@privy-io/react-auth 3.13.0 → 3.13.1-beta-20260202140759

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 (363) hide show
  1. package/dist/cjs/AccountNotFoundScreen-DopQJydk.js +1 -0
  2. package/dist/cjs/{Address-aEAhUJFV.js → Address-C0i_Lgxz.js} +1 -1
  3. package/dist/cjs/AffirmativeConsentScreen-DrfsiAOF.js +6 -0
  4. package/dist/cjs/AllowlistRejectionScreen-B4F7MdmW.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-BImVaE8G.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-Bld2VoQo.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-CK2PMVQH.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-mc4TfLdK.js +103 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-BHTmPSzt.js +2 -0
  10. package/dist/cjs/{BridgeNetworkSelectionView-CE2o-1QO.js → BridgeNetworkSelectionView-BTW55LDI.js} +1 -1
  11. package/dist/cjs/CaptchaScreen-C4OKrOJj.js +1 -0
  12. package/dist/cjs/CoinbaseOnrampStatusScreen-DuBusEzK.js +16 -0
  13. package/dist/cjs/{ConnectEmailForm-D-TxBaE5.js → ConnectEmailForm-BAtI_Su2.js} +1 -1
  14. package/dist/cjs/ConnectLedgerScreen-Cxy5kYQy.js +9 -0
  15. package/dist/cjs/ConnectOnlyLandingScreen-UHxAPPxv.js +1 -0
  16. package/dist/cjs/ConnectOnlyStatusScreen-D7hEyOkF.js +1 -0
  17. package/dist/cjs/ConnectOrCreateScreen-DCXEsisd.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-DK6jm19G.js → ConnectPhoneForm-IaeAlSaT.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-1cBOsYe3.js → ConnectWalletView-I7l3i_Tn.js} +1 -1
  20. package/dist/cjs/ConnectionStatusScreen-B5eG6O0t.js +7 -0
  21. package/dist/cjs/CrossAppAuthScreen-BHfk_dqk.js +1 -0
  22. package/dist/cjs/{CustomLandingScreenView-C879x5ia.js → CustomLandingScreenView-ZdAEwrj3.js} +1 -1
  23. package/dist/cjs/DelegatedActionsConsentScreen-LeQ6Lxpc.js +1 -0
  24. package/dist/cjs/DelegatedActionsRevokeScreen-C8v4E_cj.js +1 -0
  25. package/dist/cjs/EmbeddedWalletConnectingScreen-B1rrh4GO.js +1 -0
  26. package/dist/cjs/EmbeddedWalletCreatedScreen-Cem5Ix9r.js +1 -0
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-BpjA7HGz.js → EmbeddedWalletKeyExportScreen-C9Et_UFA.js} +3 -3
  28. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-tJoXkQEs.js +1 -0
  29. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-C2wVljgA.js +1 -0
  30. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-CG1oHF6a.js +1 -0
  31. package/dist/cjs/{EnrollTotp-D1jQjLxQ.js → EnrollTotp-BveYXBKW.js} +1 -1
  32. package/dist/cjs/ErrorScreen-Ckke6sz3.js +4 -0
  33. package/dist/cjs/{FarcasterConnectStatusScreen-JBJeeu9F.js → FarcasterConnectStatusScreen-D5ziktAq.js} +3 -3
  34. package/dist/cjs/{FarcasterSignerStatusScreen-8DplKa45.js → FarcasterSignerStatusScreen-8edRjO2Y.js} +6 -6
  35. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-DJEyYpCy.js +2 -0
  36. package/dist/cjs/{FundWalletMethodHeader-CW2KubxL.js → FundWalletMethodHeader-Dyg72x32.js} +1 -1
  37. package/dist/cjs/FundingEditAmountScreen-2vgGeOzZ.js +1 -0
  38. package/dist/cjs/FundingMethodSelectionScreen-D6K2RTnb.js +1 -0
  39. package/dist/cjs/InAppBrowserLoginNotPossible-DlH26fht.js +1 -0
  40. package/dist/cjs/InstallWalletScreen-D-aty_-m.js +1 -0
  41. package/dist/cjs/LandingScreen-C3ycf-sm.js +1 -0
  42. package/dist/cjs/{LinkConflictScreen-DKkFMAqc.js → LinkConflictScreen-tpqlaHKl.js} +2 -2
  43. package/dist/cjs/LinkEmailScreen-CVJ8MM6X.js +1 -0
  44. package/dist/cjs/{LinkPasskeyScreen-D-5RrGXJ.js → LinkPasskeyScreen-BVI23any.js} +1 -1
  45. package/dist/cjs/LinkPhoneScreen-COZH83MT.js +1 -0
  46. package/dist/cjs/LoginFailedScreen-B_f3bRu3.js +1 -0
  47. package/dist/cjs/ManualTransferScreen-DCjvNWqd.js +1 -0
  48. package/dist/cjs/MfaAuthEnrollmentFlowScreen-DN4ce0UG.js +1 -0
  49. package/dist/cjs/MfaAuthVerifyFlowScreen-c-lQ_fEz.js +1 -0
  50. package/dist/cjs/MfaEnrollmentFlowScreen-B6-EB6WE.js +1 -0
  51. package/dist/cjs/MfaVerifyFlowScreen-zbdZQoq2.js +1 -0
  52. package/dist/cjs/{ModalHeader-DmWqn83H.js → ModalHeader-Cy6QK4_e.js} +1 -1
  53. package/dist/cjs/MoonpayStatusScreen-BEtRocSA.js +16 -0
  54. package/dist/cjs/OAuthStatusScreen-FvgZmHXu.js +1 -0
  55. package/dist/cjs/PasskeySelectSignupOrLogin-DqSfSR6i.js +1 -0
  56. package/dist/cjs/PasskeyStatusScreen-DvA6G4hk.js +3 -0
  57. package/dist/cjs/PasswordRecoveryScreen-Befeqrad.js +20 -0
  58. package/dist/cjs/{QrCode-BG2PX4HL.js → QrCode-DuBadwvo.js} +1 -1
  59. package/dist/cjs/RecoveryOAuthStatusScreen-C6mVwtQH.js +1 -0
  60. package/dist/cjs/RecoveryPasswordCreateScreen-DzNiXRjH.js +1 -0
  61. package/dist/cjs/{RecoverySelectionScreen-qP99_3WR.js → RecoverySelectionScreen-CjnlE9el.js} +2 -2
  62. package/dist/cjs/{Screen-BnWlRqz4.js → Screen-edUQX_SB.js} +1 -1
  63. package/dist/cjs/{ScreenLayout-8Ho-PwHJ.js → ScreenLayout-DGTvokS8.js} +1 -1
  64. package/dist/cjs/{SetAutomaticRecoveryScreen-Dw8eXtFM.js → SetAutomaticRecoveryScreen-CrRjNWxq.js} +2 -2
  65. package/dist/cjs/{SetWalletPasswordForm-BtxQiQCF.js → SetWalletPasswordForm-DJeemCn9.js} +1 -1
  66. package/dist/cjs/SignRequestScreen-DHoZ6sz5.js +26 -0
  67. package/dist/cjs/{StandardSignAndSendTransactionScreen-BRCG_Otm.js → StandardSignAndSendTransactionScreen-CBLYn4pf.js} +1 -1
  68. package/dist/cjs/TelegramAuthScreen-D7mlDw-E.js +1 -0
  69. package/dist/cjs/{TransactionDetails-CB_SFjYb.js → TransactionDetails-CXgPk3J1.js} +1 -1
  70. package/dist/cjs/{TransactionErrorView-C6AwpMpC.js → TransactionErrorView-Deibl2Uf.js} +1 -1
  71. package/dist/cjs/{TransferFromWalletScreen-DDbM2aZ-.js → TransferFromWalletScreen-DSItFmOL.js} +2 -2
  72. package/dist/cjs/{TransferOrBridgeLoadingScreen-BdFZ-kHB.js → TransferOrBridgeLoadingScreen-CZY4tSPW.js} +1 -1
  73. package/dist/cjs/UpdateEmailScreen-Bcbi12kY.js +1 -0
  74. package/dist/cjs/UpdatePhoneScreen-lJE1r_mk.js +1 -0
  75. package/dist/cjs/UserLimitReachedScreen-CKsbmhwX.js +1 -0
  76. package/dist/cjs/{WalletInfoCard-BP4plvST.js → WalletInfoCard-BPFjUGT5.js} +1 -1
  77. package/dist/cjs/WalletInterstitialScreen-C-wi9rZH.js +1 -0
  78. package/dist/cjs/{WalletLink-Be-wt7BS.js → WalletLink-DQka9Syl.js} +1 -1
  79. package/dist/cjs/{WalletOverflowButton-DNXb1rWu.js → WalletOverflowButton-CT3ToLGt.js} +1 -1
  80. package/dist/cjs/abstract-smart-wallets.js +1 -1
  81. package/dist/cjs/{context-B5x3dsBc.js → context-BgcJR59W.js} +1 -1
  82. package/dist/cjs/{ethers-CcPcMmj-.js → ethers-CUHJ8mll.js} +1 -1
  83. package/dist/cjs/extended-chains.js +1 -1
  84. package/dist/cjs/get-entropy-details-for-user-Bh25VOwU.js +1 -0
  85. package/dist/cjs/{get-is-unified-wallet-huyBqM6I.js → get-is-unified-wallet-pvisKZtt.js} +1 -1
  86. package/dist/cjs/{index-C9h5dbsX.js → index-BgLmUrL3.js} +1 -1
  87. package/dist/cjs/index-C40Nmmja.js +174 -0
  88. package/dist/cjs/{index-Ddh08VH6.js → index-Y7m6JUJT.js} +1 -1
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/internal.js +1 -1
  91. package/dist/cjs/{shared-B4PQQyG9.js → shared-BrkTXSb9.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-Cwmd9p6v.js → shouldProceedtoEmbeddedWalletCreationFlow-ClGopOFu.js} +1 -1
  93. package/dist/cjs/smart-wallets-DhMgsCrP.js +1 -0
  94. package/dist/cjs/smart-wallets.js +1 -1
  95. package/dist/cjs/solana.js +1 -1
  96. package/dist/cjs/{styles-BYA0sdA8.js → styles-Dg1gwPet.js} +1 -1
  97. package/dist/cjs/{to-ui-error-kjcnhSmN.js → to-ui-error-Cj4nmAIy.js} +1 -1
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/use-export-wallet-BHqL5lkN.js +1 -0
  100. package/dist/cjs/use-export-wallet-CHdfox2p.js +1 -0
  101. package/dist/cjs/useActiveWallet-DQaSSN2M.js +185 -0
  102. package/dist/cjs/{useGetTokenPrice-XbJ2xnl_.js → useGetTokenPrice-Q-LRDLGC.js} +1 -1
  103. package/dist/cjs/{useI18n-CJec5B3S.js → useI18n-C-2tQwPP.js} +1 -1
  104. package/dist/cjs/usePrivy-DN8Ajdzm.js +1 -0
  105. package/dist/cjs/{useSolanaRpcClient-CN7MyWq4.js → useSolanaRpcClient-DAhvriV9.js} +1 -1
  106. package/dist/cjs/useWallets-DOb8xzgz.js +1 -0
  107. package/dist/dts/{events-context-CV9PiG6M.d.ts → events-context-uQF86xPo.d.mts} +1 -1
  108. package/dist/dts/{events-context-CV9PiG6M.d.mts → events-context-uQF86xPo.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 +4 -38
  114. package/dist/dts/index.d.ts +4 -38
  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-xIUh0rN4.d.mts → types-DLEfLPEB.d.mts} +1 -1
  122. package/dist/dts/{types-xIUh0rN4.d.ts → types-DLEfLPEB.d.ts} +1 -1
  123. package/dist/dts/ui.d.mts +1 -1
  124. package/dist/dts/ui.d.ts +1 -1
  125. package/dist/esm/AccountNotFoundScreen-CVBAv1Mv.mjs +1 -0
  126. package/dist/esm/{Address-BuCMjci7.mjs → Address-BupZf8Rc.mjs} +1 -1
  127. package/dist/esm/AffirmativeConsentScreen-CFSY5nE4.mjs +6 -0
  128. package/dist/esm/AllowlistRejectionScreen-0Z0EYviP.mjs +1 -0
  129. package/dist/esm/AuthenticateWithWalletScreen-BdJYQ2JJ.mjs +1 -0
  130. package/dist/esm/AwaitingEvmToSolBridgingScreen-D9Ef3Dnt.mjs +2 -0
  131. package/dist/esm/AwaitingExternalEthereumTransferScreen-mj07gSaD.mjs +2 -0
  132. package/dist/esm/AwaitingPasswordlessCodeScreen-DE3g9VwQ.mjs +103 -0
  133. package/dist/esm/AwaitingSolToEvmBridgingScreen-CUKh2oVG.mjs +2 -0
  134. package/dist/esm/{BridgeNetworkSelectionView-0VRZoDMv.mjs → BridgeNetworkSelectionView-D8aRUIg2.mjs} +1 -1
  135. package/dist/esm/CaptchaScreen-Co8CjcuQ.mjs +1 -0
  136. package/dist/esm/CoinbaseOnrampStatusScreen-Da7VjKBi.mjs +16 -0
  137. package/dist/esm/ConnectEmailForm-D5UhENmm.mjs +3 -0
  138. package/dist/esm/ConnectLedgerScreen-JDfzYq9M.mjs +9 -0
  139. package/dist/esm/ConnectOnlyLandingScreen-C0j3-tOW.mjs +1 -0
  140. package/dist/esm/ConnectOnlyStatusScreen-D-gYePr8.mjs +1 -0
  141. package/dist/esm/ConnectOrCreateScreen-CqLbK7av.mjs +1 -0
  142. package/dist/esm/{ConnectPhoneForm-DMcfvHG9.mjs → ConnectPhoneForm-CQJPasTi.mjs} +1 -1
  143. package/dist/esm/{ConnectWalletView-rtAY2uds.mjs → ConnectWalletView-mIrd9fmT.mjs} +3 -3
  144. package/dist/esm/ConnectionStatusScreen-D8G_flGR.mjs +7 -0
  145. package/dist/esm/CrossAppAuthScreen-Btm1d-iO.mjs +1 -0
  146. package/dist/esm/{CustomLandingScreenView-Dt4TEi0A.mjs → CustomLandingScreenView-C2TNxHAb.mjs} +1 -1
  147. package/dist/esm/DelegatedActionsConsentScreen-DXwSOiLw.mjs +1 -0
  148. package/dist/esm/DelegatedActionsRevokeScreen-B7uTGw9J.mjs +1 -0
  149. package/dist/esm/EmbeddedWalletConnectingScreen-BioR068C.mjs +1 -0
  150. package/dist/esm/EmbeddedWalletCreatedScreen-Cq1thot_.mjs +1 -0
  151. package/dist/esm/{EmbeddedWalletKeyExportScreen-sjrAvCm3.mjs → EmbeddedWalletKeyExportScreen-CtEY8G7E.mjs} +2 -2
  152. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-ShyQ92Jq.mjs +1 -0
  153. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-qoWRlbPz.mjs +1 -0
  154. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BeN-dpqi.mjs +1 -0
  155. package/dist/esm/{EnrollTotp-DlnMoeNk.mjs → EnrollTotp-3j3Uj3wv.mjs} +1 -1
  156. package/dist/esm/ErrorScreen-BpG9IyOu.mjs +4 -0
  157. package/dist/esm/{FarcasterConnectStatusScreen-BLgCDUxR.mjs → FarcasterConnectStatusScreen-DadPWt5w.mjs} +4 -4
  158. package/dist/esm/FarcasterSignerStatusScreen-DyJNx88F.mjs +28 -0
  159. package/dist/esm/FundSolWalletWithExternalSolanaWallet-Dhp2jhkc.mjs +1 -0
  160. package/dist/esm/{FundWalletMethodHeader-Dujd1j7J.mjs → FundWalletMethodHeader-Cyn7MCWO.mjs} +1 -1
  161. package/dist/esm/FundingEditAmountScreen-D0KCT7EC.mjs +1 -0
  162. package/dist/esm/FundingMethodSelectionScreen-CrHLwmNP.mjs +1 -0
  163. package/dist/esm/InAppBrowserLoginNotPossible-CcbdJWpW.mjs +1 -0
  164. package/dist/esm/InstallWalletScreen-0udkV09c.mjs +1 -0
  165. package/dist/esm/LandingScreen-C7xCusAZ.mjs +1 -0
  166. package/dist/esm/{LinkConflictScreen-DOsLOvpT.mjs → LinkConflictScreen-B31exGN7.mjs} +4 -4
  167. package/dist/esm/LinkEmailScreen-DZf6HS1n.mjs +1 -0
  168. package/dist/esm/{LinkPasskeyScreen-jzRj6Yq0.mjs → LinkPasskeyScreen-Bl7uzJ8Q.mjs} +7 -7
  169. package/dist/esm/LinkPhoneScreen-DUIIaqp0.mjs +1 -0
  170. package/dist/esm/LoginFailedScreen-DsSbXSXA.mjs +1 -0
  171. package/dist/esm/ManualTransferScreen-B-Kkarxd.mjs +1 -0
  172. package/dist/esm/MfaAuthEnrollmentFlowScreen-D82inQR9.mjs +1 -0
  173. package/dist/esm/MfaAuthVerifyFlowScreen-Cw5rWozq.mjs +1 -0
  174. package/dist/esm/MfaEnrollmentFlowScreen-B3F6HEAl.mjs +1 -0
  175. package/dist/esm/MfaVerifyFlowScreen-DYuvXWXh.mjs +1 -0
  176. package/dist/esm/{ModalHeader-CSfzkWxZ.mjs → ModalHeader-Byy3j4Lh.mjs} +1 -1
  177. package/dist/esm/MoonpayStatusScreen-CBtEX6lf.mjs +16 -0
  178. package/dist/esm/OAuthStatusScreen-YCUnttYA.mjs +1 -0
  179. package/dist/esm/PasskeySelectSignupOrLogin-DuXG4uXH.mjs +1 -0
  180. package/dist/esm/PasskeyStatusScreen-DPvVVoC2.mjs +3 -0
  181. package/dist/esm/PasswordRecoveryScreen-IS0ckI65.mjs +20 -0
  182. package/dist/esm/{QrCode-BkoTqsec.mjs → QrCode-lPYtXNC_.mjs} +1 -1
  183. package/dist/esm/RecoveryOAuthStatusScreen-CJO3irqx.mjs +1 -0
  184. package/dist/esm/RecoveryPasswordCreateScreen-DZb7gDAd.mjs +1 -0
  185. package/dist/esm/{RecoverySelectionScreen-0YIfrkiv.mjs → RecoverySelectionScreen-CThvVB-J.mjs} +2 -2
  186. package/dist/esm/{Screen-5StC6JLQ.mjs → Screen-Ct4Lyoaf.mjs} +1 -1
  187. package/dist/esm/{ScreenLayout-C2Le_YIv.mjs → ScreenLayout-DOt2sB2J.mjs} +1 -1
  188. package/dist/esm/{SetAutomaticRecoveryScreen-BAAv--Sk.mjs → SetAutomaticRecoveryScreen-D1IKpF6a.mjs} +2 -2
  189. package/dist/esm/{SetWalletPasswordForm-lzuYpBex.mjs → SetWalletPasswordForm-CiQmt-HX.mjs} +1 -1
  190. package/dist/esm/{SignRequestScreen-YrG-iwWX.mjs → SignRequestScreen-DKJky_Un.mjs} +2 -2
  191. package/dist/esm/{StandardSignAndSendTransactionScreen-Csw3bRQ4.mjs → StandardSignAndSendTransactionScreen-CPKZQMPj.mjs} +2 -2
  192. package/dist/esm/TelegramAuthScreen-bIm5jFOU.mjs +1 -0
  193. package/dist/esm/{TransactionDetails-BMVu0qlz.mjs → TransactionDetails-DLLlKhs7.mjs} +1 -1
  194. package/dist/esm/{TransactionErrorView-C6AZ1RC0.mjs → TransactionErrorView-CSRxuGt5.mjs} +1 -1
  195. package/dist/esm/{TransferFromWalletScreen-BOOq-OqM.mjs → TransferFromWalletScreen-ClNSdttH.mjs} +4 -4
  196. package/dist/esm/{TransferOrBridgeLoadingScreen-gM_oel5i.mjs → TransferOrBridgeLoadingScreen-rWz1yK-a.mjs} +1 -1
  197. package/dist/esm/UpdateEmailScreen-mog8U9Vt.mjs +1 -0
  198. package/dist/esm/UpdatePhoneScreen-CLLjzpN7.mjs +1 -0
  199. package/dist/esm/UserLimitReachedScreen-Baf8QzFD.mjs +1 -0
  200. package/dist/esm/{WalletInfoCard-TfOxho0A.mjs → WalletInfoCard-BWAC4Crm.mjs} +1 -1
  201. package/dist/esm/WalletInterstitialScreen-chmHYyvD.mjs +1 -0
  202. package/dist/esm/{WalletLink-CZTmkBKu.mjs → WalletLink-cm_UqBHl.mjs} +1 -1
  203. package/dist/esm/{WalletOverflowButton-C0Ysaik4.mjs → WalletOverflowButton-CoHTrzr-.mjs} +1 -1
  204. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  205. package/dist/esm/context-BEE1GR3p.mjs +1 -0
  206. package/dist/esm/{ethers-DrSqg5wi.mjs → ethers-CzVYf1X2.mjs} +1 -1
  207. package/dist/esm/extended-chains.mjs +1 -1
  208. package/dist/esm/farcaster.mjs +1 -1
  209. package/dist/esm/{frame-uzTmvtww.mjs → frame-CjhCpycO.mjs} +1 -1
  210. package/dist/esm/get-entropy-details-for-user-DXl-F6zT.mjs +1 -0
  211. package/dist/esm/{get-is-unified-wallet-GcvxyU9r.mjs → get-is-unified-wallet-szLxUazm.mjs} +1 -1
  212. package/dist/esm/{getErc20Balance-D0MGUaOw.mjs → getErc20Balance-Bs6MYMo9.mjs} +1 -1
  213. package/dist/esm/{getErc20TokenInfo-CZJTqd4c.mjs → getErc20TokenInfo-Cymy79Tp.mjs} +1 -1
  214. package/dist/esm/{getPublicClient-B4uPLKn-.mjs → getPublicClient-BltMpU4i.mjs} +1 -1
  215. package/dist/esm/{index-BXKPenEy.mjs → index-21Khs68W.mjs} +1 -1
  216. package/dist/esm/index-BXdEd5-h.mjs +174 -0
  217. package/dist/esm/{index-tsoVOGEt.mjs → index-CXuTLe54.mjs} +1 -1
  218. package/dist/esm/index.mjs +1 -1
  219. package/dist/esm/{internal-context-Z-fyxadS.mjs → internal-context-C4ZqP8IF.mjs} +1 -1
  220. package/dist/esm/internal.mjs +1 -1
  221. package/dist/esm/{paths-3HW55qZg.mjs → paths-BzM95ysC.mjs} +1 -1
  222. package/dist/esm/reservoir-CB32KXxK.mjs +1 -0
  223. package/dist/esm/{shared-CQ6jg1BO.mjs → shared-CcT7geMr.mjs} +1 -1
  224. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BfZwb-3N.mjs → shouldProceedtoEmbeddedWalletCreationFlow-eeAK_6M1.mjs} +1 -1
  225. package/dist/esm/smart-wallets-CHETrkmZ.mjs +1 -0
  226. package/dist/esm/smart-wallets.mjs +1 -1
  227. package/dist/esm/solana.mjs +1 -1
  228. package/dist/esm/{styles-C3H3yhVT.mjs → styles-CVcwbZBK.mjs} +1 -1
  229. package/dist/esm/{to-ui-error-fYkDcQhz.mjs → to-ui-error-CymSkIi1.mjs} +2 -2
  230. package/dist/esm/ui.mjs +1 -1
  231. package/dist/esm/use-export-wallet-BghmI1bY.mjs +1 -0
  232. package/dist/esm/use-export-wallet-DmJRcrg3.mjs +1 -0
  233. package/dist/esm/{use-sign-with-user-signer-Do5Oi_rb.mjs → use-sign-with-user-signer-BYctG7hm.mjs} +1 -1
  234. package/dist/esm/useActiveWallet-CeJ_zia0.mjs +185 -0
  235. package/dist/esm/{useGetSolPrice-DwwjjGbd.mjs → useGetSolPrice-DaxM-vxD.mjs} +1 -1
  236. package/dist/esm/{useGetTokenPrice-YObgUU6L.mjs → useGetTokenPrice-BS8CeRfC.mjs} +1 -1
  237. package/dist/esm/{useI18n-VPW2SjZN.mjs → useI18n-BWqAKjsd.mjs} +1 -1
  238. package/dist/esm/usePrivy-DZkUhG2n.mjs +1 -0
  239. package/dist/esm/{useSolanaRpcClient-BTAchFxj.mjs → useSolanaRpcClient-D-Ekw787.mjs} +1 -1
  240. package/dist/esm/{useWalletBalance-BDrbQBDX.mjs → useWalletBalance-CCG99ZD8.mjs} +1 -1
  241. package/dist/esm/useWallets-CaOutpwQ.mjs +1 -0
  242. package/package.json +1 -1
  243. package/dist/cjs/AccountNotFoundScreen-DxO5LvIc.js +0 -1
  244. package/dist/cjs/AffirmativeConsentScreen-DfJW4zFz.js +0 -6
  245. package/dist/cjs/AllowlistRejectionScreen-CP01TiLV.js +0 -1
  246. package/dist/cjs/AuthenticateWithWalletScreen-CQw1iHsK.js +0 -1
  247. package/dist/cjs/AwaitingEvmToSolBridgingScreen-BzcvlEoa.js +0 -2
  248. package/dist/cjs/AwaitingExternalEthereumTransferScreen-CF8PGODY.js +0 -2
  249. package/dist/cjs/AwaitingPasswordlessCodeScreen-BByZHkHQ.js +0 -103
  250. package/dist/cjs/AwaitingSolToEvmBridgingScreen-DcalXeu-.js +0 -2
  251. package/dist/cjs/CaptchaScreen-anNodbfx.js +0 -1
  252. package/dist/cjs/CoinbaseOnrampStatusScreen-JGw8hfLn.js +0 -16
  253. package/dist/cjs/ConnectLedgerScreen-CwS0odD_.js +0 -9
  254. package/dist/cjs/ConnectOnlyLandingScreen-fpFbLO8Y.js +0 -1
  255. package/dist/cjs/ConnectOnlyStatusScreen-DziODgdH.js +0 -1
  256. package/dist/cjs/ConnectOrCreateScreen-D-V8KzJp.js +0 -1
  257. package/dist/cjs/ConnectionStatusScreen-D4NtHDFM.js +0 -7
  258. package/dist/cjs/CrossAppAuthScreen-BtEXDc88.js +0 -1
  259. package/dist/cjs/DelegatedActionsConsentScreen-CGnSYhkE.js +0 -1
  260. package/dist/cjs/DelegatedActionsRevokeScreen-Dd8u3U62.js +0 -1
  261. package/dist/cjs/EmbeddedWalletConnectingScreen-yIHjjIR2.js +0 -1
  262. package/dist/cjs/EmbeddedWalletCreatedScreen-CouqreWe.js +0 -1
  263. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-Cv8bAxPB.js +0 -1
  264. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-roXY9Gv8.js +0 -1
  265. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-9I5OZ38V.js +0 -1
  266. package/dist/cjs/ErrorScreen-DbETfzK4.js +0 -4
  267. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-CE1VdpiY.js +0 -2
  268. package/dist/cjs/FundingEditAmountScreen-Cjzgv7Q-.js +0 -1
  269. package/dist/cjs/FundingMethodSelectionScreen-Bje3JXwS.js +0 -1
  270. package/dist/cjs/InAppBrowserLoginNotPossible-DpFXJi29.js +0 -1
  271. package/dist/cjs/InstallWalletScreen-DP80Lixb.js +0 -1
  272. package/dist/cjs/LandingScreen-B_s7VUcj.js +0 -1
  273. package/dist/cjs/LinkEmailScreen-POTKFhXp.js +0 -1
  274. package/dist/cjs/LinkPhoneScreen-RWN6_lR0.js +0 -1
  275. package/dist/cjs/LoginFailedScreen-BGq1l-h2.js +0 -1
  276. package/dist/cjs/ManualTransferScreen-S07FPGso.js +0 -1
  277. package/dist/cjs/MfaAuthEnrollmentFlowScreen-Bnb9xLgu.js +0 -1
  278. package/dist/cjs/MfaAuthVerifyFlowScreen-Bn7NxwbP.js +0 -1
  279. package/dist/cjs/MfaEnrollmentFlowScreen-DixH-nyJ.js +0 -1
  280. package/dist/cjs/MfaVerifyFlowScreen-BtjZAo_J.js +0 -1
  281. package/dist/cjs/MoonpayStatusScreen-BAgiyXOW.js +0 -16
  282. package/dist/cjs/OAuthStatusScreen-RWYIpAEG.js +0 -1
  283. package/dist/cjs/PasskeySelectSignupOrLogin-DvUcmWfj.js +0 -1
  284. package/dist/cjs/PasskeyStatusScreen-CpL_C3--.js +0 -3
  285. package/dist/cjs/PasswordRecoveryScreen-FcFRBHq1.js +0 -20
  286. package/dist/cjs/RecoveryOAuthStatusScreen-AV5BAFgZ.js +0 -1
  287. package/dist/cjs/RecoveryPasswordCreateScreen-CvtuH2mp.js +0 -1
  288. package/dist/cjs/SignRequestScreen-B5xPIK1u.js +0 -26
  289. package/dist/cjs/TelegramAuthScreen-CjTMUNYb.js +0 -1
  290. package/dist/cjs/UpdateEmailScreen-BvzkGAlB.js +0 -1
  291. package/dist/cjs/UpdatePhoneScreen-e8rAhVvP.js +0 -1
  292. package/dist/cjs/UserLimitReachedScreen-x5P5FX13.js +0 -1
  293. package/dist/cjs/WalletInterstitialScreen-DrApzB6o.js +0 -1
  294. package/dist/cjs/index-BZqehL-Z.js +0 -174
  295. package/dist/cjs/smart-wallets-xoXme78U.js +0 -1
  296. package/dist/cjs/use-export-wallet-1gw5h-6F.js +0 -1
  297. package/dist/cjs/use-export-wallet-CedJPqOx.js +0 -1
  298. package/dist/cjs/useActiveWallet-4V55N-5C.js +0 -185
  299. package/dist/cjs/usePrivy-Tr-VZh0x.js +0 -1
  300. package/dist/cjs/useWallets-By_aiK-e.js +0 -1
  301. package/dist/cjs/useWallets-Ds2FjLWj.js +0 -1
  302. package/dist/esm/AccountNotFoundScreen-DvDKQEeR.mjs +0 -1
  303. package/dist/esm/AffirmativeConsentScreen-DmjKmR3p.mjs +0 -6
  304. package/dist/esm/AllowlistRejectionScreen-Dzgqqss9.mjs +0 -1
  305. package/dist/esm/AuthenticateWithWalletScreen-DqEYmKRq.mjs +0 -1
  306. package/dist/esm/AwaitingEvmToSolBridgingScreen-mM0yFabb.mjs +0 -2
  307. package/dist/esm/AwaitingExternalEthereumTransferScreen-B8RwfC4k.mjs +0 -2
  308. package/dist/esm/AwaitingPasswordlessCodeScreen-DiwMdkl1.mjs +0 -103
  309. package/dist/esm/AwaitingSolToEvmBridgingScreen-DDjqJpxK.mjs +0 -2
  310. package/dist/esm/CaptchaScreen-DRpV5XFL.mjs +0 -1
  311. package/dist/esm/CoinbaseOnrampStatusScreen-B5SpiCFR.mjs +0 -16
  312. package/dist/esm/ConnectEmailForm-CUfcb4US.mjs +0 -3
  313. package/dist/esm/ConnectLedgerScreen-D54DrxnP.mjs +0 -9
  314. package/dist/esm/ConnectOnlyLandingScreen-Cm10LiWd.mjs +0 -1
  315. package/dist/esm/ConnectOnlyStatusScreen-Bz7rafsR.mjs +0 -1
  316. package/dist/esm/ConnectOrCreateScreen-aeQK2RJ_.mjs +0 -1
  317. package/dist/esm/ConnectionStatusScreen-_g1A1Dg2.mjs +0 -7
  318. package/dist/esm/CrossAppAuthScreen-4oQDzYzy.mjs +0 -1
  319. package/dist/esm/DelegatedActionsConsentScreen-Cj9bU7Q1.mjs +0 -1
  320. package/dist/esm/DelegatedActionsRevokeScreen-DGFRARuM.mjs +0 -1
  321. package/dist/esm/EmbeddedWalletConnectingScreen-Cmt8I8TX.mjs +0 -1
  322. package/dist/esm/EmbeddedWalletCreatedScreen-Dj_JuLO5.mjs +0 -1
  323. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-BOS_pyDI.mjs +0 -1
  324. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-DulDjFpp.mjs +0 -1
  325. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BkwyRHPS.mjs +0 -1
  326. package/dist/esm/ErrorScreen-8UMMZ6is.mjs +0 -4
  327. package/dist/esm/FarcasterSignerStatusScreen-RHH68QtJ.mjs +0 -28
  328. package/dist/esm/FundSolWalletWithExternalSolanaWallet-DVgX3EaM.mjs +0 -1
  329. package/dist/esm/FundingEditAmountScreen-D10JPLdP.mjs +0 -1
  330. package/dist/esm/FundingMethodSelectionScreen-BuWGEgge.mjs +0 -1
  331. package/dist/esm/InAppBrowserLoginNotPossible-TigdvlfS.mjs +0 -1
  332. package/dist/esm/InstallWalletScreen-DgyXxk_4.mjs +0 -1
  333. package/dist/esm/LandingScreen-C6rQCvI5.mjs +0 -1
  334. package/dist/esm/LinkEmailScreen-C7CpFuoA.mjs +0 -1
  335. package/dist/esm/LinkPhoneScreen-BKHv_Kdp.mjs +0 -1
  336. package/dist/esm/LoginFailedScreen-CJgWFc1S.mjs +0 -1
  337. package/dist/esm/ManualTransferScreen-CFNzuajf.mjs +0 -1
  338. package/dist/esm/MfaAuthEnrollmentFlowScreen-DflCQFD5.mjs +0 -1
  339. package/dist/esm/MfaAuthVerifyFlowScreen-D0KWDrSF.mjs +0 -1
  340. package/dist/esm/MfaEnrollmentFlowScreen-B5CTxsyW.mjs +0 -1
  341. package/dist/esm/MfaVerifyFlowScreen-Bds0d6wr.mjs +0 -1
  342. package/dist/esm/MoonpayStatusScreen-BgCvITlM.mjs +0 -16
  343. package/dist/esm/OAuthStatusScreen-B9LjQopq.mjs +0 -1
  344. package/dist/esm/PasskeySelectSignupOrLogin-BH-9DnYX.mjs +0 -1
  345. package/dist/esm/PasskeyStatusScreen-B0BMf34N.mjs +0 -3
  346. package/dist/esm/PasswordRecoveryScreen-BGO3xmU6.mjs +0 -20
  347. package/dist/esm/RecoveryOAuthStatusScreen-9ngTLe_q.mjs +0 -1
  348. package/dist/esm/RecoveryPasswordCreateScreen-BDCDfQzo.mjs +0 -1
  349. package/dist/esm/TelegramAuthScreen-CXnXpJTY.mjs +0 -1
  350. package/dist/esm/UpdateEmailScreen-B4u7SqtR.mjs +0 -1
  351. package/dist/esm/UpdatePhoneScreen-Dz75pT5l.mjs +0 -1
  352. package/dist/esm/UserLimitReachedScreen-BEQAxJvA.mjs +0 -1
  353. package/dist/esm/WalletInterstitialScreen-jHLFeLvC.mjs +0 -1
  354. package/dist/esm/context-bWeWAiND.mjs +0 -1
  355. package/dist/esm/index-DEtvMjrv.mjs +0 -174
  356. package/dist/esm/reservoir-0wfhnc0j.mjs +0 -1
  357. package/dist/esm/smart-wallets-wzmiQDh1.mjs +0 -1
  358. package/dist/esm/use-export-wallet-8amsQKG9.mjs +0 -1
  359. package/dist/esm/use-export-wallet-DyNNbsJn.mjs +0 -1
  360. package/dist/esm/useActiveWallet-CSq3KvGj.mjs +0 -185
  361. package/dist/esm/usePrivy-CvOp4eQ7.mjs +0 -1
  362. package/dist/esm/useWallets-izyyA2re.mjs +0 -1
  363. package/dist/esm/useWallets-yDa5ACXD.mjs +0 -1
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-szLxUazm.mjs";import{u as i}from"./context-BEE1GR3p.mjs";import{u as n,o as d,m as c}from"./internal-context-C4ZqP8IF.mjs";import{g as l}from"./get-entropy-details-for-user-DXl-F6zT.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-CiQmt-HX.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"zustand";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"styled-components";import"./ModalHeader-Byy3j4Lh.mjs";import"./useActiveWallet-CeJ_zia0.mjs";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./shared-CcT7geMr.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,_]=o(""),{authenticated:A,user:I}=t(),{client:M,walletProxy:b,refreshSessionAndUser:j,closePrivyModal:C,createAnalyticsEvent:R}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:N}=x.setWalletPassword,D=a(I),O="user-passcode"===u?.recoveryMethod,T="user-passcode"===D?.recoveryMethod;r((()=>{A||(P("LandingScreen"),N(new d("User must be authenticated before setting a password on a Privy wallet")))}),[A]);let L=()=>v?(N(v),void C({shouldCallAuthOnSuccess:!1})):O?(k(u),void C({shouldCallAuthOnSuccess:!1})):(N(new c("Exited before password was added to wallet")),void C({shouldCallAuthOnSuccess:!1}));S.current=L;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:L},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:T,onPasswordGenerate:()=>_(p()),onPasswordChange:_,onSubmit:async()=>{O?(k(u),C({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await M.getAccessToken();if(e&&I&&D?.address&&f&&b)try{R({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T}});let{entropyId:o,entropyIdVerifier:r}=l(I);if(!(await b.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void R({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T,reason:"error setting password"}});let t=await j(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void R({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T,reason:"wallet disconnected"}});w(s),R({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),R({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:D.address,reason:e}})}})(),h(!1))},onClose:L})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-C4ZqP8IF.mjs";import{a}from"./get-is-unified-wallet-szLxUazm.mjs";import{S as c}from"./ScreenLayout-DOt2sB2J.mjs";import"ofetch";import"react";import"viem";import"./context-BEE1GR3p.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-Byy3j4Lh.mjs";import"styled-components";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const n=({onClose:i,onProceed:s})=>/*#__PURE__*/e(c,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),m={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:c}=a(),{onFailure:m}=t.setWalletPassword,l=()=>{m(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return c.current=l,/*#__PURE__*/e(n,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{m as EmbeddedWalletPasswordUpdateSplashScreen,n as EmbeddedWalletPasswordUpdateSplashView,m as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-CSq3KvGj.mjs";import{M as h,b as m,P as p}from"./ModalHeader-CSfzkWxZ.mjs";import{C as u}from"./Chip-D2-wZOHJ.mjs";import{I as y,T as f,S as g,E as k,M as w,d as v,e as b,f as M,g as x,R as Z,a as L,A as j,F as E,L as I,b as S,c as T,C as P,N as R}from"./PinInput-3SLvbnQa.mjs";import A from"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import W from"@heroicons/react/24/outline/ClockIcon";import{useState as F,useMemo as B}from"react";import{u as U}from"./context-bWeWAiND.mjs";import{u as $}from"./internal-context-Z-fyxadS.mjs";import{u as z}from"./get-is-unified-wallet-GcvxyU9r.mjs";import{ErrorScreenView as N}from"./ErrorScreen-8UMMZ6is.mjs";import{DoubleIconWrapper as O}from"./LinkPasskeyScreen-jzRj6Yq0.mjs";import{C as D}from"./CopyToClipboard-BGTSFnT3.mjs";import{C as V}from"./Layouts-BlFm53ED.mjs";import{C as Y}from"./Column-C2X2MHYX.mjs";import{L as _}from"./LabelXs-oqZNqbm_.mjs";import{S as H}from"./Subtitle-CV-2yKE4.mjs";import{T as Q}from"./Title-BnzYV3Is.mjs";import{B as q}from"./shared-FM0rljBt.mjs";import{f as X,g as G,h as J,i as K}from"./index-DEtvMjrv.mjs";import ee from"@heroicons/react/24/solid/ShieldCheckIcon";import{Q as re}from"./QrCode-BkoTqsec.mjs";const te=t=>/*#__PURE__*/e(oe,{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"88",height:"89",viewBox:"0 0 88 89",...t,children:[/*#__PURE__*/r("rect",{y:"0.666016",width:"88",height:"88",rx:"44"}),/*#__PURE__*/r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.2463 20.9106C44.5473 20.2486 43.4527 20.2486 42.7537 20.9106C37.8798 25.5263 31.3034 28.3546 24.0625 28.3546C23.9473 28.3546 23.8323 28.3539 23.7174 28.3525C22.9263 28.3427 22.2202 28.8471 21.9731 29.5987C20.9761 32.6311 20.4375 35.8693 20.4375 39.2297C20.4375 53.5896 30.259 65.651 43.5482 69.0714C43.8446 69.1477 44.1554 69.1477 44.4518 69.0714C57.741 65.651 67.5625 53.5896 67.5625 39.2297C67.5625 35.8693 67.0239 32.6311 66.0269 29.5987C65.7798 28.8471 65.0737 28.3427 64.2826 28.3525C64.1677 28.3539 64.0527 28.3546 63.9375 28.3546C56.6966 28.3546 50.1202 25.5263 45.2463 20.9106ZM52.7249 40.2829C53.3067 39.4683 53.1181 38.3363 52.3035 37.7545C51.4889 37.1726 50.3569 37.3613 49.7751 38.1759L41.9562 49.1223L38.0316 45.1977C37.3238 44.4899 36.1762 44.4899 35.4684 45.1977C34.7605 45.9056 34.7605 47.0532 35.4684 47.761L40.9059 53.1985C41.2826 53.5752 41.806 53.7671 42.337 53.7232C42.868 53.6792 43.3527 53.4039 43.6624 52.9704L52.7249 40.2829Z"})]});let oe=o.svg`
1
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-CeJ_zia0.mjs";import{M as h,b as m,P as p}from"./ModalHeader-Byy3j4Lh.mjs";import{C as u}from"./Chip-D2-wZOHJ.mjs";import{I as y,T as f,S as g,E as k,M as w,d as v,e as b,f as M,g as x,R as Z,a as L,A as j,F as E,L as I,b as S,c as T,C as P,N as R}from"./PinInput-3SLvbnQa.mjs";import A from"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import W from"@heroicons/react/24/outline/ClockIcon";import{useState as F,useMemo as B}from"react";import{u as U}from"./context-BEE1GR3p.mjs";import{u as $}from"./internal-context-C4ZqP8IF.mjs";import{u as z}from"./get-is-unified-wallet-szLxUazm.mjs";import{ErrorScreenView as N}from"./ErrorScreen-BpG9IyOu.mjs";import{DoubleIconWrapper as O}from"./LinkPasskeyScreen-Bl7uzJ8Q.mjs";import{C as D}from"./CopyToClipboard-BGTSFnT3.mjs";import{C as V}from"./Layouts-BlFm53ED.mjs";import{C as Y}from"./Column-C2X2MHYX.mjs";import{L as _}from"./LabelXs-oqZNqbm_.mjs";import{S as H}from"./Subtitle-CV-2yKE4.mjs";import{T as Q}from"./Title-BnzYV3Is.mjs";import{B as q}from"./shared-FM0rljBt.mjs";import{f as X,g as G,h as J,i as K}from"./index-BXdEd5-h.mjs";import ee from"@heroicons/react/24/solid/ShieldCheckIcon";import{Q as re}from"./QrCode-lPYtXNC_.mjs";const te=t=>/*#__PURE__*/e(oe,{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"88",height:"89",viewBox:"0 0 88 89",...t,children:[/*#__PURE__*/r("rect",{y:"0.666016",width:"88",height:"88",rx:"44"}),/*#__PURE__*/r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.2463 20.9106C44.5473 20.2486 43.4527 20.2486 42.7537 20.9106C37.8798 25.5263 31.3034 28.3546 24.0625 28.3546C23.9473 28.3546 23.8323 28.3539 23.7174 28.3525C22.9263 28.3427 22.2202 28.8471 21.9731 29.5987C20.9761 32.6311 20.4375 35.8693 20.4375 39.2297C20.4375 53.5896 30.259 65.651 43.5482 69.0714C43.8446 69.1477 44.1554 69.1477 44.4518 69.0714C57.741 65.651 67.5625 53.5896 67.5625 39.2297C67.5625 35.8693 67.0239 32.6311 66.0269 29.5987C65.7798 28.8471 65.0737 28.3427 64.2826 28.3525C64.1677 28.3539 64.0527 28.3546 63.9375 28.3546C56.6966 28.3546 50.1202 25.5263 45.2463 20.9106ZM52.7249 40.2829C53.3067 39.4683 53.1181 38.3363 52.3035 37.7545C51.4889 37.1726 50.3569 37.3613 49.7751 38.1759L41.9562 49.1223L38.0316 45.1977C37.3238 44.4899 36.1762 44.4899 35.4684 45.1977C34.7605 45.9056 34.7605 47.0532 35.4684 47.761L40.9059 53.1985C41.2826 53.5752 41.806 53.7671 42.337 53.7232C42.868 53.6792 43.3527 53.4039 43.6624 52.9704L52.7249 40.2829Z"})]});let oe=o.svg`
2
2
  height: 90px;
