@privy-io/react-auth 3.8.1 → 3.9.0-beta-20251212212932
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-Cu7enz9o.js → AccountNotFoundScreen-C1W2fcyo.js} +1 -1
- package/dist/cjs/{Address-DYZ3IQKV.js → Address-DGUdKafT.js} +1 -1
- package/dist/cjs/{AffirmativeConsentScreen-Cl_SWg16.js → AffirmativeConsentScreen-D4OJpmEg.js} +1 -1
- package/dist/cjs/{AllowlistRejectionScreen-D5b9mnX_.js → AllowlistRejectionScreen-B7rDhjpU.js} +1 -1
- package/dist/cjs/{AuthenticateWithWalletScreen-CfFbXvGY.js → AuthenticateWithWalletScreen-CtH28Vb7.js} +1 -1
- package/dist/cjs/{AwaitingEvmToSolBridgingScreen-CCdsJbKx.js → AwaitingEvmToSolBridgingScreen-DNo_etZr.js} +1 -1
- package/dist/cjs/{AwaitingExternalEthereumTransferScreen-CTI3rpHf.js → AwaitingExternalEthereumTransferScreen-B0mcg1q6.js} +1 -1
- package/dist/cjs/{AwaitingPasswordlessCodeScreen-ftedBDSO.js → AwaitingPasswordlessCodeScreen-BgOZn2kl.js} +1 -1
- package/dist/cjs/{AwaitingSolToEvmBridgingScreen-CaKyEgGQ.js → AwaitingSolToEvmBridgingScreen-Cegtmcyh.js} +1 -1
- package/dist/cjs/{BridgeNetworkSelectionView-ekW1jVoZ.js → BridgeNetworkSelectionView-DQ4AKZVL.js} +1 -1
- package/dist/cjs/{Button-BpQ22RCK.js → Button-QElvggxT.js} +1 -1
- package/dist/cjs/{CaptchaScreen-aaD10pK6.js → CaptchaScreen-KIwoUwV2.js} +1 -1
- package/dist/cjs/{CoinbaseOnrampStatusScreen-DXk7YS8-.js → CoinbaseOnrampStatusScreen-ClsWbyMu.js} +1 -1
- package/dist/cjs/{ConnectEmailForm-uUuYB04I.js → ConnectEmailForm-Cpvu7PEt.js} +1 -1
- package/dist/cjs/{ConnectLedgerScreen-BsZYPosO.js → ConnectLedgerScreen-C9nw3QVj.js} +1 -1
- package/dist/cjs/{ConnectOnlyLandingScreen-DDCcNqF9.js → ConnectOnlyLandingScreen-BOuJ1H9w.js} +1 -1
- package/dist/cjs/{ConnectOnlyStatusScreen-DyJB2X3z.js → ConnectOnlyStatusScreen-DK4bjLii.js} +1 -1
- package/dist/cjs/ConnectOrCreateScreen-YCIhmLCW.js +1 -0
- package/dist/cjs/{ConnectPhoneForm-tjeQd9v8.js → ConnectPhoneForm-BhTwbwML.js} +1 -1
- package/dist/cjs/{ConnectWalletView-CxfQTEJ2.js → ConnectWalletView-OFVLgqsD.js} +1 -1
- package/dist/cjs/{ConnectionStatusScreen-iMAYJhVc.js → ConnectionStatusScreen-BmZIqpN7.js} +1 -1
- package/dist/cjs/{CrossAppAuthScreen-CsZ_rLLg.js → CrossAppAuthScreen-BeUpL_ke.js} +1 -1
- package/dist/cjs/{CustomLandingScreenView-B0bNrKZn.js → CustomLandingScreenView-BMEITA7m.js} +2 -2
- package/dist/cjs/{DelegatedActionsConsentScreen-CyITZiB7.js → DelegatedActionsConsentScreen-D7pwtlqL.js} +1 -1
- package/dist/cjs/{DelegatedActionsRevokeScreen-vQnlP7qN.js → DelegatedActionsRevokeScreen-CjM9Sioz.js} +1 -1
- package/dist/cjs/{EmbeddedWalletConnectingScreen-D5yc0IhZ.js → EmbeddedWalletConnectingScreen-CNsU7jHP.js} +1 -1
- package/dist/cjs/{EmbeddedWalletCreatedScreen-BFJ6BKQ4.js → EmbeddedWalletCreatedScreen-D3pPFl5h.js} +1 -1
- package/dist/cjs/{EmbeddedWalletKeyExportScreen-Cz3cpL6Q.js → EmbeddedWalletKeyExportScreen-Cbxp8HfV.js} +1 -1
- package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-L4tUdjxn.js → EmbeddedWalletOnAccountCreateScreen-BawUOKbB.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-n5Z982kO.js → EmbeddedWalletPasswordUpdateScreen-CXManbsF.js} +1 -1
- package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-BJQXfJ5I.js → EmbeddedWalletPasswordUpdateSplashScreen-qQpsP_mz.js} +1 -1
- package/dist/cjs/{EnrollTotp-Bo2kHSAy.js → EnrollTotp-CRTazMDP.js} +1 -1
- package/dist/cjs/{ErrorScreen-BGI-4cUT.js → ErrorScreen-Cyi-HnSe.js} +1 -1
- package/dist/cjs/{FarcasterConnectStatusScreen-BKcQ6ZMu.js → FarcasterConnectStatusScreen-CR6ZMxx9.js} +1 -1
- package/dist/cjs/{FarcasterSignerStatusScreen-BB63F9MZ.js → FarcasterSignerStatusScreen-9YR9eiIc.js} +1 -1
- package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-DFQlLB8a.js → FundSolWalletWithExternalSolanaWallet-CQsAijyt.js} +1 -1
- package/dist/cjs/{FundWalletMethodHeader-CZ9E9Pcd.js → FundWalletMethodHeader-DSaZB2cG.js} +1 -1
- package/dist/cjs/{FundingEditAmountScreen-C8OzBV96.js → FundingEditAmountScreen-CECyNIVY.js} +1 -1
- package/dist/cjs/{FundingMethodSelectionScreen-GE2W8CGa.js → FundingMethodSelectionScreen-2tZJu9S7.js} +1 -1
- package/dist/cjs/{InAppBrowserLoginNotPossible-BDJuZ0-D.js → InAppBrowserLoginNotPossible-D0k0zJDX.js} +1 -1
- package/dist/cjs/{InstallWalletScreen-tcaVKdvZ.js → InstallWalletScreen-CmP6yADd.js} +1 -1
- package/dist/cjs/{LandingScreen-BIRSSuAB.js → LandingScreen-Cu2tjqig.js} +1 -1
- package/dist/cjs/{LinkConflictScreen-D6812iEs.js → LinkConflictScreen-B0536MT6.js} +1 -1
- package/dist/cjs/{LinkEmailScreen-D-kZRiYu.js → LinkEmailScreen-CxvkEfct.js} +1 -1
- package/dist/cjs/{LinkPasskeyScreen-Dn0beRU9.js → LinkPasskeyScreen-C5PJWoRd.js} +1 -1
- package/dist/cjs/{LinkPhoneScreen-D2wD2X6_.js → LinkPhoneScreen-CAFdBxm2.js} +1 -1
- package/dist/cjs/{LoginFailedScreen-JL8lSBDT.js → LoginFailedScreen-COhVPqkq.js} +1 -1
- package/dist/cjs/{ManualTransferScreen-rVVbGuHO.js → ManualTransferScreen-DBf-aZcN.js} +1 -1
- package/dist/cjs/{MfaAuthEnrollmentFlowScreen-7wF7sedZ.js → MfaAuthEnrollmentFlowScreen-Gnjz9u3K.js} +1 -1
- package/dist/cjs/{MfaAuthVerifyFlowScreen-DXT_z8L7.js → MfaAuthVerifyFlowScreen-DEYm-6ZO.js} +1 -1
- package/dist/cjs/{MfaEnrollmentFlowScreen-DJWHdMZL.js → MfaEnrollmentFlowScreen-DNN15QXI.js} +1 -1
- package/dist/cjs/{MfaVerifyFlowScreen-BC3Vuttf.js → MfaVerifyFlowScreen-BxkXBdCC.js} +1 -1
- package/dist/cjs/{ModalHeader-BmFtLkWJ.js → ModalHeader-BcLfp3ap.js} +1 -1
- package/dist/cjs/{MoonpayStatusScreen-DyW9zeoT.js → MoonpayStatusScreen-CflXzPye.js} +1 -1
- package/dist/cjs/{OAuthStatusScreen-FjNrpKlb.js → OAuthStatusScreen-CKAOb1-J.js} +1 -1
- package/dist/cjs/{PasskeySelectSignupOrLogin-DyHtky_y.js → PasskeySelectSignupOrLogin-CfiXMGxb.js} +1 -1
- package/dist/cjs/{PasskeyStatusScreen-Q0ag_5Jx.js → PasskeyStatusScreen-DM5bpsYR.js} +1 -1
- package/dist/cjs/{PasswordRecoveryScreen-D6vuUKqB.js → PasswordRecoveryScreen-_VPOOzJe.js} +1 -1
- package/dist/cjs/{QrCode-qgAdMqWi.js → QrCode-D0s6bMSy.js} +1 -1
- package/dist/cjs/{RecoveryOAuthStatusScreen-D1xbanmh.js → RecoveryOAuthStatusScreen-BvETyFFb.js} +1 -1
- package/dist/cjs/{RecoveryPasswordCreateScreen-DW-I4Bjp.js → RecoveryPasswordCreateScreen-BdTjGqc1.js} +1 -1
- package/dist/cjs/{RecoverySelectionScreen-CSsw-SMB.js → RecoverySelectionScreen-CBpXYztT.js} +1 -1
- package/dist/cjs/{Screen-BAXdSOJk.js → Screen-BDXOD3ca.js} +1 -1
- package/dist/cjs/{ScreenLayout-95K6C4n8.js → ScreenLayout-Bolj7ZKh.js} +1 -1
- package/dist/cjs/{SetAutomaticRecoveryScreen-DdYvhBam.js → SetAutomaticRecoveryScreen-DpsqqlQy.js} +1 -1
- package/dist/cjs/{SetWalletPasswordForm-D7TN70-K.js → SetWalletPasswordForm-D4BBkjST.js} +1 -1
- package/dist/cjs/{SignRequestScreen-B6DzD2bf.js → SignRequestScreen-CnKp7Qy1.js} +1 -1
- package/dist/cjs/{StandardSignAndSendTransactionScreen-Cl_1GhiF.js → StandardSignAndSendTransactionScreen-DqmwzL-5.js} +1 -1
- package/dist/cjs/{TelegramAuthScreen-D32WGqrh.js → TelegramAuthScreen-BkWQJqdn.js} +1 -1
- package/dist/cjs/{TransactionDetails-B4mP9iqk.js → TransactionDetails-Da0Tpo_k.js} +1 -1
- package/dist/cjs/{TransactionErrorView-BPMOzuyp.js → TransactionErrorView-DAmbVGy2.js} +1 -1
- package/dist/cjs/{TransferFromWalletScreen-BbJ3ISYt.js → TransferFromWalletScreen-CFe0X_NF.js} +1 -1
- package/dist/cjs/{TransferOrBridgeLoadingScreen-DsBPxxqR.js → TransferOrBridgeLoadingScreen-DF7kw9zr.js} +1 -1
- package/dist/cjs/{UpdateEmailScreen-fqqg8VfP.js → UpdateEmailScreen-Kwl7tG4l.js} +1 -1
- package/dist/cjs/{UpdatePhoneScreen-BJDovBOR.js → UpdatePhoneScreen-44FR5anq.js} +1 -1
- package/dist/cjs/{UserLimitReachedScreen-CSkM5uLj.js → UserLimitReachedScreen-ojZueqmT.js} +1 -1
- package/dist/cjs/{WalletButtonList-jzt0Egd8.js → WalletButtonList-DLB8T0RX.js} +1 -1
- package/dist/cjs/{WalletInfoCard-bdaI4ebq.js → WalletInfoCard-5UbicbMB.js} +1 -1
- package/dist/cjs/{WalletInterstitialScreen-BzSNp3dA.js → WalletInterstitialScreen-DAgZQaZB.js} +1 -1
- package/dist/cjs/{WalletLink-2kOfC5R5.js → WalletLink-B5xI6wVT.js} +1 -1
- package/dist/cjs/abstract-smart-wallets.js +1 -1
- package/dist/cjs/context-WcHVngsl.js +1 -0
- package/dist/cjs/{ethers-Djy--MKt.js → ethers-DbIujY7-.js} +1 -1
- package/dist/cjs/extended-chains.js +1 -1
- package/dist/cjs/farcaster.js +1 -1
- package/dist/cjs/{frame-BSQIYvLs.js → frame-B14fp9oC.js} +1 -1
- package/dist/cjs/{get-is-unified-wallet-CAK7Zx3C.js → get-is-unified-wallet-wZ72VTZL.js} +1 -1
- package/dist/cjs/{getErc20Balance-BiXU_58s.js → getErc20Balance-DknCauCO.js} +1 -1
- package/dist/cjs/{getErc20TokenInfo-B78AxnZ3.js → getErc20TokenInfo-CBduyYx4.js} +1 -1
- package/dist/cjs/{getPublicClient-d-gCTRgH.js → getPublicClient-CGlodIp_.js} +1 -1
- package/dist/cjs/index-DC9qNqKe.js +5 -0
- package/dist/cjs/{index-BqAmClyL.js → index-DDm5kac-.js} +1 -1
- package/dist/cjs/{index-CBf8l7UH.js → index-DZwAWF8d.js} +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/internal-context-NWsAL807.js +1 -0
- package/dist/cjs/internal.js +1 -1
- package/dist/cjs/prepareFundingModalData-CM8ukvbz.js +1 -0
- package/dist/cjs/{reservoir-DLqCfAka.js → reservoir-CQGyEBb7.js} +1 -1
- package/dist/cjs/{shared-LnNw37YZ.js → shared-CV6uFlbd.js} +1 -1
- package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-D8TmPfTs.js → shouldProceedtoEmbeddedWalletCreationFlow-DemSlJUp.js} +1 -1
- package/dist/cjs/{smart-wallets-BxBo7Rwr.js → smart-wallets-Lspn5i9s.js} +1 -1
- package/dist/cjs/smart-wallets.js +1 -1
- package/dist/cjs/solana.js +1 -1
- package/dist/cjs/{to-ui-error-DQR0PH1r.js → to-ui-error-BJpQLLfd.js} +1 -1
- package/dist/cjs/ui.js +1 -1
- package/dist/cjs/{use-create-wallet-without-fallback-DVsaEUAi.js → use-create-wallet-without-fallback-CnS2odqx.js} +1 -1
- package/dist/cjs/{use-export-wallet-Bp3Q263k.js → use-export-wallet-C5Fb5bFu.js} +1 -1
- package/dist/cjs/{use-sign-with-user-signer-H6aAias8.js → use-sign-with-user-signer-BcAsQTGF.js} +1 -1
- package/dist/cjs/{useActiveWallet-rCbIz7HK.js → useActiveWallet-CXspRD1P.js} +1 -1
- package/dist/cjs/{useGetSolPrice-mb9rbK56.js → useGetSolPrice-C986iVoO.js} +1 -1
- package/dist/cjs/{useGetTokenPrice-BXSjabMV.js → useGetTokenPrice-COGokVcE.js} +1 -1
- package/dist/cjs/{useI18n-DnOEBAdg.js → useI18n-Cs1I7xTm.js} +1 -1
- package/dist/cjs/usePrivy-DH2ITnCQ.js +1 -0
- package/dist/cjs/{useSolanaRpcClient-BSb_hq8i.js → useSolanaRpcClient-CcJs2x9f.js} +1 -1
- package/dist/cjs/{useWalletBalance-9yRQYIAe.js → useWalletBalance-BVb8F3RO.js} +1 -1
- package/dist/cjs/{useWallets-dr024nCy.js → useWallets-BFvRErfm.js} +1 -1
- package/dist/cjs/{useWallets-D6t7Ii2K.js → useWallets-jLpT3nOf.js} +1 -1
- package/dist/dts/{events-context-Bt8hY3AJ.d.ts → events-context-D8iPaW-H.d.mts} +1 -1
- package/dist/dts/{events-context-Bt8hY3AJ.d.mts → events-context-D8iPaW-H.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 +4 -4
- package/dist/dts/index.d.ts +4 -4
- 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-Dx2VbdX1.d.mts → types-diVZpIb-.d.mts} +10 -3
- package/dist/dts/{types-Dx2VbdX1.d.ts → types-diVZpIb-.d.ts} +10 -3
- package/dist/dts/ui.d.mts +1 -1
- package/dist/dts/ui.d.ts +1 -1
- package/dist/esm/{AccountNotFoundScreen-DQR0FatT.mjs → AccountNotFoundScreen-BzlsVk3E.mjs} +1 -1
- package/dist/esm/{Address-C1iw9r70.mjs → Address-yr-IopMB.mjs} +1 -1
- package/dist/esm/{AffirmativeConsentScreen-BU4I5ISJ.mjs → AffirmativeConsentScreen-DkgWeZ_J.mjs} +1 -1
- package/dist/esm/{AllowlistRejectionScreen-WgcCN6CH.mjs → AllowlistRejectionScreen-rYOJHwfe.mjs} +1 -1
- package/dist/esm/{AuthenticateWithWalletScreen-D6Zy69An.mjs → AuthenticateWithWalletScreen-CkxHgH4i.mjs} +1 -1
- package/dist/esm/{AwaitingEvmToSolBridgingScreen-ByIVuwRF.mjs → AwaitingEvmToSolBridgingScreen-BWZ-wh0M.mjs} +1 -1
- package/dist/esm/{AwaitingExternalEthereumTransferScreen-Bq0rCErj.mjs → AwaitingExternalEthereumTransferScreen-DbIN3EKS.mjs} +1 -1
- package/dist/esm/{AwaitingPasswordlessCodeScreen-itJ4854u.mjs → AwaitingPasswordlessCodeScreen-C5zFT5_8.mjs} +1 -1
- package/dist/esm/{AwaitingSolToEvmBridgingScreen-BSxfnQcf.mjs → AwaitingSolToEvmBridgingScreen-Cr4qsHWY.mjs} +1 -1
- package/dist/esm/{BridgeNetworkSelectionView-DXjTVIcQ.mjs → BridgeNetworkSelectionView-DvYzBNcx.mjs} +1 -1
- package/dist/esm/{Button-OlK_6fKk.mjs → Button-BGdXsfbI.mjs} +1 -1
- package/dist/esm/{CaptchaScreen-BBjPbV4B.mjs → CaptchaScreen-Cm9qqF-6.mjs} +1 -1
- package/dist/esm/{CoinbaseOnrampStatusScreen-CZpfBNiz.mjs → CoinbaseOnrampStatusScreen-CmX3D7il.mjs} +1 -1
- package/dist/esm/{ConnectEmailForm-C2TJPUYV.mjs → ConnectEmailForm-Bth5xsJK.mjs} +1 -1
- package/dist/esm/{ConnectLedgerScreen-TCVn5s4x.mjs → ConnectLedgerScreen-ISKD8Msf.mjs} +1 -1
- package/dist/esm/{ConnectOnlyLandingScreen-CjVJO9uh.mjs → ConnectOnlyLandingScreen-Bm8VrsST.mjs} +1 -1
- package/dist/esm/{ConnectOnlyStatusScreen-BGJ4l52n.mjs → ConnectOnlyStatusScreen-2kQJ9RM2.mjs} +1 -1
- package/dist/esm/ConnectOrCreateScreen-BCwMWyuI.mjs +1 -0
- package/dist/esm/{ConnectPhoneForm-kW8tUq0-.mjs → ConnectPhoneForm-DBvRusd4.mjs} +1 -1
- package/dist/esm/ConnectWalletView-6VokbyOr.mjs +1 -0
- package/dist/esm/{ConnectionStatusScreen-B3NfUQx_.mjs → ConnectionStatusScreen-CdTfe93C.mjs} +1 -1
- package/dist/esm/{CrossAppAuthScreen-CnvB1lhx.mjs → CrossAppAuthScreen-BTo6-pn-.mjs} +1 -1
- package/dist/esm/CustomLandingScreenView-BNZtDY8q.mjs +2 -0
- package/dist/esm/{DelegatedActionsConsentScreen-DeBkGN9b.mjs → DelegatedActionsConsentScreen-DKTTJRC4.mjs} +1 -1
- package/dist/esm/{DelegatedActionsRevokeScreen-CTgPXrqu.mjs → DelegatedActionsRevokeScreen-Bc0pjFZb.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletConnectingScreen-Qu9cmWzJ.mjs → EmbeddedWalletConnectingScreen-BRHQSNLs.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletCreatedScreen-DFciR3k8.mjs → EmbeddedWalletCreatedScreen-CVkkyV1q.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletKeyExportScreen-CEo3FI_N.mjs → EmbeddedWalletKeyExportScreen-souOGCpG.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-C7cawTmQ.mjs → EmbeddedWalletOnAccountCreateScreen-pATMOIdC.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-GdNNmtZR.mjs → EmbeddedWalletPasswordUpdateScreen-B_2nRtJK.mjs} +1 -1
- package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-BNOCuoES.mjs → EmbeddedWalletPasswordUpdateSplashScreen-DC0m1YqY.mjs} +1 -1
- package/dist/esm/{EnrollTotp-CtNw20-I.mjs → EnrollTotp-DBtXbrmN.mjs} +1 -1
- package/dist/esm/{ErrorScreen-NoHFWbKU.mjs → ErrorScreen-BT6kRegh.mjs} +1 -1
- package/dist/esm/FarcasterConnectStatusScreen-DeX21V2U.mjs +1 -0
- package/dist/esm/{FarcasterSignerStatusScreen-MQ2QrijY.mjs → FarcasterSignerStatusScreen-DjDF7M3x.mjs} +1 -1
- package/dist/esm/{FundSolWalletWithExternalSolanaWallet-DVaHCgDh.mjs → FundSolWalletWithExternalSolanaWallet-CQCuKKUv.mjs} +1 -1
- package/dist/esm/{FundWalletMethodHeader-RY6-H-Ry.mjs → FundWalletMethodHeader-CuTZ50v9.mjs} +1 -1
- package/dist/esm/{FundingEditAmountScreen-DiZ2-4XS.mjs → FundingEditAmountScreen-DA3nETVC.mjs} +1 -1
- package/dist/esm/{FundingMethodSelectionScreen-yZenKs6o.mjs → FundingMethodSelectionScreen-Cl2Q20C1.mjs} +1 -1
- package/dist/esm/{InAppBrowserLoginNotPossible-CTnPeOBa.mjs → InAppBrowserLoginNotPossible-DNAwsnTl.mjs} +1 -1
- package/dist/esm/{InstallWalletScreen-CBxWJiQf.mjs → InstallWalletScreen-CWnE7vnq.mjs} +1 -1
- package/dist/esm/LandingScreen-DxyFLgbb.mjs +1 -0
- package/dist/esm/{LinkConflictScreen-BnoDRUE0.mjs → LinkConflictScreen-mdWjrw4c.mjs} +1 -1
- package/dist/esm/{LinkEmailScreen-x_TPODcx.mjs → LinkEmailScreen-DIPP5Qni.mjs} +1 -1
- package/dist/esm/{LinkPasskeyScreen-D9IfHaec.mjs → LinkPasskeyScreen-ThpOshKf.mjs} +1 -1
- package/dist/esm/{LinkPhoneScreen-DaK-7otl.mjs → LinkPhoneScreen-rAq6W4BG.mjs} +1 -1
- package/dist/esm/{LoginFailedScreen-CoukYLVP.mjs → LoginFailedScreen-BXxeN2zX.mjs} +1 -1
- package/dist/esm/{ManualTransferScreen-DdumQnbt.mjs → ManualTransferScreen-Lvm8KD2W.mjs} +1 -1
- package/dist/esm/{MfaAuthEnrollmentFlowScreen-BsRpCR72.mjs → MfaAuthEnrollmentFlowScreen-CO2wD8m4.mjs} +1 -1
- package/dist/esm/{MfaAuthVerifyFlowScreen-Cr92F0yT.mjs → MfaAuthVerifyFlowScreen-BJ6-SZiF.mjs} +1 -1
- package/dist/esm/{MfaEnrollmentFlowScreen-CXyaDU1D.mjs → MfaEnrollmentFlowScreen-B3urEFgN.mjs} +1 -1
- package/dist/esm/{MfaVerifyFlowScreen-ghKHn2BT.mjs → MfaVerifyFlowScreen-Ds1oHXcL.mjs} +1 -1
- package/dist/esm/{ModalHeader-CxHK1IKF.mjs → ModalHeader-QHPmjFNo.mjs} +1 -1
- package/dist/esm/{MoonpayStatusScreen-DhMZLroP.mjs → MoonpayStatusScreen-CZG4vGlx.mjs} +1 -1
- package/dist/esm/{OAuthStatusScreen-BFVDc4G4.mjs → OAuthStatusScreen-Ds4YHlqV.mjs} +1 -1
- package/dist/esm/{PasskeySelectSignupOrLogin-Dvxli58H.mjs → PasskeySelectSignupOrLogin-BjefL5Sg.mjs} +1 -1
- package/dist/esm/{PasskeyStatusScreen-c9nu4s_d.mjs → PasskeyStatusScreen-DsgPquPG.mjs} +1 -1
- package/dist/esm/{PasswordRecoveryScreen-CsdO4G6h.mjs → PasswordRecoveryScreen-CEytJb4j.mjs} +1 -1
- package/dist/esm/{QrCode-BI2LxLLg.mjs → QrCode-DYm8DzfO.mjs} +1 -1
- package/dist/esm/{RecoveryOAuthStatusScreen-Dp7fnj5t.mjs → RecoveryOAuthStatusScreen-DRKjGnJC.mjs} +1 -1
- package/dist/esm/{RecoveryPasswordCreateScreen-DdzD09T3.mjs → RecoveryPasswordCreateScreen-DSvqTOh4.mjs} +1 -1
- package/dist/esm/{RecoverySelectionScreen-D2nDGt4R.mjs → RecoverySelectionScreen-hH9LThp9.mjs} +1 -1
- package/dist/esm/{Screen-Dzz_AFFs.mjs → Screen-CWSnJQQ_.mjs} +1 -1
- package/dist/esm/{ScreenLayout-pthdsODa.mjs → ScreenLayout-CUnsRpZP.mjs} +1 -1
- package/dist/esm/{SetAutomaticRecoveryScreen-g1kDOe61.mjs → SetAutomaticRecoveryScreen-Df5GT1nk.mjs} +1 -1
- package/dist/esm/{SetWalletPasswordForm-DUTEhc4R.mjs → SetWalletPasswordForm-DVIMtdiG.mjs} +1 -1
- package/dist/esm/{SignRequestScreen-DjLHkDxK.mjs → SignRequestScreen-CxefKveW.mjs} +1 -1
- package/dist/esm/{StandardSignAndSendTransactionScreen-CFqthHKF.mjs → StandardSignAndSendTransactionScreen-jFi5e18-.mjs} +1 -1
- package/dist/esm/{TelegramAuthScreen-B5uYbdxP.mjs → TelegramAuthScreen-BVJcbU6W.mjs} +1 -1
- package/dist/esm/{TransactionDetails-DITlhQNk.mjs → TransactionDetails-Bc22QvDx.mjs} +1 -1
- package/dist/esm/{TransactionErrorView-DmFbjQHi.mjs → TransactionErrorView-C1vRGAqn.mjs} +1 -1
- package/dist/esm/{TransferFromWalletScreen-Dvp-YNqS.mjs → TransferFromWalletScreen-Be38QQ4h.mjs} +1 -1
- package/dist/esm/{TransferOrBridgeLoadingScreen-CFRKffkj.mjs → TransferOrBridgeLoadingScreen-CwlvhVb6.mjs} +1 -1
- package/dist/esm/{UpdateEmailScreen-DoDVvVCw.mjs → UpdateEmailScreen-B5J0E6kb.mjs} +1 -1
- package/dist/esm/{UpdatePhoneScreen-BoEnTnCl.mjs → UpdatePhoneScreen-C1HOHXOX.mjs} +1 -1
- package/dist/esm/{UserLimitReachedScreen-68Vv3bFU.mjs → UserLimitReachedScreen-D-zVOlb8.mjs} +1 -1
- package/dist/esm/{WalletButtonList-C1OqZHCA.mjs → WalletButtonList-8WEh4_jp.mjs} +1 -1
- package/dist/esm/{WalletInfoCard-DmIqX_B8.mjs → WalletInfoCard-MF3MtEmQ.mjs} +1 -1
- package/dist/esm/{WalletInterstitialScreen-Du_L0CK7.mjs → WalletInterstitialScreen-1gCTcafs.mjs} +1 -1
- package/dist/esm/{WalletLink-D2x4SkPO.mjs → WalletLink-YnR_-97O.mjs} +1 -1
- package/dist/esm/abstract-smart-wallets.mjs +1 -1
- package/dist/esm/context-DiNfuFGT.mjs +1 -0
- package/dist/esm/{ethers-oRuqwv5W.mjs → ethers-DIoYcpjG.mjs} +1 -1
- package/dist/esm/extended-chains.mjs +1 -1
- package/dist/esm/farcaster.mjs +1 -1
- package/dist/esm/{frame-BMn1PaPp.mjs → frame-CwE9r3cT.mjs} +1 -1
- package/dist/esm/{get-is-unified-wallet-DXko-EzF.mjs → get-is-unified-wallet-K0mTk9yp.mjs} +1 -1
- package/dist/esm/{getErc20Balance-Cl5jZN3g.mjs → getErc20Balance-CaKjNAs9.mjs} +1 -1
- package/dist/esm/{getErc20TokenInfo-wBcf5dYY.mjs → getErc20TokenInfo-BFoeg5F6.mjs} +1 -1
- package/dist/esm/{getPublicClient-C_l_ocJu.mjs → getPublicClient-A9RSftUZ.mjs} +1 -1
- package/dist/esm/{index-Ce4cEnEO.mjs → index-BWOKHYTy.mjs} +1 -1
- package/dist/esm/{index-BctMJtH0.mjs → index-CFRKlMDE.mjs} +1 -1
- package/dist/esm/index-lYmwKGIx.mjs +5 -0
- package/dist/esm/index.mjs +1 -1
- package/dist/esm/{internal-context-DLZicboG.mjs → internal-context-e-Eni5bG.mjs} +1 -1
- package/dist/esm/internal.mjs +1 -1
- package/dist/esm/prepareFundingModalData-WE6JA8F4.mjs +1 -0
- package/dist/esm/{reservoir-DRNnyqld.mjs → reservoir-kvLjIrEo.mjs} +1 -1
- package/dist/esm/{shared-BMOp6N9y.mjs → shared-MHIQ423d.mjs} +1 -1
- package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-DVwf2mAj.mjs → shouldProceedtoEmbeddedWalletCreationFlow-CqO4vU4u.mjs} +1 -1
- package/dist/esm/{smart-wallets-B3-1-dnO.mjs → smart-wallets-D5JfcVKT.mjs} +1 -1
- package/dist/esm/smart-wallets.mjs +1 -1
- package/dist/esm/solana.mjs +1 -1
- package/dist/esm/{to-ui-error-B8DSJO-0.mjs → to-ui-error-BRKruPsR.mjs} +1 -1
- package/dist/esm/ui.mjs +1 -1
- package/dist/esm/{use-create-wallet-without-fallback-COqi_EHH.mjs → use-create-wallet-without-fallback-CHBqJaDR.mjs} +1 -1
- package/dist/esm/{use-export-wallet-CRKJ4-yx.mjs → use-export-wallet-BrdknVyy.mjs} +1 -1
- package/dist/esm/{use-sign-with-user-signer-J1po7l19.mjs → use-sign-with-user-signer-eEm9Olt_.mjs} +1 -1
- package/dist/esm/{useActiveWallet-Bj-s666H.mjs → useActiveWallet-CP0uCd2v.mjs} +1 -1
- package/dist/esm/{useGetSolPrice-fF6UX0Cj.mjs → useGetSolPrice-Cfm8o9C5.mjs} +1 -1
- package/dist/esm/{useGetTokenPrice-CnQZmfvQ.mjs → useGetTokenPrice-CSolUboj.mjs} +1 -1
- package/dist/esm/{useI18n-DIAzggWr.mjs → useI18n-CWj3uwjJ.mjs} +1 -1
- package/dist/esm/usePrivy-B07VkOGc.mjs +1 -0
- package/dist/esm/{useSolanaRpcClient-Be5Dd6m5.mjs → useSolanaRpcClient-Cj4b2UVF.mjs} +1 -1
- package/dist/esm/{useWalletBalance-BuMx9pCk.mjs → useWalletBalance-CkNw6kj0.mjs} +1 -1
- package/dist/esm/{useWallets-Cc1ILfGS.mjs → useWallets-D4Q4lJPh.mjs} +1 -1
- package/dist/esm/{useWallets-DuxHKVvE.mjs → useWallets-DltUT6WJ.mjs} +1 -1
- package/package.json +6 -6
- package/dist/cjs/ConnectOrCreateScreen-Dfoq-0pD.js +0 -1
- package/dist/cjs/context-CToLw7Dr.js +0 -1
- package/dist/cjs/index-DKxtLOTJ.js +0 -5
- package/dist/cjs/internal-context-D80qA_jS.js +0 -1
- package/dist/cjs/prepareFundingModalData-BhY38T4k.js +0 -1
- package/dist/cjs/usePrivy-fmKLKsT3.js +0 -1
- package/dist/esm/ConnectOrCreateScreen-CZDi1Oaj.mjs +0 -1
- package/dist/esm/ConnectWalletView-tpdAD3K7.mjs +0 -1
- package/dist/esm/CustomLandingScreenView-DZTOg8z4.mjs +0 -2
- package/dist/esm/FarcasterConnectStatusScreen-CiN00CmD.mjs +0 -1
- package/dist/esm/LandingScreen-CzhCoUSE.mjs +0 -1
- package/dist/esm/context-B4VZqX5H.mjs +0 -1
- package/dist/esm/index-CCrVHfyv.mjs +0 -5
- package/dist/esm/prepareFundingModalData-CndHQFiM.mjs +0 -1
- package/dist/esm/usePrivy-BSIhOAz8.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("@heroicons/react/24/outline"),r=require("react"),n=require("styled-components"),i=require("@privy-io/js-sdk-core"),o=require("./Button-BpQ22RCK.js"),l=require("./ModalHeader-BmFtLkWJ.js"),t=require("./Value-C-XtZyFa.js"),a=require("./Row-CxDF-VMy.js"),d=require("./ErrorMessage-f0cRWc29.js"),c=require("./LabelXs-CYMv6rOZ.js"),x=require("./Subtitle-Dtmrw8l5.js"),h=require("./Title-C-tHJvrb.js"),u=require("./Address-DYZ3IQKV.js"),m=require("./WalletInfoCard-bdaI4ebq.js"),j=require("./context-CToLw7Dr.js"),p=require("./useActiveWallet-rCbIz7HK.js"),g=require("./LoadingSkeleton-DoCrfGnl.js"),b=require("viem"),f=require("./shared-BPGwTh8c.js"),w=require("./Checkbox-DXPQZFlQ.js"),y=require("./ErrorBanner-CMjaobRI.js"),S=require("./WarningBanner-B_Gs_15p.js"),k=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),v=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),I=require("@heroicons/react/24/outline/ExclamationCircleIcon"),L=require("./internal-context-D80qA_jS.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=/*#__PURE__*/C(k),A=/*#__PURE__*/C(v),T=/*#__PURE__*/C(I);const V=/*#__PURE__*/n.styled(t.LabelSm).withConfig({displayName:"InteractiveLabel",componentId:"sc-b57d0824-0"})(["cursor:pointer;display:inline-flex;gap:8px;align-items:center;color:var(--privy-color-accent);svg{fill:var(--privy-color-accent);}"]);var N=({iconUrl:s,value:r,symbol:n,usdValue:i,nftName:o,nftCount:l,decimals:t,$isLoading:a})=>{if(a)/*#__PURE__*/return e.jsx(M,{$isLoading:a});let d=r&&i&&t?function(e,s,r){let n=parseFloat(e),i=parseFloat(r);if(0===n||0===i||Number.isNaN(n)||Number.isNaN(i))return e;let o=Math.ceil(-Math.log10(.01/(i/n))),l=Math.pow(10,o=Math.max(o=Math.min(o,s),1)),t=+(Math.floor(n*l)/l).toFixed(o).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:s}).format(t)}(r,t,i):r;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(M,{$isLoading:a,children:[s&&/*#__PURE__*/e.jsx(F,{src:s,alt:"Token icon"}),l&&l>1?l+"x":void 0," ",o,d," ",n]}),i&&/*#__PURE__*/e.jsxs(E,{$isLoading:a,children:["$",i]})]})};let M=/*#__PURE__*/n.styled.span.withConfig({displayName:"Value",componentId:"sc-991db279-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);const E=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subvalue",componentId:"sc-991db279-1"})(["color:var(--privy-color-foreground-2);font-size:12px;font-weight:400;line-height:18px;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);let F=/*#__PURE__*/n.styled.img.withConfig({displayName:"TokenIcon",componentId:"sc-991db279-2"})(["height:14px;width:14px;margin-right:4px;object-fit:contain;"]);const q=s=>{let{chain:r,transactionDetails:n,isTokenContractInfoLoading:i,symbol:o}=s,{action:l,functionName:d}=n;/*#__PURE__*/return e.jsx(f.Box,{children:/*#__PURE__*/e.jsxs(a.Rows,{children:["transaction"!==l&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Action"}),/*#__PURE__*/e.jsx(t.Value,{children:d})]}),"mint"===d&&"args"in n&&n.args.filter((e=>e)).map(((s,n)=>/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:`Param ${n}`}),/*#__PURE__*/e.jsx(t.Value,{children:"string"==typeof s&&b.isAddress(s)?/*#__PURE__*/e.jsx(u.Address,{address:s,url:r?.blockExplorers?.default?.url,showCopyIcon:!1}):s?.toString()})]},n))),"setApprovalForAll"===d&&n.operator&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Operator"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.operator,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===d&&void 0!==n.approved&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Set approval to"}),/*#__PURE__*/e.jsx(t.Value,{children:n.approved?"true":"false"})]}),"transfer"===d||"transferFrom"===d||"safeTransferFrom"===d||"approve"===d?/*#__PURE__*/e.jsxs(e.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{$isLoading:i,children:[n.formattedAmount," ",o]})]}),"tokenId"in n&&n.tokenId&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token ID"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===d&&/*#__PURE__*/e.jsxs(e.Fragment,{children:["amounts"in n&&n.amounts&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amounts"}),/*#__PURE__*/e.jsx(t.Value,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token IDs"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenIds.join(", ")})]})]}),"approve"===d&&n.spender&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.spender,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferFrom&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring from"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferFrom,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferTo&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring to"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferTo,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},$=({variant:s,setPreventMaliciousTransaction:r,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===s?/*#__PURE__*/e.jsx(D,{children:/*#__PURE__*/e.jsxs(S.WarningBanner,{theme:n,children:[/*#__PURE__*/e.jsx("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===s?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(D,{children:[/*#__PURE__*/e.jsx(y.ErrorBanner,{theme:n,children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/e.jsxs(O,{children:[/*#__PURE__*/e.jsx(w.Checkbox,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>r(!i)}),/*#__PURE__*/e.jsx("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let D=/*#__PURE__*/n.styled.div.withConfig({displayName:"BannerContainer",componentId:"sc-ab8a5a0b-0"})(["margin-top:1.5rem;"]),O=/*#__PURE__*/n.styled.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-ab8a5a0b-1"})(["display:flex;align-items:center;gap:0.5rem;margin-top:0.75rem;"]);const B=({transactionIndex:e,maxIndex:s})=>"number"!=typeof e||0===s?"":` (${e+1} / ${s+1})`;let P=/*#__PURE__*/n.styled(m.WalletInfoCard).withConfig({displayName:"StyledWalletInfoCard",componentId:"sc-cbe5ab37-0"})(["",""],(e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;")),X=/*#__PURE__*/n.styled(a.Rows).withConfig({displayName:"InstructionRows",componentId:"sc-cbe5ab37-1"})(["margin-top:0.5rem;border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-sm);padding:0.5rem;"]),W="There was an error preparing your transaction. Your transaction request will likely fail.",z=/*#__PURE__*/n.styled.div.withConfig({displayName:"ImageContainer",componentId:"sc-cbe5ab37-2"})(["display:flex;width:100%;justify-content:center;max-height:40px;> img{object-fit:contain;border-radius:var(--privy-border-radius-sm);}"]),H=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredRow",componentId:"sc-cbe5ab37-3"})(["display:inline-flex;align-items:center;gap:0.3rem;"]),U=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredText",componentId:"sc-cbe5ab37-4"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]);let G=()=>/*#__PURE__*/e.jsxs(K,{children:[/*#__PURE__*/e.jsx(_,{}),/*#__PURE__*/e.jsx(Z,{})]});let J=/*#__PURE__*/n.styled.div.withConfig({displayName:"TransactionErrorScreenContainer",componentId:"sc-d58f10e6-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;"]),Q=/*#__PURE__*/n.styled.span.withConfig({displayName:"ErrorCode",componentId:"sc-d58f10e6-1"})(["color:var(--privy-color-foreground);text-align:center;font-size:1.125rem;font-weight:500;line-height:1.25rem;text-align:center;margin:10px;"]),Y=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-d58f10e6-2"})(["margin-top:4px;margin-bottom:10px;color:var(--privy-color-foreground-3);text-align:center;font-size:0.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;"]),K=/*#__PURE__*/n.styled.div.withConfig({displayName:"CircleContainer",componentId:"sc-d58f10e6-3"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),Z=/*#__PURE__*/n.styled(T.default).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-d58f10e6-4"})(["position:absolute;width:35px;height:35px;color:var(--privy-color-error);"]),_=/*#__PURE__*/n.styled.div.withConfig({displayName:"StyledRedCircle",componentId:"sc-d58f10e6-5"})(["position:absolute;width:60px;height:60px;border-radius:50%;background-color:var(--privy-color-error);opacity:0.1;"]),ee=/*#__PURE__*/n.styled(o.PrimaryButton).withConfig({displayName:"RetryButton",componentId:"sc-d58f10e6-6"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),se=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBoxTitle",componentId:"sc-d58f10e6-7"})(["width:100%;text-align:left;font-size:0.825rem;color:var(--privy-color-foreground);padding:4px;"]),re=/*#__PURE__*/n.styled.div.withConfig({displayName:"TextBoxContainer",componentId:"sc-d58f10e6-8"})(["width:100%;margin:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;"]),ne=/*#__PURE__*/n.styled.text.withConfig({displayName:"HelperText",componentId:"sc-d58f10e6-9"})(["position:relative;width:100%;padding:5px;font-size:0.8rem;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;"]),ie=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBox",componentId:"sc-d58f10e6-10"})(["position:relative;width:100%;background-color:var(--privy-color-background-2);padding:8px 12px;border-radius:10px;margin-top:5px;font-size:14px;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;",""],(e=>e.$clickable&&"cursor: pointer;\n transition: background-color 0.3s;\n padding-right: 45px;\n\n &:hover {\n background-color: var(--privy-color-foreground-4);\n }")),oe=/*#__PURE__*/n.styled(A.default).withConfig({displayName:"StyledClipboardIcon",componentId:"sc-d58f10e6-11"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),le=/*#__PURE__*/n.styled(R.default).withConfig({displayName:"StyledClipboardCheckIcon",componentId:"sc-d58f10e6-12"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),te=({clicked:s})=>s?/*#__PURE__*/e.jsx(le,{}):/*#__PURE__*/e.jsx(oe,{});exports.SendSolanaTransactionScreenView=({img:n,title:m,subtitle:g,cta:b,instructions:f,network:w,blockExplorerUrl:y,isMissingFunds:S,submitError:k,parseError:v,total:I,swap:L,transactingWalletAddress:C,fee:R,balance:A,disabled:T,isSubmitting:N,isPreparing:M,isTokenPriceLoading:E,onClick:F,onClose:q,onBack:$,isSponsored:D})=>{let O=M||E,[B,G]=r.useState(!1),J=j.useAppConfig();/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:q,backFn:$}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsx(h.Title,{style:{marginTop:n?"1.5rem":0},children:m}),/*#__PURE__*/e.jsx(x.Subtitle,{children:g}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(I||O)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:I})]}),L&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Swap"}),/*#__PURE__*/e.jsx(t.Value,{children:L})]}),w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:w})]}),(R||O||void 0!==D)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:D&&!O?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",J.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):R})]})]}),/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>G((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(s.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:B?"rotate(180deg)":void 0}})]})}),B&&/*#__PURE__*/e.jsx(e.Fragment,{children:f.map(((s,r)=>"sol-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:s.token.decimals})," ",s.token.symbol]})]}),!!s.toAccount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAccount,url:y})})]})]},r):"spl-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.token.symbol]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.value.toString()})]}),!!s.fromAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.fromAta,url:y})})]}),!!s.toAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAta,url:y})})]}),!!s.token.address&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.token.address,url:y})})]})]},r):"ata-creation"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"create-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Create account ",s.withSeed?"with seed":""]})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:9})," SOL"]})]})]},r):"spl-init-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Initialize token account"})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),!!s.mint&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Mint"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mint,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-close-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Close token account"})}),!!s.source&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.source,url:y})})]}),!!s.destination&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.destination,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-sync-native"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]})]},r):"raydium-swap-base-input"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.minimumAmountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"raydium-swap-base-output"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Max amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-shared-accounts-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"In amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedOutAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-exact-out-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.outAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Data"}),/*#__PURE__*/e.jsx(t.Value,{children:s.discriminator})]})]},r)))}),/*#__PURE__*/e.jsx(p.Grow,{}),k?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:k.message}):v?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:W}):null,/*#__PURE__*/e.jsx(P,{$useSmallMargins:!(!v&&!k),title:"",address:C,balance:A,errMsg:M||v||k||!S?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(o.PrimaryButton,{style:{marginTop:"1rem"},loading:N,disabled:T||M,onClick:F,children:b}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.SendTransactionScreenView=({img:n,submitError:i,prepareError:c,onClose:m,action:g,title:b,subtitle:f,to:w,tokenAddress:y,network:S,missingFunds:k,fee:v,from:I,cta:L,disabled:C,chain:R,isSubmitting:A,isPreparing:T,isTokenPriceLoading:M,isTokenContractInfoLoading:E,isSponsored:F,symbol:D,balance:O,onClick:X,transactionDetails:G,transactionIndex:J,maxIndex:Q,onBack:Y,chainName:K,validation:Z,hasScanDetails:_,setIsScanDetailsOpen:ee,preventMaliciousTransaction:se,setPreventMaliciousTransaction:re,tokensSent:ne,tokensReceived:ie,isScanning:oe,isCancellable:le,functionName:te})=>{let{showTransactionDetails:ae,setShowTransactionDetails:de,hasMoreDetails:ce,isErc20Ish:xe}=(e=>{let[s,n]=r.useState(!1),i=!0,o=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(i=!1),i&&(o=Object.entries(e||{}).some((([e,s])=>s&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:s,setShowTransactionDetails:n,hasMoreDetails:i&&o,isErc20Ish:e?.isErc20Ish}})(G),he=j.useAppConfig(),ue=xe&&E||T||M||oe;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:m,backFn:Y}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsxs(h.Title,{style:{marginTop:n?"1.5rem":0},children:[b,/*#__PURE__*/e.jsx(B,{maxIndex:Q,transactionIndex:J})]}),/*#__PURE__*/e.jsx(x.Subtitle,{children:f}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem"},children:[(!!ne[0]||ue)&&/*#__PURE__*/e.jsxs(a.Row,{children:[ie.length>0?/*#__PURE__*/e.jsx(t.LabelSm,{children:"Send"}):/*#__PURE__*/e.jsx(t.LabelSm,{children:"approve"===g?"Approval amount":"Amount"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ne.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:"setApprovalForAll"===te?"All":s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),ie.length>0&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Receive"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ie.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),G&&"spender"in G&&G?.spender?/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:G.spender,url:R?.blockExplorers?.default?.url})})]}):null,w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:w,url:R?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),y&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token address"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:y,url:R?.blockExplorers?.default?.url})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:S})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:T||M||void 0===F,children:F?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",he.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):v})]}),ce&&!_&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.Row,{className:"cursor-pointer",onClick:()=>de(!ae),children:/*#__PURE__*/e.jsxs(t.LabelSmPrimary,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e.jsx(s.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ae?"rotate(180deg)":void 0}})]})}),ae&&G&&/*#__PURE__*/e.jsx(q,{action:g,chain:R,transactionDetails:G,isTokenContractInfoLoading:E,symbol:D})]}),_&&/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>ee(!0),children:[/*#__PURE__*/e.jsx("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e.jsx(s.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e.jsx(p.Grow,{}),i?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:i.message}):c&&0===J?
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("@heroicons/react/24/outline"),r=require("react"),n=require("styled-components"),i=require("@privy-io/js-sdk-core"),o=require("./Button-QElvggxT.js"),l=require("./ModalHeader-BcLfp3ap.js"),t=require("./Value-C-XtZyFa.js"),a=require("./Row-CxDF-VMy.js"),d=require("./ErrorMessage-f0cRWc29.js"),c=require("./LabelXs-CYMv6rOZ.js"),x=require("./Subtitle-Dtmrw8l5.js"),h=require("./Title-C-tHJvrb.js"),u=require("./Address-DGUdKafT.js"),m=require("./WalletInfoCard-5UbicbMB.js"),j=require("./context-WcHVngsl.js"),p=require("./useActiveWallet-CXspRD1P.js"),g=require("./LoadingSkeleton-DoCrfGnl.js"),b=require("viem"),f=require("./shared-BPGwTh8c.js"),w=require("./Checkbox-DXPQZFlQ.js"),y=require("./ErrorBanner-CMjaobRI.js"),S=require("./WarningBanner-B_Gs_15p.js"),k=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),v=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),I=require("@heroicons/react/24/outline/ExclamationCircleIcon"),L=require("./internal-context-NWsAL807.js");function C(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=/*#__PURE__*/C(k),A=/*#__PURE__*/C(v),T=/*#__PURE__*/C(I);const V=/*#__PURE__*/n.styled(t.LabelSm).withConfig({displayName:"InteractiveLabel",componentId:"sc-b57d0824-0"})(["cursor:pointer;display:inline-flex;gap:8px;align-items:center;color:var(--privy-color-accent);svg{fill:var(--privy-color-accent);}"]);var N=({iconUrl:s,value:r,symbol:n,usdValue:i,nftName:o,nftCount:l,decimals:t,$isLoading:a})=>{if(a)/*#__PURE__*/return e.jsx(M,{$isLoading:a});let d=r&&i&&t?function(e,s,r){let n=parseFloat(e),i=parseFloat(r);if(0===n||0===i||Number.isNaN(n)||Number.isNaN(i))return e;let o=Math.ceil(-Math.log10(.01/(i/n))),l=Math.pow(10,o=Math.max(o=Math.min(o,s),1)),t=+(Math.floor(n*l)/l).toFixed(o).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:s}).format(t)}(r,t,i):r;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(M,{$isLoading:a,children:[s&&/*#__PURE__*/e.jsx(F,{src:s,alt:"Token icon"}),l&&l>1?l+"x":void 0," ",o,d," ",n]}),i&&/*#__PURE__*/e.jsxs(E,{$isLoading:a,children:["$",i]})]})};let M=/*#__PURE__*/n.styled.span.withConfig({displayName:"Value",componentId:"sc-991db279-0"})(["color:var(--privy-color-foreground);font-size:0.875rem;font-weight:500;line-height:1.375rem;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);const E=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subvalue",componentId:"sc-991db279-1"})(["color:var(--privy-color-foreground-2);font-size:12px;font-weight:400;line-height:18px;word-break:break-all;text-align:right;display:flex;justify-content:flex-end;",""],g.LoadingSkeleton);let F=/*#__PURE__*/n.styled.img.withConfig({displayName:"TokenIcon",componentId:"sc-991db279-2"})(["height:14px;width:14px;margin-right:4px;object-fit:contain;"]);const q=s=>{let{chain:r,transactionDetails:n,isTokenContractInfoLoading:i,symbol:o}=s,{action:l,functionName:d}=n;/*#__PURE__*/return e.jsx(f.Box,{children:/*#__PURE__*/e.jsxs(a.Rows,{children:["transaction"!==l&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Action"}),/*#__PURE__*/e.jsx(t.Value,{children:d})]}),"mint"===d&&"args"in n&&n.args.filter((e=>e)).map(((s,n)=>/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:`Param ${n}`}),/*#__PURE__*/e.jsx(t.Value,{children:"string"==typeof s&&b.isAddress(s)?/*#__PURE__*/e.jsx(u.Address,{address:s,url:r?.blockExplorers?.default?.url,showCopyIcon:!1}):s?.toString()})]},n))),"setApprovalForAll"===d&&n.operator&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Operator"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.operator,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===d&&void 0!==n.approved&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Set approval to"}),/*#__PURE__*/e.jsx(t.Value,{children:n.approved?"true":"false"})]}),"transfer"===d||"transferFrom"===d||"safeTransferFrom"===d||"approve"===d?/*#__PURE__*/e.jsxs(e.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{$isLoading:i,children:[n.formattedAmount," ",o]})]}),"tokenId"in n&&n.tokenId&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token ID"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===d&&/*#__PURE__*/e.jsxs(e.Fragment,{children:["amounts"in n&&n.amounts&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amounts"}),/*#__PURE__*/e.jsx(t.Value,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token IDs"}),/*#__PURE__*/e.jsx(t.Value,{children:n.tokenIds.join(", ")})]})]}),"approve"===d&&n.spender&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.spender,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferFrom&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring from"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferFrom,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferTo&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Transferring to"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:n.transferTo,url:r?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},$=({variant:s,setPreventMaliciousTransaction:r,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===s?/*#__PURE__*/e.jsx(D,{children:/*#__PURE__*/e.jsxs(S.WarningBanner,{theme:n,children:[/*#__PURE__*/e.jsx("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===s?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(D,{children:[/*#__PURE__*/e.jsx(y.ErrorBanner,{theme:n,children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/e.jsxs(O,{children:[/*#__PURE__*/e.jsx(w.Checkbox,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>r(!i)}),/*#__PURE__*/e.jsx("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let D=/*#__PURE__*/n.styled.div.withConfig({displayName:"BannerContainer",componentId:"sc-ab8a5a0b-0"})(["margin-top:1.5rem;"]),O=/*#__PURE__*/n.styled.div.withConfig({displayName:"CheckboxContainer",componentId:"sc-ab8a5a0b-1"})(["display:flex;align-items:center;gap:0.5rem;margin-top:0.75rem;"]);const B=({transactionIndex:e,maxIndex:s})=>"number"!=typeof e||0===s?"":` (${e+1} / ${s+1})`;let P=/*#__PURE__*/n.styled(m.WalletInfoCard).withConfig({displayName:"StyledWalletInfoCard",componentId:"sc-cbe5ab37-0"})(["",""],(e=>e.$useSmallMargins?"margin-top: 0.5rem;":"margin-top: 2rem;")),X=/*#__PURE__*/n.styled(a.Rows).withConfig({displayName:"InstructionRows",componentId:"sc-cbe5ab37-1"})(["margin-top:0.5rem;border:1px solid var(--privy-color-foreground-4);border-radius:var(--privy-border-radius-sm);padding:0.5rem;"]),W="There was an error preparing your transaction. Your transaction request will likely fail.",z=/*#__PURE__*/n.styled.div.withConfig({displayName:"ImageContainer",componentId:"sc-cbe5ab37-2"})(["display:flex;width:100%;justify-content:center;max-height:40px;> img{object-fit:contain;border-radius:var(--privy-border-radius-sm);}"]),H=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredRow",componentId:"sc-cbe5ab37-3"})(["display:inline-flex;align-items:center;gap:0.3rem;"]),U=/*#__PURE__*/n.styled.span.withConfig({displayName:"SponsoredText",componentId:"sc-cbe5ab37-4"})(["font-size:14px;font-weight:500;color:var(--privy-color-foreground);"]);let G=()=>/*#__PURE__*/e.jsxs(K,{children:[/*#__PURE__*/e.jsx(_,{}),/*#__PURE__*/e.jsx(Z,{})]});let J=/*#__PURE__*/n.styled.div.withConfig({displayName:"TransactionErrorScreenContainer",componentId:"sc-d58f10e6-0"})(["display:flex;flex-direction:column;align-items:center;justify-content:center;"]),Q=/*#__PURE__*/n.styled.span.withConfig({displayName:"ErrorCode",componentId:"sc-d58f10e6-1"})(["color:var(--privy-color-foreground);text-align:center;font-size:1.125rem;font-weight:500;line-height:1.25rem;text-align:center;margin:10px;"]),Y=/*#__PURE__*/n.styled.span.withConfig({displayName:"Subtitle",componentId:"sc-d58f10e6-2"})(["margin-top:4px;margin-bottom:10px;color:var(--privy-color-foreground-3);text-align:center;font-size:0.875rem;font-style:normal;font-weight:400;line-height:20px;letter-spacing:-0.008px;"]),K=/*#__PURE__*/n.styled.div.withConfig({displayName:"CircleContainer",componentId:"sc-d58f10e6-3"})(["position:relative;width:60px;height:60px;margin:10px;display:flex;justify-content:center;align-items:center;"]),Z=/*#__PURE__*/n.styled(T.default).withConfig({displayName:"StyledExclamationCircleIcon",componentId:"sc-d58f10e6-4"})(["position:absolute;width:35px;height:35px;color:var(--privy-color-error);"]),_=/*#__PURE__*/n.styled.div.withConfig({displayName:"StyledRedCircle",componentId:"sc-d58f10e6-5"})(["position:absolute;width:60px;height:60px;border-radius:50%;background-color:var(--privy-color-error);opacity:0.1;"]),ee=/*#__PURE__*/n.styled(o.PrimaryButton).withConfig({displayName:"RetryButton",componentId:"sc-d58f10e6-6"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]),se=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBoxTitle",componentId:"sc-d58f10e6-7"})(["width:100%;text-align:left;font-size:0.825rem;color:var(--privy-color-foreground);padding:4px;"]),re=/*#__PURE__*/n.styled.div.withConfig({displayName:"TextBoxContainer",componentId:"sc-d58f10e6-8"})(["width:100%;margin:5px;display:flex;flex-direction:column;justify-content:center;align-items:center;"]),ne=/*#__PURE__*/n.styled.text.withConfig({displayName:"HelperText",componentId:"sc-d58f10e6-9"})(["position:relative;width:100%;padding:5px;font-size:0.8rem;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;"]),ie=/*#__PURE__*/n.styled.span.withConfig({displayName:"TextBox",componentId:"sc-d58f10e6-10"})(["position:relative;width:100%;background-color:var(--privy-color-background-2);padding:8px 12px;border-radius:10px;margin-top:5px;font-size:14px;color:var(--privy-color-foreground-3);text-align:left;word-wrap:break-word;",""],(e=>e.$clickable&&"cursor: pointer;\n transition: background-color 0.3s;\n padding-right: 45px;\n\n &:hover {\n background-color: var(--privy-color-foreground-4);\n }")),oe=/*#__PURE__*/n.styled(A.default).withConfig({displayName:"StyledClipboardIcon",componentId:"sc-d58f10e6-11"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),le=/*#__PURE__*/n.styled(R.default).withConfig({displayName:"StyledClipboardCheckIcon",componentId:"sc-d58f10e6-12"})(["position:absolute;top:13px;right:13px;width:24px;height:24px;"]),te=({clicked:s})=>s?/*#__PURE__*/e.jsx(le,{}):/*#__PURE__*/e.jsx(oe,{});exports.SendSolanaTransactionScreenView=({img:n,title:m,subtitle:g,cta:b,instructions:f,network:w,blockExplorerUrl:y,isMissingFunds:S,submitError:k,parseError:v,total:I,swap:L,transactingWalletAddress:C,fee:R,balance:A,disabled:T,isSubmitting:N,isPreparing:M,isTokenPriceLoading:E,onClick:F,onClose:q,onBack:$,isSponsored:D})=>{let O=M||E,[B,G]=r.useState(!1),J=j.useAppConfig();/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:q,backFn:$}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsx(h.Title,{style:{marginTop:n?"1.5rem":0},children:m}),/*#__PURE__*/e.jsx(x.Subtitle,{children:g}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(I||O)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:I})]}),L&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Swap"}),/*#__PURE__*/e.jsx(t.Value,{children:L})]}),w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:w})]}),(R||O||void 0!==D)&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:O,children:D&&!O?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",J.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):R})]})]}),/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>G((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(s.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:B?"rotate(180deg)":void 0}})]})}),B&&/*#__PURE__*/e.jsx(e.Fragment,{children:f.map(((s,r)=>"sol-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:s.token.decimals})," ",s.token.symbol]})]}),!!s.toAccount&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAccount,url:y})})]})]},r):"spl-transfer"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Transfer ",s.token.symbol]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.value.toString()})]}),!!s.fromAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.fromAta,url:y})})]}),!!s.toAta&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.toAta,url:y})})]}),!!s.token.address&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.token.address,url:y})})]})]},r):"ata-creation"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"create-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Create account ",s.withSeed?"with seed":""]})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(t.Value,{children:[i.formatTokenAmount({amount:s.value,decimals:9})," SOL"]})]})]},r):"spl-init-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Initialize token account"})}),!!s.account&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.account,url:y})})]}),!!s.mint&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Mint"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mint,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-close-account"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Close token account"})}),!!s.source&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.source,url:y})})]}),!!s.destination&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.destination,url:y})})]}),!!s.owner&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.owner,url:y})})]})]},r):"spl-sync-native"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsx(c.LabelXs,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]})]},r):"raydium-swap-base-input"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.minimumAmountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"raydium-swap-base-output"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Raydium swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Max amount in"}),/*#__PURE__*/e.jsx(t.Value,{children:s.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.amountOut.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-shared-accounts-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"In amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedOutAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):"jupiter-swap-exact-out-route"===s.type?/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(c.LabelXs,{children:["Jupiter swap"," ",s.tokenIn&&s.tokenOut?`${s.tokenIn.symbol} → ${s.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(t.Value,{children:s.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(t.Value,{children:s.outAmount.toString()})]}),s.mintIn&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintIn,url:y})})]}),s.mintOut&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.mintOut,url:y})})]})]},r):/*#__PURE__*/e.jsxs(X,{children:[/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:s.program,url:y})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Data"}),/*#__PURE__*/e.jsx(t.Value,{children:s.discriminator})]})]},r)))}),/*#__PURE__*/e.jsx(p.Grow,{}),k?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:k.message}):v?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:W}):null,/*#__PURE__*/e.jsx(P,{$useSmallMargins:!(!v&&!k),title:"",address:C,balance:A,errMsg:M||v||k||!S?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(o.PrimaryButton,{style:{marginTop:"1rem"},loading:N,disabled:T||M,onClick:F,children:b}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.SendTransactionScreenView=({img:n,submitError:i,prepareError:c,onClose:m,action:g,title:b,subtitle:f,to:w,tokenAddress:y,network:S,missingFunds:k,fee:v,from:I,cta:L,disabled:C,chain:R,isSubmitting:A,isPreparing:T,isTokenPriceLoading:M,isTokenContractInfoLoading:E,isSponsored:F,symbol:D,balance:O,onClick:X,transactionDetails:G,transactionIndex:J,maxIndex:Q,onBack:Y,chainName:K,validation:Z,hasScanDetails:_,setIsScanDetailsOpen:ee,preventMaliciousTransaction:se,setPreventMaliciousTransaction:re,tokensSent:ne,tokensReceived:ie,isScanning:oe,isCancellable:le,functionName:te})=>{let{showTransactionDetails:ae,setShowTransactionDetails:de,hasMoreDetails:ce,isErc20Ish:xe}=(e=>{let[s,n]=r.useState(!1),i=!0,o=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(i=!1),i&&(o=Object.entries(e||{}).some((([e,s])=>s&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:s,setShowTransactionDetails:n,hasMoreDetails:i&&o,isErc20Ish:e?.isErc20Ish}})(G),he=j.useAppConfig(),ue=xe&&E||T||M||oe;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:m,backFn:Y}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsxs(h.Title,{style:{marginTop:n?"1.5rem":0},children:[b,/*#__PURE__*/e.jsx(B,{maxIndex:Q,transactionIndex:J})]}),/*#__PURE__*/e.jsx(x.Subtitle,{children:f}),/*#__PURE__*/e.jsxs(a.Rows,{style:{marginTop:"2rem"},children:[(!!ne[0]||ue)&&/*#__PURE__*/e.jsxs(a.Row,{children:[ie.length>0?/*#__PURE__*/e.jsx(t.LabelSm,{children:"Send"}):/*#__PURE__*/e.jsx(t.LabelSm,{children:"approve"===g?"Approval amount":"Amount"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ne.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:"setApprovalForAll"===te?"All":s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),ie.length>0&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Receive"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ie.map(((s,r)=>/*#__PURE__*/e.jsx(N,{iconUrl:s.iconUrl,value:s.value,usdValue:s.usdValue,symbol:s.symbol,nftName:s.nftName,nftCount:s.nftCount,decimals:s.decimals},r)))})]}),G&&"spender"in G&&G?.spender?/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:G.spender,url:R?.blockExplorers?.default?.url})})]}):null,w&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:w,url:R?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),y&&/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Token address"}),/*#__PURE__*/e.jsx(t.Value,{children:/*#__PURE__*/e.jsx(u.Address,{address:y,url:R?.blockExplorers?.default?.url})})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(t.Value,{children:S})]}),/*#__PURE__*/e.jsxs(a.Row,{children:[/*#__PURE__*/e.jsx(t.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(t.Value,{$isLoading:T||M||void 0===F,children:F?/*#__PURE__*/e.jsxs(H,{children:[/*#__PURE__*/e.jsxs(U,{children:["Sponsored by ",he.name]}),/*#__PURE__*/e.jsx(s.BoltIcon,{height:16,width:16})]}):v})]}),ce&&!_&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.Row,{className:"cursor-pointer",onClick:()=>de(!ae),children:/*#__PURE__*/e.jsxs(t.LabelSmPrimary,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e.jsx(s.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:ae?"rotate(180deg)":void 0}})]})}),ae&&G&&/*#__PURE__*/e.jsx(q,{action:g,chain:R,transactionDetails:G,isTokenContractInfoLoading:E,symbol:D})]}),_&&/*#__PURE__*/e.jsx(a.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>ee(!0),children:[/*#__PURE__*/e.jsx("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e.jsx(s.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e.jsx(p.Grow,{}),i?/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:i.message}):c&&0===J?
|
|
2
2
|
/*#__PURE__*/e.jsx(d.ErrorMessage,{style:{marginTop:"2rem"},children:c.shortMessage??W}):null,/*#__PURE__*/e.jsx($,{variant:Z,preventMaliciousTransaction:se,setPreventMaliciousTransaction:re}),/*#__PURE__*/e.jsx(P,{$useSmallMargins:!(!c&&!i&&"warn"!==Z&&"error"!==Z),address:I,balance:O,errMsg:T||c||i||!k?void 0:`Add funds on ${R?.name??K} to complete transaction.`}),/*#__PURE__*/e.jsx(o.PrimaryButton,{style:{marginTop:"1rem"},loading:A,disabled:C||T,onClick:X,children:L}),le&&/*#__PURE__*/e.jsx(o.EmbeddedButton,{style:{marginTop:"1rem"},onClick:m,isSubmitting:!1,children:"Not now"}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.TransactionErrorView=({transactionError:s,chainId:n,onClose:i,onRetry:o,chainType:t,transactionHash:a})=>{let{chains:d}=L.usePrivyInternal(),[c,x]=r.useState(!1),{errorCode:h,errorMessage:u}=((e,s)=>{if("ethereum"===s)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let r=e.txSignature,n=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let s=e.logs.find((e=>/insufficient (lamports|funds)/gi.test(e)));s&&(n=s)}return{transactionHash:r,errorMessage:n}})(s,t),m=(({chains:e,chainId:s,chainType:r,transactionHash:n})=>"ethereum"===r?e.find((e=>e.id===s))?.blockExplorers?.default.url??"https://etherscan.io":function(e,s){return`https://explorer.solana.com/tx/${e}?chain=${s}`}(n||"",s))({chains:d,chainId:n,chainType:t,transactionHash:a});/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:i}),/*#__PURE__*/e.jsxs(J,{children:[/*#__PURE__*/e.jsx(G,{}),/*#__PURE__*/e.jsx(Q,{children:h}),/*#__PURE__*/e.jsx(Y,{children:"Please try again."}),/*#__PURE__*/e.jsxs(re,{children:[/*#__PURE__*/e.jsx(se,{children:"Error message"}),/*#__PURE__*/e.jsx(ie,{$clickable:!1,children:u})]}),a&&/*#__PURE__*/e.jsxs(re,{children:[/*#__PURE__*/e.jsx(se,{children:"Transaction hash"}),/*#__PURE__*/e.jsxs(ne,{children:["Copy this hash to view details about the transaction on a"," ",/*#__PURE__*/e.jsx("u",{children:/*#__PURE__*/e.jsx("a",{href:m,children:"block explorer"})}),"."]}),/*#__PURE__*/e.jsxs(ie,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(a),x(!0)},children:[a,/*#__PURE__*/e.jsx(te,{clicked:c})]})]}),/*#__PURE__*/e.jsx(ee,{onClick:()=>o({resetNonce:!!a}),children:"Retry transaction"})]}),/*#__PURE__*/e.jsx(l.ModalFooter,{})]})};
|
package/dist/cjs/{TransferFromWalletScreen-BbJ3ISYt.js → TransferFromWalletScreen-CFe0X_NF.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("react"),n=require("./ModalHeader-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("react"),n=require("./ModalHeader-BcLfp3ap.js"),t=require("./ScreenHeader-CyURV6Ti.js"),i=require("./FundWalletMethodHeader-DSaZB2cG.js"),a=require("./Chip-ChrHHazc.js"),l=require("./Subtitle-Dtmrw8l5.js"),o=require("./context-WcHVngsl.js"),s=require("./useActiveWallet-CXspRD1P.js"),u=require("./internal-context-NWsAL807.js"),c=require("./get-is-unified-wallet-wZ72VTZL.js"),d=require("./useWallets-jLpT3nOf.js"),h=require("./WalletButtonList-DLB8T0RX.js"),p=require("./styles-D4VeJNv1.js");require("styled-components"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./LoadingSkeleton-DoCrfGnl.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-CM8ukvbz.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("ofetch"),require("lucide-react"),require("./index-DC9qNqKe.js"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DH2ITnCQ.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./InjectedWalletIcon-UY3nMvZo.js"),require("@heroicons/react/24/outline/WalletIcon");const y={component:()=>{let a,{connectors:p}=u.usePrivyInternal(),{setModalData:y,data:m,navigate:q}=c.usePrivyModal(),C=o.useAppConfig(),{wallets:j}=d.useWallets(),w=p.filter(s.isSolanaWalletConnector).flatMap((e=>e.wallets)),[f,x]=r.useState("default"),T="solana"===m?.funding?.chainType,v=!!m?.funding?.crossChainBridgingEnabled;a="ethereum"===m?.funding?.chainType?m.funding.erc20Address&&!m.funding.isUSDC?"ethereum-only":v&&!m.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":v&&!m.funding?.isUSDC?"ethereum-and-solana":"solana-only";let W=j.filter((e=>"privy"!==e.walletClientType)),S=W.map((e=>e.walletClientType)),F=w.filter((e=>"privy"!==e.walletClientType)),b=F.map((e=>e.walletClientType)),M=[],D={...m.funding};D.usingDefaultFundingMethod&&(D.usingDefaultFundingMethod=!1);let k=({wallet:e,walletChainType:r})=>{y({...m,funding:{...D,connectedWallet:e,onContinueWithExternalWallet:()=>q(A({destChainType:T?"solana":"ethereum",sourceChainType:r}))},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e.address,walletClientType:e.walletClientType}}:void 0}),q("FundingAmountEditScreen")};"solana-only"!==a&&M.push(...W.map(((r,n)=>/*#__PURE__*/e.jsx(g,{onClick:()=>k({wallet:r,walletChainType:"ethereum"}),icon:r.meta.icon,name:r.meta.name,chainType:r.type},n)))),"ethereum-only"!==a&&M.push(...F.map(((r,n)=>/*#__PURE__*/e.jsx(g,{onClick:()=>k({wallet:r,walletChainType:"solana"}),icon:r.meta.icon,name:r.meta.name,chainType:r.type},n)))),M.push(...h.toWalletButtons({walletList:C.appearance.walletList.filter((e=>!W.some((r=>r.walletClientType===e))&&!F.some((r=>r.walletClientType===e)))),walletChainType:a,connectors:p,connectOnly:!0,ignore:[...C.appearance.walletList,...S,...b],walletConnectEnabled:C.externalWallets.walletConnect.enabled}));let E=/*#__PURE__*/e.jsx(h.WalletOverflowButton,{text:"More wallets",onClick:()=>x("overflow")}),A=({sourceChainType:e,destChainType:r})=>"ethereum"===e&&"solana"===r?"AwaitingEvmToSolBridgingScreen":"ethereum"===e&&"ethereum"===r?"AwaitingExternalEthereumTransferScreen":"solana"===e&&"ethereum"===r?"AwaitingSolToEvmBridgingScreen":D.externalSolanaFundingScreen;return r.useEffect((()=>{y({...m,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:r,walletChainType:n})=>{let t=n??"ethereum",i="ethereum"===t?W.find((n=>n.address===e&&n.walletClientType===r)):F.find((n=>n.address===e&&n.walletClientType===r));return y({...m,funding:{...D,connectedWallet:i,onContinueWithExternalWallet:()=>{q(A({destChainType:T?"solana":"ethereum",sourceChainType:t}))}},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:r||""}}:void 0}),"FundingAmountEditScreen"}}})}),[]),"overflow"===f?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(n.ModalHeader,{backFn:()=>x("default")},"header"),/*#__PURE__*/e.jsxs(s.LoginMethodContainer,{children:[/*#__PURE__*/e.jsx(l.Subtitle,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),M]}),/*#__PURE__*/e.jsx(n.BlobbyFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(i.t,{}),/*#__PURE__*/e.jsx(t.CenteredScreenHeader,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e.jsxs(s.LoginMethodContainer,{children:[M.length>4?M.slice(0,3):M,M.length>4&&E]}),/*#__PURE__*/e.jsx(n.BlobbyFooter,{})]})}};let g=({onClick:r,icon:n,name:t,chainType:i})=>/*#__PURE__*/e.jsxs(s.LoginMethodButton,{onClick:r,children:[/*#__PURE__*/e.jsx(p.IconContainer,{style:{width:20},children:/*#__PURE__*/e.jsx("img",{src:n})}),t,/*#__PURE__*/e.jsx(a.Chip,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===i&&/*#__PURE__*/e.jsx(a.Chip,{color:"gray",children:"Solana"})]});exports.TransferFromWalletScreen=y,exports.default=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("./Layouts-dRL0OSpp.js"),s=require("./ModalHeader-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("./Layouts-dRL0OSpp.js"),s=require("./ModalHeader-BcLfp3ap.js"),n=require("./ScreenHeader-CyURV6Ti.js"),l=require("./FundWalletMethodHeader-DSaZB2cG.js"),t=require("./InjectedWalletIcon-UY3nMvZo.js"),a=require("./index-CRFXS9pP.js"),d=require("./Row-CxDF-VMy.js"),c=require("./Value-C-XtZyFa.js"),o=require("./Address-DGUdKafT.js"),j=require("./NetworkIcon-BZ9Mj6vV.js"),u=require("./useActiveWallet-CXspRD1P.js");let x=/*#__PURE__*/r.styled.div.withConfig({displayName:"NetworkColumn",componentId:"sc-5bdbf842-0"})(["display:flex;flex-direction:row;align-items:center;gap:4px;"]);exports.TransferOrBridgeLoadingScreen=({walletClientType:r,displayName:h,addressToFund:m,chainId:g,chainName:w,isBridging:p,isErc20Flow:I,totalPriceInNativeCurrency:q,totalPriceInUsd:y,gasPriceInNativeCurrency:C,gasPriceInUsd:N})=>{let S=u.useExternalWalletListing(r);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.t,{}),/*#__PURE__*/e.jsx(a.NeutralSpinner,{centerIcon:/*#__PURE__*/e.jsx(t.InjectedWalletIcon,{icon:S?.image_url?.md,name:r})}),/*#__PURE__*/e.jsx(n.CenteredScreenHeader,{style:{marginTop:"8px",marginBottom:"12px"},title:`${p?"Bridging":"Confirming"} with ${h}`}),!p&&!I&&/*#__PURE__*/e.jsxs(d.Rows,{children:[/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Total"}),/*#__PURE__*/e.jsx(c.Value,{children:y||q})]}),/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsx(o.Address,{address:m,showCopyIcon:!1})})]}),/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsxs(x,{children:[/*#__PURE__*/e.jsx(j.NetworkIcon,{chainId:g,height:16,width:16})," ",w]})})]}),C&&/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(c.Value,{children:N||C})]})]}),/*#__PURE__*/e.jsx(i.ConfigurableSpacer,{height:24}),/*#__PURE__*/e.jsx(s.BlobbyFooter,{})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/EnvelopeIcon"),i=require("./Layouts-dRL0OSpp.js"),t=require("lucide-react"),a=require("react"),s=require("./context-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/EnvelopeIcon"),i=require("./Layouts-dRL0OSpp.js"),t=require("lucide-react"),a=require("react"),s=require("./context-WcHVngsl.js"),u=require("./index-DC9qNqKe.js"),o=require("./internal-context-NWsAL807.js"),n=require("./get-is-unified-wallet-wZ72VTZL.js"),l=require("./useActiveWallet-CXspRD1P.js"),d=require("./Button-QElvggxT.js"),c=require("./EmailInputForm-tjrhBacA.js"),q=require("./ErrorMessage-f0cRWc29.js"),m=require("./ScreenLayout-Bolj7ZKh.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("uuid"),require("jose"),require("eventemitter3"),require("./useWallets-jLpT3nOf.js"),require("./prepareFundingModalData-CM8ukvbz.js"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("react-device-detect"),require("viem/utils"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-DH2ITnCQ.js"),require("./events-context-Di6--rDg.js"),require("@scure/base"),require("zustand"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("viem"),require("./getPublicClient-CGlodIp_.js"),require("ofetch"),require("js-cookie"),require("./frame-B14fp9oC.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-BcAsQTGF.js"),require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),require("./Screen-BDXOD3ca.js"),require("./ModalHeader-BcLfp3ap.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var h=/*#__PURE__*/p(r);const j=/*#__PURE__*/a.forwardRef(((r,i)=>{let[c,m]=a.useState(""),[p,h]=a.useState(""),[j,g]=a.useState(!1),{authenticated:x,user:w}=n.usePrivyContext(),{initUpdateEmail:S}=o.usePrivyInternal(),{navigate:f,setModalData:b,currentScreen:E}=n.usePrivyModal(),{enabled:k,token:C}=u.useCaptcha(),A=s.useAppConfig(),M=l.validateEmail(c)&&(A.disablePlusEmails&&c.includes("+")?(p||h("Please enter a valid email address without a '+'."),!1):(p&&h(""),!0)),P=j||!M,I=()=>{!k||C||x?(async e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");g(!0);try{await S({oldAddress:w.email.address,newAddress:c,captchaToken:e}),f("AwaitingPasswordlessCodeScreen")}catch(e){b({errorModalData:{error:e,previousScreen:E||"LandingScreen"}}),f("ErrorScreen")}g(!1)})(C):(b({captchaModalData:{callback:e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");return S({oldAddress:w.email.address,newAddress:c,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),f("CaptchaScreen"))};/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(v,{children:[p&&/*#__PURE__*/e.jsx(q.ErrorMessage,{style:{marginTop:"0.25rem",textAlign:"left"},children:p}),/*#__PURE__*/e.jsxs(y,{$error:!!p,children:[/*#__PURE__*/e.jsx(l.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(t.Mail,{})}),/*#__PURE__*/e.jsx("input",{ref:i,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>m(e.target.value),onKeyUp:e=>{"Enter"===e.key&&I()},value:c,autoComplete:"email"}),r.stacked?null:/*#__PURE__*/e.jsx(d.EmbeddedButton,{isSubmitting:j,onClick:I,disabled:P,children:"Submit"})]})]}),r.stacked?/*#__PURE__*/e.jsx(d.PrimaryButton,{loadingText:null,loading:j,disabled:P,onClick:I,style:{width:"100%"},children:"Submit"}):null]})}));let v=c.InputContainerForm,y=c.EmailUpdateForm;const g=({title:r="Update your email",subtitle:t="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/e.jsx(m.ScreenLayout,{title:r,subtitle:t,icon:h.default,watermark:!0,children:/*#__PURE__*/e.jsx(i.BottomPusherContainer,{children:/*#__PURE__*/e.jsx(j,{stacked:!0})})}),x={component:()=>/*#__PURE__*/e.jsx(g,{})};exports.UpdateEmailScreen=x,exports.UpdateEmailScreenView=g,exports.default=x;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-BhTwbwML.js"),n=require("./internal-context-NWsAL807.js"),o=require("./get-is-unified-wallet-wZ72VTZL.js"),u=require("./ScreenLayout-Bolj7ZKh.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("./context-WcHVngsl.js"),require("tinycolor2"),require("./useActiveWallet-CXspRD1P.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-CM8ukvbz.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-jLpT3nOf.js"),require("./Button-QElvggxT.js"),require("./Chip-ChrHHazc.js"),require("./LoadingSkeleton-DoCrfGnl.js"),require("ofetch"),require("./Screen-BDXOD3ca.js"),require("./ModalHeader-BcLfp3ap.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");var s=/*#__PURE__*/a(r);const c=({title:r="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:o,isSubmitting:a=!1})=>{let[c,l]=t.useState(null);/*#__PURE__*/return e.jsx(u.ScreenLayout,{title:r,subtitle:n,icon:s.default,primaryCta:{label:a?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await o(c)},disabled:!c?.isValid||a},watermark:!0,children:/*#__PURE__*/e.jsx(i.ConnectPhoneNumberForm,{onChange:e=>{l(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},l={component:()=>{let{currentScreen:r,data:i,navigate:u,setModalData:a}=o.usePrivyModal(),{user:s}=o.usePrivyContext(),{initUpdatePhone:l}=n.usePrivyInternal(),[d,q]=t.useState(!1);/*#__PURE__*/return e.jsx(c,{onSubmit:async e=>{q(!0);try{if(!s?.phone?.number)throw Error("User is required to have an phone number to update it.");await l(s?.phone?.number,e.qualifiedPhoneNumber),u("AwaitingPasswordlessCodeScreen")}catch(e){a({errorModalData:{error:e,previousScreen:i?.errorModalData?.previousScreen||r||"LinkPhoneScreen"}}),u("ErrorScreen")}finally{q(!1)}},isSubmitting:d})}};exports.UpdatePhoneScreen=l,exports.UpdatePhoneScreenView=c,exports.default=l;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),r=require("./get-is-unified-wallet-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),r=require("./get-is-unified-wallet-wZ72VTZL.js"),t=require("./ScreenLayout-Bolj7ZKh.js");require("viem"),require("react"),require("./context-WcHVngsl.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("./Button-QElvggxT.js"),require("styled-components"),require("./useActiveWallet-CXspRD1P.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-CM8ukvbz.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-jLpT3nOf.js"),require("./Screen-BDXOD3ca.js"),require("./ModalHeader-BcLfp3ap.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const i=({style:r,...t})=>/*#__PURE__*/e.jsx("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...r},...t,children:/*#__PURE__*/e.jsx("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),o=({title:r="Unable to sign in",subtitle:o="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/e.jsx(t.ScreenLayout,{title:r,subtitle:o,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:t}=r.usePrivyModal();/*#__PURE__*/return e.jsx(o,{onGoBack:()=>{t("LandingScreen")}})}};exports.UserLimitReachedScreen=n,exports.UserLimitReachedScreenView=o,exports.default=n;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),n=require("lucide-react"),t=require("./useActiveWallet-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),n=require("lucide-react"),t=require("./useActiveWallet-CXspRD1P.js"),l=require("./index-DC9qNqKe.js"),o=require("react-device-detect"),a=require("styled-components"),i=require("./InjectedWalletIcon-UY3nMvZo.js"),c=require("./Chip-ChrHHazc.js"),r=require("./internal-context-NWsAL807.js"),s=require("./get-is-unified-wallet-wZ72VTZL.js");const p=({provider:n,displayName:a,logo:c,connectOnly:p,connector:u})=>{let h,{navigate:T,setModalData:f}=s.usePrivyModal(),{connectWallet:C}=r.usePrivyInternal(),m=t.useRecentlyUsedLogin(),_=t.useExternalWalletListing(n),x="wallet_connect_v2"===u.connectorType?n:u.walletClientType,g=window.matchMedia("(display-mode: standalone)").matches,j=t.getWalletConfigForConnector({connectorType:u.connectorType,walletClientType:x});h=j&&j.chainTypes.includes(u.chainType)?()=>{j.isInstalled||"solana"===u.chainType&&"isInstalled"in u&&u.isInstalled?(C(u,x),T(p?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):o.isMobile?(f({installWalletModalData:{walletConfig:j,chainType:u.chainType,connectOnly:p}}),T("WalletInterstitialScreen")):(f({installWalletModalData:{walletConfig:j,chainType:u.chainType,connectOnly:p}}),T("InstallWalletScreen"))}:"coinbase_wallet"!==u.connectorType||"eoaOnly"!==u.coinbaseWalletConfig.preference?.options||!o.isMobile||g||t.isCoinbaseWalletInstalled()?()=>{(!l.e(window.navigator.userAgent)||event?.isTrusted)&&(C(u,x),p?"wallet_connect_v2"===u.connectorType?(f((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),T("ConnectOnlyLandingScreen")):T("ConnectOnlyStatusScreen"):T("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let v=a||_?.metadata?.shortName||_?.name||u.walletClientType;/*#__PURE__*/return e.jsxs(d,{onClick:h,children:[/*#__PURE__*/e.jsx(i.InjectedWalletIcon,{icon:c||_?.image_url?.md,name:v}),/*#__PURE__*/e.jsx("span",{children:v}),/*#__PURE__*/e.jsxs(w,{id:"chip-container",children:[m?.walletClientType===x&&m?.chainType===u.chainType?/*#__PURE__*/e.jsx(y,{color:"gray",children:"Recent"}):/*#__PURE__*/e.jsx("span",{id:"connect-text",children:"Connect"}),"solana"===u.chainType&&/*#__PURE__*/e.jsx(y,{color:"gray",children:"Solana"})]})]})};let d=/*#__PURE__*/a.styled(t.LoginMethodButton).withConfig({displayName:"ConnectWalletButton",componentId:"sc-5fe2f19b-0"})(["> span{color:var(--privy-color-foreground);}> #chip-container > #connect-text{font-weight:500;color:var(--privy-color-accent);opacity:0;transition:opacity 0.1s ease-out;}:hover > #chip-container > #connect-text{opacity:1;}@media (max-width:440px){> #chip-container > #connect-text{display:none;}}"]),y=/*#__PURE__*/a.styled(c.Chip).withConfig({displayName:"StyledChip",componentId:"sc-5fe2f19b-1"})(["margin-left:auto;"]),w=/*#__PURE__*/a.styled.div.withConfig({displayName:"ChipContainer",componentId:"sc-5fe2f19b-2"})(["display:flex;flex-wrap:wrap;gap:8px;margin-left:auto;"]);const u=["coinbase_wallet","base_account"];let h=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const T=["safe"],f=["phantom","backpack","solflare","jupiter","universal_profile"];exports.WalletOverflowButton=({onClick:l,text:o})=>/*#__PURE__*/e.jsxs(t.LoginMethodButton,{onClick:l,children:[/*#__PURE__*/e.jsx(t.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(n.Wallet,{})}),/*#__PURE__*/e.jsx(t.Grow,{children:o})]}),exports.toWalletButtons=({walletList:n,walletChainType:t,connectors:o,connectOnly:a,ignore:i,walletConnectEnabled:c,forceWallet:r})=>{let s=[],d=[],y=[],w=o.filter((e=>"ethereum-only"===t?"ethereum"===e.chainType:"solana-only"!==t||"solana"===e.chainType)),C=w.find((e=>"wallet_connect_v2"===e.connectorType));for(let[o,m]of(r?[r.wallet]:n).entries()){if("detected_ethereum_wallets"===m)for(let[n,t]of w.filter((({chainType:e,connectorType:n,walletClientType:t})=>"solana"!==e&&("uniswap_wallet_extension"===t||"uniswap_extension"===t?!i.includes("uniswap"):"crypto.com_wallet_extension"===t||"crypto.com_onchain"===t?!i.includes("cryptocom"):"injected"===n&&!i.includes(t)))).entries()){let{walletClientType:l,walletBranding:i,chainType:c}=t;("unknown"===l?d:s).push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:l,logo:i.icon,displayName:i.name,connector:t},`${o}-${m}-${l}-${c}-${n}`))}if("detected_solana_wallets"===m)for(let[n,l]of w.filter((({chainType:e,walletClientType:n})=>{if("solana"===e)return"ethereum-only"!==t&&!i.includes(n)})).entries()){let{walletClientType:t,walletBranding:i,chainType:c}=l;("unknown"===t?d:s).push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:t,logo:i.icon,displayName:i.name,connector:l},`${o}-${m}-${t}-${c}-${n}`))}if(f.includes(m)){let n=w.find((e=>"injected"===e.connectorType&&e.walletClientType===m||e.connectorType===m));if(n&&s.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,connector:n},`${o}-${m}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=w.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===m));n&&s.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,connector:n},`${m}-solana`))}}else if(h.includes(m)){let n=w.find((e=>"uniswap"===m?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===m?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===m));if(c&&!n&&(n=C),n&&s.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,connector:n,logo:"injected"===n.connectorType?n.walletBranding.icon:void 0,displayName:"injected"===n.connectorType?n.walletBranding.name:void 0},`${o}-${m}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=w.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===m));n&&s.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,connector:n},`${m}-solana`))}}else if(u.includes(m)){let n=w.find((({connectorType:e})=>e===m));n&&s.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,connector:n,displayName:"coinbase_wallet"===n.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===n.walletClientType?l.COINBASE_WALLET_DATA_URI:l.BASE_ACCOUNT_DATA_URI},`${o}-${m}`))}else if(T.includes(m))C&&y.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,connector:C},`${o}-${m}`));else if("wallet_connect"===m)C&&y.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,connector:C,logo:C.walletBranding.icon,displayName:"WalletConnect"},`${o}-${m}`));else if(m===r?.wallet){let t="ethereum"===r.chainType&&n.includes("detected_ethereum_wallets"),l="solana"===r.chainType&&n.includes("detected_solana_wallets");if(t||l){let n=w.find((({walletClientType:e})=>e===m));n&&s.push(/*#__PURE__*/e.jsx(p,{connectOnly:a,provider:m,displayName:n.walletBranding?.name,logo:n.walletBranding?.icon,connector:n},`${o}-${m}`))}}}return[...d,...s,...y]};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),s=require("lucide-react"),t=require("react"),r=require("styled-components"),i=require("./Button-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),s=require("lucide-react"),t=require("react"),r=require("styled-components"),i=require("./Button-QElvggxT.js"),o=require("./ErrorMessage-f0cRWc29.js"),n=require("./LabelXs-CYMv6rOZ.js"),d=require("./Address-DGUdKafT.js"),a=require("./shared-BPGwTh8c.js");let l=/*#__PURE__*/r.styled(a.Box).withConfig({displayName:"StyledBox",componentId:"sc-4010d8f3-0"})(["&&{padding:0.75rem;height:56px;}"]),c=/*#__PURE__*/r.styled.div.withConfig({displayName:"WalletContent",componentId:"sc-4010d8f3-1"})(["display:flex;align-items:center;justify-content:space-between;width:100%;"]),p=/*#__PURE__*/r.styled.div.withConfig({displayName:"AddressContainer",componentId:"sc-4010d8f3-2"})(["display:flex;flex-direction:column;gap:0;"]),m=/*#__PURE__*/r.styled.div.withConfig({displayName:"BalanceText",componentId:"sc-4010d8f3-3"})(["font-size:12px;line-height:1rem;color:var(--privy-color-foreground-3);"]),h=/*#__PURE__*/r.styled(n.LabelXs).withConfig({displayName:"TitleLabel",componentId:"sc-4010d8f3-4"})(["text-align:left;margin-bottom:0.5rem;"]),f=/*#__PURE__*/r.styled(o.ErrorMessage).withConfig({displayName:"StyledErrorMessage",componentId:"sc-4010d8f3-5"})(["margin-top:0.25rem;"]),y=/*#__PURE__*/r.styled(i.SecondaryButton).withConfig({displayName:"CopyButton",componentId:"sc-4010d8f3-6"})(["&&{gap:0.375rem;font-size:14px;}"]);exports.WalletInfoCard=({errMsg:r,balance:i,address:o,className:n,title:a,showCopyButton:u=!1})=>{let[x,g]=t.useState(!1);return t.useEffect((()=>{if(x){let e=setTimeout((()=>g(!1)),3e3);return()=>clearTimeout(e)}}),[x]),/*#__PURE__*/e.jsxs("div",{children:[a&&/*#__PURE__*/e.jsx(h,{children:a}),/*#__PURE__*/e.jsx(l,{className:n,$state:r?"error":void 0,children:/*#__PURE__*/e.jsxs(c,{children:[/*#__PURE__*/e.jsxs(p,{children:[/*#__PURE__*/e.jsx(d.Address,{address:o,showCopyIcon:!1}),void 0!==i&&/*#__PURE__*/e.jsx(m,{children:i})]}),u&&/*#__PURE__*/e.jsx(y,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(o).then((()=>g(!0))).catch(console.error)},size:"sm",children:x?/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copied",/*#__PURE__*/e.jsx(s.Check,{size:14})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:["Copy",/*#__PURE__*/e.jsx(s.Copy,{size:14})]})})]})}),r&&/*#__PURE__*/e.jsx(f,{children:r})]})};
|
package/dist/cjs/{WalletInterstitialScreen-BzSNp3dA.js → WalletInterstitialScreen-DAgZQaZB.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./get-is-unified-wallet-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./get-is-unified-wallet-wZ72VTZL.js"),i=require("./ScreenLayout-Bolj7ZKh.js");require("viem"),require("./context-WcHVngsl.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-NWsAL807.js"),require("ofetch"),require("./Button-QElvggxT.js"),require("styled-components"),require("./useActiveWallet-CXspRD1P.js"),require("zustand"),require("react-device-detect"),require("./prepareFundingModalData-CM8ukvbz.js"),require("eventemitter3"),require("./events-context-Di6--rDg.js"),require("viem/utils"),require("./getPublicClient-CGlodIp_.js"),require("./useWallets-jLpT3nOf.js"),require("./Screen-BDXOD3ca.js"),require("./ModalHeader-BcLfp3ap.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./index-CRFXS9pP.js");const o=({title:t,subtitle:r,buttonText:o,buttonHref:n,isLoading:l=!1,helpText:a,onButtonClick:u})=>/*#__PURE__*/e.jsx(i.ScreenLayout,{title:t,subtitle:r,primaryCta:{label:o,onClick:()=>{n&&window.open(n,"_self"),u?.()},disabled:l},helpText:a,watermark:!0}),n={component:()=>{let{ready:i}=r.usePrivyContext(),{data:n}=r.usePrivyModal(),[l,a]=t.useState(!1);if(!n?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:u,connectOnly:s,chainType:c}=n.installWalletModalData,d=u.getMobileRedirect({useUniversalLink:!l,isSolana:"solana"===c,connectOnly:s}),p=u.name.replace(/ wallet/gi,""),q={title:`Redirecting to ${p} Mobile Wallet`,description:`We'll take you to the ${p} Mobile Wallet app to continue your login experience.`,footnote:""};return i&&(q.description=`For the best experience, we'll automatically log you into the ${p} Mobile Wallet in-app browser.`,q.footnote="You can always return here to login via other methods."),l&&(q.title="Still here?",q.description=`You may need to install the ${u.name} mobile app.`,q.footnote=`Once you're done, you can connect with ${u.name} wallet to complete the login.`),/*#__PURE__*/e.jsx(o,{title:q.title,subtitle:q.description,buttonText:l?"Go to App Store":"Continue",buttonHref:d,isLoading:i&&!d,helpText:q.footnote||void 0,onButtonClick:()=>{setTimeout((()=>a(!0)),1e3)}})}};exports.WalletInterstitialScreen=n,exports.WalletInterstitialScreenView=o,exports.default=n;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";var e=require("react/jsx-runtime"),t=require("styled-components"),r=require("viem"),i=require("./ethers-
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("styled-components"),r=require("viem"),i=require("./ethers-DbIujY7-.js"),s=require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),n=require("./transaction-DjF5X-by.js"),a=require("./useActiveWallet-CXspRD1P.js");let l=/*#__PURE__*/t.styled.span.withConfig({displayName:"StyledPriceDisplay",componentId:"sc-3cd56c8a-0"})(["font-size:14px;line-height:140%;display:flex;gap:4px;align-items:center;"]),o=/*#__PURE__*/t.styled.span.withConfig({displayName:"StyledPriceUnit",componentId:"sc-3cd56c8a-1"})(["font-size:12px;line-height:12px;color:var(--privy-color-foreground-3);"]),c=/*#__PURE__*/t.styled.span.withConfig({displayName:"TinyLessThan",componentId:"sc-3cd56c8a-2"})(["font-size:10px;"]),d=/*#__PURE__*/t.styled.span.withConfig({displayName:"FlexCenter",componentId:"sc-3cd56c8a-3"})(["display:flex;align-items:center;"]);function m(e,t){return`https://explorer.solana.com/account/${e}?chain=${t}`}let p=/*#__PURE__*/t.styled.a.withConfig({displayName:"StyledLink",componentId:"sc-dd6c0f9f-0"})(["&:hover{text-decoration:underline;}"]);exports.HeaderPriceDisplay=({weiQuantities:t,tokenPrice:r,tokenSymbol:s})=>{let n=i.sumWeiQuantities(t),a=r?i.getDollarsFromWei(n,r):void 0,o=i.getNativeCurrencyFromWei(n,s);/*#__PURE__*/return e.jsx(l,{children:a||o})},exports.PriceDisplay=({weiQuantities:t,tokenPrice:r,tokenSymbol:s})=>{let n=i.sumWeiQuantities(t),a=r?i.getDollarsFromWei(n,r):void 0,m=i.getNativeCurrencyFromWei(n,s);/*#__PURE__*/return e.jsx(l,{children:a?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(o,{children:"USD"}),"<$0.01"===a?
|
|
2
2
|
/*#__PURE__*/e.jsxs(d,{children:[/*#__PURE__*/e.jsx(c,{children:"<"}),"$0.01"]}):a]}):m})},exports.SolanaPriceDisplay=({quantities:t,tokenPrice:i,tokenSymbol:a="SOL",tokenDecimals:o=9})=>{let m=t.reduce(((e,t)=>e+t),0n),p=i&&"SOL"===a&&9===o?s.getFormattedUsdFromLamports(m,i):void 0,h="SOL"===a&&9===o?n.getNativeCurrencyFromLamports(m):`${r.formatUnits(m,o)} ${a}`;/*#__PURE__*/return e.jsx(l,{children:p?/*#__PURE__*/e.jsx(e.Fragment,{children:"<$0.01"===p?
|
|
3
3
|
/*#__PURE__*/e.jsxs(d,{children:[/*#__PURE__*/e.jsx(c,{children:"<"}),"$0.01"]}):p}):h})},exports.WalletLink=t=>/*#__PURE__*/e.jsx(p,{href:"ethereum"===t.chainType?i.getBlockExplorerUrlForAddress(t.chainId,t.walletAddress):m(t.walletAddress,t.chainId),target:"_blank",children:a.formatWalletAddress(t.walletAddress)});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("@abstract-foundation/agw-client"),t=require("@abstract-foundation/agw-client/actions"),a=require("viem"),n=require("viem/accounts"),r=require("viem/chains"),s=require("./get-is-unified-wallet-
|
|
1
|
+
"use strict";var e=require("@abstract-foundation/agw-client"),t=require("@abstract-foundation/agw-client/actions"),a=require("viem"),n=require("viem/accounts"),r=require("viem/chains"),s=require("./get-is-unified-wallet-wZ72VTZL.js"),i=require("./context-WcHVngsl.js"),o=require("./internal-context-NWsAL807.js"),c=require("./useWallets-jLpT3nOf.js"),d=require("./getPublicClient-CGlodIp_.js"),l=require("./getEmbeddedConnectedWallet-6TsVZJkD.js"),u=require("./smart-wallets-Lspn5i9s.js");require("react/jsx-runtime"),require("react"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("permissionless"),require("permissionless/accounts"),require("permissionless/clients/pimlico"),require("viem/account-abstraction"),exports.useAbstractSmartWallets=function(){let{user:p}=s.usePrivyContext(),{hideWalletUIs:g,openPrivyModal:y,chains:m,appId:h,rpcConfig:T,client:f}=o.usePrivyInternal(),v=i.useAppConfig(),{wallets:I}=c.useWallets(),{setModalData:q}=s.usePrivyModal(),S=s.getPrivyEthereumWallet(p),b=!!S&&s.getIsUnifiedWallet(S),W=async(t=r.abstractTestnet.id)=>{let s=l.getEmbeddedConnectedWallet(I);if(!s)throw Error("No connected wallet found");let i="string"==typeof t?a.hexToNumber(t):t;if(![r.abstractTestnet.id,2741,r.zksync.id].includes(i))throw Error("Error, only Abstract and ZKSync Era chains are supported");let o=m.find((e=>e.id===i));if(!o)throw Error("Chain not configured");await s.switchChain(o.id);let c=await s.getEthereumProvider(),u=a.createWalletClient({account:s.address,transport:a.custom(c)}),p=n.toAccount({address:s.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e.createAbstractClient({chain:o,transport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),publicTransport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),signer:p})};return{signMessage:async({message:e},t)=>{let a=await W(t);return new Promise((async(t,n)=>{let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);g.current=!0,q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>a.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTypedData:async(e,t)=>{let a=await W(t);return new Promise((async(t,n)=>{g.current=!0;let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>a.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let a=await W(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?a.sendTransactionBatch(e):a.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTransaction:async e=>{let a=await W(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:S.recoveryMethod,connectingWalletAddress:S.address,isUnifiedWallet:b,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return a.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("@privy-io/js-sdk-core");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(require("tinycolor2"));const r={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let l=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),i=e=>l.has(e),s=(e,t,n)=>n.indexOf(e)===t;const c=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(i).filter(s):e?e.filter(i).filter(s):r.appearance.walletList;let d=/paymaster\.biconomy\.io\/api/i,u={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const g=(e,t)=>e&&d.test(e)?u:t&&t.policy_id?{policyId:t.policy_id}:void 0;function _(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return o.default({...e.toHsl(),l:n})}function p(e,t){let n=e.getLuminance(),a=t.getLuminance();return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}function f(e,t){if(!e){let e=t?b:m;return{accent:o.default(e.background.interactive),accentLight:o.default(e.background.interactive),accentHover:o.default(e.background["interactive-hover"]),accentDark:o.default(e.background["interactive-clicked"]),accentDarkest:o.default(e.background["interactive-disabled"])}}let n=o.default(e);return{accent:n,accentLight:_(n,.15),accentHover:_(n,.3),accentDark:_(n,-.06),accentDarkest:_(n,-.6)}}function h({backgroundTheme:e,accentHex:t}){let n,a;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=o.default(e).getLuminance(),a=o.default(e).toHslString());let r=n?"dark":"light",l=n?b:m,{accent:i,accentLight:s,accentHover:c,accentDark:d,accentDarkest:u}=f(t,n),g=function(e){let t=o.default(m.text.default),n=o.default(b.text.default),a=p(e,t),r=p(e,n),l=e.toHsl();return l.h>=220&&l.h<=300&&r>=3?b.text.default:a>r?m.text.default:b.text.default}(i),_=o.default(g),h=p(i,o.default(l.background.default))>=3;return{colorScheme:r,background:a||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:i.toHslString(),accentLight:s.toHslString(),accentHover:c.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:_.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:h?"1":"0",linkNavigationColor:h?i.toHslString():l.text.default,linkNavigationDecoration:h?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const b={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},m={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function v(e,t,a,o,l){let i,s,d,u,_,p,f,b,m,v,C,w,E,k,F,y,A,x=a?console.warn:()=>{},S=[];if(t?.loginMethods)for(let e of(i=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),_=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),C=t.loginMethods.includes("spotify"),w=t.loginMethods.includes("instagram"),b=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("line"),v=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),E=t.loginMethods.includes("linkedin"),F=t.loginMethods.includes("apple"),y=t.loginMethods.includes("farcaster"),A=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&S.push(e);else i=e.email_auth,s=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,_=e.google_oauth,p=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,C=e.spotify_oauth,w=e.instagram_oauth,b=e.tiktok_oauth,m=e.line_oauth,v=e.twitch_oauth,E=e.linkedin_oauth,F=e.apple_oauth,y=e.farcaster_auth,A=e.telegram_auth,d=e.passkey_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let O=[i,s].filter(Boolean),M=[_,p,f,k,C,w,b,m,E,F,y,A].filter(Boolean),D=[u].filter(Boolean),I=t?.loginMethods?.includes("passkey")??!1,T=e.passkeys_for_signup_enabled??!1,L=[d&&(T||I)].filter(Boolean);if(O.length+M.length+D.length+L.length+S.length===0)throw Error("You must enable at least one login method");let B=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;B&&0===D.length?(x("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),B=!1):B||M.length+O.length!==0||(x("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),B=!0);let U=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&x("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let W=c({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((W.includes("wallet_connect_qr")||W.includes("wallet_connect"))&&W.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let N=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let a of e.overflow??[])t.includes(a)||n.includes(a)?console.warn(`Duplicated login method: ${a}`):n.push(a);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),H=t?.intl?.defaultCountry??"US",{chains:R,defaultChain:P}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=n.dedupeSupportedChains(e)}else a=[...n.DEFAULT_SUPPORTED_CHAINS];let o=e?a[0]:n.mainnet,r=t??o;if(!a.find((e=>e.id===r.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),K=!!t?.defaultChain,Y=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,q=Y?"all-users":e.embedded_wallet_config.ethereum.create_on_login,j=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let G=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,$=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,z=e.smart_wallet_config;return{id:e.id,appClientId:l,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??r.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:h({backgroundTheme:t?.appearance?.theme??r.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:B?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:W,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:i,sms:s,passkey:d,google:_,twitter:p,discord:f,github:k,spotify:C,instagram:w,tiktok:b,line:m,twitch:v,linkedin:E,apple:F,farcaster:y,telegram:A},customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:S,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:N,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??r.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:R,defaultChain:P,intl:{defaultCountry:H,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:K,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:U},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!Y&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:Y?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??q},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??j},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??o??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:Y?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:G,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??r._render.standalone},fundingConfig:$,fundingMethodConfig:{...t?.fundingMethodConfig??r.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??r.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??r.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:z?.enabled?{enabled:z.enabled,smartWalletVersion:z.smart_wallet_version,smartWalletType:z.smart_wallet_type,configuredNetworks:z.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:g(e.paymaster_url,e.paymaster_context)})))}:{enabled:z?.enabled??!1}}}const C={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},w=v(C,void 0,!1);let E=/*#__PURE__*/t.createContext({appConfig:w,isServerConfigLoaded:!1});exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:n,client:a,legacyClient:o,clientConfig:r,appClientId:l})=>{let[i,s]=t.useState(null),c=t.useMemo((()=>v(i??C,r,!!i,"undefined"!=typeof window?window.location.origin:void 0,l)),[i,r,l]);return t.useEffect((()=>{if(!i)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:n,defaultChain:a,externalWallets:o,...r}=e;return{...r,...n?{supportedChains:n.map((e=>e.id))}:void 0,...a?{defaultChain:a.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(r),t=function(e,t=0){let n=3735928559^t,a=1103547991^t;for(let t,o=0;o<e.length;o++)n=Math.imul(n^(t=e.charCodeAt(o)),2654435761),a=Math.imul(a^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),4294967296*(2097151&(a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${i.id}:${t}`;localStorage.getItem(n)||(o.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[r,i]),t.useEffect((()=>{i||(async()=>{try{await a.initialize();let e=a.app.getConfig();e.custom_api_url&&o.updateApiUrl(e.custom_api_url),s(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e.jsx(E.Provider,{value:{appConfig:c,isServerConfigLoaded:!!i},children:n})},exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.VERSION="3.9.0-beta-20251212212932",exports.WALLET_PROXY_TIMEOUT=3e4,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.useAppConfig=()=>{let{appConfig:e}=t.useContext(E);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=t.useContext(E);return e};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("viem"),r=require("./internal-context-
|
|
1
|
+
"use strict";var e=require("viem"),r=require("./internal-context-NWsAL807.js"),t=require("./useActiveWallet-CXspRD1P.js");let s=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),o=e=>s.format(e);const a=(r,t=6,s=!1)=>{let o=parseFloat(e.formatEther(r)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return s?o:`${"0"===o?"<0.001":o}`};exports.getBlockExplorerUrlForAddress=(e,s)=>{let{chains:o}=r.usePrivyInternal(),a=`https://etherscan.io/address/${s}`,i=`${t.getBlockExplorer(e,o)}/address/${s}`;if(!i)return a;try{new URL(i)}catch{return a}return i},exports.getDollarsFromStringFloat=(e,r)=>{let t=o(r*parseFloat(e));return"$0.00"!==t?t:"<$0.01"},exports.getDollarsFromWei=(r,t)=>{let s=o(t*parseFloat(e.formatEther(r)));return"$0.00"===s?"<$0.01":s},exports.getNativeCurrencyFromWei=(e,r,t=6,s=!1)=>`${a(e,t,s)} ${r}`,exports.parseNativeCurrencyFromWei=a,exports.sumWeiQuantities=e=>e.reduce(((e,r)=>e+r),0n);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("@privy-io/js-sdk-core"),t=require("./internal-context-
|
|
1
|
+
"use strict";var e=require("react"),r=require("@privy-io/js-sdk-core"),t=require("./internal-context-NWsAL807.js"),i=require("./get-is-unified-wallet-wZ72VTZL.js"),a=require("./context-WcHVngsl.js"),n=require("./use-sign-with-user-signer-BcAsQTGF.js");require("ofetch"),require("viem"),require("react/jsx-runtime"),require("tinycolor2");exports.useCreateWallet=()=>{let{refreshSessionAndUser:i,privy:a}=t.usePrivyInternal();return e.useMemo((()=>({async createWallet(e){let t=await r.create(a,{request:{chain_type:e.chainType}}),n=await i();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:t}}})),[i,a])},exports.useExportWallet=function(){let{user:r,getAccessToken:n}=i.usePrivyContext(),{walletProxy:s,openModal:l,client:o}=t.usePrivyInternal(),{setModalData:d}=i.usePrivyModal(),u=a.useAppConfig();return e.useMemo((()=>({exportWallet:e=>new Promise((async(a,c)=>{if(!r)return void c(new t.PrivyClientError("User must be authenticated before exporting their Privy wallet"));let p=i.getPrivyWalletWithAddress(r,e.address);p?"spark"===p.chainType&&i.getIsUnifiedWallet(p)?await n()?s?(d({connectWallet:{recoveryMethod:p.recoveryMethod,connectingWalletAddress:p.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:c,shouldForceMFA:!0},keyExport:{appId:u.id,appClientId:u.appClientId,origin:o.apiUrl,address:p.address,hdWalletIndex:p.walletIndex,chainType:p.chainType,walletId:p.id,isUnifiedWallet:!0,imported:p.imported,onSuccess:a,onFailure:c}}),l("EmbeddedWalletConnectingScreen")):c(new t.PrivyClientError("Wallet not ready for export")):c(new t.PrivyClientError("Must have valid access token.")):c(Error("Export via extended-chains is only supported for unified stack wallets")):c(new t.PrivyClientError("User must have an embedded wallet."))}))})),[r,n,s,l,o,d,u])},exports.useSignRawHash=()=>{let{user:a}=i.usePrivyContext(),{privy:s}=t.usePrivyInternal(),{signWithUserSigner:l}=n.useSignWithUserSigner();return e.useMemo((()=>({async signRawHash({address:e,chainType:t,hash:n}){if(!a)throw Error("User must be authenticated before signing");let o=i.getAllPrivyWalletsForChainType(a,t).filter((e=>i.getIsUnifiedWallet(e))).find((r=>r.address===e));if(!o)throw Error("Wallet not found");let d=await r.rawSign(s,l,{wallet_id:o.id,params:{hash:n}});if(d.data&&"signature"in d.data&&"hex"===d.data.encoding)return{signature:d.data.signature};throw Error("Failed to sign")}})),[s,l,a])};
|
package/dist/cjs/farcaster.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("./frame-
|
|
1
|
+
"use strict";var e=require("react"),r=require("./frame-B14fp9oC.js"),t=require("./internal-context-NWsAL807.js");require("./paths-DizMb-lU.js"),require("ofetch");exports.useLoginToMiniApp=()=>{let{client:i,setAuthenticated:a,setUser:n}=t.usePrivyInternal();return{initLoginToMiniApp:e.useCallback((async()=>{let e=new r.FarcasterFramesFlow;if(!i)throw new t.PrivyClientError("Must initialize Privy client first.");return i.startAuthFlow(e),await e.init()}),[i]),loginToMiniApp:e.useCallback((async({message:e,signature:s})=>{if(!i)throw new t.PrivyClientError("Must initialize Privy client first.");if(!(i.authFlow instanceof r.FarcasterFramesFlow))throw new t.PrivyClientError("Must initialize Farcaster Mini App flow first.");let l=(e=>{let r=e.match(/farcaster:\/\/fid\/(\d+)/);return r&&r[1]?parseInt(r[1],10):null})(e);if(!l)throw new t.PrivyClientError("Invalid message format; could not parse Farcaster ID.");i.authFlow.setAuthData({message:e,signature:s,fid:l});let{user:u}=await i.authenticate();return u&&(n(u),a(!0)),u}),[i,n,a])}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var t=require("./internal-context-
|
|
1
|
+
"use strict";var t=require("./internal-context-NWsAL807.js"),i=require("./paths-DizMb-lU.js");exports.FarcasterFramesFlow=class{async init(){if(!this.api)throw new t.PrivyClientError("Auth flow has no API instance");let{nonce:e,expires_at:r}=await this.api.post(i.initFarcasterV2Path,{});return{nonce:e,expiresAt:r}}async authenticate(){if(!this.message||!this.signature||!this.fid)throw new t.PrivyClientError("Auth flow has no message, signature, or fid");if(!this.api)throw new t.PrivyClientError("Auth flow has no API instance");try{let e=await this.api.post(i.authenticateFarcasterV2Path,{message:this.message,signature:this.signature,fid:this.fid});if(!e)throw new t.PrivyClientError("No response from authentication");return e}catch(i){throw t.formatApiError(i)}}async link(){throw Error("Not implemented")}setAuthData({message:t,signature:i,fid:e}){this.message=t,this.signature=i,this.fid=e}constructor(){this.meta={}}};
|