@privy-io/react-auth 3.11.1-beta-20260121203903 → 3.12.0

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.
Files changed (242) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-RZUQmQIk.js → AccountNotFoundScreen-BBWWze9O.js} +1 -1
  2. package/dist/cjs/{Address-DvOcxlUo.js → Address-6qDWL5TN.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-DLWcVEb0.js → AffirmativeConsentScreen-CCwAwjH1.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-D4SmR-eM.js → AllowlistRejectionScreen-DEMYbzGA.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-BWzZT5MI.js → AuthenticateWithWalletScreen-dBvBC7MB.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-k97fI9em.js → AwaitingEvmToSolBridgingScreen-D9NwI47L.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-m4IWTGam.js → AwaitingExternalEthereumTransferScreen-D_0NulpI.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-BpPFuyVa.js → AwaitingPasswordlessCodeScreen-B4HAKL4-.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-DPrRf-se.js → AwaitingSolToEvmBridgingScreen-CnuLLTC0.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-pqZH6aEP.js → BridgeNetworkSelectionView-DKA06V8u.js} +1 -1
  11. package/dist/cjs/{CaptchaScreen-nno_DeVo.js → CaptchaScreen-N-ueJQF3.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-Fit_-mUl.js → CoinbaseOnrampStatusScreen-06yaO6r4.js} +1 -1
  13. package/dist/cjs/{ConnectEmailForm-CvpXHbvm.js → ConnectEmailForm-DZrCSv9t.js} +1 -1
  14. package/dist/cjs/{ConnectLedgerScreen-nBnIQH_E.js → ConnectLedgerScreen-C7vGQocf.js} +1 -1
  15. package/dist/cjs/{ConnectOnlyLandingScreen-DYyltRDK.js → ConnectOnlyLandingScreen-_9y9kOsT.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyStatusScreen-CNydKxL3.js → ConnectOnlyStatusScreen-mZHx4a7S.js} +1 -1
  17. package/dist/cjs/{ConnectOrCreateScreen-CEYOMLS0.js → ConnectOrCreateScreen-Cp4uExOd.js} +1 -1
  18. package/dist/cjs/{ConnectPhoneForm-n0Ir63YF.js → ConnectPhoneForm-BWSmRonl.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-C5RUSkYw.js → ConnectWalletView-Bh1DK9t5.js} +1 -1
  20. package/dist/cjs/{ConnectionStatusScreen-D66HjJ9d.js → ConnectionStatusScreen-B27DUsGt.js} +1 -1
  21. package/dist/cjs/{CrossAppAuthScreen-BlAAnv4P.js → CrossAppAuthScreen-BbLFbCdU.js} +1 -1
  22. package/dist/cjs/{CustomLandingScreenView-Bb3HFp04.js → CustomLandingScreenView-DP1fJrBU.js} +6 -6
  23. package/dist/cjs/{DelegatedActionsConsentScreen-BwFIgwlL.js → DelegatedActionsConsentScreen-DzWruJOn.js} +1 -1
  24. package/dist/cjs/{DelegatedActionsRevokeScreen-hYJVAMSG.js → DelegatedActionsRevokeScreen-D-TwUXyj.js} +1 -1
  25. package/dist/cjs/{EmbeddedWalletConnectingScreen-AHB8rY4q.js → EmbeddedWalletConnectingScreen-CYav4Mjb.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletCreatedScreen-DHAatfd0.js → EmbeddedWalletCreatedScreen-m0t_c_AA.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-CV925NJl.js → EmbeddedWalletKeyExportScreen-_4GMdJuo.js} +1 -1
  28. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B5-JBZRJ.js +1 -0
  29. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-DjKQJpbm.js → EmbeddedWalletPasswordUpdateScreen-CITAy3i6.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Cv5jWZxV.js → EmbeddedWalletPasswordUpdateSplashScreen-DG5LKyjo.js} +1 -1
  31. package/dist/cjs/{EnrollTotp-Dj3Dsvm_.js → EnrollTotp-leOB_B4o.js} +1 -1
  32. package/dist/cjs/{ErrorScreen-CZPWuczS.js → ErrorScreen-xNDIVXx8.js} +1 -1
  33. package/dist/cjs/{FarcasterConnectStatusScreen-DUYhOO7b.js → FarcasterConnectStatusScreen-Bzmd4izn.js} +1 -1
  34. package/dist/cjs/{FarcasterSignerStatusScreen-jWhFgNOH.js → FarcasterSignerStatusScreen-Cxoi54pp.js} +1 -1
  35. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-BSgvqB70.js → FundSolWalletWithExternalSolanaWallet-BCyBv_xe.js} +1 -1
  36. package/dist/cjs/{FundWalletMethodHeader-DQK9y0aY.js → FundWalletMethodHeader-YwNCXAU_.js} +1 -1
  37. package/dist/cjs/{FundingEditAmountScreen-DvNnAP2W.js → FundingEditAmountScreen-CDlb4Acx.js} +1 -1
  38. package/dist/cjs/{FundingMethodSelectionScreen-CalOUo0B.js → FundingMethodSelectionScreen-DlPxjsJq.js} +1 -1
  39. package/dist/cjs/{InAppBrowserLoginNotPossible-BDiHa7jI.js → InAppBrowserLoginNotPossible-Bdx0vKyA.js} +1 -1
  40. package/dist/cjs/{InstallWalletScreen-BJnzGz4d.js → InstallWalletScreen-Cshn01eK.js} +1 -1
  41. package/dist/cjs/{LandingScreen-C1x4_p_d.js → LandingScreen-0FdwpJ9w.js} +1 -1
  42. package/dist/cjs/{LinkConflictScreen-C6x_ncim.js → LinkConflictScreen-BCzS7Szr.js} +1 -1
  43. package/dist/cjs/{LinkEmailScreen-AjVtqBaA.js → LinkEmailScreen-B7rxdQso.js} +1 -1
  44. package/dist/cjs/{LinkPasskeyScreen-DMRGlud1.js → LinkPasskeyScreen-o4qdrAL3.js} +1 -1
  45. package/dist/cjs/{LinkPhoneScreen-DD21Qmod.js → LinkPhoneScreen-DweFqlM1.js} +1 -1
  46. package/dist/cjs/{LoginFailedScreen-CIpe87NH.js → LoginFailedScreen-mHcvCBEz.js} +1 -1
  47. package/dist/cjs/{ManualTransferScreen-CyJYfUlU.js → ManualTransferScreen-CfYgtyLD.js} +1 -1
  48. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-DzngmyLo.js → MfaAuthEnrollmentFlowScreen-D631h0XW.js} +1 -1
  49. package/dist/cjs/MfaAuthVerifyFlowScreen-BZ3IyqAd.js +1 -0
  50. package/dist/cjs/{MfaEnrollmentFlowScreen-55tEmBJh.js → MfaEnrollmentFlowScreen-_tNeX5lT.js} +1 -1
  51. package/dist/cjs/MfaVerifyFlowScreen-D_7nkuBq.js +1 -0
  52. package/dist/cjs/{ModalHeader-LSXkaXcl.js → ModalHeader-C5O9gNUP.js} +1 -1
  53. package/dist/cjs/{MoonpayStatusScreen-D_q2vNSj.js → MoonpayStatusScreen-DoFbZ_0d.js} +1 -1
  54. package/dist/cjs/{OAuthStatusScreen-Q32YT7Xd.js → OAuthStatusScreen-BZY7BiP5.js} +1 -1
  55. package/dist/cjs/{PasskeySelectSignupOrLogin-QWZDah9B.js → PasskeySelectSignupOrLogin-C3k_ixTz.js} +1 -1
  56. package/dist/cjs/{PasskeyStatusScreen-Btu1z-Db.js → PasskeyStatusScreen-BX-SOBDr.js} +1 -1
  57. package/dist/cjs/{PasswordRecoveryScreen-DBi0pol-.js → PasswordRecoveryScreen-VZQDtt5v.js} +1 -1
  58. package/dist/cjs/{QrCode-B5AlIfrN.js → QrCode-CLd3Ytk7.js} +1 -1
  59. package/dist/cjs/{RecoveryOAuthStatusScreen-COSwnkwr.js → RecoveryOAuthStatusScreen-DKYx6ECd.js} +1 -1
  60. package/dist/cjs/{RecoveryPasswordCreateScreen-DBXYtHzz.js → RecoveryPasswordCreateScreen-DP0xOBMA.js} +1 -1
  61. package/dist/cjs/{RecoverySelectionScreen-CMaje15b.js → RecoverySelectionScreen-Bw9_M6y0.js} +1 -1
  62. package/dist/cjs/{Screen-C4gtVIB2.js → Screen-BSwlHqPg.js} +1 -1
  63. package/dist/cjs/{ScreenLayout-COH0TK8Y.js → ScreenLayout-BtVIYAso.js} +1 -1
  64. package/dist/cjs/{SetAutomaticRecoveryScreen-D5Hw8eNe.js → SetAutomaticRecoveryScreen-SUOUjBk4.js} +1 -1
  65. package/dist/cjs/{SetWalletPasswordForm-BIaXMtEl.js → SetWalletPasswordForm-Gkq-DskE.js} +1 -1
  66. package/dist/cjs/{SignRequestScreen-BZ4eapC7.js → SignRequestScreen-BNcy6yU_.js} +1 -1
  67. package/dist/cjs/{StandardSignAndSendTransactionScreen-r2GXb1G6.js → StandardSignAndSendTransactionScreen-z_EUNaeD.js} +1 -1
  68. package/dist/cjs/{TelegramAuthScreen-9wKUQlkU.js → TelegramAuthScreen-DV8KYJMX.js} +1 -1
  69. package/dist/cjs/{TransactionDetails-COpAbn2x.js → TransactionDetails-DYow9ihU.js} +1 -1
  70. package/dist/cjs/{TransactionErrorView-0GIGeFK2.js → TransactionErrorView-yUMJqqF2.js} +1 -1
  71. package/dist/cjs/{TransferFromWalletScreen-DWZP1uGW.js → TransferFromWalletScreen-Duk7CEcq.js} +1 -1
  72. package/dist/cjs/{TransferOrBridgeLoadingScreen-CkIL1XXz.js → TransferOrBridgeLoadingScreen-DuBLyfE1.js} +1 -1
  73. package/dist/cjs/{UpdateEmailScreen-DvH9-lSu.js → UpdateEmailScreen-DRJv5CZs.js} +1 -1
  74. package/dist/cjs/{UpdatePhoneScreen-DRed5FbH.js → UpdatePhoneScreen-C3myqOv0.js} +1 -1
  75. package/dist/cjs/{UserLimitReachedScreen-BqYIFksV.js → UserLimitReachedScreen-l_e6Vhr0.js} +1 -1
  76. package/dist/cjs/{WalletInfoCard-CiGIQ_Ui.js → WalletInfoCard-CHEynRZS.js} +1 -1
  77. package/dist/cjs/{WalletInterstitialScreen-Lj5ftT4Q.js → WalletInterstitialScreen-BgoDwKIp.js} +1 -1
  78. package/dist/cjs/{WalletLink-Dj3bs71e.js → WalletLink-CZLtiI7E.js} +1 -1
  79. package/dist/cjs/{WalletOverflowButton-CqqjQnq9.js → WalletOverflowButton-FlgoA77a.js} +1 -1
  80. package/dist/cjs/abstract-smart-wallets.js +1 -1
  81. package/dist/cjs/{context-wZdgWZUB.js → context-BeSQM-Ma.js} +1 -1
  82. package/dist/cjs/{ethers-CKQdyx7W.js → ethers-XrYC9HG-.js} +1 -1
  83. package/dist/cjs/extended-chains.js +1 -1
  84. package/dist/cjs/{get-is-unified-wallet-ibtz66iD.js → get-is-unified-wallet-BwdzQwn_.js} +1 -1
  85. package/dist/cjs/{index-BQkbc-uV.js → index-0-2WrPDo.js} +1 -1
  86. package/dist/cjs/{index-mNjkTRbF.js → index-CzmnSRoa.js} +6 -6
  87. package/dist/cjs/{index-wMbil80w.js → index-W2ZSukRW.js} +1 -1
  88. package/dist/cjs/index.js +1 -1
  89. package/dist/cjs/internal.js +1 -1
  90. package/dist/cjs/{prepareFundingModalData-DUhgT6Y0.js → prepareFundingModalData-DDf6xLze.js} +1 -1
  91. package/dist/cjs/{shared-C7aAS5SO.js → shared-BcueHfN-.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-CwtJGqzM.js → shouldProceedtoEmbeddedWalletCreationFlow-j6p9PEm-.js} +1 -1
  93. package/dist/cjs/{smart-wallets-B-fEYiIl.js → smart-wallets-BBh3vgRq.js} +1 -1
  94. package/dist/cjs/smart-wallets.js +1 -1
  95. package/dist/cjs/solana.js +1 -1
  96. package/dist/cjs/{styles-DH0Tsq0O.js → styles-Csarwypj.js} +1 -1
  97. package/dist/cjs/to-ui-error-C4aac_aM.js +4 -0
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/{use-export-wallet-Be7AipzS.js → use-export-wallet-C9HWu0Dq.js} +1 -1
  100. package/dist/cjs/{useActiveWallet-D9GOotll.js → useActiveWallet-vlXeDPzp.js} +1 -1
  101. package/dist/cjs/{useGetTokenPrice-CoEf4JSB.js → useGetTokenPrice-DJpJnTij.js} +1 -1
  102. package/dist/cjs/{useI18n-Dqwophu1.js → useI18n-CnsBjm9v.js} +1 -1
  103. package/dist/cjs/usePrivy-Bx2PKTrU.js +1 -0
  104. package/dist/cjs/{useSolanaRpcClient-DxLm7cuH.js → useSolanaRpcClient-CYMWkK7E.js} +1 -1
  105. package/dist/cjs/{useWallets-DCGyh9dN.js → useWallets-BwB7ALB8.js} +1 -1
  106. package/dist/cjs/{useWallets-DoT0AQ3s.js → useWallets-DMyuB5aJ.js} +1 -1
  107. package/dist/dts/{events-context-BTan6II8.d.mts → events-context-DeukTtar.d.mts} +1 -1
  108. package/dist/dts/{events-context-BTan6II8.d.ts → events-context-DeukTtar.d.ts} +1 -1
  109. package/dist/dts/extended-chains.d.mts +1 -1
  110. package/dist/dts/extended-chains.d.ts +1 -1
  111. package/dist/dts/farcaster.d.mts +1 -1
  112. package/dist/dts/farcaster.d.ts +1 -1
  113. package/dist/dts/index.d.mts +6 -4
  114. package/dist/dts/index.d.ts +6 -4
  115. package/dist/dts/internal.d.mts +1 -1
  116. package/dist/dts/internal.d.ts +1 -1
  117. package/dist/dts/smart-wallets.d.mts +1 -1
  118. package/dist/dts/smart-wallets.d.ts +1 -1
  119. package/dist/dts/solana.d.mts +3 -3
  120. package/dist/dts/solana.d.ts +3 -3
  121. package/dist/dts/{types-B4eMcjTQ.d.mts → types-FifkyCQc.d.mts} +1 -0
  122. package/dist/dts/{types-B4eMcjTQ.d.ts → types-FifkyCQc.d.ts} +1 -0
  123. package/dist/dts/ui.d.mts +1 -1
  124. package/dist/dts/ui.d.ts +1 -1
  125. package/dist/esm/{AccountNotFoundScreen-CI0D4ySi.mjs → AccountNotFoundScreen-C6S8_GyN.mjs} +1 -1
  126. package/dist/esm/{Address-C4fukiNP.mjs → Address-QmAVCQtO.mjs} +1 -1
  127. package/dist/esm/{AffirmativeConsentScreen-efWx6UzN.mjs → AffirmativeConsentScreen-QfJBfI_f.mjs} +1 -1
  128. package/dist/esm/{AllowlistRejectionScreen-BXMajVbe.mjs → AllowlistRejectionScreen-CX57yv4U.mjs} +1 -1
  129. package/dist/esm/{AuthenticateWithWalletScreen-B7IBRpcP.mjs → AuthenticateWithWalletScreen-CZJ-aWhZ.mjs} +1 -1
  130. package/dist/esm/{AwaitingEvmToSolBridgingScreen-cxBOftrF.mjs → AwaitingEvmToSolBridgingScreen-C1CMtT4Y.mjs} +1 -1
  131. package/dist/esm/{AwaitingExternalEthereumTransferScreen-CgZPJxNW.mjs → AwaitingExternalEthereumTransferScreen-DX91STcF.mjs} +1 -1
  132. package/dist/esm/{AwaitingPasswordlessCodeScreen-pIPldPkU.mjs → AwaitingPasswordlessCodeScreen-BuExr50N.mjs} +1 -1
  133. package/dist/esm/{AwaitingSolToEvmBridgingScreen-BJc0jK3s.mjs → AwaitingSolToEvmBridgingScreen-Bm1i_2qW.mjs} +1 -1
  134. package/dist/esm/{BridgeNetworkSelectionView-DjURqgXj.mjs → BridgeNetworkSelectionView-DQGcampg.mjs} +1 -1
  135. package/dist/esm/{CaptchaScreen-DZhOLCO9.mjs → CaptchaScreen-B-hFDb5f.mjs} +1 -1
  136. package/dist/esm/{CoinbaseOnrampStatusScreen-CY3MKXAS.mjs → CoinbaseOnrampStatusScreen-OHm2RUBv.mjs} +1 -1
  137. package/dist/esm/{ConnectEmailForm-NcyqdOJE.mjs → ConnectEmailForm-Df5OtmDR.mjs} +1 -1
  138. package/dist/esm/{ConnectLedgerScreen-BCbXSUmJ.mjs → ConnectLedgerScreen-BHLYW-F3.mjs} +1 -1
  139. package/dist/esm/{ConnectOnlyLandingScreen-DDKT7Q7k.mjs → ConnectOnlyLandingScreen-C6nzEwpN.mjs} +1 -1
  140. package/dist/esm/{ConnectOnlyStatusScreen-CYq-frYL.mjs → ConnectOnlyStatusScreen-CremlXDY.mjs} +1 -1
  141. package/dist/esm/{ConnectOrCreateScreen-cJAfQx-J.mjs → ConnectOrCreateScreen-262UvCdD.mjs} +1 -1
  142. package/dist/esm/{ConnectPhoneForm-DjqZxuB-.mjs → ConnectPhoneForm-BMtTIItD.mjs} +1 -1
  143. package/dist/esm/{ConnectWalletView-CGp7rFXq.mjs → ConnectWalletView-BMjEKo1_.mjs} +1 -1
  144. package/dist/esm/{ConnectionStatusScreen-CWFkg5OC.mjs → ConnectionStatusScreen-mk5beBL7.mjs} +1 -1
  145. package/dist/esm/{CrossAppAuthScreen-DqRTKCRF.mjs → CrossAppAuthScreen-BXjEJQv6.mjs} +1 -1
  146. package/dist/esm/{CustomLandingScreenView-BxPTSEZL.mjs → CustomLandingScreenView-BlDfJaDr.mjs} +3 -3
  147. package/dist/esm/{DelegatedActionsConsentScreen-Dgg2-1Sn.mjs → DelegatedActionsConsentScreen-ANmQe-9G.mjs} +1 -1
  148. package/dist/esm/{DelegatedActionsRevokeScreen-CztqU_Oo.mjs → DelegatedActionsRevokeScreen-D9X7mWmI.mjs} +1 -1
  149. package/dist/esm/{EmbeddedWalletConnectingScreen-B4sUIif5.mjs → EmbeddedWalletConnectingScreen-2g-RrIvW.mjs} +1 -1
  150. package/dist/esm/{EmbeddedWalletCreatedScreen-Djv6kWAI.mjs → EmbeddedWalletCreatedScreen-BXTAv4_-.mjs} +1 -1
  151. package/dist/esm/{EmbeddedWalletKeyExportScreen-BqozBh7H.mjs → EmbeddedWalletKeyExportScreen-DYVHVHOj.mjs} +1 -1
  152. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-CYyMoMFF.mjs +1 -0
  153. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-BoQ-HdCR.mjs → EmbeddedWalletPasswordUpdateScreen-oT5ZcPQV.mjs} +1 -1
  154. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-B6k6GRZN.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BQcHDyuV.mjs} +1 -1
  155. package/dist/esm/{EnrollTotp-CukCif6j.mjs → EnrollTotp-DVLg14UT.mjs} +1 -1
  156. package/dist/esm/{ErrorScreen-BACrlbnT.mjs → ErrorScreen-CLfeO5pd.mjs} +1 -1
  157. package/dist/esm/{FarcasterConnectStatusScreen-BmATusyA.mjs → FarcasterConnectStatusScreen-CUO9DKCJ.mjs} +1 -1
  158. package/dist/esm/{FarcasterSignerStatusScreen-CWjyzBwk.mjs → FarcasterSignerStatusScreen-B135UOnV.mjs} +1 -1
  159. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-BvQrkL0k.mjs → FundSolWalletWithExternalSolanaWallet-DO3ttgom.mjs} +1 -1
  160. package/dist/esm/{FundWalletMethodHeader-AiS18uZn.mjs → FundWalletMethodHeader-PIxwFzzh.mjs} +1 -1
  161. package/dist/esm/{FundingEditAmountScreen-kKwJ8dz8.mjs → FundingEditAmountScreen-BRQb2ffL.mjs} +1 -1
  162. package/dist/esm/{FundingMethodSelectionScreen-Cywf8FMW.mjs → FundingMethodSelectionScreen-DTt1Z5RI.mjs} +1 -1
  163. package/dist/esm/{InAppBrowserLoginNotPossible-DfscY-nj.mjs → InAppBrowserLoginNotPossible-DH96QD2c.mjs} +1 -1
  164. package/dist/esm/{InstallWalletScreen-CCT-Qs7e.mjs → InstallWalletScreen-PnK6VfrP.mjs} +1 -1
  165. package/dist/esm/{LandingScreen-BKw0C3-6.mjs → LandingScreen-D_EvjOHf.mjs} +1 -1
  166. package/dist/esm/{LinkConflictScreen-ppQfc4uC.mjs → LinkConflictScreen-B94e_-2N.mjs} +1 -1
  167. package/dist/esm/{LinkEmailScreen-3fD1dFMW.mjs → LinkEmailScreen-CT8gAQr3.mjs} +1 -1
  168. package/dist/esm/{LinkPasskeyScreen-CUdvQeqw.mjs → LinkPasskeyScreen-DYfWSjKR.mjs} +1 -1
  169. package/dist/esm/{LinkPhoneScreen-avo8CmrK.mjs → LinkPhoneScreen-ccrKA6tf.mjs} +1 -1
  170. package/dist/esm/{LoginFailedScreen-CqOzzZaq.mjs → LoginFailedScreen-BwgxhbMf.mjs} +1 -1
  171. package/dist/esm/{ManualTransferScreen-BE_WaxS9.mjs → ManualTransferScreen-DgCG2P3B.mjs} +1 -1
  172. package/dist/esm/{MfaAuthEnrollmentFlowScreen-D8kccFQA.mjs → MfaAuthEnrollmentFlowScreen-CNVUTOnE.mjs} +1 -1
  173. package/dist/esm/MfaAuthVerifyFlowScreen-2nvvFipu.mjs +1 -0
  174. package/dist/esm/{MfaEnrollmentFlowScreen-99fSY8g-.mjs → MfaEnrollmentFlowScreen-DfnIqNNU.mjs} +1 -1
  175. package/dist/esm/MfaVerifyFlowScreen-BwerwBz5.mjs +1 -0
  176. package/dist/esm/{ModalHeader-BAGwTwiB.mjs → ModalHeader-rCMpqA2a.mjs} +1 -1
  177. package/dist/esm/{MoonpayStatusScreen-Cg4mZfRC.mjs → MoonpayStatusScreen-D5fRCEb3.mjs} +1 -1
  178. package/dist/esm/{OAuthStatusScreen-UdobH4WP.mjs → OAuthStatusScreen-DtLgYw89.mjs} +1 -1
  179. package/dist/esm/{PasskeySelectSignupOrLogin-xct1rtzo.mjs → PasskeySelectSignupOrLogin-QoPhmagh.mjs} +1 -1
  180. package/dist/esm/{PasskeyStatusScreen-DYsvVX3i.mjs → PasskeyStatusScreen-DzjU3ZVT.mjs} +1 -1
  181. package/dist/esm/{PasswordRecoveryScreen-B9EHvANs.mjs → PasswordRecoveryScreen-LZYGRBkP.mjs} +1 -1
  182. package/dist/esm/{QrCode-CT_CXG3e.mjs → QrCode-DjnQgnaZ.mjs} +1 -1
  183. package/dist/esm/{RecoveryOAuthStatusScreen-DNfp6fRv.mjs → RecoveryOAuthStatusScreen-DKfp8Udh.mjs} +1 -1
  184. package/dist/esm/{RecoveryPasswordCreateScreen-CtisV6Qu.mjs → RecoveryPasswordCreateScreen-D4DI5Bom.mjs} +1 -1
  185. package/dist/esm/{RecoverySelectionScreen-BzhQF-en.mjs → RecoverySelectionScreen-B2V3518x.mjs} +1 -1
  186. package/dist/esm/{Screen-Dv092amM.mjs → Screen-CV2tt2Ap.mjs} +1 -1
  187. package/dist/esm/{ScreenLayout-DG_XRElR.mjs → ScreenLayout-DF3DCKOK.mjs} +1 -1
  188. package/dist/esm/{SetAutomaticRecoveryScreen-Cc5MVRbR.mjs → SetAutomaticRecoveryScreen-C6cFVbSx.mjs} +1 -1
  189. package/dist/esm/{SetWalletPasswordForm-D3-A_JVl.mjs → SetWalletPasswordForm-ChA4tW4Y.mjs} +1 -1
  190. package/dist/esm/{SignRequestScreen-DXUaMZ6j.mjs → SignRequestScreen-BslfKJ1N.mjs} +1 -1
  191. package/dist/esm/{StandardSignAndSendTransactionScreen-DuuDN9Sp.mjs → StandardSignAndSendTransactionScreen-D4OBsj5k.mjs} +1 -1
  192. package/dist/esm/{TelegramAuthScreen-ByE57dqV.mjs → TelegramAuthScreen-BJq5f_Rq.mjs} +1 -1
  193. package/dist/esm/{TransactionDetails-BnKb_enO.mjs → TransactionDetails-BP142O9n.mjs} +1 -1
  194. package/dist/esm/{TransactionErrorView-BEWZNGyq.mjs → TransactionErrorView-BwwGMqSj.mjs} +1 -1
  195. package/dist/esm/{TransferFromWalletScreen-CHxSLdSM.mjs → TransferFromWalletScreen-BHH0YcI4.mjs} +1 -1
  196. package/dist/esm/{TransferOrBridgeLoadingScreen-mLHBuB78.mjs → TransferOrBridgeLoadingScreen-VLQTcf_6.mjs} +1 -1
  197. package/dist/esm/{UpdateEmailScreen-Ckp4zEBP.mjs → UpdateEmailScreen-CMFBvYz5.mjs} +1 -1
  198. package/dist/esm/{UpdatePhoneScreen-CBJdvtlX.mjs → UpdatePhoneScreen-DmhHcNq3.mjs} +1 -1
  199. package/dist/esm/{UserLimitReachedScreen-Csq5lFOZ.mjs → UserLimitReachedScreen-DNqgCf3B.mjs} +1 -1
  200. package/dist/esm/{WalletInfoCard-DKxQTgDG.mjs → WalletInfoCard-ChBHG5L5.mjs} +1 -1
  201. package/dist/esm/{WalletInterstitialScreen-TrxS1y6N.mjs → WalletInterstitialScreen-RS89fm6t.mjs} +1 -1
  202. package/dist/esm/{WalletLink-Dqy4DrLT.mjs → WalletLink-CN4enmsE.mjs} +1 -1
  203. package/dist/esm/{WalletOverflowButton-CF8zOlXL.mjs → WalletOverflowButton-B-nEN4GW.mjs} +1 -1
  204. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  205. package/dist/esm/context-LVpDfP2H.mjs +1 -0
  206. package/dist/esm/{ethers-jrpF9vqa.mjs → ethers-BQ45eiVv.mjs} +1 -1
  207. package/dist/esm/extended-chains.mjs +1 -1
  208. package/dist/esm/{get-is-unified-wallet-DKm2LBUt.mjs → get-is-unified-wallet-CNcx75Dp.mjs} +1 -1
  209. package/dist/esm/{index-RTEGzREl.mjs → index-2knYP69D.mjs} +1 -1
  210. package/dist/esm/{index-DNLZMnCG.mjs → index-DNz_w3-G.mjs} +4 -4
  211. package/dist/esm/{index-BLPxiHb2.mjs → index-DoasOxbi.mjs} +1 -1
  212. package/dist/esm/index.mjs +1 -1
  213. package/dist/esm/internal.mjs +1 -1
  214. package/dist/esm/{prepareFundingModalData-BHVs3Cx-.mjs → prepareFundingModalData-DjTxAoJ1.mjs} +1 -1
  215. package/dist/esm/{shared-BjYW7t-U.mjs → shared-DwO5pr5t.mjs} +1 -1
  216. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-Ir-axYfm.mjs → shouldProceedtoEmbeddedWalletCreationFlow-Cv_C9s3_.mjs} +1 -1
  217. package/dist/esm/{smart-wallets-BcApWuwL.mjs → smart-wallets-9LKzbfWj.mjs} +1 -1
  218. package/dist/esm/smart-wallets.mjs +1 -1
  219. package/dist/esm/solana.mjs +1 -1
  220. package/dist/esm/{styles-C12iVD4I.mjs → styles-BNn7MnP1.mjs} +1 -1
  221. package/dist/esm/to-ui-error-CCqAdorW.mjs +4 -0
  222. package/dist/esm/ui.mjs +1 -1
  223. package/dist/esm/{use-export-wallet-D2afU6Pi.mjs → use-export-wallet-DllHf-2F.mjs} +1 -1
  224. package/dist/esm/{useActiveWallet-CT7uncGy.mjs → useActiveWallet-RZ4w-uGq.mjs} +1 -1
  225. package/dist/esm/{useGetTokenPrice-CInz9y-l.mjs → useGetTokenPrice-DERdsrmf.mjs} +1 -1
  226. package/dist/esm/{useI18n-_trTURSX.mjs → useI18n-Dk9y58cU.mjs} +1 -1
  227. package/dist/esm/usePrivy-Dj52a5sp.mjs +1 -0
  228. package/dist/esm/{useSolanaRpcClient-BPnbGqxB.mjs → useSolanaRpcClient-B7UDPdLi.mjs} +1 -1
  229. package/dist/esm/{useWallets-Cs7YKcaR.mjs → useWallets-DlGuNtGR.mjs} +1 -1
  230. package/dist/esm/{useWallets-DnyWQdit.mjs → useWallets-cSQYA-Jk.mjs} +1 -1
  231. package/package.json +6 -6
  232. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-7a79-vYL.js +0 -1
  233. package/dist/cjs/MfaAuthVerifyFlowScreen-CBOzaSAc.js +0 -1
  234. package/dist/cjs/MfaVerifyFlowScreen-DaIPQR72.js +0 -1
  235. package/dist/cjs/to-ui-error-ByzUez1b.js +0 -4
  236. package/dist/cjs/usePrivy-BhaLJaKF.js +0 -1
  237. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DWvW9eRs.mjs +0 -1
  238. package/dist/esm/MfaAuthVerifyFlowScreen-Cb9DZ4gN.mjs +0 -1
  239. package/dist/esm/MfaVerifyFlowScreen-o_Yfo0QH.mjs +0 -1
  240. package/dist/esm/context-C7FGpzoq.mjs +0 -1
  241. package/dist/esm/to-ui-error-GnZ5qhQ4.mjs +0 -4
  242. package/dist/esm/usePrivy-DXv-y-86.mjs +0 -1
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import{M as o,B as i}from"./ModalHeader-BAGwTwiB.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-AiS18uZn.mjs";import{C as s}from"./Chip-D2-wZOHJ.mjs";import{S as p}from"./Subtitle-CV-2yKE4.mjs";import{u as d}from"./context-C7FGpzoq.mjs";import{F as m,Q as y,m as u,T as h,U as w,v as f,a8 as T}from"./useActiveWallet-CT7uncGy.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as C}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as v}from"./useWallets-Cs7YKcaR.mjs";import{W as _}from"./WalletOverflowButton-CF8zOlXL.mjs";import{A as j,D as x,E as S}from"./index-DNLZMnCG.mjs";import{isMobile as W}from"react-device-detect";import{styled as b}from"styled-components";import{I as $}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{I as k}from"./styles-C12iVD4I.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"zustand";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"lucide-react";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./LinkPasskeyScreen-CUdvQeqw.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DG_XRElR.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=C(),{connectWallet:p}=g(),d=m(),w=y(t),f="wallet_connect_v2"===i.connectorType?t:i.walletClientType,T=window.matchMedia("(display-mode: standalone)").matches,v=u({connectorType:i.connectorType,walletClientType:f});r=v&&v.chainTypes.includes(i.chainType)?()=>{v.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,f),c(o?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):W?(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("WalletInterstitialScreen")):(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!W||T||h()?()=>{(!j(window.navigator.userAgent)||event?.isTrusted)&&(p(i,f),o?"wallet_connect_v2"===i.connectorType?(s((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),c("ConnectOnlyLandingScreen")):c("ConnectOnlyStatusScreen"):c("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let _=l||w?.metadata?.shortName||w?.name||i.walletClientType;/*#__PURE__*/return e(D,{onClick:r,children:[/*#__PURE__*/n($,{icon:a||w?.image_url?.md,name:_}),/*#__PURE__*/n("span",{children:_}),/*#__PURE__*/e(M,{id:"chip-container",children:[d?.walletClientType===f&&d?.chainType===i.chainType?/*#__PURE__*/n(I,{color:"gray",children:"Recent"}):/*#__PURE__*/n("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/n(I,{color:"gray",children:"Solana"})]})]})};let D=b(w)`
1
+ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import{M as o,B as i}from"./ModalHeader-rCMpqA2a.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-PIxwFzzh.mjs";import{C as s}from"./Chip-D2-wZOHJ.mjs";import{S as p}from"./Subtitle-CV-2yKE4.mjs";import{u as d}from"./context-LVpDfP2H.mjs";import{F as m,Q as y,m as u,T as h,U as w,v as f,a8 as T}from"./useActiveWallet-RZ4w-uGq.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as C}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{u as v}from"./useWallets-DlGuNtGR.mjs";import{W as _}from"./WalletOverflowButton-B-nEN4GW.mjs";import{A as j,D as x,E as S}from"./index-DNz_w3-G.mjs";import{isMobile as W}from"react-device-detect";import{styled as b}from"styled-components";import{I as $}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{I as k}from"./styles-BNn7MnP1.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"zustand";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"lucide-react";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./LinkPasskeyScreen-DYfWSjKR.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DF3DCKOK.mjs";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=C(),{connectWallet:p}=g(),d=m(),w=y(t),f="wallet_connect_v2"===i.connectorType?t:i.walletClientType,T=window.matchMedia("(display-mode: standalone)").matches,v=u({connectorType:i.connectorType,walletClientType:f});r=v&&v.chainTypes.includes(i.chainType)?()=>{v.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,f),c(o?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):W?(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("WalletInterstitialScreen")):(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!W||T||h()?()=>{(!j(window.navigator.userAgent)||event?.isTrusted)&&(p(i,f),o?"wallet_connect_v2"===i.connectorType?(s((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),c("ConnectOnlyLandingScreen")):c("ConnectOnlyStatusScreen"):c("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let _=l||w?.metadata?.shortName||w?.name||i.walletClientType;/*#__PURE__*/return e(D,{onClick:r,children:[/*#__PURE__*/n($,{icon:a||w?.image_url?.md,name:_}),/*#__PURE__*/n("span",{children:_}),/*#__PURE__*/e(M,{id:"chip-container",children:[d?.walletClientType===f&&d?.chainType===i.chainType?/*#__PURE__*/n(I,{color:"gray",children:"Recent"}):/*#__PURE__*/n("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/n(I,{color:"gray",children:"Solana"})]})]})};let D=b(w)`
2
2
  /* Wallet name text color */