3
3
  width: 90px;
4
4
 
@@ -0,0 +1,4 @@
1
+ import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-BEE1GR3p.mjs";import{a as c,P as l}from"./index-BXdEd5-h.mjs";import{g as m,c as p,b as d,e as u}from"./internal-context-C4ZqP8IF.mjs";import{a as T}from"./get-is-unified-wallet-szLxUazm.mjs";import{R as g}from"./reservoir-CB32KXxK.mjs";import{S as y}from"./ScreenLayout-DOt2sB2J.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"ofetch";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-Byy3j4Lh.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-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const h=({error:n,allowlistConfig:s,onRetry:c,onCaptchaReset:T,onBack:h})=>{let f=((n,s)=>{if(n instanceof g)return{title:"Transaction failed",detail:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:n.message}),/*#__PURE__*/e("span",{children:[" ","Check the"," ",/*#__PURE__*/t(w,{href:n.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(n instanceof d)switch(n.privyErrorCode){case p.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:n.message,ctaText:"Try again",icon:i};case p.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:n.message,ctaText:"Try again",icon:i};case p.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:n.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(n instanceof l&&"twilio_verification_failed"===n.type)return{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:a};if(!(n instanceof m))return n instanceof u&&n.status&&[400,422].includes(n.status)?{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(n.privyErrorCode){case p.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case p.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:n.message,ctaText:"Try another method",icon:i};case p.ALLOWLIST_REJECTED:return{title:s.errorTitle||"You don't have access to this app",detail:s.errorDetail||"Have you been invited?",ctaText:s.errorCtaText||"Try another account",icon:o};case p.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case p.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case p.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(n,s);/*#__PURE__*/return t(y,{title:f.title,subtitle:f.detail,icon:f.icon,onBack:h,iconVariant:"error",primaryCta:{label:f.ctaText,onClick:()=>{n instanceof m&&(n.privyErrorCode===p.INVALID_CAPTCHA&&T?.(),n.privyErrorCode===p.ALLOWLIST_REJECTED&&s.errorCtaLink)?window.location.href=s.errorCtaLink:c?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:i,currentScreen:a}=T(),o=s(),{reset:n}=c(),l=r?.errorModalData?.previousScreen||(i===a?void 0:i);/*#__PURE__*/return t(h,{error:r?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(l||"LandingScreen",!1)},onCaptchaReset:n})}};let w=n.a`
2
+ color: var(--privy-color-accent) !important;
3
+ font-weight: 600;
4
+ `;export{f as ErrorScreen,h as ErrorScreenView,f as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-CSq3KvGj.mjs";import{O as d}from"./OpenLink-DZHy38vr.mjs";import{Q as m}from"./QrCode-BkoTqsec.mjs";import{Check as p,Copy as u}from"lucide-react";import{S as h}from"./ModalHeader-CSfzkWxZ.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{u as f,q as g}from"./context-bWeWAiND.mjs";import{u as y,b,k as w}from"./internal-context-Z-fyxadS.mjs";import{u as x,a as C}from"./get-is-unified-wallet-GcvxyU9r.mjs";import{s as E}from"./shouldProceedtoEmbeddedWalletCreationFlow-BfZwb-3N.mjs";import{S}from"./ScreenLayout-C2Le_YIv.mjs";import{F as k}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./use-export-wallet-DyNNbsJn.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-izyyA2re.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"./index-DEtvMjrv.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-CvOp4eQ7.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./Screen-5StC6JLQ.mjs";import"./index-Dq_xe9dz.mjs";let j=l.div`
1
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-CeJ_zia0.mjs";import{O as d}from"./OpenLink-DZHy38vr.mjs";import{Q as m}from"./QrCode-lPYtXNC_.mjs";import{Check as p,Copy as u}from"lucide-react";import{S as h}from"./ModalHeader-Byy3j4Lh.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{u as f,q as g}from"./context-BEE1GR3p.mjs";import{u as y,c as b,k as w}from"./internal-context-C4ZqP8IF.mjs";import{u as x,a as C}from"./get-is-unified-wallet-szLxUazm.mjs";import{s as E}from"./shouldProceedtoEmbeddedWalletCreationFlow-eeAK_6M1.mjs";import{S}from"./ScreenLayout-DOt2sB2J.mjs";import{F as k}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"./events-context-CI0iqAXA.mjs";import"qrcode";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"./index-BXdEd5-h.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";let j=l.div`
2
2
  width: 100%;
3
3
  `,T=l.div`
4
4
  display: flex;
@@ -47,14 +47,14 @@ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState
47
47
  font-size: 14px;
48
48
  flex-shrink: 0;
49
49
  }
50
- `;const I=({value:a,title:n,placeholder:s,className:l,showCopyButton:c=!0,truncate:d,maxLength:m=40,disabled:h=!1})=>{let[v,f]=i(!1),g=d&&a?((e,r,t)=>{if((e=e.startsWith("https://")?e.slice(8):e).length<=t)return e;if("middle"===r){let r=Math.ceil(t/2)-2,i=Math.floor(t/2)-1;return`${e.slice(0,r)}...${e.slice(-i)}`}return`${e.slice(0,t-3)}...`})(a,d,m):a;return o((()=>{if(v){let e=setTimeout((()=>f(!1)),3e3);return()=>clearTimeout(e)}}),[v]),/*#__PURE__*/e(j,{className:l,children:[n&&/*#__PURE__*/r(O,{children:n}),/*#__PURE__*/e(T,{$disabled:h,children:[/*#__PURE__*/r(A,{children:a?/*#__PURE__*/r(L,{$disabled:h,title:a,children:g}):/*#__PURE__*/r(F,{$disabled:h,children:s||"No value"})}),c&&a&&/*#__PURE__*/r(_,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(a).then((()=>f(!0))).catch(console.error)},size:"sm",children:/*#__PURE__*/e(t,v?{children:["Copied",/*#__PURE__*/r(p,{size:14})]}:{children:["Copy",/*#__PURE__*/r(u,{size:14})]})})]})]})},R=({connectUri:t,loading:i,success:o,errorMessage:a,onBack:l,onClose:p,onOpenFarcaster:u})=>/*#__PURE__*/r(S,n||i?s?{title:a?a.message:"Sign in with Farcaster",subtitle:a?a.detail:"To sign in with Farcaster, please open the Farcaster app.",icon:k,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!a},primaryCta:t&&u?{label:"Open Farcaster app",onClick:u}:void 0,onBack:l,onClose:p,watermark:!0}:{title:a?a.message:"Signing in with Farcaster",subtitle:a?a.detail:"This should only take a moment",icon:k,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!a},onBack:l,onClose:p,watermark:!0,children:t&&n&&/*#__PURE__*/r(U,{children:/*#__PURE__*/r(d,{text:"Take me to Farcaster",url:t,color:"#8a63d2"})})}:{title:"Sign in with Farcaster",subtitle:"Scan with your phone's camera to continue.",onBack:l,onClose:p,watermark:!0,children:/*#__PURE__*/e(W,{children:[/*#__PURE__*/r(M,{children:t?/*#__PURE__*/r(m,{url:t,size:275,squareLogoElement:k}):/*#__PURE__*/r(z,{children:/*#__PURE__*/r(c,{})})}),/*#__PURE__*/e($,{children:[/*#__PURE__*/r(D,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),t&&/*#__PURE__*/r(I,{value:t,truncate:"end",maxLength:30,showCopyButton:!0,disabled:!0})]})]})}),N={component:()=>{let{authenticated:e,logout:t,ready:n,user:s}=x(),{lastScreen:l,navigate:c,navigateBack:d,setModalData:m}=C(),p=f(),{getAuthFlow:u,loginWithFarcaster:h,closePrivyModal:v,createAnalyticsEvent:S}=y(),[k,j]=i(void 0),[T,A]=i(!1),[L,F]=i(!1),O=a([]),_=u(),I=_?.meta.connectUri;return o((()=>{let e=Date.now(),r=setInterval((async()=>{let t=await _.pollForReady.execute(),i=Date.now()-e;if(t){clearInterval(r),A(!0);try{await h(),F(!0)}catch(e){let r={retryable:!1,message:"Authentication failed"};if(e?.privyErrorCode===b.ALLOWLIST_REJECTED)return void c("AllowlistRejectionScreen");if(e?.privyErrorCode===b.USER_LIMIT_REACHED)return console.error(new w(e).toString()),void c("UserLimitReachedScreen");if(e?.privyErrorCode===b.USER_DOES_NOT_EXIST)return void c("AccountNotFoundScreen");if(e?.privyErrorCode===b.LINKED_TO_ANOTHER_USER)r.detail=e.message??"This account has already been linked to another user.";else{if(e?.privyErrorCode===b.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return m({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:"farcaster",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,farcasterEmbeddedAddress:e.data?.data?.otherUser?.farcasterEmbeddedAddress}}),void c("LinkConflictScreen");e?.privyErrorCode===b.INVALID_CREDENTIALS?(r.retryable=!0,r.detail="Something went wrong. Try again."):e?.privyErrorCode===b.TOO_MANY_REQUESTS&&(r.detail="Too many requests. Please wait before trying again.")}j(r)}}else i>12e4&&(clearInterval(r),j({retryable:!0,message:"Authentication failed",detail:"The request timed out. Try again."}))}),2e3);return()=>{clearInterval(r),O.current.forEach((e=>clearTimeout(e)))}}),[]),o((()=>{if(n&&e&&L&&s){if(p?.legal.requireUsersAcceptTerms&&!s.hasAcceptedTerms){let e=setTimeout((()=>{c("AffirmativeConsentScreen")}),g);return()=>clearTimeout(e)}L&&(E(s,p.embeddedWallets)?O.current.push(setTimeout((()=>{m({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"FarcasterConnectStatusScreen"}}),t()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),g)):O.current.push(setTimeout((()=>v({shouldCallAuthOnSuccess:!0,isSuccess:!0})),g)))}}),[L,n,e,s]),/*#__PURE__*/r(R,{connectUri:I,loading:T,success:L,errorMessage:k,onBack:l?d:void 0,onClose:v,onOpenFarcaster:()=>{I&&(window.location.href=I)}})}};let U=l.div`
50
+ `;const I=({value:a,title:n,placeholder:s,className:l,showCopyButton:c=!0,truncate:d,maxLength:m=40,disabled:h=!1})=>{let[v,f]=i(!1),g=d&&a?((e,r,t)=>{if((e=e.startsWith("https://")?e.slice(8):e).length<=t)return e;if("middle"===r){let r=Math.ceil(t/2)-2,i=Math.floor(t/2)-1;return`${e.slice(0,r)}...${e.slice(-i)}`}return`${e.slice(0,t-3)}...`})(a,d,m):a;return o((()=>{if(v){let e=setTimeout((()=>f(!1)),3e3);return()=>clearTimeout(e)}}),[v]),/*#__PURE__*/e(j,{className:l,children:[n&&/*#__PURE__*/r(O,{children:n}),/*#__PURE__*/e(T,{$disabled:h,children:[/*#__PURE__*/r(A,{children:a?/*#__PURE__*/r(L,{$disabled:h,title:a,children:g}):/*#__PURE__*/r(F,{$disabled:h,children:s||"No value"})}),c&&a&&/*#__PURE__*/r(_,{onClick:function(e){e.stopPropagation(),navigator.clipboard.writeText(a).then((()=>f(!0))).catch(console.error)},size:"sm",children:/*#__PURE__*/e(t,v?{children:["Copied",/*#__PURE__*/r(p,{size:14})]}:{children:["Copy",/*#__PURE__*/r(u,{size:14})]})})]})]})},R=({connectUri:t,loading:i,success:o,errorMessage:a,onBack:l,onClose:p,onOpenFarcaster:u})=>/*#__PURE__*/r(S,n||i?s?{title:a?a.message:"Sign in with Farcaster",subtitle:a?a.detail:"To sign in with Farcaster, please open the Farcaster app.",icon:k,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!a},primaryCta:t&&u?{label:"Open Farcaster app",onClick:u}:void 0,onBack:l,onClose:p,watermark:!0}:{title:a?a.message:"Signing in with Farcaster",subtitle:a?a.detail:"This should only take a moment",icon:k,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!a},onBack:l,onClose:p,watermark:!0,children:t&&n&&/*#__PURE__*/r(U,{children:/*#__PURE__*/r(d,{text:"Take me to Farcaster",url:t,color:"#8a63d2"})})}:{title:"Sign in with Farcaster",subtitle:"Scan with your phone's camera to continue.",onBack:l,onClose:p,watermark:!0,children:/*#__PURE__*/e(M,{children:[/*#__PURE__*/r(W,{children:t?/*#__PURE__*/r(m,{url:t,size:275,squareLogoElement:k}):/*#__PURE__*/r(z,{children:/*#__PURE__*/r(c,{})})}),/*#__PURE__*/e($,{children:[/*#__PURE__*/r(D,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),t&&/*#__PURE__*/r(I,{value:t,truncate:"end",maxLength:30,showCopyButton:!0,disabled:!0})]})]})}),N={component:()=>{let{authenticated:e,logout:t,ready:n,user:s}=x(),{lastScreen:l,navigate:c,navigateBack:d,setModalData:m}=C(),p=f(),{getAuthFlow:u,loginWithFarcaster:h,closePrivyModal:v,createAnalyticsEvent:S}=y(),[k,j]=i(void 0),[T,A]=i(!1),[L,F]=i(!1),O=a([]),_=u(),I=_?.meta.connectUri;return o((()=>{let e=Date.now(),r=setInterval((async()=>{let t=await _.pollForReady.execute(),i=Date.now()-e;if(t){clearInterval(r),A(!0);try{await h(),F(!0)}catch(e){let r={retryable:!1,message:"Authentication failed"};if(e?.privyErrorCode===b.ALLOWLIST_REJECTED)return void c("AllowlistRejectionScreen");if(e?.privyErrorCode===b.USER_LIMIT_REACHED)return console.error(new w(e).toString()),void c("UserLimitReachedScreen");if(e?.privyErrorCode===b.USER_DOES_NOT_EXIST)return void c("AccountNotFoundScreen");if(e?.privyErrorCode===b.LINKED_TO_ANOTHER_USER)r.detail=e.message??"This account has already been linked to another user.";else{if(e?.privyErrorCode===b.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return m({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:"farcaster",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,farcasterEmbeddedAddress:e.data?.data?.otherUser?.farcasterEmbeddedAddress}}),void c("LinkConflictScreen");e?.privyErrorCode===b.INVALID_CREDENTIALS?(r.retryable=!0,r.detail="Something went wrong. Try again."):e?.privyErrorCode===b.TOO_MANY_REQUESTS&&(r.detail="Too many requests. Please wait before trying again.")}j(r)}}else i>12e4&&(clearInterval(r),j({retryable:!0,message:"Authentication failed",detail:"The request timed out. Try again."}))}),2e3);return()=>{clearInterval(r),O.current.forEach((e=>clearTimeout(e)))}}),[]),o((()=>{if(n&&e&&L&&s){if(p?.legal.requireUsersAcceptTerms&&!s.hasAcceptedTerms){let e=setTimeout((()=>{c("AffirmativeConsentScreen")}),g);return()=>clearTimeout(e)}L&&(E(s,p.embeddedWallets)?O.current.push(setTimeout((()=>{m({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"FarcasterConnectStatusScreen"}}),t()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),g)):O.current.push(setTimeout((()=>v({shouldCallAuthOnSuccess:!0,isSuccess:!0})),g)))}}),[L,n,e,s]),/*#__PURE__*/r(R,{connectUri:I,loading:T,success:L,errorMessage:k,onBack:l?d:void 0,onClose:v,onOpenFarcaster:()=>{I&&(window.location.href=I)}})}};let U=l.div`
51
51
  margin-top: 24px;
52
- `,W=l.div`
52
+ `,M=l.div`
53
53
  display: flex;
54
54
  flex-direction: column;
55
55
  align-items: center;
56
56
  gap: 24px;
57
- `,M=l.div`
57
+ `,W=l.div`
58
58
  display: flex;
59
59
  align-items: center;
60
60
  justify-content: center;
@@ -0,0 +1,28 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-BGTSFnT3.mjs";import{L as c}from"./useActiveWallet-CeJ_zia0.mjs";import{O as m}from"./OpenLink-DZHy38vr.mjs";import{Q as p}from"./QrCode-lPYtXNC_.mjs";import{u as d,q as u}from"./context-BEE1GR3p.mjs";import{u as g}from"./internal-context-C4ZqP8IF.mjs";import{a as f}from"./get-is-unified-wallet-szLxUazm.mjs";import{S as h}from"./ScreenLayout-DOt2sB2J.mjs";import{F as v}from"./farcaster-DPlSjvF5.mjs";import"./copy-Bx2Jwc5_.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"./events-context-CI0iqAXA.mjs";import"qrcode";import"tinycolor2";import"ofetch";import"./ModalHeader-Byy3j4Lh.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-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";let y="#8a63d2";const w=({appName:r,loading:o,success:a,errorMessage:n,connectUri:d,onBack:u,onClose:g,onOpenFarcaster:f})=>/*#__PURE__*/e(h,i||o?s?{title:n?n.message:"Add a signer to Farcaster",subtitle:n?n.detail:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},primaryCta:d&&f?{label:"Open Farcaster app",onClick:f}:void 0,onBack:u,onClose:g,watermark:!0}:{title:n?n.message:"Requesting signer from Farcaster",subtitle:n?n.detail:"This should only take a moment",icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},onBack:u,onClose:g,watermark:!0,children:d&&i&&/*#__PURE__*/e(k,{children:/*#__PURE__*/e(m,{text:"Take me to Farcaster",url:d,color:y})})}:{title:"Add a signer to Farcaster",subtitle:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,onBack:u,onClose:g,watermark:!0,children:/*#__PURE__*/t(j,{children:[/*#__PURE__*/e(x,{children:d?/*#__PURE__*/e(p,{url:d,size:275,squareLogoElement:v}):/*#__PURE__*/e(S,{children:/*#__PURE__*/e(c,{})})}),/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(b,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),d&&/*#__PURE__*/e(l,{text:d,itemName:"link",color:y})]})]})});let k=n.div`
2
+ margin-top: 24px;
3
+ `,j=n.div`
4
+ display: flex;
5
+ flex-direction: column;
6
+ align-items: center;
7
+ gap: 24px;
8
+ `,x=n.div`
9
+ padding: 24px;
10
+ position: relative;
11
+ display: flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ min-height: 275px;
15
+ `,C=n.div`
16
+ display: flex;
17
+ flex-direction: column;
18
+ align-items: center;
19
+ gap: 16px;
20
+ `,b=n.div`
21
+ font-size: 0.875rem;
22
+ text-align: center;
23
+ color: var(--privy-color-foreground-2);
24
+ `,S=n.div`
25
+ position: relative;
26
+ width: 82px;
27
+ height: 82px;
28
+ `;const I={component:()=>{let{lastScreen:t,navigateBack:i,data:s}=f(),n=d(),{requestFarcasterSignerStatus:l,closePrivyModal:c}=g(),[m,p]=r(void 0),[h,v]=r(!1),[y,k]=r(!1),j=o([]),x=s?.farcasterSigner;a((()=>{let e=Date.now(),t=setInterval((async()=>{if(!x?.public_key)return clearInterval(t),void p({retryable:!0,message:"Connect failed",detail:"Something went wrong. Please try again."});"approved"===x.status&&(clearInterval(t),v(!1),k(!0),j.current.push(setTimeout((()=>c({shouldCallAuthOnSuccess:!1,isSuccess:!0})),u)));let r=await l(x?.public_key),o=Date.now()-e;"approved"===r.status?(clearInterval(t),v(!1),k(!0),j.current.push(setTimeout((()=>c({shouldCallAuthOnSuccess:!1,isSuccess:!0})),u))):o>3e5?(clearInterval(t),p({retryable:!0,message:"Connect failed",detail:"The request timed out. Try again."})):"revoked"===r.status&&(clearInterval(t),p({retryable:!0,message:"Request rejected",detail:"The request was rejected. Please try again."}))}),2e3);return()=>{clearInterval(t),j.current.forEach((e=>clearTimeout(e)))}}),[]);let C="pending_approval"===x?.status?x.signer_approval_url:void 0;/*#__PURE__*/return e(w,{appName:n.name,loading:h,success:y,errorMessage:m,connectUri:C,onBack:t?i:void 0,onClose:c,onOpenFarcaster:()=>{C&&(window.location.href=C)}})}};export{I as FarcasterSignerStatusScreen,w as FarcasterSignerStatusView,I as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-Byy3j4Lh.mjs";import{b as m,c,R as d,e as u}from"./Layouts-BlFm53ED.mjs";import{C as p}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as f}from"./FundWalletMethodHeader-Cyn7MCWO.mjs";import{I as g}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as h}from"./index-Dq_xe9dz.mjs";import{L as I,V as w}from"./Value-tcJV9e0L.mjs";import{a as v,R as S}from"./Row-C9vrS4Zi.mjs";import{u as j,t as C}from"./context-BEE1GR3p.mjs";import{u as y,b as L,c as x}from"./internal-context-C4ZqP8IF.mjs";import{a as k}from"./get-is-unified-wallet-szLxUazm.mjs";import{u as F,g as U}from"./useWallets-CaOutpwQ.mjs";import{u as T}from"./useGetTokenPrice-BS8CeRfC.mjs";import{O as b}from"./analytics-mkkvFRju.mjs";import{getTransferSolInstruction as A}from"@solana-program/system";import{pipe as W,createTransactionMessage as P,setTransactionMessageFeePayerSigner as D,setTransactionMessageLifetimeUsingBlockhash as N,appendTransactionMessageInstruction as O,compileTransaction as E,getTransactionEncoder as M}from"@solana/kit";import{findAssociatedTokenPda as B,getCreateAssociatedTokenIdempotentInstruction as $,getTransferInstruction as R}from"@solana-program/token";import{T as H,L as G,g as V}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as _}from"./getUsdcMintAddress-DFI1hv05.mjs";import{u as q,f as z,s as Q,w as X}from"./useSolanaRpcClient-D-Ekw787.mjs";import{g as Y}from"./getChainName-DjpPdUSc.mjs";import{t as J}from"./use-export-wallet-DmJRcrg3.mjs";import"styled-components";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem";import"viem/utils";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/WalletIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"./usePrivy-DZkUhG2n.mjs";import"eventemitter3";import"@scure/base";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./useGetSolPrice-DaxM-vxD.mjs";function K({rows:a}){/*#__PURE__*/return e(v,{children:a.filter((e=>!!e)).map(((a,n)=>null!=a.value||a.isLoading?/*#__PURE__*/t(S,{children:[/*#__PURE__*/e(I,{children:a.label}),/*#__PURE__*/e(w,{$isLoading:a.isLoading,children:a.value})]},n):null))})}function Z(e){return BigInt(Math.floor(1e9*parseFloat(e)))}function ee(e){return+te.format(parseFloat(e.toString())/1e9)}let te=Intl.NumberFormat(void 0,{maximumFractionDigits:8});async function ae({tx:e,solanaClient:t,amount:a,asset:n,tokenPrice:o}){if(!e)return null;if("SOL"===n&&o){let n=Z(a),r=V(n,o),s=await z({solanaClient:t,tx:e});return{amountInUsd:r,feeInUsd:o?V(s,o):void 0,totalInUsd:V(n+s,o)}}if("USDC"===n&&o){let n="$"+a,r=await z({solanaClient:t,tx:e}),s=function(e,t){let a=parseFloat(e.toString())/G*t;return a<.01?0:a}(r,o);return{amountInUsd:n,feeInUsd:V(r,o),totalInUsd:"$"+(parseFloat(a)+s).toFixed(2)}}if("SOL"===n){let n=Z(a),o=await z({solanaClient:t,tx:e});return{amountInSol:a+" SOL",feeInSol:ee(o)+" SOL",totalInSol:ee(n+o)+" SOL"}}return{amountInUsdc:a+" USDC",feeInSol:ee(await z({solanaClient:t,tx:e}))+" SOL"}}const ne={component:function(){let I=j(),{closePrivyModal:w,createAnalyticsEvent:v}=y(),{data:S,setModalData:G,navigate:z}=k(),{wallets:ee}=F(),[te,ne]=o("preparing"),[oe,re]=o(),[se,ie]=o(),[le,me]=o();if(!S?.solanaFundingData)throw Error("Funding config is missing");if(!S.solanaFundingData.sourceWalletData)throw Error("Funding config is missing source wallet data");let{amount:ce,asset:de,chain:ue,sourceWalletData:pe,destinationAddress:fe,afterSuccessScreen:ge}=S.solanaFundingData,he=ee.find((e=>e.address===pe.address&&J(pe.walletClientType)===J(e.standardWallet.name))),Ie=q()(ue),{tokenPrice:we,isTokenPriceLoading:ve}=T("solana");return r((()=>{if("preparing"!==te||ve||!he)return;let e="SOL"===de?Z(ce):function(e){return BigInt(Math.floor(1e6*parseFloat(e)))}(ce);ie({amount:("SOL"===de&&we?V(e,we):ce)??ce}),("SOL"===de?async function({solanaClient:e,source:t,destination:a,amountInLamports:n}){let{value:o}=await e.rpc.getLatestBlockhash().send(),r={address:t},s=W(P({version:0}),(e=>D(r,e)),(e=>N(o,e)),(e=>O(A({amount:n,source:r,destination:a}),e)),(e=>E(e)));return new Uint8Array(M().encode(s))}({solanaClient:Ie,source:he.address,destination:fe,amountInLamports:e}):async function({solanaClient:e,source:t,destination:a,amountInBaseUnits:n}){let o=_(e.chain),{value:r}=await e.rpc.getLatestBlockhash().send(),s={address:t},[i]=await B({mint:o,owner:t,tokenProgram:H}),[l]=await B({mint:o,owner:a,tokenProgram:H}),[m,c]=await Promise.all([e.rpc.getAccountInfo(i,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null)),e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null))]);if(!m?.value)throw Error(`Source token account does not exist for address: ${t}`);let d=$({payer:s,ata:l,owner:a,mint:o}),u=W(P({version:0}),(e=>D(s,e)),(e=>N(r,e)),(e=>c?.value?e:O(d,e)),(e=>O(R({source:i,destination:l,authority:s,amount:n}),e)),(e=>E(e)));return new Uint8Array(M().encode(u))}({solanaClient:Ie,source:he.address,destination:fe,amountInBaseUnits:e})).then(re).catch((e=>{ne("error"),me(e)}))}),[te,ce,de,ue,he,fe,ve,we]),r((()=>{"preparing"===te&&oe&&ae({tx:oe,solanaClient:Ie,amount:ce,asset:de,tokenPrice:we}).then((e=>{ne("loaded"),ie({amount:e?.amountInUsd??e?.amountInUsdc??e?.amountInSol??ce,fee:e?.feeInUsd??e?.feeInSol,total:e?.totalInUsd??e?.totalInSol})})).catch((e=>{ne("error"),me(e)}))}),[oe,ce,de,te,we]),r((()=>{"error"===te&&le&&(G({errorModalData:{error:le,previousScreen:"FundSolWalletWithExternalSolanaWallet"},solanaFundingData:S.solanaFundingData}),z("ErrorScreen",!1))}),[te,z]),r((()=>{if("success"!==te)return;let e=setTimeout(ge?()=>z(ge):w,C);return()=>clearTimeout(e)}),[te]),/*#__PURE__*/t(a,"success"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(m,{}),/*#__PURE__*/t(c,{children:[/*#__PURE__*/e(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e(p,{title:"Success!",description:`You’ve successfully added ${ce} ${de} to your ${I.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/e(d,{}),/*#__PURE__*/e(i,{})]}:"preparing"===te||"loaded"===te||"sending"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(u,{style:{marginTop:"16px"},children:/*#__PURE__*/e(g,{icon:he?.standardWallet.icon,name:he?.standardWallet.name})}),/*#__PURE__*/e(p,{style:{marginTop:"8px",marginBottom:"12px"},title:"sending"===te&&he?`Confirming with ${he.standardWallet.name}`:"Confirm transaction"}),/*#__PURE__*/e(K,{rows:[{label:"Source",value:s(pe.address)},{label:"Destination",value:s(fe)},{label:"Network",value:Y(ue)},{label:"Amount",value:se?.amount,isLoading:"preparing"===te},{label:"Estimated fee",value:se?.fee,isLoading:"preparing"===te},{label:"Total",value:se?.total,isLoading:"preparing"===te}]}),/*#__PURE__*/e(l,{style:{marginTop:"1rem"},loading:"preparing"===te||"sending"===te,onClick:function(){"loaded"===te&&oe&&he&&(ne("sending"),async function({transaction:e,chain:t,sourceWallet:a,solanaClient:n}){let{hasFunds:o}=await Q({solanaClient:n,tx:e});if(!o)throw new L(`Wallet ${s(a.address)} does not have enough funds.`,void 0,x.INSUFFICIENT_BALANCE);let r=U((await a.signAndSendTransaction({transaction:e,chain:t}).catch((e=>{throw new L("Transaction was rejected by the user",e,x.TRANSACTION_FAILURE)}))).signature);return await X({rpcSubscriptions:n.rpcSubscriptions,signature:r,timeout:2e4}),r}({solanaClient:Ie,transaction:oe,chain:ue,sourceWallet:he}).then((e=>{ne("success"),v({eventName:b,payload:{provider:"external",status:"success",txHash:e,address:he.address,value:ce,chainType:"solana",clusterName:ue,token:de,destinationAddress:fe,destinationValue:ce,destinationChainType:"solana",destinationClusterName:ue,destinationToken:de}})})).catch((e=>{ne("error"),me(e)})))},children:"Confirm"}),/*#__PURE__*/e(i,{})]}:{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(h,{}),/*#__PURE__*/e("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/e(i,{})]})}};export{ne as FundSolWalletWithExternalSolanaWallet,ne as default};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-GcvxyU9r.mjs";import{M as a}from"./ModalHeader-CSfzkWxZ.mjs";function t({title:t}){let{currentScreen:i,navigateBack:r,navigate:d,data:o,setModalData:u}=e();/*#__PURE__*/return n(a,{title:t,backFn:"ManualTransferScreen"===i?r:i===o?.funding?.methodScreen?o.funding.comingFromSendTransactionScreen?()=>d("SendTransactionScreen"):void 0:o?.funding?.methodScreen?()=>{let n=o.funding;n.usingDefaultFundingMethod&&(n.usingDefaultFundingMethod=!1),u({funding:n,solanaFundingData:o?.solanaFundingData}),d(n.methodScreen)}:void 0})}export{t};
1
+ import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-szLxUazm.mjs";import{M as a}from"./ModalHeader-Byy3j4Lh.mjs";function t({title:t}){let{currentScreen:i,navigateBack:r,navigate:d,data:o,setModalData:u}=e();/*#__PURE__*/return n(a,{title:t,backFn:"ManualTransferScreen"===i?r:i===o?.funding?.methodScreen?o.funding.comingFromSendTransactionScreen?()=>d("SendTransactionScreen"):void 0:o?.funding?.methodScreen?()=>{let n=o.funding;n.usingDefaultFundingMethod&&(n.usingDefaultFundingMethod=!1),u({funding:n,solanaFundingData:o?.solanaFundingData}),d(n.methodScreen)}:void 0})}export{t};
@@ -0,0 +1 @@
1
+ import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{c as i,B as n}from"./ModalHeader-Byy3j4Lh.mjs";import{F as s}from"./Layouts-BlFm53ED.mjs";import{t as m}from"./FundWalletMethodHeader-Cyn7MCWO.mjs";import{N as a}from"./index-Dq_xe9dz.mjs";import{T as c}from"./Title-BnzYV3Is.mjs";import{a as l}from"./get-is-unified-wallet-szLxUazm.mjs";import{u as p}from"./useGetTokenPrice-BS8CeRfC.mjs";import{c as d}from"./ethers-CzVYf1X2.mjs";import{F as u,a as h,h as j,c as f,d as C}from"./styles-CVcwbZBK.mjs";import"styled-components";import"./context-BEE1GR3p.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem";import"viem/utils";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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"./useGetSolPrice-DaxM-vxD.mjs";import"./LinkPasskeyScreen-Bl7uzJ8Q.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DOt2sB2J.mjs";import"./Screen-Ct4Lyoaf.mjs";const g={component:()=>{let{data:g,setModalData:y}=l(),v=g?.funding,x="solana"===v.chainType,k=r(null),{tokenPrice:D}=p(x?"solana":v.chain.id),S=x?void 0:v,T=!(!S?.erc20Address||S?.erc20ContractInfo),F=x?v.isUSDC?"USDC":"SOL":v.erc20Address?v.erc20ContractInfo?.symbol:v.chain.nativeCurrency.symbol||"ETH",A=parseFloat(v.amount),I=!isNaN(A)&&A>0,L=D?d(v.amount,D):void 0;/*#__PURE__*/return t(e,{children:[/*#__PURE__*/o(m,{}),/*#__PURE__*/o(c,{children:"Confirm or edit amount"}),/*#__PURE__*/t(s,{style:{marginTop:"32px"},children:[/*#__PURE__*/o(u,{children:T?/*#__PURE__*/o(a,{size:"50px"}):/*#__PURE__*/t(e,{children:[/*#__PURE__*/t(h,{onClick:()=>k.current?.focus(),children:[/*#__PURE__*/o(j,{ref:k,value:v.amount,onChange:t=>{let e=t.target.value;/^[0-9.]*$/.test(e)&&e.split(".").length-1<=1&&y({...g,funding:{...v,amount:e},solanaFundingData:g?.solanaFundingData?{...g.solanaFundingData,amount:e}:void 0})}}),/*#__PURE__*/o(f,{children:F})]}),!S?.erc20Address&&!(x&&v.isUSDC)&&/*#__PURE__*/o(C,{children:L&&I?`${L} USD`:""})]})}),/*#__PURE__*/o(i,{style:{marginTop:"1rem"},disabled:!I,onClick:v.onContinueWithExternalWallet,children:"Continue"})]}),/*#__PURE__*/o(n,{})]})}};export{g as FundingAmountEditScreen,g as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CreditCardIcon";import i from"@heroicons/react/24/outline/QrCodeIcon";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import{useState as r,useEffect as c,useMemo as d}from"react";import{getAddress as s}from"viem/utils";import{B as l}from"./ModalHeader-Byy3j4Lh.mjs";import{t as h}from"./FundWalletMethodHeader-Cyn7MCWO.mjs";import{E as p}from"./ErrorBanner-CQERa7bL.mjs";import{I as m}from"./InfoBanner-Dk1KghcK.mjs";import{u}from"./context-BEE1GR3p.mjs";import{f,Q as g,U as y}from"./useActiveWallet-CeJ_zia0.mjs";import{b as C,u as v}from"./internal-context-C4ZqP8IF.mjs";import{a as w}from"./get-is-unified-wallet-szLxUazm.mjs";import{u as F}from"./get-entropy-details-for-user-DXl-F6zT.mjs";import{W as M}from"./WalletCards-DH1rqayz.mjs";import{g as b}from"./getErc20TokenInfo-Cymy79Tp.mjs";import{avalanche as S,arbitrum as x,polygon as W,optimism as I,base as j,mainnet as D,toCoinbaseAssetId as T,getCoinbaseOnRampUrl as k,chainToMoonpayCurrency as A,isSupportedChainIdForMoonpay as z,isSupportedChainIdForCoinbaseOnramp as L}from"@privy-io/js-sdk-core";import{trigger as E}from"@privy-io/popup";import{a as U}from"./index-21Khs68W.mjs";import{e as O,I as _,f as H,g as P}from"./styles-CVcwbZBK.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"tinycolor2";import"zustand";import"viem";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"./analytics-mkkvFRju.mjs";import"./LinkPasskeyScreen-Bl7uzJ8Q.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DOt2sB2J.mjs";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const B=n=>/*#__PURE__*/e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),R=t=>/*#__PURE__*/n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...t,children:[/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),V=e=>{let[n,t]=r();return c((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function q(e){let n=N[e];if(!n)throw new C(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let N={[D.id]:"ethereum",[j.id]:"base",[I.id]:"optimism",[W.id]:"polygon",[x.id]:"arbitrum",[S.id]:"avacchain"};const Q=(e,n,t,a,i,o)=>new Promise((async(r,c)=>{let d=E();if(!d)return void c(Error("Unable to initialize flow"));let s="ethereum"===n.chainType?q(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?T(n.chain.id,"native-currency"):"SOL",h=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[s]}],assets:[l]}),{url:p}=k({appId:e.getAppId(),input:h,amount:n.amount,blockchain:s,asset:l,experience:o});d.location=p.toString();let m={...i?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:d}}),a("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:h.partner_user_id,popup:d}})}),5e3),r()})),$=async(e,n,t,a,i,o,r,c)=>{let d=E();if(!d)throw Error("Unable to initialize flow");let s="ethereum"===n.chainType?A(n.chain.id,a):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:h}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:c,currencyCode:s,quoteCurrencyAmount:U(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),d.location=l;let p={...r?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:p,solanaFundingData:r?.solanaFundingData}),o("MoonpayStatusScreen"),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:h},funding:p,solanaFundingData:r?.solanaFundingData})}),8e3)};let K=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const X=()=>K("https://apple.com/apple-pay"),G=()=>K("https://google.com/pay"),J={component:()=>{let{wallets:r}=F(),{connectors:C}=v(),S=C.filter(f).flatMap((e=>e.wallets)),{navigate:x,data:W,setModalData:I}=w(),{client:j}=v(),D=u(),T=W?.funding,k=V(X),A=V(G),E="solana"===T.chainType,U=E?void 0:T,q=d((()=>((e,n,t,a,i,o)=>{let r,c,d="solana"===t.chainType,s=d?void 0:t,l=t.isUSDC?"USDC":s?.erc20Address?void 0:"native-currency",h=!!d||l&&z(Number(t.chain.id),l),p=!!d||l&&L(Number(t.chain.id),l),m=[];for(let r of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===r.method&&"coinbase"===r.provider&&p&&m.push((()=>Q(n,t,a,i,o,"buy"))),"card"===r.method&&"moonpay"===r.provider&&h&&l&&m.push((()=>$(n,t,e,l,a,i,o,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&p&&(r=()=>Q(n,t,a,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(c=()=>i("TransferFromWalletScreen"));return{onFundWithCard:m,onFundWithExchange:r,onFundWithWallet:c}})(D,j,T,I,x,W)),[D,j,T,W,I,x]),N=E?S.find((({address:e})=>e===T.address)):r.find((({address:e})=>s(e)===s(T.address))),K=g(N?.walletClientType||"unknown"),J=K?.name||"wallet",Y=N&&"privy"!==N.walletClientType?J:D.name,Z=d((()=>T.uiConfig?.landing?.title?T.uiConfig?.landing?.title:`Add funds to your ${Y?.toLowerCase().endsWith("wallet")?Y:Y+" wallet"}`),[T.uiConfig?.landing?.title,Y]);c((()=>{if(T?.defaultFundingMethod&&T.usingDefaultFundingMethod)switch(I({funding:{...T,usingDefaultFundingMethod:!1},solanaFundingData:W?.solanaFundingData}),T?.defaultFundingMethod){case"card":q.onFundWithCard[0]&&q.onFundWithCard[0]();break;case"exchange":q.onFundWithExchange&&q.onFundWithExchange();break;case"wallet":q.onFundWithWallet&&q.onFundWithWallet();break;case"manual":x("ManualTransferScreen")}}),[]),c((()=>{U?.erc20Address&&!U.erc20ContractInfo&&b({address:U.erc20Address,chain:U.chain,rpcConfig:D.rpcConfig,privyAppId:D.id}).then((e=>{I({...W,funding:{...U,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[U?.erc20Address,U?.chain]);let ee=!(!U?.erc20Address||U?.erc20ContractInfo);/*#__PURE__*/return n(t,{children:[/*#__PURE__*/e(h,{}),/*#__PURE__*/e("h3",{children:Z}),/*#__PURE__*/n(O,{children:[T.errorMessage&&/*#__PURE__*/e(p,{theme:D.appearance.palette.colorScheme,children:T.errorMessage}),q.onFundWithCard?.[0]&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithCard[0],children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(a,{style:{width:24}})}),"Pay with card",k?/*#__PURE__*/e(B,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):A?/*#__PURE__*/e(R,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),q.onFundWithExchange&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithExchange,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(o,{style:{width:24}})}),"Transfer from an exchange"]}),q.onFundWithWallet&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithWallet,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(M,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/n(y,{disabled:ee,onClick:()=>x("ManualTransferScreen"),children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(i,{style:{width:24}})}),"Receive funds"]}),T?.showAlternateFundingMethod&&q.onFundWithCard?.[1]&&/*#__PURE__*/e(m,{theme:D.appearance.palette.colorScheme,children:/*#__PURE__*/n(H,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e(P,{onClick:q.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e(l,{})]})}};export{J as FundingMethodSelectionScreen,J as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{ExternalLink as o}from"lucide-react";import{u as e}from"./internal-context-C4ZqP8IF.mjs";import{S as r}from"./ScreenLayout-DOt2sB2J.mjs";import"ofetch";import"react";import"./ModalHeader-Byy3j4Lh.mjs";import"styled-components";import"./context-BEE1GR3p.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-is-unified-wallet-szLxUazm.mjs";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const i=({onClose:e})=>/*#__PURE__*/t(r,{title:"Could not log in with provider",subtitle:"It looks like you're using an in-app browser. To log in, please try again using an external browser.",icon:o,primaryCta:{label:"Close",onClick:e},watermark:!0}),m={component:()=>{let{closePrivyModal:o}=e();/*#__PURE__*/return t(i,{onClose:()=>o()})}};export{m as InAppBrowserLoginNotPossible,i as InAppBrowserLoginNotPossibleView,m as default};
@@ -0,0 +1 @@
1
+ import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{L as o}from"./Link-DJ5gq9Di.mjs";import{T as i,a as l}from"./TodoList-CgrU7uwu.mjs";import{a}from"./get-is-unified-wallet-szLxUazm.mjs";import{S as n}from"./ScreenLayout-DOt2sB2J.mjs";import"styled-components";import"lucide-react";import"react";import"viem";import"./context-BEE1GR3p.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"./ModalHeader-Byy3j4Lh.mjs";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const s=({walletName:a,installLink:s,title:m,subtitle:c="Follow the instructions below to get started.",onReload:p,onBack:d})=>{let h=m||`Create a ${a} wallet`.replace(/wallet wallet/gi,"wallet");/*#__PURE__*/return t(n,{title:h,subtitle:c,onBack:d,showBack:!0,primaryCta:{label:"Reload the page to use your wallet",onClick:p},helpText:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:"Still not sure? "}),/*#__PURE__*/t(o,{size:"sm",target:"_blank",href:"https://solana.com/docs/intro/wallets",children:"Learn more"})]}),watermark:!0,children:/*#__PURE__*/e(i,{children:[/*#__PURE__*/t(l,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/t("span",{children:"Install the "})," ",/*#__PURE__*/e(o,{href:s,target:"_blank",children:[a," browser extension"]})]})}),/*#__PURE__*/t(l,{children:"Set up your first wallet"}),/*#__PURE__*/t(l,{children:"Store your recovery phrase in a safe place!"})]})})},m={component:()=>{let{navigateBack:e,data:r}=a();if(!r?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:o}=r.installWalletModalData;/*#__PURE__*/return t(s,{walletName:o.name,installLink:o.installLink,onReload:()=>{window.location.reload()},onBack:e})}};export{m as InstallWalletScreen,s as InstallWalletScreenView,m as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-BEE1GR3p.mjs";import{C as r,L as i}from"./CustomLandingScreenView-C2TNxHAb.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-Byy3j4Lh.mjs";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem";import"viem/utils";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-is-unified-wallet-szLxUazm.mjs";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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"./index-BXdEd5-h.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ConnectWalletView-mIrd9fmT.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-lPYtXNC_.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-BWqAKjsd.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-D5UhENmm.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-CQJPasTi.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-CoHTrzr-.mjs";import"./ScreenLayout-DOt2sB2J.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!1}):/*#__PURE__*/t(i,{connectOnly:!1})},isCaptchaRequired:!0,isUnauthenticatedScreem:!0};export{e as LandingScreen,e as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import n from"@heroicons/react/24/outline/WalletIcon";import{useState as i}from"react";import{P as a,M as s,B as c,S as l}from"./ModalHeader-CSfzkWxZ.mjs";import{styled as d}from"styled-components";import{e as u}from"./StackedContainer-B2vaEl56.mjs";import{A as p}from"./Address-BuCMjci7.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-GcvxyU9r.mjs";import{e as f}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{u as g}from"./context-bWeWAiND.mjs";import x from"@heroicons/react/24/outline/ExclamationCircleIcon";import y from"@heroicons/react/24/outline/Square2StackIcon";import"./useActiveWallet-CSq3KvGj.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DyNNbsJn.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-izyyA2re.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"lucide-react";import"ofetch";import"tinycolor2";const v=d.span`
1
+ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import n from"@heroicons/react/24/outline/WalletIcon";import{useState as i}from"react";import{P as a,M as s,B as c,S as l}from"./ModalHeader-Byy3j4Lh.mjs";import{styled as d}from"styled-components";import{e as u}from"./StackedContainer-B2vaEl56.mjs";import{A as p}from"./Address-BupZf8Rc.mjs";import{u as h}from"./internal-context-C4ZqP8IF.mjs";import{a as m}from"./get-is-unified-wallet-szLxUazm.mjs";import{e as f}from"./capitalizeFirstLetter-DmLYqXsO.mjs";import{u as g}from"./context-BEE1GR3p.mjs";import x from"@heroicons/react/24/outline/ExclamationCircleIcon";import y from"@heroicons/react/24/outline/Square2StackIcon";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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"lucide-react";import"ofetch";import"tinycolor2";const v=d.span`
2
2
  && {
3
3
  width: 82px;
4
4
  height: 82px;
@@ -58,7 +58,7 @@ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@h
58
58
  font-size: 14px;
59
59
  width: 100%;
60
60
  text-align: left;
61
- `,W=d.li`
61
+ `,I=d.li`
62
62
  font-size: 14px;
63
63
  list-style-type: auto;
64
64
  list-style-position: outside;
@@ -68,7 +68,7 @@ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@h
68
68
  &:last-child {
69
69
  margin-bottom: 0; /* Remove margin from the last item */
70
70
  }
71
- `,I=d.div`
71
+ `,W=d.div`
72
72
  position: relative;
73
73
  width: 60px;
74
74
  height: 60px;
@@ -76,4 +76,4 @@ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import t from"@h
76
76
  display: flex;
77
77
  justify-content: center;
78
78
  align-items: center;
79
- `;let M=()=>/*#__PURE__*/r(I,{children:/*#__PURE__*/r(A,{$iconSize:60})});const $=({address:t,onClose:i,onRetry:a,onTransfer:l,isTransferring:d,transferSuccess:u})=>{let{defaultChain:h}=g(),m=h.blockExplorers?.default.url??"https://etherscan.io";/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(s,{onClose:i,backFn:a}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/r(M,{}),/*#__PURE__*/e(k,{children:[/*#__PURE__*/r("h3",{children:"Check account assets before transferring"}),/*#__PURE__*/r("p",{children:"Before transferring, ensure there are no assets in the other account. Assets in that account will not transfer automatically and may be lost."}),/*#__PURE__*/e(j,{children:[/*#__PURE__*/r("p",{children:" To check your balance, you can:"}),/*#__PURE__*/r(W,{children:"Log out and log back into the other account, or "}),/*#__PURE__*/e(W,{children:["Copy your wallet address and use a"," ",/*#__PURE__*/r("u",{children:/*#__PURE__*/r("a",{target:"_blank",href:m,children:"block explorer"})})," ","to see if the account holds any assets."]})]}),/*#__PURE__*/e(C,{onClick:()=>navigator.clipboard.writeText(t).catch(console.error),children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(p,{address:t,showCopyIcon:!1}),/*#__PURE__*/r(S,{})]}),/*#__PURE__*/r(b,{onTransfer:l,isTransferring:d,transferSuccess:u})]})]}),/*#__PURE__*/r(c,{})]})},z={component:()=>{let{initiateAccountTransfer:e,closePrivyModal:o}=h(),{data:t,navigate:n,lastScreen:a,setModalData:s}=m(),[c,l]=i(void 0),[d,u]=i(!1),[p,f]=i(!1),g=async()=>{try{if(!t?.accountTransfer?.nonce||!t?.accountTransfer?.account)throw Error("missing account transfer inputs");f(!0),await e({nonce:t?.accountTransfer?.nonce,account:t?.accountTransfer?.account,accountType:t?.accountTransfer?.linkMethod,externalWalletMetadata:t?.accountTransfer?.externalWalletMetadata,telegramWebAppData:t?.accountTransfer?.telegramWebAppData,telegramAuthResult:t?.accountTransfer?.telegramAuthResult,farcasterEmbeddedAddress:t?.accountTransfer?.farcasterEmbeddedAddress,oAuthUserInfo:t?.accountTransfer?.oAuthUserInfo}),u(!0),f(!1),setTimeout(o,1e3)}catch(e){s({errorModalData:{error:e,previousScreen:a||"LinkConflictScreen"}}),n("ErrorScreen",!0)}};return c?/*#__PURE__*/r($,{address:c,onClose:o,onRetry:()=>l(void 0),onTransfer:g,isTransferring:p,transferSuccess:d}):/*#__PURE__*/r(E,{onClose:o,onInfo:()=>l(t?.accountTransfer?.embeddedWalletAddress),onContinue:()=>l(t?.accountTransfer?.embeddedWalletAddress),onTransfer:g,isTransferring:p,transferSuccess:d,data:t})}},E=({onClose:n,onContinue:i,onInfo:d,onTransfer:p,transferSuccess:h,isTransferring:m,data:g})=>{if(!g?.accountTransfer?.linkMethod||!g?.accountTransfer?.displayName)return;let x={method:g?.accountTransfer?.linkMethod,handle:g?.accountTransfer?.displayName,disclosedAccount:g?.accountTransfer?.embeddedWalletAddress?{type:"wallet",handle:g?.accountTransfer?.embeddedWalletAddress}:void 0};/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(s,{closeable:!0}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/r(u,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/r(v,{color:"var(--privy-color-error)"}),/*#__PURE__*/r(t,{height:38,width:38,stroke:"var(--privy-color-error)"})]})}),/*#__PURE__*/e(k,{children:[/*#__PURE__*/e("h3",{children:[function(e){switch(e){case"sms":return"Phone number";case"email":return"Email address";case"siwe":return"Wallet address";case"siws":return"Solana wallet address";case"linkedin":return"LinkedIn profile";case"google":case"apple":case"discord":case"github":case"instagram":case"spotify":case"tiktok":case"line":case"twitch":case"twitter":case"telegram":case"farcaster":return`${f(e.replace("_oauth",""))} profile`;default:return e.startsWith("privy:")?"Cross-app account":e}}(x.method)," is associated with another account"]}),/*#__PURE__*/e("p",{children:["Do you want to transfer",/*#__PURE__*/r("b",{children:x.handle?` ${x.handle}`:""})," to this account instead? This will delete your other account."]}),/*#__PURE__*/r(L,{onClick:d,disclosedAccount:x.disclosedAccount})]}),/*#__PURE__*/e(k,{style:{gap:12,marginTop:12},children:[g?.accountTransfer?.embeddedWalletAddress?/*#__PURE__*/r(a,{onClick:i,children:"Continue"}):/*#__PURE__*/r(b,{onTransfer:p,transferSuccess:h,isTransferring:m}),/*#__PURE__*/r(l,{onClick:n,children:"No thanks"})]})]}),/*#__PURE__*/r(c,{})]})};function L({disclosedAccount:o,onClick:t}){return o?/*#__PURE__*/e(C,{onClick:t,children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(p,{address:o.handle,showCopyIcon:!1}),/*#__PURE__*/r(w,{width:15,height:15,color:"var(--privy-color-foreground-3)",style:{marginLeft:"auto"}})]}):null}export{z as LinkConflictScreen,E as LinkConflictScreenView,z as default};
79
+ `;let M=()=>/*#__PURE__*/r(W,{children:/*#__PURE__*/r(A,{$iconSize:60})});const $=({address:t,onClose:i,onRetry:a,onTransfer:l,isTransferring:d,transferSuccess:u})=>{let{defaultChain:h}=g(),m=h.blockExplorers?.default.url??"https://etherscan.io";/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(s,{onClose:i,backFn:a}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/r(M,{}),/*#__PURE__*/e(k,{children:[/*#__PURE__*/r("h3",{children:"Check account assets before transferring"}),/*#__PURE__*/r("p",{children:"Before transferring, ensure there are no assets in the other account. Assets in that account will not transfer automatically and may be lost."}),/*#__PURE__*/e(j,{children:[/*#__PURE__*/r("p",{children:" To check your balance, you can:"}),/*#__PURE__*/r(I,{children:"Log out and log back into the other account, or "}),/*#__PURE__*/e(I,{children:["Copy your wallet address and use a"," ",/*#__PURE__*/r("u",{children:/*#__PURE__*/r("a",{target:"_blank",href:m,children:"block explorer"})})," ","to see if the account holds any assets."]})]}),/*#__PURE__*/e(C,{onClick:()=>navigator.clipboard.writeText(t).catch(console.error),children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(p,{address:t,showCopyIcon:!1}),/*#__PURE__*/r(S,{})]}),/*#__PURE__*/r(b,{onTransfer:l,isTransferring:d,transferSuccess:u})]})]}),/*#__PURE__*/r(c,{})]})},z={component:()=>{let{initiateAccountTransfer:e,closePrivyModal:o}=h(),{data:t,navigate:n,lastScreen:a,setModalData:s}=m(),[c,l]=i(void 0),[d,u]=i(!1),[p,f]=i(!1),g=async()=>{try{if(!t?.accountTransfer?.nonce||!t?.accountTransfer?.account)throw Error("missing account transfer inputs");f(!0),await e({nonce:t?.accountTransfer?.nonce,account:t?.accountTransfer?.account,accountType:t?.accountTransfer?.linkMethod,externalWalletMetadata:t?.accountTransfer?.externalWalletMetadata,telegramWebAppData:t?.accountTransfer?.telegramWebAppData,telegramAuthResult:t?.accountTransfer?.telegramAuthResult,farcasterEmbeddedAddress:t?.accountTransfer?.farcasterEmbeddedAddress,oAuthUserInfo:t?.accountTransfer?.oAuthUserInfo}),u(!0),f(!1),setTimeout(o,1e3)}catch(e){s({errorModalData:{error:e,previousScreen:a||"LinkConflictScreen"}}),n("ErrorScreen",!0)}};return c?/*#__PURE__*/r($,{address:c,onClose:o,onRetry:()=>l(void 0),onTransfer:g,isTransferring:p,transferSuccess:d}):/*#__PURE__*/r(E,{onClose:o,onInfo:()=>l(t?.accountTransfer?.embeddedWalletAddress),onContinue:()=>l(t?.accountTransfer?.embeddedWalletAddress),onTransfer:g,isTransferring:p,transferSuccess:d,data:t})}},E=({onClose:n,onContinue:i,onInfo:d,onTransfer:p,transferSuccess:h,isTransferring:m,data:g})=>{if(!g?.accountTransfer?.linkMethod||!g?.accountTransfer?.displayName)return;let x={method:g?.accountTransfer?.linkMethod,handle:g?.accountTransfer?.displayName,disclosedAccount:g?.accountTransfer?.embeddedWalletAddress?{type:"wallet",handle:g?.accountTransfer?.embeddedWalletAddress}:void 0};/*#__PURE__*/return e(o,{children:[/*#__PURE__*/r(s,{closeable:!0}),/*#__PURE__*/e(T,{children:[/*#__PURE__*/r(u,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/r(v,{color:"var(--privy-color-error)"}),/*#__PURE__*/r(t,{height:38,width:38,stroke:"var(--privy-color-error)"})]})}),/*#__PURE__*/e(k,{children:[/*#__PURE__*/e("h3",{children:[function(e){switch(e){case"sms":return"Phone number";case"email":return"Email address";case"siwe":return"Wallet address";case"siws":return"Solana wallet address";case"linkedin":return"LinkedIn profile";case"google":case"apple":case"discord":case"github":case"instagram":case"spotify":case"tiktok":case"line":case"twitch":case"twitter":case"telegram":case"farcaster":return`${f(e.replace("_oauth",""))} profile`;default:return e.startsWith("privy:")?"Cross-app account":e}}(x.method)," is associated with another account"]}),/*#__PURE__*/e("p",{children:["Do you want to transfer",/*#__PURE__*/r("b",{children:x.handle?` ${x.handle}`:""})," to this account instead? This will delete your other account."]}),/*#__PURE__*/r(L,{onClick:d,disclosedAccount:x.disclosedAccount})]}),/*#__PURE__*/e(k,{style:{gap:12,marginTop:12},children:[g?.accountTransfer?.embeddedWalletAddress?/*#__PURE__*/r(a,{onClick:i,children:"Continue"}):/*#__PURE__*/r(b,{onTransfer:p,transferSuccess:h,isTransferring:m}),/*#__PURE__*/r(l,{onClick:n,children:"No thanks"})]})]}),/*#__PURE__*/r(c,{})]})};function L({disclosedAccount:o,onClick:t}){return o?/*#__PURE__*/e(C,{onClick:t,children:[/*#__PURE__*/r(n,{color:"var(--privy-color-foreground-1)",strokeWidth:2,height:"28px",width:"28px"}),/*#__PURE__*/r(p,{address:o.handle,showCopyIcon:!1}),/*#__PURE__*/r(w,{width:15,height:15,color:"var(--privy-color-foreground-3)",style:{marginLeft:"auto"}})]}):null}export{z as LinkConflictScreen,E as LinkConflictScreenView,z as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/EnvelopeIcon";import{C as r}from"./ConnectEmailForm-D5UhENmm.mjs";import{B as i}from"./Layouts-BlFm53ED.mjs";import{u as e}from"./context-BEE1GR3p.mjs";import{S as m}from"./ScreenLayout-DOt2sB2J.mjs";import"lucide-react";import"react";import"styled-components";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"./index-BXdEd5-h.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"./get-is-unified-wallet-szLxUazm.mjs";import"viem";import"eventemitter3";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./ModalHeader-Byy3j4Lh.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"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"tinycolor2";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const p=({title:e="Connect your email",subtitle:p="Add your email to your account"})=>/*#__PURE__*/t(m,{title:e,subtitle:p,icon:o,watermark:!0,children:/*#__PURE__*/t(i,{children:/*#__PURE__*/t(r,{stacked:!0})})}),s={component:()=>{let o=e();/*#__PURE__*/return t(p,{subtitle:`Add your email to your ${o?.name} account`})}};export{s as LinkEmailScreen,p as LinkEmailScreenView,s as default};
@@ -1,6 +1,6 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import{CheckCircle as t,FingerprintIcon as o,Trash2 as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s,css as c}from"styled-components";import{G as l}from"./useActiveWallet-CSq3KvGj.mjs";import{T as d,a as p}from"./TodoList-CgrU7uwu.mjs";import{u as m,c as h,b as u}from"./internal-context-Z-fyxadS.mjs";import{u as y}from"./get-is-unified-wallet-GcvxyU9r.mjs";import{S as f}from"./ScreenLayout-C2Le_YIv.mjs";import"zustand";import"./context-bWeWAiND.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"react-device-detect";import"./use-export-wallet-DyNNbsJn.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-izyyA2re.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"./ModalHeader-CSfzkWxZ.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-5StC6JLQ.mjs";import"./index-Dq_xe9dz.mjs";const k=({passkeys:r,isLoading:i,errorReason:n,success:a,expanded:s,onLinkPasskey:c,onUnlinkPasskey:l,onExpand:d,onBack:p,onClose:m})=>/*#__PURE__*/e(f,a?{title:"Passkeys updated",icon:t,iconVariant:"success",primaryCta:{label:"Done",onClick:m},onClose:m,watermark:!0}:s?{icon:o,title:"Your passkeys",onBack:p,onClose:m,watermark:!0,children:/*#__PURE__*/e(v,{passkeys:r,expanded:s,onUnlink:l,onExpand:d})}:{icon:o,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:c,loading:i},onClose:m,watermark:!0,helpText:n||void 0,children:0===r.length?/*#__PURE__*/e(x,{}):/*#__PURE__*/e(g,{children:/*#__PURE__*/e(v,{passkeys:r,expanded:s,onUnlink:l,onExpand:d})})});let g=s.div`
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{CheckCircle as t,FingerprintIcon as o,Trash2 as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s,css as c}from"styled-components";import{G as l}from"./useActiveWallet-CeJ_zia0.mjs";import{T as d,a as p}from"./TodoList-CgrU7uwu.mjs";import{u as m,g as h,c as u}from"./internal-context-C4ZqP8IF.mjs";import{u as y}from"./get-is-unified-wallet-szLxUazm.mjs";import{S as f}from"./ScreenLayout-DOt2sB2J.mjs";import"zustand";import"./context-BEE1GR3p.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"./ModalHeader-Byy3j4Lh.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-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const k=({passkeys:r,isLoading:i,errorReason:n,success:a,expanded:s,onLinkPasskey:c,onUnlinkPasskey:l,onExpand:d,onBack:p,onClose:m})=>/*#__PURE__*/e(f,a?{title:"Passkeys updated",icon:t,iconVariant:"success",primaryCta:{label:"Done",onClick:m},onClose:m,watermark:!0}:s?{icon:o,title:"Your passkeys",onBack:p,onClose:m,watermark:!0,children:/*#__PURE__*/e(v,{passkeys:r,expanded:s,onUnlink:l,onExpand:d})}:{icon:o,title:"Set up passkey verification",subtitle:"Verify with passkey",primaryCta:{label:"Add new passkey",onClick:c,loading:i},onClose:m,watermark:!0,helpText:n||void 0,children:0===r.length?/*#__PURE__*/e(x,{}):/*#__PURE__*/e(g,{children:/*#__PURE__*/e(v,{passkeys:r,expanded:s,onUnlink:l,onExpand:d})})});let g=s.div`
2
2
  margin-bottom: 12px;
3
- `,v=({passkeys:t,expanded:o,onUnlink:a,onExpand:s})=>{let[c,d]=n([]),p=o?t.length:2;/*#__PURE__*/return r("div",{children:[/*#__PURE__*/e(A,{children:"Your passkeys"}),/*#__PURE__*/r(I,{children:[t.slice(0,p).map((t=>{/*#__PURE__*/return r(P,{children:[/*#__PURE__*/r("div",{children:[/*#__PURE__*/e(E,{children:(o=t,o.authenticatorName?o.createdWithBrowser?`${o.authenticatorName} on ${o.createdWithBrowser}`:o.authenticatorName:o.createdWithBrowser?o.createdWithOs?`${o.createdWithBrowser} on ${o.createdWithOs}`:`${o.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/r(L,{children:["Last used:"," ",(t.latestVerifiedAt??t.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e(W,{disabled:c.includes(t.credentialId),onClick:()=>(async e=>{d((r=>r.concat([e]))),await a(e),d((r=>r.filter((r=>r!==e))))})(t.credentialId),children:c.includes(t.credentialId)?/*#__PURE__*/e(l,{}):/*#__PURE__*/e(i,{size:16})})]},t.credentialId);var o})),t.length>2&&!o&&/*#__PURE__*/e(C,{onClick:s,children:"View all"})]})]})},x=()=>/*#__PURE__*/r(d,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e(p,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e(p,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e(p,{children:"Use your passkey to verify transactions and login to your account"})]});const w={component:()=>{let{user:r,unlinkPasskey:t}=y(),{linkWithPasskey:o,closePrivyModal:i}=m(),s=r?.linkedAccounts.filter((e=>"passkey"===e.type)),[c,l]=n(!1),[d,p]=n(""),[f,g]=n(!1),[v,x]=n(!1);return a((()=>{0===s.length&&x(!1)}),[s.length]),/*#__PURE__*/e(k,{passkeys:s,isLoading:c,errorReason:d,success:f,expanded:v,onLinkPasskey:()=>{l(!0),o().then((()=>g(!0))).catch((e=>{if(e instanceof h){if(e.privyErrorCode===u.CANNOT_LINK_MORE_OF_TYPE)return void p("Cannot link more passkeys to account.");if(e.privyErrorCode===u.PASSKEY_NOT_ALLOWED)return void p("Passkey request timed out or rejected by user.")}p("Unknown error occurred.")})).finally((()=>{l(!1)}))},onUnlinkPasskey:async e=>(l(!0),await t(e).then((()=>g(!0))).catch((e=>{e instanceof h&&e.privyErrorCode===u.MISSING_MFA_CREDENTIALS?p("Cannot unlink a passkey enrolled in MFA"):p("Unknown error occurred.")})).finally((()=>{l(!1)}))),onExpand:()=>x(!0),onBack:()=>x(!1),onClose:()=>i()})}},b=s.div`
3
+ `,v=({passkeys:t,expanded:o,onUnlink:a,onExpand:s})=>{let[c,d]=n([]),p=o?t.length:2;/*#__PURE__*/return r("div",{children:[/*#__PURE__*/e(A,{children:"Your passkeys"}),/*#__PURE__*/r(I,{children:[t.slice(0,p).map((t=>{/*#__PURE__*/return r(P,{children:[/*#__PURE__*/r("div",{children:[/*#__PURE__*/e(E,{children:(o=t,o.authenticatorName?o.createdWithBrowser?`${o.authenticatorName} on ${o.createdWithBrowser}`:o.authenticatorName:o.createdWithBrowser?o.createdWithOs?`${o.createdWithBrowser} on ${o.createdWithOs}`:`${o.createdWithBrowser}`:"Unknown device")}),/*#__PURE__*/r(L,{children:["Last used:"," ",(t.latestVerifiedAt??t.firstVerifiedAt)?.toLocaleString()??"N/A"]})]}),/*#__PURE__*/e(S,{disabled:c.includes(t.credentialId),onClick:()=>(async e=>{d((r=>r.concat([e]))),await a(e),d((r=>r.filter((r=>r!==e))))})(t.credentialId),children:c.includes(t.credentialId)?/*#__PURE__*/e(l,{}):/*#__PURE__*/e(i,{size:16})})]},t.credentialId);var o})),t.length>2&&!o&&/*#__PURE__*/e(b,{onClick:s,children:"View all"})]})]})},x=()=>/*#__PURE__*/r(d,{style:{color:"var(--privy-color-foreground)"},children:[/*#__PURE__*/e(p,{children:"Verify with Touch ID, Face ID, PIN, or hardware key"}),/*#__PURE__*/e(p,{children:"Takes seconds to set up and use"}),/*#__PURE__*/e(p,{children:"Use your passkey to verify transactions and login to your account"})]});const w={component:()=>{let{user:r,unlinkPasskey:t}=y(),{linkWithPasskey:o,closePrivyModal:i}=m(),s=r?.linkedAccounts.filter((e=>"passkey"===e.type)),[c,l]=n(!1),[d,p]=n(""),[f,g]=n(!1),[v,x]=n(!1);return a((()=>{0===s.length&&x(!1)}),[s.length]),/*#__PURE__*/e(k,{passkeys:s,isLoading:c,errorReason:d,success:f,expanded:v,onLinkPasskey:()=>{l(!0),o().then((()=>g(!0))).catch((e=>{if(e instanceof h){if(e.privyErrorCode===u.CANNOT_LINK_MORE_OF_TYPE)return void p("Cannot link more passkeys to account.");if(e.privyErrorCode===u.PASSKEY_NOT_ALLOWED)return void p("Passkey request timed out or rejected by user.")}p("Unknown error occurred.")})).finally((()=>{l(!1)}))},onUnlinkPasskey:async e=>(l(!0),await t(e).then((()=>g(!0))).catch((e=>{e instanceof h&&e.privyErrorCode===u.MISSING_MFA_CREDENTIALS?p("Cannot unlink a passkey enrolled in MFA"):p("Unknown error occurred.")})).finally((()=>{l(!1)}))),onExpand:()=>x(!0),onBack:()=>x(!1),onClose:()=>i()})}},j=s.div`
4
4
  display: flex;
5
5
  align-items: center;
6
6
  justify-content: center;
@@ -16,7 +16,7 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{CheckCircle as t,Finger
16
16
  stroke: var(--privy-color-accent) !important;
17
17
  fill: var(--privy-color-accent) !important;
18
18
  }
19
- `;let j=c`
19
+ `;let C=c`
20
20
  && {
21
21
  width: 100%;
22
22
  font-size: 0.875rem;
@@ -41,8 +41,8 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{CheckCircle as t,Finger
41
41
  box-shadow: none;
42
42
  }
43
43
  }
44
- `;const C=s.button`
45
- ${j}
44
+ `;const b=s.button`
45
+ ${C}
46
46
  `;let I=s.div`
47
47
  display: flex;
48
48
  flex-direction: column;
@@ -100,6 +100,6 @@ import{jsx as e,jsxs as r}from"react/jsx-runtime";import{CheckCircle as t,Finger
100
100
  svg:hover {
101
101
  color: var(--privy-color-foreground-3);
102
102
  }
103
- `,W=s.button`
103
+ `,S=s.button`
104
104
  ${N}
105
- `;export{b as DoubleIconWrapper,C as LinkButton,w as LinkPasskeyScreen,k as LinkPasskeyView,w as default};
105
+ `;export{j as DoubleIconWrapper,b as LinkButton,w as LinkPasskeyScreen,k as LinkPasskeyView,w as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import e from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-CQJPasTi.mjs";import{u as i}from"./context-BEE1GR3p.mjs";import{u as n}from"./internal-context-C4ZqP8IF.mjs";import{a as m}from"./get-is-unified-wallet-szLxUazm.mjs";import{S as a}from"./ScreenLayout-DOt2sB2J.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"./ModalHeader-Byy3j4Lh.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"tinycolor2";import"ofetch";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Connect your phone",subtitle:n="Add your number to your account",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null),l=async()=>{c?.qualifiedPhoneNumber&&await m(c)};/*#__PURE__*/return t(a,{title:i,subtitle:n,icon:e,primaryCta:{label:s?"Submitting":"Submit",onClick:l,disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/t(r,{onChange:t=>{u(t)},onSubmit:l,noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:e,data:r,navigate:a,setModalData:c}=m(),u=i(),{initLoginWithSms:l}=n(),[p,d]=o(!1);/*#__PURE__*/return t(s,{subtitle:`Add your number to your ${u?.name} account`,onSubmit:async t=>{d(!0);try{await l({phoneNumber:t.qualifiedPhoneNumber,withPrivyUi:!0}),a("AwaitingPasswordlessCodeScreen")}catch(t){c({errorModalData:{error:t,previousScreen:r?.errorModalData?.previousScreen||e||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:p})}};export{c as LinkPhoneScreen,s as LinkPhoneScreenView,c as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{XCircle as e}from"lucide-react";import{u as o}from"./internal-context-C4ZqP8IF.mjs";import{a as r}from"./get-is-unified-wallet-szLxUazm.mjs";import{S as i}from"./ScreenLayout-DOt2sB2J.mjs";import"ofetch";import"react";import"viem";import"./context-BEE1GR3p.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-Byy3j4Lh.mjs";import"styled-components";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:o="Could not connect with wallet",subtitle:r="Please check that Phantom multichain is enabled and try again.",primaryCtaText:n="Try again",secondaryCtaText:a="Cancel",onTryAgain:m,onCancel:c})=>/*#__PURE__*/t(i,{title:o,subtitle:r,icon:e,iconVariant:"error",primaryCta:{label:n,onClick:m},secondaryCta:{label:a,onClick:c},watermark:!0}),a={component:()=>{let{closePrivyModal:e}=o(),{navigate:i}=r();/*#__PURE__*/return t(n,{onTryAgain:()=>{i("LandingScreen")},onCancel:async()=>{await e()}})}};export{a as LoginFailedScreen,n as LoginFailedScreenView,a as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useMemo as s}from"react";import{formatUnits as a}from"viem";import{formatTokenAmount as n,formatWeiAmount as m}from"@privy-io/js-sdk-core";import{P as c,B as d}from"./ModalHeader-Byy3j4Lh.mjs";import{F as l}from"./Layouts-BlFm53ED.mjs";import{Q as p}from"./QrCode-lPYtXNC_.mjs";import{t as u}from"./FundWalletMethodHeader-Cyn7MCWO.mjs";import{I as f}from"./InfoBanner-Dk1KghcK.mjs";import{S as h}from"./Subtitle-CV-2yKE4.mjs";import{T as g}from"./Title-BnzYV3Is.mjs";import{W as v}from"./WalletInfoCard-BWAC4Crm.mjs";import{u as j}from"./context-BEE1GR3p.mjs";import{f as y,D as C}from"./useActiveWallet-CeJ_zia0.mjs";import{u as S}from"./internal-context-C4ZqP8IF.mjs";import{a as I}from"./get-is-unified-wallet-szLxUazm.mjs";import{u as T}from"./useWalletBalance-CCG99ZD8.mjs";import{u as b}from"./get-entropy-details-for-user-DXl-F6zT.mjs";import{O as w}from"./analytics-mkkvFRju.mjs";import{x as A,z as k}from"./index-BXdEd5-h.mjs";import{g as F}from"./getChainName-DjpPdUSc.mjs";import{g as D}from"./getUsdcMintAddress-DFI1hv05.mjs";import{g as M}from"./transaction-CnfuREWo.mjs";import{g as U}from"./getErc20Balance-Bs6MYMo9.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"qrcode";import"@heroicons/react/24/outline/InformationCircleIcon";import"lucide-react";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-BupZf8Rc.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"zustand";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";const x={component:()=>{let{wallets:k}=b(),{connectors:x}=S(),E=x.filter(y).flatMap((e=>e.wallets)),{data:$,setModalData:L,navigate:P,lastScreen:W}=I(),{rpcConfig:O,appId:R,createAnalyticsEvent:q,closePrivyModal:z}=S(),H=j(),[N,Q]=o(void 0),[X,Y]=o(!1),G=$?.funding,{reloadBalance:J}=T({rpcConfig:O,appId:R,address:"ethereum"===G.chainType?G.address:void 0,chain:"ethereum"===G.chainType?G.chain:void 0}),K="solana"===G.chainType,V=K?G.isUSDC?"USDC":"SOL":G.erc20Address?G.erc20ContractInfo?.symbol:G.chain.nativeCurrency.symbol,Z=K?E.find((({address:e})=>e===G.address)):k.find((({address:e})=>C(e)===C(G.address)));if(!G)return L({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:W||"FundingMethodSelectionScreen"},funding:$?.funding,solanaFundingData:$?.solanaFundingData,sendTransaction:$?.sendTransaction}),P("ErrorScreen"),/*#__PURE__*/e(r,{});i((()=>{let e=K?async function(){if("solana"!==G.chainType)return;let e=H.solanaRpcs[G.chain];e?(G.isUSDC?async function({rpc:e,address:r,mintAddress:t}){let o=await e.getTokenAccountsByOwner(r,{mint:t},{encoding:"jsonParsed",commitment:"confirmed"}).send(),i=o.value[0]?.account;return i?BigInt(i.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:G.address,mintAddress:D(G.chain)}):A({rpc:e.rpc,address:G.address})).then((e=>{let r=BigInt(e);N&&r>N&&(Y(!0),q({eventName:w,payload:{provider:"manual",status:"success",chainType:"solana",address:Z?.address,value:G.isUSDC?a(r-N,6):a(r-N,9),token:G.isUSDC?"USDC":"SOL"}})),Q(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===G.chainType&&(async()=>{if(!G.erc20Address)return await J()??BigInt(0);{let{balance:e}=await U({chain:G.chain,address:G.address,erc20Address:G.erc20Address,rpcConfig:O,appId:R});return e}})().then((e=>{N&&e>N&&(Y(!0),q({eventName:w,payload:{provider:"manual",status:"success",chainType:"ethereum",address:Z?.address,chainId:G.chain.id,value:a(e-N,G.erc20ContractInfo?.decimals??18),token:G.erc20ContractInfo?.symbol??G.erc20Address??"ETH"}})),Q(e)})).catch((()=>Q(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[N]);let _=s((()=>null==N?"":G.isUSDC?n({amount:N,decimals:6}):K?M(N,3,!0,!0):null!=G.erc20ContractInfo?.decimals?n({amount:N,decimals:G.erc20ContractInfo.decimals}):m({wei:N})),[N,K,G]),ee="ethereum"===G.chainType?G.chain.name:F(G.chain),re=s((()=>""===G.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e(g,{children:G.uiConfig?.receiveFundsTitle??`Receive ${G.amount} ${V??""}`.trim()})),[G.uiConfig?.receiveFundsTitle,G.amount,V]),te=s((()=>""===G.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e(h,{children:G.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${ee}.`})),[G.uiConfig?.receiveFundsSubtitle,ee]),oe="solana"===G.chainType&&G.isUSDC&&D(G.chain)?`?spl-token=${D(G.chain)}`:"";/*#__PURE__*/return t(r,{children:[/*#__PURE__*/e(u,{}),re,te,/*#__PURE__*/t(l,{style:{gap:"1rem",margin:re||te?"1rem 0":"0"},children:[/*#__PURE__*/e(p,{url:`${G.chainType}:${G.address}${oe}`,size:200,squareLogoElement:B}),/*#__PURE__*/t(f,{theme:H.appearance.palette.colorScheme,children:["Make sure to send funds on ",ee,"."]}),/*#__PURE__*/e(v,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${_} ${V}`,address:G.address}),X&&/*#__PURE__*/e(c,{onClick:()=>z({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e(d,{})]})}};let B=({...r})=>/*#__PURE__*/e(k,{color:"black",...r});export{x as ManualTransferScreen,x as default};
@@ -0,0 +1 @@
1
+ import{jsxs as e,Fragment as o,jsx as t}from"react/jsx-runtime";import r from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import i from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as n}from"react";import{M as s,b as a,P as m}from"./ModalHeader-Byy3j4Lh.mjs";import{L as l}from"./useActiveWallet-CeJ_zia0.mjs";import{u as c}from"./context-BEE1GR3p.mjs";import{u as p,a as u}from"./get-is-unified-wallet-szLxUazm.mjs";import{M as d,E as h,a as y,b as f}from"./EnrollTotp-3j3Uj3wv.mjs";import{A as v,C as j,I as k,T as g,S as C,B as w}from"./PinInput-3SLvbnQa.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"tinycolor2";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"@heroicons/react/24/outline/PhoneIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./ErrorScreen-BpG9IyOu.mjs";import"lucide-react";import"./index-BXdEd5-h.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./reservoir-CB32KXxK.mjs";import"./ScreenLayout-DOt2sB2J.mjs";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";import"./LinkPasskeyScreen-Bl7uzJ8Q.mjs";import"./TodoList-CgrU7uwu.mjs";import"./CopyToClipboard-BGTSFnT3.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-lPYtXNC_.mjs";import"qrcode";const M={component:()=>{let{user:M,ready:b}=p(),{data:I,onUserCloseViaDialogOrKeybindRef:P}=u(),S=c(),[A,E]=n(null),[R,T]=n(null),[x,F]=n(null),[L,B]=n(!1),[U,W]=n(!1),[D,O]=n(),$=async()=>{D?H(D):M?await K({user:M}):H(Error("Must be logged in to manage MFA")),setTimeout((()=>{E(null),T(null)}),500)};if(P.current=$,!I?.mfaEnroll)throw Error("Missing modal data for MFA enrollment screen.");let{onFailure:H,onSuccess:K,onBack:Q,mfaMethods:X,verify:q,generateTotpSecret:z,enrollTotp:N,unenrollTotp:V,enrollPasskey:Y}=I.mfaEnroll,G=M?.mfaMethods.includes("sms"),J=M?.mfaMethods.includes("totp"),Z=M?.mfaMethods.includes("passkey"),_=!!M?.phone,ee=M?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function oe(){E(null),T(null),O(void 0)}async function te(e=ee){try{O(void 0),W(!0);let o=await Y(e);return await K({user:o})}catch(e){O(e)}finally{W(!1),B(!1)}}if(!b||!M||!S)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(s,{onClose:$,backFn:Q},"header"),/*#__PURE__*/t(v,{children:/*#__PURE__*/t(d,{})}),/*#__PURE__*/t(j,{children:/*#__PURE__*/t(l,{})}),/*#__PURE__*/t(a,{})]});if("sms"===A)return null;if("totp"===A)/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(s,{backFn:oe,onClose:$},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Remove authenticator app verification?"}),/*#__PURE__*/e(C,{children:["MFA adds an extra layer of security to your ",S?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(m,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await V();return await K({user:e})}catch(e){O(e)}finally{W(!1),E(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(a,{})]});if("passkey"===A){let i=I.mfaEnroll.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return e(o,{children:[/*#__PURE__*/t(s,{backFn:oe,onClose:$},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(r,{})}),/*#__PURE__*/t(g,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/t(C,{children:i?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(m,{$warn:!0,onClick:async function(){try{O(void 0),W(!0);let e=await Y([]);return await K({user:e})}catch(e){O(e)}finally{W(!1),E(null)}},loading:U,children:"Remove"})}),/*#__PURE__*/t(a,{})]})}return 0!==X.length||G||J||Z?"sms"===R?null:"totp"===R&&x?/*#__PURE__*/t(h,{onClose:$,onReset:oe,submitEnrollmentWithTotp:e=>async function(e){try{O(void 0),W(!0);let o=await N(e);return await K({user:o})}catch(e){O(e)}finally{W(!1),E(null)}}(e.mfaCode),error:D,totpInfo:{...x,appName:S?.name||"Privy"}}):"passkey"===R?/*#__PURE__*/t(y,{onReset:oe,onClose:$,submitEnrollmentWithPasskey:te}):/*#__PURE__*/t(f,{showIntro:!0,userMfaMethods:M.mfaMethods,appMfaMethods:S.mfa.methods,userHasAuthSms:_,backFn:Q,handleSelectMethod:async function(e){O(void 0);try{await q()}catch(e){return void O(e)}return"totp"===e?(T(e),F(null),void z().then((({totpSecret:e,totpAuthUrl:o})=>{F({authUrl:o,secret:e})})).catch((()=>{F(null),oe()}))):"passkey"===e&&1===ee.length?await te():void T(e)},isTotpLoading:"totp"===R&&!x,isPasskeyLoading:L,error:D,onClose:$,setRemovingMfaMethod:async function(e){O(void 0);try{await q()}catch(e){return void O(e)}E(e)}}):/*#__PURE__*/e(o,{children:[/*#__PURE__*/t(s,{onClose:$,backFn:Q},"header"),/*#__PURE__*/t(k,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/t(i,{})}),/*#__PURE__*/t(g,{children:"Add more security"}),/*#__PURE__*/e(C,{children:[S?.name," does not have any verification methods enabled."]}),/*#__PURE__*/t(w,{children:/*#__PURE__*/t(m,{onClick:$,children:"Close"})}),/*#__PURE__*/t(a,{})]})}};export{M as MfaAuthEnrollmentFlowScreen,M as default};
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{useMemo as e,useState as t,useEffect as r,useRef as i}from"react";import{u as s}from"./context-BEE1GR3p.mjs";import{u as m,a as n}from"./get-is-unified-wallet-szLxUazm.mjs";import{V as a,a as c,b as p,t as l}from"./to-ui-error-CymSkIi1.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"viem";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-Byy3j4Lh.mjs";import"styled-components";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.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"./ScreenLayout-DOt2sB2J.mjs";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-BS8CeRfC.mjs";import"./useGetSolPrice-DaxM-vxD.mjs";import"./index-BXdEd5-h.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"./TransactionDetails-DLLlKhs7.mjs";import"./WalletLink-cm_UqBHl.mjs";import"./ethers-CzVYf1X2.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const u={component:()=>{let{user:u}=m(),d=s(),h=e((()=>u?.mfaMethods.filter((o=>"passkey"!==o||!d.globalDisablePasskeys))??[]),[u?.mfaMethods,d.globalDisablePasskeys]),{data:f}=n(),[j,y]=t(h[0]),[v,k]=t(!1),[g,w]=t(),[C,b]=t();if(r((()=>{y(h[0])}),[h]),!f?.mfaVerify)throw Error("Missing modal data for MFA verification screen.");let{onFailure:M,onSuccess:P,generateOptions:S,verifyTotpCode:I,verifyPasskey:x,verifySmsCode:A,sendSmsCode:E}=f.mfaVerify,B=async o=>{if("passkey"!==o)try{y(o),"sms"===o&&(y(o),await E()),"totp"===o&&y(o)}catch(o){console.error(o)}else try{y(o);let e=await S();if(!e)throw Error("something went wrong");w(e),await x(e),k(!0),b(void 0),P()}catch(o){b(l(o))}},D=async o=>{b(void 0);try{if(!o||!j)return;if("passkey"===j){if(!g)throw Error("Missing passkey challenge");await x(g)}else"sms"===j?await A(o):"totp"===j&&await I(o);b(void 0),k(!0),P()}catch(o){throw l(o).error}},F=()=>{C||!v?M(C?.error??Error("Canceled MFA verification.")):P()},L=i(!1);return r((()=>{!L.current&&j&&(L.current=!0,B(j).finally((()=>{L.current=!1})))}),[open]),u?"passkey"===j?/*#__PURE__*/o(a,{account:u.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,e)=>e.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:v,hasBlockingError:C?.isBlocking??!1,error:C?.error,onClose:F,onBack:()=>{y(void 0),b(void 0)},handleSubmit:()=>D(g).catch(b)}):"sms"===j||"totp"===j?/*#__PURE__*/o(c,{selectedMethod:j,submitSuccess:v,hasBlockingError:C?.isBlocking??!1,handleSubmitCode:D,onClose:F,onBack:h.length>1?()=>y(void 0):void 0}):/*#__PURE__*/o(p,{mfaMethods:h,onSelect:B,handleClose:F}):null}};export{u as MfaAuthVerifyFlowScreen,u as default};
@@ -0,0 +1 @@
1
+ import{jsx as e,jsxs as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import n from"@heroicons/react/24/outline/ShieldCheckIcon";import i from"@heroicons/react/24/solid/CheckBadgeIcon";import l from"@heroicons/react/24/solid/IdentificationIcon";import{useState as a,useEffect as s}from"react";import{M as c,b as m,P as d,S as h}from"./ModalHeader-Byy3j4Lh.mjs";import{L as u}from"./useActiveWallet-CeJ_zia0.mjs";import{u as p}from"./context-BEE1GR3p.mjs";import{u as y}from"./internal-context-C4ZqP8IF.mjs";import{a as f,u as v}from"./get-is-unified-wallet-szLxUazm.mjs";import{d as C,f as w,g as k,h as g,i as j,u as b}from"./index-BXdEd5-h.mjs";import{M,E as S,a as E,b as I}from"./EnrollTotp-3j3Uj3wv.mjs";import P from"@heroicons/react/24/outline/CheckCircleIcon";import F from"@heroicons/react/24/outline/PhoneIcon";import{lastFourDigits as R}from"@privy-io/js-sdk-core";import{C as x}from"./ConnectPhoneForm-CQJPasTi.mjs";import{I as T,T as L,S as W,C as A,a as B,B as N,N as U,A as O,L as D,b as Y,c as $}from"./PinInput-3SLvbnQa.mjs";import{ErrorScreenView as q}from"./ErrorScreen-BpG9IyOu.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"viem";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"eventemitter3";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"@heroicons/react/24/outline/ChevronRightIcon";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/MinusCircleIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import"@heroicons/react/24/outline/ClockIcon";import"./LinkPasskeyScreen-Bl7uzJ8Q.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DOt2sB2J.mjs";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";import"./CopyToClipboard-BGTSFnT3.mjs";import"./copy-Bx2Jwc5_.mjs";import"./Layouts-BlFm53ED.mjs";import"./Column-C2X2MHYX.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/solid/ShieldCheckIcon";import"./QrCode-lPYtXNC_.mjs";import"qrcode";import"./reservoir-CB32KXxK.mjs";const H=({appName:t,onComplete:n,onReset:i,onClose:l})=>{let[s,h]=a(""),[u,y]=a(!1),[v,b]=a(null),[M,S]=a("enroll"),{initEnrollmentWithSms:E,submitEnrollmentWithSms:I}=C(),{data:O}=f(),D=p();function Y(){O?.mfaEnrollmentFlow?.onSuccess(),n()}return v?/*#__PURE__*/e(q,{allowlistConfig:D.allowlistConfig,error:v,onBack:()=>b(null),onRetry:()=>b(null)}):/*#__PURE__*/o(r,"enroll"===M?{children:[/*#__PURE__*/e(c,{backFn:i,onClose:l},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(L,{children:"Set up SMS verification"}),/*#__PURE__*/o(W,{children:["We'll text a verification code to this mobile device whenever you use your ",t," ","wallet."]}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(x,{onSubmit:async function({qualifiedPhoneNumber:e}){try{await E({phoneNumber:e}),h(e),S("verify")}catch(e){b(e)}},hideRecent:!0}),/*#__PURE__*/o(B,{children:["By providing your mobile number, you agree to receive text messages from ",D?.name,". Some carrier charges may apply"]})]}),/*#__PURE__*/e(m,{})]}:u?{children:[/*#__PURE__*/e(c,{onClose:Y},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(P,{})}),/*#__PURE__*/e(L,{children:"SMS verification added"}),/*#__PURE__*/o(W,{children:["From now on, you'll enter the verification code sent to your mobile device whenever you use your ",t," wallet."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:Y,children:"Done"})}),/*#__PURE__*/e(m,{})]}:{children:[/*#__PURE__*/e(c,{backFn:function(){"verify"===M?S("enroll"):i()},onClose:l},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(F,{})}),/*#__PURE__*/e(L,{children:"Enter enrollment code"}),/*#__PURE__*/o(A,{children:[/*#__PURE__*/e(U,{onChange:async function(e){try{if(!e)return;await I({phoneNumber:s,mfaCode:e}),y(!0)}catch(e){if(w(e))throw Error("You have exceeded the maximum number of attempts. Please close this window and try again in 10 seconds.");if(k(e))throw Error("The code you entered is not valid");if(g(e))throw Error("You have exceeded the time limit for code entry. Please try again in 30 seconds.");throw j(e)?Error("Verification canceled"):Error("Unknown error")}}}),/*#__PURE__*/o(W,{children:["To continue, enter the 6-digit code sent to ",/*#__PURE__*/e("strong",{children:R(s)})]})]}),/*#__PURE__*/e(m,{})]})},K={component:()=>{let{user:w,enrollInMfa:k,ready:g}=v(),[j,P]=a(null),{unenrollWithSms:F,unenrollWithTotp:R,unenrollWithPasskey:x,submitEnrollmentWithTotp:B,initEnrollmentWithPasskey:U,submitEnrollmentWithPasskey:q,initEnrollmentWithTotp:K}=C(),{data:Q,onUserCloseViaDialogOrKeybindRef:V}=f(),X=p(),{closePrivyModal:z}=y(),{promptMfa:G}=b(),[J,Z]=a(!1),[_,ee]=a(null),[oe,re]=a(null),te=()=>{z({shouldCallAuthOnSuccess:!0}),k(!1),setTimeout((()=>{P(null),ee(null)}),500)},[ne,ie]=a(!1),[le,ae]=a();V.current=te;let se=w?.mfaMethods.includes("sms"),ce=!!w?.phone,me=w?.mfaMethods.includes("totp"),de=w?.mfaMethods.includes("passkey"),he=se||me||de,ue=w?.linkedAccounts.filter((e=>"passkey"===e.type)).map((e=>e.credentialId))??[];function pe(){P(null),ee(null)}async function ye(e=ue){ie(!0);try{return await U(),await q({credentialIds:e},{removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{ie(!1)}}if(s((()=>{he&&Z(!0)}),[he]),!g||!w||!X/*#__PURE__*/)return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(O,{children:/*#__PURE__*/e(M,{})}),/*#__PURE__*/e(A,{children:/*#__PURE__*/e(u,{})}),/*#__PURE__*/e(m,{})]});if("sms"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(L,{children:"Remove SMS verification?"}),/*#__PURE__*/o(W,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await F()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("totp"===j)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(L,{children:"Remove authenticator app verification?"}),/*#__PURE__*/o(W,{children:["MFA adds an extra layer of security to your ",X?.name," account. Make sure you have other methods to secure your account."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await R()}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]});if("passkey"===j){let n=Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa??!0;/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{backFn:pe,onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(L,{children:"Are you sure you want to remove this passkey?"}),/*#__PURE__*/e(W,{children:n?"Removing your passkey will remove as both a verification method and a login method.":"Removing your passkey will remove as a verification method."}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{$warn:!0,onClick:async function(){P(null);try{await x({removeForLogin:Q?.mfaEnrollmentFlow?.shouldUnlinkOnUnenrollMfa})}catch(e){P(null)}},children:"Remove"})}),/*#__PURE__*/e(m,{})]})}if(0===Q.mfaEnrollmentFlow.mfaMethods.length&&!he)/*#__PURE__*/return o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(L,{children:"Add more security"}),/*#__PURE__*/o(W,{children:[X?.name," does not have any verification methods enabled."]}),/*#__PURE__*/e(N,{children:/*#__PURE__*/e(d,{onClick:te,children:"Close"})}),/*#__PURE__*/e(m,{})]});let fe=!he&&!J;return fe?/*#__PURE__*/o(r,{children:[/*#__PURE__*/e(c,{onClose:te},"header"),/*#__PURE__*/e(T,{style:{marginBottom:"1.5rem"},children:/*#__PURE__*/e(n,{})}),/*#__PURE__*/e(L,{children:"Transaction Protection"}),/*#__PURE__*/e(W,{children:"Set up transaction protection to add an extra layer of security to your account"}),/*#__PURE__*/o(D,{children:[/*#__PURE__*/o(Y,{children:[/*#__PURE__*/e($,{children:/*#__PURE__*/e(i,{})}),"Enable 2-Step verification for your ",X?.name," wallet."]}),/*#__PURE__*/o(Y,{children:[/*#__PURE__*/e($,{children:/*#__PURE__*/e(l,{})}),"You'll be prompted to authenticate to complete transactions."]})]}),/*#__PURE__*/o(N,{children:[/*#__PURE__*/e(d,{onClick:()=>Z(!0),children:"Continue"}),/*#__PURE__*/e(h,{onClick:te,children:"Not now"})]}),/*#__PURE__*/e(m,{})]}):"sms"===_?/*#__PURE__*/e(H,{appName:X?.name||"Privy",onComplete:te,onReset:pe,onClose:te}):"totp"===_&&oe?/*#__PURE__*/e(S,{onClose:te,onReset:pe,submitEnrollmentWithTotp:({mfaCode:e})=>async function(e){try{return ae(void 0),await B({mfaCode:e}),Q?.mfaEnrollmentFlow?.onSuccess(),te()}catch(e){ae(e)}finally{P(null)}}(e),totpInfo:{...oe,appName:X?.name||"Privy"}}):"passkey"===_?/*#__PURE__*/e(E,{onReset:pe,onClose:te,submitEnrollmentWithPasskey:ye}):/*#__PURE__*/e(I,{showIntro:fe,userMfaMethods:w.mfaMethods,appMfaMethods:X.mfa.methods,userHasAuthSms:ce,backFn:function(){Z(!1)},handleSelectMethod:async function(e){try{await G()}catch(e){return void ae(e)}return"totp"===e?(ee(e),re(null),void K().then((e=>{re(e)})).catch((()=>{re(null),pe()}))):"passkey"===e&&1===ue.length?await ye():void ee(e)},isTotpLoading:"totp"===_&&!oe,isPasskeyLoading:ne,error:le,onClose:te,setRemovingMfaMethod:async e=>{try{await G()}catch(e){return void ae(e)}P(e)}})}};export{K as MfaEnrollmentFlowScreen,K as default};
@@ -0,0 +1 @@
1
+ import{jsx as o}from"react/jsx-runtime";import{useMemo as t,useState as e,useEffect as r,useRef as i}from"react";import{u as s}from"./context-BEE1GR3p.mjs";import{u as n}from"./get-is-unified-wallet-szLxUazm.mjs";import{u as m}from"./index-BXdEd5-h.mjs";import{V as a,a as c,b as l,t as p}from"./to-ui-error-CymSkIi1.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"viem";import"./internal-context-C4ZqP8IF.mjs";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CeJ_zia0.mjs";import"zustand";import"viem/utils";import"./use-export-wallet-DmJRcrg3.mjs";import"./get-entropy-details-for-user-DXl-F6zT.mjs";import"./getPublicClient-BltMpU4i.mjs";import"react-device-detect";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@walletconnect/ethereum-provider";import"./usePrivy-DZkUhG2n.mjs";import"./paths-BzM95ysC.mjs";import"js-cookie";import"./PrivyPluginContext-2QN2dVUw.mjs";import"mipd";import"@privy-io/popup";import"@scure/base";import"@headlessui/react";import"@privy-io/urls";import"@privy-io/ethereum";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./frame-CjhCpycO.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-BYctG7hm.mjs";import"@heroicons/react/24/outline/DevicePhoneMobileIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/PhoneIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"./ModalHeader-Byy3j4Lh.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"./ScreenLayout-DOt2sB2J.mjs";import"./Screen-Ct4Lyoaf.mjs";import"./index-Dq_xe9dz.mjs";import"./PinInput-3SLvbnQa.mjs";import"@heroicons/react/24/outline/CalendarIcon";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./StackedContainer-B2vaEl56.mjs";import"./useGetTokenPrice-BS8CeRfC.mjs";import"./useGetSolPrice-DaxM-vxD.mjs";import"./TransactionDetails-DLLlKhs7.mjs";import"./WalletLink-cm_UqBHl.mjs";import"./ethers-CzVYf1X2.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"./Layouts-BlFm53ED.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";const u=({onClose:u})=>{let{user:d}=n(),h=s(),j=t((()=>d?.mfaMethods.filter((o=>"passkey"!==o||!h.globalDisablePasskeys))??[]),[d?.mfaMethods,h.globalDisablePasskeys]),[f,v]=e(j[0]??null),{init:y,cancel:k,submit:g}=m(),[b,w]=e(!1),[C,I]=e(null),[P,x]=e();r((()=>{v(j[0]??null)}),[j]);let S=i(!1);async function M(o){x(void 0);try{if(!o||!f)return;await g(f,o),w(!0),x(void 0),u()}catch(o){throw p(o).error}}async function A(o){if("passkey"!==o)try{v(o),await y(o)}catch(o){console.error(o)}else try{v(o);let t=await y(o);if(!t)throw Error("something went wrong");I(t),await g(o,t),w(!0),x(void 0),u()}catch(o){x(p(o))}}r((()=>{!S.current&&f&&(S.current=!0,A(f).finally((()=>{S.current=!1})))}),[]);let B=()=>{v(null),x(void 0),k(),u()};return d?"passkey"===f?/*#__PURE__*/o(a,{account:d.linkedAccounts.filter((o=>"passkey"===o.type&&o.enrolledInMfa)).sort(((o,t)=>t.firstVerifiedAt.valueOf()-o.firstVerifiedAt.valueOf()))[0],submitSuccess:b,hasBlockingError:P?.isBlocking??!1,error:P?.error,onClose:B,onBack:()=>{v(null),x(void 0)},handleSubmit:()=>M(C).catch(x)}):f?/*#__PURE__*/o(c,{submitSuccess:b,hasBlockingError:P?.isBlocking??!1,handleSubmitCode:M,selectedMethod:f,onClose:B,onBack:j.length>1?()=>v(null):void 0}):/*#__PURE__*/o(l,{mfaMethods:j,onSelect:A,handleClose:B}):null};export{u as MfaVerifyFlowScreen,u as default};
@@ -1,4 +1,4 @@
1
- import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as c}from"styled-components";import{u as l}from"./context-bWeWAiND.mjs";import{G as i}from"./useActiveWallet-CSq3KvGj.mjs";import d from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import n from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import t from"@heroicons/react/24/outline/XMarkIcon";import{u as v}from"./internal-context-Z-fyxadS.mjs";function s(o){/*#__PURE__*/return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=a.span`
1
+ import{jsx as r,jsxs as o,Fragment as e}from"react/jsx-runtime";import{styled as a,css as c}from"styled-components";import{u as l}from"./context-BEE1GR3p.mjs";import{G as i}from"./useActiveWallet-CeJ_zia0.mjs";import d from"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import n from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import t from"@heroicons/react/24/outline/XMarkIcon";import{u as v}from"./internal-context-C4ZqP8IF.mjs";function s(o){/*#__PURE__*/return r("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 460 40",...o,children:/*#__PURE__*/r("g",{fill:o.color||"var(--privy-color-foreground)",children:/*#__PURE__*/r("path",{d:"M0 15.4v15.38h4.64V19.96h3.58c2.47 0 3.63-.01 3.77-.02 1-.08 1.49-.15 2.18-.3a9.45 9.45 0 0 0 4.6-2.37c1.66-1.57 2.64-3.87 2.81-6.56.02-.3.02-1.19 0-1.49-.1-1.77-.56-3.35-1.36-4.72A8.84 8.84 0 0 0 15.14.57c-.93-.3-1.75-.43-3.09-.54C11.9.02 10.2 0 5.93 0H0ZM10.85 4c1.85.05 3.1.45 4.16 1.3.22.17.54.49.69.68a5.97 5.97 0 0 1 1.19 3.13c.04.35.04 1.36 0 1.71-.08.68-.23 1.3-.44 1.85a4.8 4.8 0 0 1-1.09 1.68A5.63 5.63 0 0 1 12 15.92c-.6.08-.4.08-4.01.09H4.64V3.98h2.9c1.6 0 3.08 0 3.31.02ZM187.65 5.71v5.72h-.27l-.09-.14a15.9 15.9 0 0 0-1.21-1.73c-.43-.5-1-.95-1.7-1.36-.54-.3-1.05-.5-1.73-.63a8.98 8.98 0 0 0-1.7-.17 8.84 8.84 0 0 0-7.8 4.03 12.95 12.95 0 0 0-2.03 6.39c-.07.98-.06 2.15.02 3.13.2 2.47.87 4.53 2.02 6.25a8.98 8.98 0 0 0 10.22 3.65 6.5 6.5 0 0 0 2.8-1.93c.41-.51.84-1.1 1.1-1.55l.1-.17h.37v3.58h4.38V0h-4.48Zm-5.24 5.54c1.3.14 2.3.6 3.17 1.48.9.9 1.5 2.09 1.85 3.64.36 1.6.39 3.72.06 5.43a8.13 8.13 0 0 1-1.54 3.62 5.1 5.1 0 0 1-3.93 1.96 6.13 6.13 0 0 1-2.32-.31 5.87 5.87 0 0 1-3.33-3.5c-.39-1-.62-2.05-.72-3.32-.03-.32-.04-1.35-.02-1.73.08-1.56.4-2.91.96-4.05a6.2 6.2 0 0 1 1.06-1.58 5.08 5.08 0 0 1 3.6-1.66c.25-.02.9 0 1.16.02ZM210.07 15.39l.01 15.38h4.38l.01-3.57h.37l.09.15c.24.44.84 1.26 1.21 1.7a6.79 6.79 0 0 0 2.57 1.75 9.3 9.3 0 0 0 6.86-.49 9.28 9.28 0 0 0 4.05-4.07A13.05 13.05 0 0 0 231 21.6c.21-1.73.18-3.7-.09-5.32a13.03 13.03 0 0 0-1.5-4.3 9.1 9.1 0 0 0-3.75-3.63 9.15 9.15 0 0 0-4.43-.96 7.46 7.46 0 0 0-2.8.5A7.07 7.07 0 0 0 216 9.7c-.4.52-.82 1.12-1.1 1.59l-.07.14h-.27V0h-4.5Zm11.13-4.14c1.07.1 1.94.44 2.7 1.04a6.1 6.1 0 0 1 1.64 1.98c.43.84.78 2 .94 3.11.15 1.16.16 2.4.02 3.54a9.34 9.34 0 0 1-1.39 4.03 5.33 5.33 0 0 1-2.69 2.15c-.9.3-2.04.38-3.06.2a5.14 5.14 0 0 1-3.45-2.37 6.03 6.03 0 0 1-.45-.8c-.5-1.03-.8-2.2-.92-3.58-.04-.49-.06-.89-.05-1.53.01-.76.05-1.23.13-1.85.38-2.53 1.47-4.38 3.15-5.31a5.46 5.46 0 0 1 2.3-.63 10 10 0 0 1 1.13.02ZM69.05 2.17l-.01 2.77V7.7h-3.36v3.6h3.36v6.8l.01 7.15c.06 1.4.4 2.44 1.1 3.37a5.8 5.8 0 0 0 2.97 2.07c.91.3 1.83.42 2.9.38a8.71 8.71 0 0 0 2.66-.48l-.8-3.7-.38.06a4.96 4.96 0 0 1-2.43-.06c-.33-.1-.56-.25-.8-.49-.4-.41-.6-.88-.7-1.67-.02-.2-.02-.62-.03-6.82v-6.6h4.73V7.7h-4.73V2.16h-4.49ZM133.34 2.17V7.7h-3.39v3.6h3.38v6.9l.01 7.17a5.66 5.66 0 0 0 2.36 4.49c.85.6 2.03 1.03 3.26 1.17.85.1 2.03.05 2.81-.1.3-.06.75-.18 1-.26l.2-.06v-.05l-.81-3.67-.37.06a4.99 4.99 0 0 1-1.8.09c-.85-.13-1.32-.4-1.7-.97a2.63 2.63 0 0 1-.39-1.04c-.06-.4-.06 0-.06-7.1V11.3h4.7V7.7h-4.7l-.01-2.77V2.16h-4.49ZM293.41 2.36a14.56 14.56 0 0 0-13.7 16.07 14.59 14.59 0 0 0 21.86 11.08 14.5 14.5 0 0 0 7.11-14.07 14.61 14.61 0 0 0-6.53-10.73 14.49 14.49 0 0 0-8.74-2.35ZM350.8 2.36a10.17 10.17 0 0 0-7.56 4.2c-.16.2-.45.63-.58.83l-.05.1h-.47l-.01-4.36h-7.36v36.4h7.82V27.27h.49l.05.07a11.3 11.3 0 0 0 7.49 4.15 10.52 10.52 0 0 0 9.38-4.1c1.66-2.1 2.73-4.9 3.07-8.06.1-.87.13-1.4.13-2.37 0-.8 0-1.1-.07-1.76a15.95 15.95 0 0 0-3.23-8.72 12.8 12.8 0 0 0-1.85-1.84 10.49 10.49 0 0 0-7.26-2.28Zm-.94 6.05c1.27.15 2.33.65 3.2 1.5.98.96 1.67 2.31 2.03 4 .34 1.57.38 3.68.12 5.39a9.78 9.78 0 0 1-1.04 3.25c-.14.25-.44.69-.6.89a5.35 5.35 0 0 1-4.31 2.07 5.25 5.25 0 0 1-4.41-1.9 7.35 7.35 0 0 1-1.26-2.32 14.09 14.09 0 0 1-.62-4.83c.05-1.98.38-3.53 1.02-4.85a5.63 5.63 0 0 1 2.5-2.65c.66-.34 1.3-.5 2.14-.58.18-.02 1.04 0 1.23.03ZM363.63 3.1l-.01 3.2v3.16h1.43c1.26.01 1.44.02 1.54.04.42.09.66.28.79.62.08.23.08.08.08 2.96a911.57 911.57 0 0 1 .03 10.18v7.54h7.82v-7.4l.01-7.83c.03-.94.11-1.63.27-2.28.46-1.9 1.54-2.93 3.35-3.23.52-.08.2-.08 5-.08h4.4V3.08h-3.1c-3.48 0-3.91.01-4.67.1-1.83.2-3.04.79-3.96 1.88-.5.6-.9 1.32-1.26 2.26l-.06.17h-.46V3.09h-5.6c-4.46 0-5.6 0-5.6.02ZM390.8 16.95V30.8h3.87l3.86-.01V3.09h-7.73ZM400.6 3.1l-.01.4v.38l4.66 13.4 4.69 13.47.02.05h10.3l.03-.05 4.67-13.45 4.67-13.4V3.1h-7.43l-6.7 19.26h-.5l-3.28-9.5-3.31-9.64-.05-.12h-3.88l-3.88.01ZM430.98 3.1c-.01 0-.02.19-.02.4v.39l5.08 14.59c2.8 8.02 5.08 14.6 5.08 14.61.01.02-.22.02-4.8.02h-4.82v6.42h4.95c5.09 0 5.23 0 5.87-.06 3.15-.28 5.29-1.63 6.63-4.15.28-.55.44-.95.87-2.16L459 6.78l1-2.89v-.8h-7.43l-6.69 19.26h-.5l-3.27-9.46-3.31-9.64-.06-.16h-3.88l-3.88.01ZM36.57 7.36c-1.36.1-2.6.6-3.62 1.45a5.65 5.65 0 0 0-1.67 2.42l-.05.13H31V7.7h-4.35v23.08h4.5v-7.3c0-8 0-7.34.08-7.82a4.89 4.89 0 0 1 2.06-3.18c.83-.58 1.74-.89 2.87-.98a11.87 11.87 0 0 1 2.8.25H39v-4.3l-.21-.02c-.61-.07-1.74-.1-2.22-.07ZM51.08 7.41c-2.33.12-4.3.84-5.95 2.16a9.89 9.89 0 0 0-2.03 2.2 12.5 12.5 0 0 0-2 5.78 18.04 18.04 0 0 0 0 3.65 12.13 12.13 0 0 0 2.26 6.05 9.74 9.74 0 0 0 5 3.52c2.11.64 4.7.64 6.8 0a9.78 9.78 0 0 0 4.88-3.37c1.38-1.78 2.19-4 2.4-6.58.13-1.46.06-3.06-.18-4.42a11.24 11.24 0 0 0-3.58-6.6 10 10 0 0 0-5.75-2.35c-.56-.06-1.31-.07-1.85-.04Zm1.42 3.78c.88.1 1.62.34 2.28.75a6.13 6.13 0 0 1 1.99 2.15 10.31 10.31 0 0 1 1.2 5c.02 1.23-.12 2.44-.42 3.51a7.14 7.14 0 0 1-1.81 3.32c-.61.6-1.2.98-1.95 1.24a6 6 0 0 1-2 .3 5.7 5.7 0 0 1-2.72-.6 5 5 0 0 1-1.28-.94A7.1 7.1 0 0 1 46 22.73c-.57-1.99-.6-4.46-.08-6.5a7.24 7.24 0 0 1 2.03-3.67 5.13 5.13 0 0 1 3.35-1.4 11 11 0 0 1 1.2.03ZM92.05 7.4c-.96.06-1.56.15-2.3.33a9.62 9.62 0 0 0-6.09 4.66 13.5 13.5 0 0 0-1.71 7c0 .83 0 1.04.06 1.6.16 1.77.58 3.32 1.29 4.7A9.72 9.72 0 0 0 90.28 31c1.84.37 4.08.32 5.85-.13a9.07 9.07 0 0 0 5.02-3.1A7.64 7.64 0 0 0 102.5 25l-2.11-.39-2.11-.38-.08.13a4.72 4.72 0 0 1-2.35 2.55 6.3 6.3 0 0 1-2.23.58c-.29.03-1.13.03-1.44 0a6.35 6.35 0 0 1-3.02-1.04 5.93 5.93 0 0 1-2.02-2.43 8.44 8.44 0 0 1-.72-3.18v-.26h16.38v-.81c0-1.83-.06-2.76-.25-3.87-.2-1.22-.53-2.24-1.05-3.28a8.9 8.9 0 0 0-2.66-3.26 10.1 10.1 0 0 0-5.34-1.94 18.3 18.3 0 0 0-1.46-.03Zm1.3 3.75c1.2.13 2.19.55 3.05 1.3a5.8 5.8 0 0 1 1.78 2.96c.13.51.21 1.17.21 1.66v.15H86.43v-.12c.08-.97.3-1.78.72-2.61.5-1 1.2-1.8 2.14-2.42a5.32 5.32 0 0 1 2.9-.95c.2-.01.97 0 1.17.03ZM116.79 7.41c-2 .1-3.73.65-5.22 1.65a10.7 10.7 0 0 0-4.25 6.06 16.1 16.1 0 0 0-.5 5.8c.2 2.17.84 4.13 1.88 5.76.58.9 1.32 1.73 2.15 2.4a9.37 9.37 0 0 0 3.6 1.8 12.06 12.06 0 0 0 3.92.34 10.2 10.2 0 0 0 3.84-.95 8.31 8.31 0 0 0 4.76-6.75l.01-.04h-4.37l-.05.16a4.87 4.87 0 0 1-4.24 3.75c-.59.07-1.32.06-1.93-.05a5.47 5.47 0 0 1-3.5-2.27c-.56-.75-1-1.73-1.26-2.79a13.8 13.8 0 0 1-.16-5.24 7.77 7.77 0 0 1 2.1-4.3 5.48 5.48 0 0 1 2.15-1.3 6.4 6.4 0 0 1 3.89.1c.59.21 1.03.5 1.5.96a5.32 5.32 0 0 1 1.46 2.5l.04.15h4.37v-.06a8.22 8.22 0 0 0-5.31-6.94 10.98 10.98 0 0 0-4.88-.74ZM156.2 7.41a9.87 9.87 0 0 0-6 2.29 11.02 11.02 0 0 0-3.41 5.43c-.52 1.78-.68 3.9-.48 5.97.17 1.8.63 3.38 1.37 4.8a9.68 9.68 0 0 0 5.91 4.86c1.65.48 3.63.61 5.53.36 3.72-.49 6.55-2.62 7.56-5.69.12-.39.13-.42.1-.43-.02 0-4.13-.75-4.19-.75-.03 0-.04 0-.1.16-.18.42-.45.9-.72 1.22-.16.2-.49.53-.7.7-.67.54-1.5.9-2.43 1.08-.48.08-.83.11-1.41.11-.64 0-1.07-.04-1.6-.15a5.76 5.76 0 0 1-3.93-2.83 8 8 0 0 1-.99-3.79v-.16h16.38v-1.11l-.02-1.43c-.1-2.25-.53-4-1.35-5.59a9.24 9.24 0 0 0-6.18-4.75c-1.04-.26-2.2-.36-3.33-.3Zm1.45 3.74a5.35 5.35 0 0 1 3.66 1.94 6.1 6.1 0 0 1 1.38 4.01v.12h-11.97v-.06c0-.02 0-.14.02-.25a6.6 6.6 0 0 1 2.15-4.32 5.73 5.73 0 0 1 3.5-1.46c.25-.02 1 0 1.26.02ZM233.58 7.82l8.37 23.22a49.22 49.22 0 0 1-.67 1.9 5.36 5.36 0 0 1-1.14 1.8c-.41.4-.82.58-1.48.69-.27.04-1.03.03-1.35 0a8.05 8.05 0 0 1-1.1-.23l-1.08 3.67c0 .02.32.14.66.22.83.21 1.57.29 2.56.28.56-.01.8-.03 1.24-.1 2.71-.4 4.66-2.09 5.86-5.08l9.64-26.44c0-.02-4.82-.06-4.83-.05l-2.93 8.96-2.91 8.94h-.24l-.22-.65-2.91-8.95-2.7-8.3H233.53ZM293.05 35.8c-1.18.04-1.93.09-2.8.16-2.52.24-4.53.69-5.43 1.23-.7.41-.76.86-.2 1.28.88.66 3.29 1.19 6.36 1.4a48.55 48.55 0 0 0 5.75.05c3.47-.19 6.24-.78 7.11-1.5.22-.19.3-.34.3-.53 0-.1 0-.12-.04-.22-.35-.69-2.32-1.3-5.25-1.63a41.09 41.09 0 0 0-5.8-.24Zm0 0"})})})}let p=a.span`
2
2
  margin-top: 16px;
3
3
  font-size: 13px;
4
4
  text-align: center;