3
3
  > span {
4
4
  color: var(--privy-color-foreground);
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{styled as o}from"styled-components";import{d as t}from"./Layouts-BlFm53ED.mjs";import{B as n}from"./ModalHeader-BAGwTwiB.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as a}from"./FundWalletMethodHeader-AiS18uZn.mjs";import{I as s}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as d}from"./index-Dq_xe9dz.mjs";import{a as l,R as c}from"./Row-C9vrS4Zi.mjs";import{L as h,V as p}from"./Value-tcJV9e0L.mjs";import{A as f}from"./Address-C4fukiNP.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{Q as j}from"./useActiveWallet-CT7uncGy.mjs";const I=({walletClientType:o,displayName:I,addressToFund:w,chainId:y,chainName:x,isBridging:N,isErc20Flow:C,totalPriceInNativeCurrency:T,totalPriceInUsd:v,gasPriceInNativeCurrency:B,gasPriceInUsd:P})=>{let A=j(o);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/i(a,{}),/*#__PURE__*/i(d,{centerIcon:/*#__PURE__*/i(s,{icon:A?.image_url?.md,name:o})}),/*#__PURE__*/i(m,{style:{marginTop:"8px",marginBottom:"12px"},title:`${N?"Bridging":"Confirming"} with ${I}`}),!N&&!C&&/*#__PURE__*/e(l,{children:[/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Total"}),/*#__PURE__*/i(p,{children:v||T})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"To"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/i(f,{address:w,showCopyIcon:!1})})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Network"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/e(u,{children:[/*#__PURE__*/i(g,{chainId:y,height:16,width:16})," ",x]})})]}),B&&/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Estimated fee"}),/*#__PURE__*/i(p,{children:P||B})]})]}),/*#__PURE__*/i(t,{height:24}),/*#__PURE__*/i(n,{})]})};let u=o.div`
1
+ import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{styled as o}from"styled-components";import{d as t}from"./Layouts-BlFm53ED.mjs";import{B as n}from"./ModalHeader-rCMpqA2a.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as a}from"./FundWalletMethodHeader-PIxwFzzh.mjs";import{I as s}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as d}from"./index-Dq_xe9dz.mjs";import{a as l,R as c}from"./Row-C9vrS4Zi.mjs";import{L as h,V as p}from"./Value-tcJV9e0L.mjs";import{A as f}from"./Address-QmAVCQtO.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{Q as j}from"./useActiveWallet-RZ4w-uGq.mjs";const I=({walletClientType:o,displayName:I,addressToFund:w,chainId:y,chainName:x,isBridging:N,isErc20Flow:C,totalPriceInNativeCurrency:T,totalPriceInUsd:v,gasPriceInNativeCurrency:B,gasPriceInUsd:P})=>{let A=j(o);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/i(a,{}),/*#__PURE__*/i(d,{centerIcon:/*#__PURE__*/i(s,{icon:A?.image_url?.md,name:o})}),/*#__PURE__*/i(m,{style:{marginTop:"8px",marginBottom:"12px"},title:`${N?"Bridging":"Confirming"} with ${I}`}),!N&&!C&&/*#__PURE__*/e(l,{children:[/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Total"}),/*#__PURE__*/i(p,{children:v||T})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"To"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/i(f,{address:w,showCopyIcon:!1})})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Network"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/e(u,{children:[/*#__PURE__*/i(g,{chainId:y,height:16,width:16})," ",x]})})]}),B&&/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Estimated fee"}),/*#__PURE__*/i(p,{children:P||B})]})]}),/*#__PURE__*/i(t,{height:24}),/*#__PURE__*/i(n,{})]})};let u=o.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  align-items: center;
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import i from"@heroicons/react/24/outline/EnvelopeIcon";import{B as o}from"./Layouts-BlFm53ED.mjs";import{Mail as a}from"lucide-react";import{forwardRef as s,useState as m}from"react";import{u as n}from"./context-C7FGpzoq.mjs";import{a as l}from"./index-DNLZMnCG.mjs";import{u as d}from"./internal-context-Z-fyxadS.mjs";import{u as c,a as p}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{a1 as u,V as h}from"./useActiveWallet-CT7uncGy.mjs";import{E as f,P as j}from"./ModalHeader-BAGwTwiB.mjs";import{I as v,E as g}from"./EmailInputForm-Dgoii4vf.mjs";import{E as y}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-DG_XRElR.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-Cs7YKcaR.mjs";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,v]=m(""),[g,w]=m(""),[k,E]=m(!1),{authenticated:A,user:C}=c(),{initUpdateEmail:x}=d(),{navigate:I,setModalData:M,currentScreen:P}=p(),{enabled:T,token:U}=l(),D=n(),L=u(s)&&(D.disablePlusEmails&&s.includes("+")?(g||w("Please enter a valid email address without a '+'."),!1):(g&&w(""),!0)),W=k||!L,q=()=>{!T||U||A?(async e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");E(!0);try{await x({oldAddress:C.email.address,newAddress:s,captchaToken:e}),I("AwaitingPasswordlessCodeScreen")}catch(e){M({errorModalData:{error:e,previousScreen:P||"LandingScreen"}}),I("ErrorScreen")}E(!1)})(U):(M({captchaModalData:{callback:e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");return x({oldAddress:C.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),I("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(b,{children:[g&&/*#__PURE__*/t(y,{style:{marginTop:"0.25rem",textAlign:"left"},children:g}),/*#__PURE__*/e(S,{$error:!!g,children:[/*#__PURE__*/t(h,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&q()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(f,{isSubmitting:k,onClick:q,disabled:W,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(j,{loadingText:null,loading:k,disabled:W,onClick:q,style:{width:"100%"},children:"Submit"}):null]})}));let b=v,S=g;const E=({title:e="Update your email",subtitle:r="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/t(w,{title:e,subtitle:r,icon:i,watermark:!0,children:/*#__PURE__*/t(o,{children:/*#__PURE__*/t(k,{stacked:!0})})}),A={component:()=>/*#__PURE__*/t(E,{})};export{A as UpdateEmailScreen,E as UpdateEmailScreenView,A as default};
1
+ import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import i from"@heroicons/react/24/outline/EnvelopeIcon";import{B as o}from"./Layouts-BlFm53ED.mjs";import{Mail as a}from"lucide-react";import{forwardRef as s,useState as m}from"react";import{u as n}from"./context-LVpDfP2H.mjs";import{a as l}from"./index-DNz_w3-G.mjs";import{u as d}from"./internal-context-Z-fyxadS.mjs";import{u as c,a as p}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{a1 as u,V as h}from"./useActiveWallet-RZ4w-uGq.mjs";import{E as f,P as j}from"./ModalHeader-rCMpqA2a.mjs";import{I as v,E as g}from"./EmailInputForm-Dgoii4vf.mjs";import{E as y}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-DF3DCKOK.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-DlGuNtGR.mjs";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,v]=m(""),[g,w]=m(""),[k,E]=m(!1),{authenticated:A,user:C}=c(),{initUpdateEmail:x}=d(),{navigate:I,setModalData:M,currentScreen:P}=p(),{enabled:T,token:U}=l(),D=n(),L=u(s)&&(D.disablePlusEmails&&s.includes("+")?(g||w("Please enter a valid email address without a '+'."),!1):(g&&w(""),!0)),W=k||!L,q=()=>{!T||U||A?(async e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");E(!0);try{await x({oldAddress:C.email.address,newAddress:s,captchaToken:e}),I("AwaitingPasswordlessCodeScreen")}catch(e){M({errorModalData:{error:e,previousScreen:P||"LandingScreen"}}),I("ErrorScreen")}E(!1)})(U):(M({captchaModalData:{callback:e=>{if(!C?.email)throw Error("User is required to have an email address to update it.");return x({oldAddress:C.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),I("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(b,{children:[g&&/*#__PURE__*/t(y,{style:{marginTop:"0.25rem",textAlign:"left"},children:g}),/*#__PURE__*/e(S,{$error:!!g,children:[/*#__PURE__*/t(h,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>v(e.target.value),onKeyUp:e=>{"Enter"===e.key&&q()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(f,{isSubmitting:k,onClick:q,disabled:W,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(j,{loadingText:null,loading:k,disabled:W,onClick:q,style:{width:"100%"},children:"Submit"}):null]})}));let b=v,S=g;const E=({title:e="Update your email",subtitle:r="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/t(w,{title:e,subtitle:r,icon:i,watermark:!0,children:/*#__PURE__*/t(o,{children:/*#__PURE__*/t(k,{stacked:!0})})}),A={component:()=>/*#__PURE__*/t(E,{})};export{A as UpdateEmailScreen,E as UpdateEmailScreenView,A as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-DjqZxuB-.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as a}from"./ScreenLayout-DG_XRElR.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-C7FGpzoq.mjs";import"tinycolor2";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"./ModalHeader-BAGwTwiB.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null);/*#__PURE__*/return e(a,{title:i,subtitle:n,icon:t,primaryCta:{label:s?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await m(c)},disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/e(r,{onChange:e=>{u(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:t,data:r,navigate:a,setModalData:c}=n(),{user:u}=m(),{initUpdatePhone:p}=i(),[l,d]=o(!1);/*#__PURE__*/return e(s,{onSubmit:async e=>{d(!0);try{if(!u?.phone?.number)throw Error("User is required to have an phone number to update it.");await p(u?.phone?.number,e.qualifiedPhoneNumber),a("AwaitingPasswordlessCodeScreen")}catch(e){c({errorModalData:{error:e,previousScreen:r?.errorModalData?.previousScreen||t||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:l})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
1
+ import{jsx as e}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-BMtTIItD.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as a}from"./ScreenLayout-DF3DCKOK.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-LVpDfP2H.mjs";import"tinycolor2";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"./ModalHeader-rCMpqA2a.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null);/*#__PURE__*/return e(a,{title:i,subtitle:n,icon:t,primaryCta:{label:s?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await m(c)},disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/e(r,{onChange:e=>{u(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:t,data:r,navigate:a,setModalData:c}=n(),{user:u}=m(),{initUpdatePhone:p}=i(),[l,d]=o(!1);/*#__PURE__*/return e(s,{onSubmit:async e=>{d(!0);try{if(!u?.phone?.number)throw Error("User is required to have an phone number to update it.");await p(u?.phone?.number,e.qualifiedPhoneNumber),a("AwaitingPasswordlessCodeScreen")}catch(e){c({errorModalData:{error:e,previousScreen:r?.errorModalData?.previousScreen||t||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:l})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as o}from"./ScreenLayout-DG_XRElR.mjs";import"viem";import"react";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const i=({style:e,...o})=>/*#__PURE__*/t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...e},...o,children:/*#__PURE__*/t("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),r=({title:e="Unable to sign in",subtitle:r="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/t(o,{title:e,subtitle:r,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:o}=e();/*#__PURE__*/return t(r,{onGoBack:()=>{o("LandingScreen")}})}};export{n as UserLimitReachedScreen,r as UserLimitReachedScreenView,n as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as o}from"./ScreenLayout-DF3DCKOK.mjs";import"viem";import"react";import"./context-LVpDfP2H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-rCMpqA2a.mjs";import"styled-components";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const i=({style:e,...o})=>/*#__PURE__*/t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...e},...o,children:/*#__PURE__*/t("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),r=({title:e="Unable to sign in",subtitle:r="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/t(o,{title:e,subtitle:r,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:o}=e();/*#__PURE__*/return t(r,{onGoBack:()=>{o("LandingScreen")}})}};export{n as UserLimitReachedScreen,r as UserLimitReachedScreenView,n as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-BAGwTwiB.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-C4fukiNP.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
1
+ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-rCMpqA2a.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-QmAVCQtO.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
2
2
  && {
3
3
  padding: 0.75rem;
4
4
  height: 56px;
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o,a as i}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{S as n}from"./ScreenLayout-DG_XRElR.mjs";import"viem";import"./context-C7FGpzoq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-BAGwTwiB.mjs";import"styled-components";import"./useActiveWallet-CT7uncGy.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-BHVs3Cx-.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-Cs7YKcaR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";const r=({title:e,subtitle:o,buttonText:i,buttonHref:r,isLoading:l=!1,helpText:a,onButtonClick:m})=>/*#__PURE__*/t(n,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{r&&window.open(r,"_self"),m?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:n}=o(),{data:l}=i(),[a,m]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:s,connectOnly:c,chainType:p}=l.installWalletModalData,u=s.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=s.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return n&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${s.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${s.name} wallet to complete the login.`),/*#__PURE__*/t(r,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:n&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>m(!0)),1e3)}})}};export{l as WalletInterstitialScreen,r as WalletInterstitialScreenView,l as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o,a as i}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{S as n}from"./ScreenLayout-DF3DCKOK.mjs";import"viem";import"./context-LVpDfP2H.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-rCMpqA2a.mjs";import"styled-components";import"./useActiveWallet-RZ4w-uGq.mjs";import"zustand";import"react-device-detect";import"./prepareFundingModalData-DjTxAoJ1.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-DlGuNtGR.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";const r=({title:e,subtitle:o,buttonText:i,buttonHref:r,isLoading:l=!1,helpText:a,onButtonClick:m})=>/*#__PURE__*/t(n,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{r&&window.open(r,"_self"),m?.()},disabled:l},helpText:a,watermark:!0}),l={component:()=>{let{ready:n}=o(),{data:l}=i(),[a,m]=e(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:s,connectOnly:c,chainType:p}=l.installWalletModalData,u=s.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=s.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return n&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${s.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${s.name} wallet to complete the login.`),/*#__PURE__*/t(r,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:n&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>m(!0)),1e3)}})}};export{l as WalletInterstitialScreen,r as WalletInterstitialScreenView,l as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-jrpF9vqa.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as m}from"./transaction-CnfuREWo.mjs";import{D as d}from"./useActiveWallet-CT7uncGy.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),m=i?s(c,i):void 0,d=a(c,l);/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(g,{children:"USD"}),"<$0.01"===m?
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-BQ45eiVv.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as m}from"./transaction-CnfuREWo.mjs";import{D as d}from"./useActiveWallet-RZ4w-uGq.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),m=i?s(c,i):void 0,d=a(c,l);/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(g,{children:"USD"}),"<$0.01"===m?
2
2
  /*#__PURE__*/r(k,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):m]}):d})},f=({quantities:n,tokenPrice:o,tokenSymbol:s="SOL",tokenDecimals:a=9})=>{let l=n.reduce(((e,t)=>e+t),0n),d=o&&"SOL"===s&&9===a?c(l,o):void 0,p="SOL"===s&&9===a?m(l):`${i(l,a)} ${s}`;/*#__PURE__*/return e(u,{children:d?/*#__PURE__*/e(t,{children:"<$0.01"===d?
3
3
  /*#__PURE__*/r(k,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):d}):p})};let u=n.span`
4
4
  font-size: 14px;
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{U as i,V as c,Y as o}from"./useActiveWallet-CT7uncGy.mjs";const l=({onClick:l,text:m})=>/*#__PURE__*/r(i,{onClick:l,children:[/*#__PURE__*/e(c,{children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(o,{children:m})]});export{l as W};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{U as i,V as c,Y as o}from"./useActiveWallet-RZ4w-uGq.mjs";const l=({onClick:l,text:m})=>/*#__PURE__*/r(i,{onClick:l,children:[/*#__PURE__*/e(c,{children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(o,{children:m})]});export{l as W};
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as a}from"@abstract-foundation/agw-client/actions";import{hexToNumber as n,createWalletClient as t,custom as r,http as s}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as o,zksync as c}from"viem/chains";import{u as d,a as l,c as m,b as p}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u}from"./context-C7FGpzoq.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{u as y,g as f}from"./useWallets-Cs7YKcaR.mjs";import{a as h}from"./getPublicClient-B4uPLKn-.mjs";import{g as v}from"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import{c as I}from"./smart-wallets-BcApWuwL.mjs";import"react/jsx-runtime";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=d(),{hideWalletUIs:S,openPrivyModal:w,chains:P,appId:W,rpcConfig:b,client:C}=g(),F=u(),{wallets:M}=y(),{setModalData:_}=l(),x=m(T),A=!!x&&p(x),q=async(a=o.id)=>{let d=v(M);if(!d)throw Error("No connected wallet found");let l="string"==typeof a?n(a):a;if(![o.id,2741,c.id].includes(l))throw Error("Error, only Abstract and ZKSync Era chains are supported");let m=P.find((e=>e.id===l));if(!m)throw Error("Chain not configured");await d.switchChain(m.id);let p=await d.getEthereumProvider(),u=t({account:d.address,transport:r(p)}),g=i({address:d.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e({chain:m,transport:s(h(m,b,W)),publicTransport:s(h(m,b,W)),signer:g})};return{signMessage:async({message:e},a)=>{let n=await q(a);return new Promise((async(a,t)=>{let{entropyId:r,entropyIdVerifier:s}=f(T);S.current=!0,_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>n.signMessage({message:e}),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTypedData:async(e,a)=>{let n=await q(a);return new Promise((async(a,t)=>{S.current=!0;let{entropyId:r,entropyIdVerifier:s}=f(T);_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>n.signTypedData(e),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let n=await q(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let n=await q(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return n.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))}}}export{T as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as a}from"@abstract-foundation/agw-client/actions";import{hexToNumber as n,createWalletClient as t,custom as r,http as s}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as o,zksync as c}from"viem/chains";import{u as d,a as l,c as m,b as p}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{u}from"./context-LVpDfP2H.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{u as y,g as f}from"./useWallets-DlGuNtGR.mjs";import{a as h}from"./getPublicClient-B4uPLKn-.mjs";import{g as v}from"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import{c as I}from"./smart-wallets-9LKzbfWj.mjs";import"react/jsx-runtime";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=d(),{hideWalletUIs:S,openPrivyModal:w,chains:P,appId:W,rpcConfig:b,client:C}=g(),F=u(),{wallets:M}=y(),{setModalData:_}=l(),x=m(T),A=!!x&&p(x),q=async(a=o.id)=>{let d=v(M);if(!d)throw Error("No connected wallet found");let l="string"==typeof a?n(a):a;if(![o.id,2741,c.id].includes(l))throw Error("Error, only Abstract and ZKSync Era chains are supported");let m=P.find((e=>e.id===l));if(!m)throw Error("Chain not configured");await d.switchChain(m.id);let p=await d.getEthereumProvider(),u=t({account:d.address,transport:r(p)}),g=i({address:d.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e({chain:m,transport:s(h(m,b,W)),publicTransport:s(h(m,b,W)),signer:g})};return{signMessage:async({message:e},a)=>{let n=await q(a);return new Promise((async(a,t)=>{let{entropyId:r,entropyIdVerifier:s}=f(T);S.current=!0,_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>n.signMessage({message:e}),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTypedData:async(e,a)=>{let n=await q(a);return new Promise((async(a,t)=>{S.current=!0;let{entropyId:r,entropyIdVerifier:s}=f(T);_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>n.signTypedData(e),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let n=await q(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let n=await q(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);_({connectWallet:{recoveryMethod:x.recoveryMethod,connectingWalletAddress:x.address,isUnifiedWallet:A,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return n.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))}}}export{T as useAbstractSmartWallets};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useMemo as a,useEffect as n,createContext as o,useContext as l}from"react";import{dedupeSupportedChains as r,DEFAULT_SUPPORTED_CHAINS as i,mainnet as s}from"@privy-io/js-sdk-core";import c from"tinycolor2";const d="https://auth.privy.io",u=2e4,g=1400,h=2500,f=4e3,p="3.12.0",_="privy:token",b="privy-token",m="privy:refresh_token",v="privy-refresh-token",w="privy:pat",k="privy:id_token",y="privy-id-token",F="privy-session",C="privy:caid",M=e=>`privy:guest:${e}`,A=e=>`privy:cross-app:${e}`,E="privy:state_code",x="privy:code_verifier",B="privy:headless_oauth",D="privy:oauth_disable_signup",W=e=>`privy:wallet:${e}`,S="privy:connections",L=12e4,H=1,I="0x1",O=3e4,U="https://api.moonpay.com/v1",P="https://api.moonpay.com/v1",q="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",j="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",R="deprecated",T={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let N=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),$=e=>N.has(e),z=(e,t,a)=>a.indexOf(e)===t;const Y=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter($).filter(z):e?e.filter($).filter(z):T.appearance.walletList;let G=/paymaster\.biconomy\.io\/api/i,J={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const V=(e,t)=>e&&G.test(e)?J:t&&t.policy_id?{policyId:t.policy_id}:void 0;function K(e,t){let a=Math.max(0,Math.min(1,e.toHsl().l+t));return c({...e.toHsl(),l:a})}function X(e,t){let a=e.getLuminance(),n=t.getLuminance();return(Math.max(a,n)+.05)/(Math.min(a,n)+.05)}function Z(e,t){if(!e){let e=t?ee:te;return{accent:c(e.background.interactive),accentLight:c(e.background.interactive),accentHover:c(e.background["interactive-hover"]),accentDark:c(e.background["interactive-clicked"]),accentDarkest:c(e.background["interactive-disabled"])}}let a=c(e);return{accent:a,accentLight:K(a,.15),accentHover:K(a,.3),accentDark:K(a,-.06),accentDarkest:K(a,-.6)}}function Q({backgroundTheme:e,accentHex:t}){let a,n;"light"===e?a=!1:"dark"===e?a=!0:(a=.5>=c(e).getLuminance(),n=c(e).toHslString());let o=a?"dark":"light",l=a?ee:te,{accent:r,accentLight:i,accentHover:s,accentDark:d,accentDarkest:u}=Z(t,a),g=function(e){let t=c(te.text.default),a=c(ee.text.default),n=X(e,t),o=X(e,a),l=e.toHsl();return l.h>=220&&l.h<=300&&o>=3?ee.text.default:n>o?te.text.default:ee.text.default}(r),h=c(g),f=X(r,c(l.background.default))>=3;return{colorScheme:o,background:n||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:r.toHslString(),accentLight:i.toHslString(),accentHover:s.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:h.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:f?"1":"0",linkNavigationColor:f?r.toHslString():l.text.default,linkNavigationDecoration:f?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const ee={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},te={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function ae(e,t,a,n,o){let l,c,d,u,g,h,f,p,_,b,m,v,w,k,y,F,C,M,A=a?console.warn:()=>{},E=[];if(t?.loginMethods)for(let e of(l=t.loginMethods.includes("email"),c=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),g=t.loginMethods.includes("google"),h=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),m=t.loginMethods.includes("spotify"),v=t.loginMethods.includes("instagram"),p=t.loginMethods.includes("tiktok"),_=t.loginMethods.includes("line"),b=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),w=t.loginMethods.includes("linkedin"),y=t.loginMethods.includes("apple"),F=t.loginMethods.includes("farcaster"),C=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&E.push(e);else l=e.email_auth,c=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,g=e.google_oauth,h=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,m=e.spotify_oauth,v=e.instagram_oauth,p=e.tiktok_oauth,_=e.line_oauth,b=e.twitch_oauth,w=e.linkedin_oauth,y=e.apple_oauth,F=e.farcaster_auth,C=e.telegram_auth,d=e.passkey_auth,M=e.custom_jwt_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let x=[l,c].filter(Boolean),B=[g,h,f,k,m,v,p,_,b,w,y,F,C].filter(Boolean),D=[u].filter(Boolean),W=t?.loginMethods?.includes("passkey")??!1,S=e.passkeys_for_signup_enabled??!1,L=[d&&(S||W)].filter(Boolean),H=[M].filter(Boolean);if(x.length+B.length+D.length+L.length+H.length+E.length===0)throw Error("You must enable at least one login method");let I=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;I&&0===D.length?(A("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),I=!1):I||B.length+x.length!==0||(A("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),I=!0);let O=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&A("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let U=Y({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((U.includes("wallet_connect_qr")||U.includes("wallet_connect"))&&U.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let P=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],a=[];for(let a of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(a)?console.warn(`Duplicated login method: ${a}`):t.push(a);for(let n of e.overflow??[])t.includes(n)||a.includes(n)?console.warn(`Duplicated login method: ${n}`):a.push(n);return{primary:t,overflow:a}})({input:t?.loginMethodsAndOrder}),q=t?.intl?.defaultCountry??"US",{chains:j,defaultChain:R}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=r(e)}else a=[...i];let n=e?a[0]:s,o=t??n;if(!a.find((e=>e.id===o.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:o}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),N=!!t?.defaultChain,$=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,z=$?"all-users":e.embedded_wallet_config.ethereum.create_on_login,G=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let J=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,K=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,X=e.smart_wallet_config;return{id:e.id,appClientId:o,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??T.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:Q({backgroundTheme:t?.appearance?.theme??T.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:I?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:U,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:l,sms:c,passkey:d,google:g,twitter:h,discord:f,github:k,spotify:m,instagram:v,tiktok:p,line:_,twitch:b,linkedin:w,apple:y,farcaster:F,telegram:C},globalDisablePasskeys:t?.globalDisablePasskeys??!1,customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:E,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:P,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??T.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:j,defaultChain:R,intl:{defaultCountry:q,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:N,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:O},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!$&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:$?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??z},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??G},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??n??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:$?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:J,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??T._render.standalone},fundingConfig:K,fundingMethodConfig:{...t?.fundingMethodConfig??T.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??T.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??T.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:X?.enabled?{enabled:X.enabled,smartWalletVersion:X.smart_wallet_version,smartWalletType:X.smart_wallet_type,configuredNetworks:X.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:V(e.paymaster_url,e.paymaster_context)})))}:{enabled:X?.enabled??!1}}}const ne={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1};let oe=/*#__PURE__*/o({appConfig:ae(ne,void 0,!1),isServerConfigLoaded:!1});const le=({children:o,client:l,legacyClient:r,clientConfig:i,appClientId:s})=>{let[c,d]=t(null),u=a((()=>ae(c??ne,i,!!c,"undefined"!=typeof window?window.location.origin:void 0,s)),[c,i,s]);return n((()=>{if(!c)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:a,defaultChain:n,externalWallets:o,...l}=e;return{...l,...a?{supportedChains:a.map((e=>e.id))}:void 0,...n?{defaultChain:n.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(i),t=function(e,t=0){let a=3735928559^t,n=1103547991^t;for(let t,o=0;o<e.length;o++)a=Math.imul(a^(t=e.charCodeAt(o)),2654435761),n=Math.imul(n^t,1597334677);return a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909),4294967296*(2097151&(n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909)))+(a>>>0)}(JSON.stringify(e)).toString(),a=`privy:sent:${c.id}:${t}`;localStorage.getItem(a)||(r.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(a,"t"))}),[i,c]),n((()=>{c||(async()=>{try{await l.initialize();let e=l.app.getConfig();e.custom_api_url&&r.updateApiUrl(e.custom_api_url),d(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e(oe.Provider,{value:{appConfig:u,isServerConfigLoaded:!!c},children:o})},re=()=>{let{appConfig:e}=l(oe);return e},ie=()=>{let{isServerConfigLoaded:e}=l(oe);return e};export{_ as C,d as D,B as H,k as I,P as M,D as O,w as P,m as R,E as S,p as V,O as W,x as a,S as b,ie as c,C as d,A as e,F as f,M as g,R as h,b as i,v as j,y as k,u as l,le as m,L as n,W as o,I as p,g as q,h as r,H as s,f as t,re as u,U as v,j as w,q as x};
@@ -1 +1 @@
1
- import{formatEther as e}from"viem";import{u as r}from"./internal-context-Z-fyxadS.mjs";import{a5 as t}from"./useActiveWallet-CT7uncGy.mjs";let a=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),s=e=>a.format(e);const n=(e,r)=>{let t=s(r*parseFloat(e));return"$0.00"!==t?t:"<$0.01"},o=(r,t)=>{let a=s(t*parseFloat(e(r)));return"$0.00"===a?"<$0.01":a},c=(e,r,t=6,a=!1)=>`${i(e,t,a)} ${r}`,i=(r,t=6,a=!1)=>{let s=parseFloat(e(r)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return a?s:`${"0"===s?"<0.001":s}`},l=e=>e.reduce(((e,r)=>e+r),0n),m=(e,a)=>{let{chains:s}=r(),n=`https://etherscan.io/address/${a}`,o=`${t(e,s)}/address/${a}`;if(!o)return n;try{new URL(o)}catch{return n}return o};export{o as a,m as b,n as c,c as g,i as p,l as s};
1
+ import{formatEther as e}from"viem";import{u as r}from"./internal-context-Z-fyxadS.mjs";import{a5 as t}from"./useActiveWallet-RZ4w-uGq.mjs";let a=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),s=e=>a.format(e);const n=(e,r)=>{let t=s(r*parseFloat(e));return"$0.00"!==t?t:"<$0.01"},o=(r,t)=>{let a=s(t*parseFloat(e(r)));return"$0.00"===a?"<$0.01":a},c=(e,r,t=6,a=!1)=>`${i(e,t,a)} ${r}`,i=(r,t=6,a=!1)=>{let s=parseFloat(e(r)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return a?s:`${"0"===s?"<0.001":s}`},l=e=>e.reduce(((e,r)=>e+r),0n),m=(e,a)=>{let{chains:s}=r(),n=`https://etherscan.io/address/${a}`,o=`${t(e,s)}/address/${a}`;if(!o)return n;try{new URL(o)}catch{return n}return o};export{o as a,m as b,n as c,c as g,i as p,l as s};
@@ -1 +1 @@
1
- import{useMemo as e}from"react";import{create as t,rawSign as r}from"@privy-io/js-sdk-core";import{u as a,a as i}from"./internal-context-Z-fyxadS.mjs";import{u as n,a as s,h as o,b as l,n as d}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as c}from"./context-C7FGpzoq.mjs";import{u as p}from"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"ofetch";import"viem";import"react/jsx-runtime";import"tinycolor2";const u=()=>{let{refreshSessionAndUser:r,privy:i}=a();return e((()=>({async createWallet(e){let a=await t(i,{request:{chain_type:e.chainType}}),n=await r();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:a}}})),[r,i])};function m(){let{user:t,getAccessToken:r}=n(),{walletProxy:d,openModal:p,client:u}=a(),{setModalData:m}=s(),h=c();return e((()=>({exportWallet:e=>new Promise((async(a,n)=>{if(!t)return void n(new i("User must be authenticated before exporting their Privy wallet"));let s=o(t,e.address);s?"spark"===s.chainType&&l(s)?await r()?d?(m({connectWallet:{recoveryMethod:s.recoveryMethod,connectingWalletAddress:s.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:n,shouldForceMFA:!0},keyExport:{appId:h.id,appClientId:h.appClientId,origin:u.apiUrl,address:s.address,hdWalletIndex:s.walletIndex,chainType:s.chainType,walletId:s.id,isUnifiedWallet:!0,imported:s.imported,onSuccess:a,onFailure:n}}),p("EmbeddedWalletConnectingScreen")):n(new i("Wallet not ready for export")):n(new i("Must have valid access token.")):n(Error("Export via extended-chains is only supported for unified stack wallets")):n(new i("User must have an embedded wallet."))}))})),[t,r,d,p,u,m,h])}const h=()=>{let{user:t}=n(),{privy:i}=a(),{signWithUserSigner:s}=p();return e((()=>({async signRawHash({address:e,chainType:a,hash:n}){if(!t)throw Error("User must be authenticated before signing");let o=d(t,a).filter((e=>l(e))).find((t=>t.address===e));if(!o)throw Error("Wallet not found");let c=await r(i,s,{wallet_id:o.id,params:{hash:n}});if(c.data&&"signature"in c.data&&"hex"===c.data.encoding)return{signature:c.data.signature};throw Error("Failed to sign")}})),[i,s,t])};export{u as useCreateWallet,m as useExportWallet,h as useSignRawHash};
1
+ import{useMemo as e}from"react";import{create as t,rawSign as r}from"@privy-io/js-sdk-core";import{u as a,a as i}from"./internal-context-Z-fyxadS.mjs";import{u as n,a as s,h as o,b as l,n as d}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{u as c}from"./context-LVpDfP2H.mjs";import{u as p}from"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"ofetch";import"viem";import"react/jsx-runtime";import"tinycolor2";const u=()=>{let{refreshSessionAndUser:r,privy:i}=a();return e((()=>({async createWallet(e){let a=await t(i,{request:{chain_type:e.chainType}}),n=await r();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:a}}})),[r,i])};function m(){let{user:t,getAccessToken:r}=n(),{walletProxy:d,openModal:p,client:u}=a(),{setModalData:m}=s(),h=c();return e((()=>({exportWallet:e=>new Promise((async(a,n)=>{if(!t)return void n(new i("User must be authenticated before exporting their Privy wallet"));let s=o(t,e.address);s?"spark"===s.chainType&&l(s)?await r()?d?(m({connectWallet:{recoveryMethod:s.recoveryMethod,connectingWalletAddress:s.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:n,shouldForceMFA:!0},keyExport:{appId:h.id,appClientId:h.appClientId,origin:u.apiUrl,address:s.address,hdWalletIndex:s.walletIndex,chainType:s.chainType,walletId:s.id,isUnifiedWallet:!0,imported:s.imported,onSuccess:a,onFailure:n}}),p("EmbeddedWalletConnectingScreen")):n(new i("Wallet not ready for export")):n(new i("Must have valid access token.")):n(Error("Export via extended-chains is only supported for unified stack wallets")):n(new i("User must have an embedded wallet."))}))})),[t,r,d,p,u,m,h])}const h=()=>{let{user:t}=n(),{privy:i}=a(),{signWithUserSigner:s}=p();return e((()=>({async signRawHash({address:e,chainType:a,hash:n}){if(!t)throw Error("User must be authenticated before signing");let o=d(t,a).filter((e=>l(e))).find((t=>t.address===e));if(!o)throw Error("Wallet not found");let c=await r(i,s,{wallet_id:o.id,params:{hash:n}});if(c.data&&"signature"in c.data&&"hex"===c.data.encoding)return{signature:c.data.signature};throw Error("Failed to sign")}})),[i,s,t])};export{u as useCreateWallet,m as useExportWallet,h as useSignRawHash};
@@ -1 +1 @@
1
- import{getAddress as e}from"viem";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useContext as a,createContext as r,useState as s,useRef as l,useEffect as n}from"react";import{u}from"./context-C7FGpzoq.mjs";import{n as d}from"./internal-context-Z-fyxadS.mjs";function o(e){return"string"==typeof e&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}function c(e){return e?new Date(1e3*e):null}function p(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt?.getTime()??0)-(t.firstVerifiedAt?.getTime()??0))).find((e=>e.type===t))}const m=e=>e?f(e).find((e=>0===e.walletIndex))??null:null,f=e=>e?_(e,"ethereum"):[],_=(e,t)=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t)),y=e=>e?_(e,"solana"):[],h=e=>e?y(e).find((e=>0===e.walletIndex))??null:null,b=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType)),k=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType)),g=(t,i)=>t===i||!(!t.startsWith("0x")||!i.startsWith("0x"))&&42===t.length&&42===i.length&&e(t)===e(i),v=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&g(e.address,t)))||null,A=(e,t)=>e.find((e=>g(e.address,t)))||null,j=e=>m(e)??h(e);function w(e){if(!e)return null;let t=function(e){let t=[];for(let i of e){let e=i.type;switch(i.type){case"wallet":let a={id:i.id,address:i.address,type:i.type,imported:i.imported,delegated:i.delegated,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),chainType:i.chain_type,walletClientType:i.wallet_client_type,connectorType:i.connector_type,recoveryMethod:i.recovery_method,walletIndex:i.wallet_index,publicKey:i.public_key};t.push(a);break;case"smart_wallet":let r={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),smartWalletType:i.smart_wallet_type,smartWalletVersion:i.smart_wallet_version};t.push(r);break;case"cross_app":let s={type:i.type,subject:i.subject,embeddedWallets:i.embedded_wallets,smartWallets:i.smart_wallets,providerApp:{id:i.provider_app_id},firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(s);break;case"email":let l={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(l);break;case"phone":let n={number:i.phoneNumber,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(n);break;case"google_oauth":let u={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(u);break;case"spotify_oauth":let d={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(d);break;case"instagram_oauth":let p={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(p);break;case"twitter_oauth":let m={subject:i.subject,username:i.username,name:i.name,type:i.type,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(m);break;case"discord_oauth":let f={subject:i.subject,username:i.username,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(f);break;case"github_oauth":let _={subject:i.subject,username:i.username,name:i.name,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(_);break;case"tiktok_oauth":let y={subject:i.subject,username:i.username,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(y);break;case"line_oauth":let h={subject:i.subject,name:i.name,email:i.email,profilePictureUrl:i.profile_picture_url,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(h);break;case"twitch_oauth":let b={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(b);break;case"linkedin_oauth":let k={subject:i.subject,name:i.name,email:i.email,vanityName:i.vanity_name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(k);break;case"apple_oauth":let g={subject:i.subject,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(g);break;case"custom_auth":t.push({type:i.type,customUserId:i.custom_user_id,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)});break;case"farcaster":let v={type:i.type,fid:i.fid,ownerAddress:i.owner_address,displayName:i.display_name,username:i.username,bio:i.bio,pfp:i.profile_picture_url,url:i.homepage_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),signerPublicKey:i.signer_public_key};t.push(v);break;case"passkey":let A={type:i.type,enrolledInMfa:i.enrolled_in_mfa,credentialId:i.credential_id,publicKey:i.public_key,authenticatorName:i.authenticator_name,createdWithDevice:i.created_with_device,createdWithOs:i.created_with_os,createdWithBrowser:i.created_with_browser,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(A);break;case"telegram":let j={type:i.type,telegramUserId:i.telegram_user_id,firstName:i.first_name,lastName:i.last_name,username:i.username,photoUrl:i.photo_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(j);break;default:if(o(i.type)){let e={type:i.type,subject:i.subject,name:i.name,username:i.username,email:i.email,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(e);break}console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),i=p(t,"wallet"),a=p(t,"smart_wallet"),r=p(t,"email"),s=p(t,"phone"),l=p(t,"google_oauth"),n=p(t,"twitter_oauth"),u=p(t,"discord_oauth"),d=p(t,"github_oauth"),m=p(t,"spotify_oauth"),f=p(t,"instagram_oauth"),_=p(t,"tiktok_oauth"),y=p(t,"line_oauth"),h=p(t,"twitch_oauth"),b=p(t,"linkedin_oauth"),k=p(t,"apple_oauth"),g=p(t,"farcaster"),v=p(t,"telegram"),A=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:c(t)})));return{id:e.id,createdAt:c(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:s&&{number:s?.number},wallet:i&&{id:i.id,address:i.address,chainType:i.chainType,walletClientType:i.walletClientType,connectorType:i.connectorType,recoveryMethod:i.recoveryMethod,imported:i.imported,delegated:i.delegated,walletIndex:i.walletIndex,publicKey:i.publicKey},smartWallet:a&&{address:a.address,smartWalletType:a.smartWalletType,smartWalletVersion:a.smartWalletVersion},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:n&&{subject:n.subject,username:n.username,name:n.name,profilePictureUrl:n.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:d&&{subject:d.subject,username:d.username,name:d.name,email:d.email},spotify:m&&{subject:m.subject,email:m.email,name:m.name},instagram:f&&{subject:f.subject,username:f.username},tiktok:_&&{subject:_.subject,username:_.username,name:_.name},line:y&&{subject:y.subject,name:y.name,email:y.email,profilePictureUrl:y.profilePictureUrl},twitch:h&&{subject:h.subject,username:h.username},linkedin:b&&{subject:b.subject,name:b.name,email:b.email,vanityName:b.vanityName},apple:k&&{subject:k.subject,email:k.email},farcaster:g&&{fid:g.fid,ownerAddress:g.ownerAddress,displayName:g.displayName,username:g.username,bio:g.bio,pfp:g.pfp,url:g.url,signerPublicKey:g.signerPublicKey},telegram:v&&{telegramUserId:v.telegramUserId,firstName:v.firstName,lastName:v.lastName,username:v.username,photoUrl:v.photoUrl},delegatedWallets:[],mfaMethods:A.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}function V({src:e,...i}){/*#__PURE__*/return t("img",{src:e,...i,style:{display:"none"}})}const T=/*#__PURE__*/r({currentScreen:null,lastScreen:null,navigate:d,navigateBack:d,resetNavigation:d,setModalData:d,onUserCloseViaDialogOrKeybindRef:void 0}),W=e=>{let a=u(),[r,d]=s(e.initialScreen),o=l(null);n((()=>{e.open||(o.current=null)}),[e.open]),n((()=>{o.current=null}),[e.initialScreen]);let c={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:r,navigate:(t,i=!0)=>{e.setInitialScreen(t),i&&d(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(r)},resetNavigation:()=>{e.setInitialScreen(null),d(null)},onUserCloseViaDialogOrKeybindRef:o};/*#__PURE__*/return i(T.Provider,{value:c,children:[("string"==typeof a.appearance.logo||"img"===a.appearance.logo?.type)&&/*#__PURE__*/t(V,{src:"string"==typeof a.appearance.logo?a.appearance.logo:a.appearance.logo.props.src}),e.children]})},P=()=>a(T),I=/*#__PURE__*/r({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:d,login:d,connectOrCreateWallet:d,linkEmail:d,linkPhone:d,linkFarcaster:d,linkWallet:d,startCrossAppAuthFlow:d,linkGoogle:d,linkTwitter:d,linkTwitch:d,linkDiscord:d,linkGithub:d,linkSpotify:d,linkInstagram:d,linkTelegram:d,linkTiktok:d,linkLine:d,linkLinkedIn:d,linkApple:d,linkPasskey:d,updateEmail:d,updatePhone:d,logout:d,getAccessToken:d,unlinkEmail:d,unlinkPhone:d,unlinkWallet:d,unlinkGoogle:d,unlinkTwitter:d,unlinkTwitch:d,unlinkDiscord:d,unlinkGithub:d,unlinkSpotify:d,unlinkInstagram:d,unlinkTiktok:d,unlinkLine:d,unlinkLinkedIn:d,unlinkApple:d,unlinkCrossAppAccount:d,unlinkFarcaster:d,unlinkTelegram:d,unlinkPasskey:d,signMessage:d,signTypedData:d,enrollInMfa:d,initEnrollmentWithSms:d,initEnrollmentWithTotp:d,initEnrollmentWithPasskey:d,promptMfa:d,init:d,submitEnrollmentWithSms:d,submitEnrollmentWithTotp:d,submitEnrollmentWithPasskey:d,unenroll:d,submit:d,cancel:d,sendTransaction:d,signTransaction:d,exportWallet:d,setWalletPassword:d,setWalletRecovery:d,requestFarcasterSignerFromWarpcast:d,getFarcasterSignerPublicKey:d,signFarcasterMessage:d,signMessageWithCrossAppWallet:d,signTypedDataWithCrossAppWallet:d,sendTransactionWithCrossAppWallet:d,signTransactionWithCrossAppWallet:d,isModalOpen:!1,mfaMethods:[]}),M=()=>a(I),S=e=>!!e.id&&"privy-v2"===e.recoveryMethod;export{W as M,I as P,P as a,S as b,m as c,h as d,f as e,b as f,j as g,v as h,o as i,A as j,k,w as l,g as m,_ as n,y as o,M as u};
1
+ import{getAddress as e}from"viem";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useContext as a,createContext as r,useState as s,useRef as l,useEffect as n}from"react";import{u}from"./context-LVpDfP2H.mjs";import{n as d}from"./internal-context-Z-fyxadS.mjs";function o(e){return"string"==typeof e&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}function c(e){return e?new Date(1e3*e):null}function p(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt?.getTime()??0)-(t.firstVerifiedAt?.getTime()??0))).find((e=>e.type===t))}const m=e=>e?f(e).find((e=>0===e.walletIndex))??null:null,f=e=>e?_(e,"ethereum"):[],_=(e,t)=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t)),y=e=>e?_(e,"solana"):[],h=e=>e?y(e).find((e=>0===e.walletIndex))??null:null,b=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType)),k=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType)),g=(t,i)=>t===i||!(!t.startsWith("0x")||!i.startsWith("0x"))&&42===t.length&&42===i.length&&e(t)===e(i),v=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&g(e.address,t)))||null,A=(e,t)=>e.find((e=>g(e.address,t)))||null,j=e=>m(e)??h(e);function w(e){if(!e)return null;let t=function(e){let t=[];for(let i of e){let e=i.type;switch(i.type){case"wallet":let a={id:i.id,address:i.address,type:i.type,imported:i.imported,delegated:i.delegated,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),chainType:i.chain_type,walletClientType:i.wallet_client_type,connectorType:i.connector_type,recoveryMethod:i.recovery_method,walletIndex:i.wallet_index,publicKey:i.public_key};t.push(a);break;case"smart_wallet":let r={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),smartWalletType:i.smart_wallet_type,smartWalletVersion:i.smart_wallet_version};t.push(r);break;case"cross_app":let s={type:i.type,subject:i.subject,embeddedWallets:i.embedded_wallets,smartWallets:i.smart_wallets,providerApp:{id:i.provider_app_id},firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(s);break;case"email":let l={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(l);break;case"phone":let n={number:i.phoneNumber,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(n);break;case"google_oauth":let u={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(u);break;case"spotify_oauth":let d={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(d);break;case"instagram_oauth":let p={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(p);break;case"twitter_oauth":let m={subject:i.subject,username:i.username,name:i.name,type:i.type,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(m);break;case"discord_oauth":let f={subject:i.subject,username:i.username,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(f);break;case"github_oauth":let _={subject:i.subject,username:i.username,name:i.name,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(_);break;case"tiktok_oauth":let y={subject:i.subject,username:i.username,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(y);break;case"line_oauth":let h={subject:i.subject,name:i.name,email:i.email,profilePictureUrl:i.profile_picture_url,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(h);break;case"twitch_oauth":let b={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(b);break;case"linkedin_oauth":let k={subject:i.subject,name:i.name,email:i.email,vanityName:i.vanity_name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(k);break;case"apple_oauth":let g={subject:i.subject,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(g);break;case"custom_auth":t.push({type:i.type,customUserId:i.custom_user_id,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)});break;case"farcaster":let v={type:i.type,fid:i.fid,ownerAddress:i.owner_address,displayName:i.display_name,username:i.username,bio:i.bio,pfp:i.profile_picture_url,url:i.homepage_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),signerPublicKey:i.signer_public_key};t.push(v);break;case"passkey":let A={type:i.type,enrolledInMfa:i.enrolled_in_mfa,credentialId:i.credential_id,publicKey:i.public_key,authenticatorName:i.authenticator_name,createdWithDevice:i.created_with_device,createdWithOs:i.created_with_os,createdWithBrowser:i.created_with_browser,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(A);break;case"telegram":let j={type:i.type,telegramUserId:i.telegram_user_id,firstName:i.first_name,lastName:i.last_name,username:i.username,photoUrl:i.photo_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(j);break;default:if(o(i.type)){let e={type:i.type,subject:i.subject,name:i.name,username:i.username,email:i.email,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(e);break}console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),i=p(t,"wallet"),a=p(t,"smart_wallet"),r=p(t,"email"),s=p(t,"phone"),l=p(t,"google_oauth"),n=p(t,"twitter_oauth"),u=p(t,"discord_oauth"),d=p(t,"github_oauth"),m=p(t,"spotify_oauth"),f=p(t,"instagram_oauth"),_=p(t,"tiktok_oauth"),y=p(t,"line_oauth"),h=p(t,"twitch_oauth"),b=p(t,"linkedin_oauth"),k=p(t,"apple_oauth"),g=p(t,"farcaster"),v=p(t,"telegram"),A=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:c(t)})));return{id:e.id,createdAt:c(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:s&&{number:s?.number},wallet:i&&{id:i.id,address:i.address,chainType:i.chainType,walletClientType:i.walletClientType,connectorType:i.connectorType,recoveryMethod:i.recoveryMethod,imported:i.imported,delegated:i.delegated,walletIndex:i.walletIndex,publicKey:i.publicKey},smartWallet:a&&{address:a.address,smartWalletType:a.smartWalletType,smartWalletVersion:a.smartWalletVersion},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:n&&{subject:n.subject,username:n.username,name:n.name,profilePictureUrl:n.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:d&&{subject:d.subject,username:d.username,name:d.name,email:d.email},spotify:m&&{subject:m.subject,email:m.email,name:m.name},instagram:f&&{subject:f.subject,username:f.username},tiktok:_&&{subject:_.subject,username:_.username,name:_.name},line:y&&{subject:y.subject,name:y.name,email:y.email,profilePictureUrl:y.profilePictureUrl},twitch:h&&{subject:h.subject,username:h.username},linkedin:b&&{subject:b.subject,name:b.name,email:b.email,vanityName:b.vanityName},apple:k&&{subject:k.subject,email:k.email},farcaster:g&&{fid:g.fid,ownerAddress:g.ownerAddress,displayName:g.displayName,username:g.username,bio:g.bio,pfp:g.pfp,url:g.url,signerPublicKey:g.signerPublicKey},telegram:v&&{telegramUserId:v.telegramUserId,firstName:v.firstName,lastName:v.lastName,username:v.username,photoUrl:v.photoUrl},delegatedWallets:[],mfaMethods:A.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}function V({src:e,...i}){/*#__PURE__*/return t("img",{src:e,...i,style:{display:"none"}})}const T=/*#__PURE__*/r({currentScreen:null,lastScreen:null,navigate:d,navigateBack:d,resetNavigation:d,setModalData:d,onUserCloseViaDialogOrKeybindRef:void 0}),W=e=>{let a=u(),[r,d]=s(e.initialScreen),o=l(null);n((()=>{e.open||(o.current=null)}),[e.open]),n((()=>{o.current=null}),[e.initialScreen]);let c={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:r,navigate:(t,i=!0)=>{e.setInitialScreen(t),i&&d(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(r)},resetNavigation:()=>{e.setInitialScreen(null),d(null)},onUserCloseViaDialogOrKeybindRef:o};/*#__PURE__*/return i(T.Provider,{value:c,children:[("string"==typeof a.appearance.logo||"img"===a.appearance.logo?.type)&&/*#__PURE__*/t(V,{src:"string"==typeof a.appearance.logo?a.appearance.logo:a.appearance.logo.props.src}),e.children]})},P=()=>a(T),I=/*#__PURE__*/r({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:d,login:d,connectOrCreateWallet:d,linkEmail:d,linkPhone:d,linkFarcaster:d,linkWallet:d,startCrossAppAuthFlow:d,linkGoogle:d,linkTwitter:d,linkTwitch:d,linkDiscord:d,linkGithub:d,linkSpotify:d,linkInstagram:d,linkTelegram:d,linkTiktok:d,linkLine:d,linkLinkedIn:d,linkApple:d,linkPasskey:d,updateEmail:d,updatePhone:d,logout:d,getAccessToken:d,unlinkEmail:d,unlinkPhone:d,unlinkWallet:d,unlinkGoogle:d,unlinkTwitter:d,unlinkTwitch:d,unlinkDiscord:d,unlinkGithub:d,unlinkSpotify:d,unlinkInstagram:d,unlinkTiktok:d,unlinkLine:d,unlinkLinkedIn:d,unlinkApple:d,unlinkCrossAppAccount:d,unlinkFarcaster:d,unlinkTelegram:d,unlinkPasskey:d,signMessage:d,signTypedData:d,enrollInMfa:d,initEnrollmentWithSms:d,initEnrollmentWithTotp:d,initEnrollmentWithPasskey:d,promptMfa:d,init:d,submitEnrollmentWithSms:d,submitEnrollmentWithTotp:d,submitEnrollmentWithPasskey:d,unenroll:d,submit:d,cancel:d,sendTransaction:d,signTransaction:d,exportWallet:d,setWalletPassword:d,setWalletRecovery:d,requestFarcasterSignerFromWarpcast:d,getFarcasterSignerPublicKey:d,signFarcasterMessage:d,signMessageWithCrossAppWallet:d,signTypedDataWithCrossAppWallet:d,sendTransactionWithCrossAppWallet:d,signTransactionWithCrossAppWallet:d,isModalOpen:!1,mfaMethods:[]}),M=()=>a(I),S=e=>!!e.id&&"privy-v2"===e.recoveryMethod;export{W as M,I as P,P as a,S as b,m as c,h as d,f as e,b as f,j as g,v as h,o as i,A as j,k,w as l,g as m,_ as n,y as o,M as u};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as a,useMemo as s,useCallback as i,useEffect as o}from"react";import{createPublicClient as r,http as p,toHex as l,decodeFunctionData as u,decodeAbiParameters as m,formatEther as c}from"viem";import{getJsonRpcEndpointFromChain as d,formatTokenAmount as y,ProviderErrors as f}from"@privy-io/js-sdk-core";import{A as b}from"./Address-C4fukiNP.mjs";import{u as T,q as h}from"./context-C7FGpzoq.mjs";import{P as g,j as I}from"./prepareFundingModalData-BHVs3Cx-.mjs";import{u as v}from"./internal-context-Z-fyxadS.mjs";import{a as k,u as j}from"./get-is-unified-wallet-DKm2LBUt.mjs";import{u as E}from"./useGetTokenPrice-CInz9y-l.mjs";import{u as M}from"./useWalletBalance-CRXiZUj2.mjs";import{g as C}from"./getErc20TokenInfo-CxatSwzi.mjs";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as _,a as w,p as x}from"./ethers-jrpF9vqa.mjs";import{Y as N,D as S}from"./useActiveWallet-CT7uncGy.mjs";import{g as A}from"./getPublicClient-B4uPLKn-.mjs";import{ErrorScreenView as O}from"./ErrorScreen-BACrlbnT.mjs";import{styled as R}from"styled-components";import{M as D,B as $,P as B}from"./ModalHeader-BAGwTwiB.mjs";import{D as P}from"./JsonTree-aPaJmPx7.mjs";import{T as q,S as L}from"./TransactionErrorView-BEWZNGyq.mjs";import{R as U}from"./Layouts-BlFm53ED.mjs";import{S as W}from"./ScreenHeader-CHmc4-Lu.mjs";import{T as V}from"./TransactionDetails-BnKb_enO.mjs";import{E as G}from"./transfer-6YztDh-t.mjs";import{p as H}from"./index-DNLZMnCG.mjs";import"lucide-react";import"tinycolor2";import"eventemitter3";import"ofetch";import"./useGetSolPrice-DwwjjGbd.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./useWallets-Cs7YKcaR.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-DG_XRElR.mjs";import"./Screen-Dv092amM.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DXv-y-86.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./WalletInfoCard-DKxQTgDG.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"./WalletLink-Dqy4DrLT.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";let z=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],J=R.div`
1
+ import{jsxs as e,jsx as t,Fragment as n}from"react/jsx-runtime";import{useState as a,useMemo as s,useCallback as i,useEffect as o}from"react";import{createPublicClient as r,http as p,toHex as l,decodeFunctionData as u,decodeAbiParameters as m,formatEther as c}from"viem";import{getJsonRpcEndpointFromChain as d,formatTokenAmount as y,ProviderErrors as f}from"@privy-io/js-sdk-core";import{A as b}from"./Address-QmAVCQtO.mjs";import{u as T,q as h}from"./context-LVpDfP2H.mjs";import{P as g,j as I}from"./prepareFundingModalData-DjTxAoJ1.mjs";import{u as v}from"./internal-context-Z-fyxadS.mjs";import{a as k,u as j}from"./get-is-unified-wallet-CNcx75Dp.mjs";import{u as E}from"./useGetTokenPrice-DERdsrmf.mjs";import{u as M}from"./useWalletBalance-CRXiZUj2.mjs";import{g as C}from"./getErc20TokenInfo-CxatSwzi.mjs";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as _,a as w,p as x}from"./ethers-BQ45eiVv.mjs";import{Y as N,D as S}from"./useActiveWallet-RZ4w-uGq.mjs";import{g as A}from"./getPublicClient-B4uPLKn-.mjs";import{ErrorScreenView as O}from"./ErrorScreen-CLfeO5pd.mjs";import{styled as R}from"styled-components";import{M as D,B as $,P as B}from"./ModalHeader-rCMpqA2a.mjs";import{D as P}from"./JsonTree-aPaJmPx7.mjs";import{T as q,S as L}from"./TransactionErrorView-BwwGMqSj.mjs";import{R as U}from"./Layouts-BlFm53ED.mjs";import{S as W}from"./ScreenHeader-CHmc4-Lu.mjs";import{T as V}from"./TransactionDetails-BP142O9n.mjs";import{E as G}from"./transfer-6YztDh-t.mjs";import{p as H}from"./index-DNz_w3-G.mjs";import"lucide-react";import"tinycolor2";import"eventemitter3";import"ofetch";import"./useGetSolPrice-DwwjjGbd.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./useWallets-DlGuNtGR.mjs";import"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-DF3DCKOK.mjs";import"./Screen-CV2tt2Ap.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-Dj52a5sp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./WalletInfoCard-ChBHG5L5.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"./WalletLink-CN4enmsE.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";let z=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],J=R.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  min-height: 72px;