@privy-io/react-auth 3.16.0 → 3.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (375) hide show
  1. package/dist/cjs/AccountNotFoundScreen-B_Ii7HuZ.js +1 -0
  2. package/dist/cjs/{Address-DTfphH3Q.js → Address-DVa7_frc.js} +1 -1
  3. package/dist/cjs/AffirmativeConsentScreen-B7KmE68B.js +6 -0
  4. package/dist/cjs/AllowlistRejectionScreen-O8KznddG.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-C8K-iZIK.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-cOTXpUAv.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-yMOq8AmY.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-lFFqycAd.js +103 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-DmvP14kc.js +2 -0
  10. package/dist/cjs/{BridgeNetworkSelectionView-xdYr4mxx.js → BridgeNetworkSelectionView-pkX-b3EU.js} +3 -3
  11. package/dist/cjs/CaptchaScreen-C0GEjNbh.js +1 -0
  12. package/dist/cjs/CoinbaseOnrampStatusScreen-yT0aNgm6.js +16 -0
  13. package/dist/cjs/ConnectEmailForm-BBb0J8Qw.js +3 -0
  14. package/dist/cjs/ConnectLedgerScreen-DUt1xIAQ.js +9 -0
  15. package/dist/cjs/ConnectOnlyLandingScreen-DsDH4IPK.js +1 -0
  16. package/dist/cjs/ConnectOnlyStatusScreen-DHifzxdh.js +1 -0
  17. package/dist/cjs/ConnectOrCreateScreen-BUgdLxoo.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-BYX8kgCj.js → ConnectPhoneForm-Cz02aWfj.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-QyJORAZG.js → ConnectWalletView-CWInrfMx.js} +1 -1
  20. package/dist/cjs/ConnectionStatusScreen-BVrAip_u.js +7 -0
  21. package/dist/cjs/CrossAppAuthScreen-BlSprwdt.js +1 -0
  22. package/dist/cjs/{CustomLandingScreenView-Cx9QR2CX.js → CustomLandingScreenView-FFU4u8kB.js} +6 -6
  23. package/dist/cjs/DelegatedActionsConsentScreen-2K48Ywrm.js +1 -0
  24. package/dist/cjs/DelegatedActionsRevokeScreen-AuQpKTzg.js +1 -0
  25. package/dist/cjs/EmbeddedWalletConnectingScreen-C4LTqs6h.js +1 -0
  26. package/dist/cjs/EmbeddedWalletCreatedScreen-C32Uofc9.js +1 -0
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-wfa1ho1-.js → EmbeddedWalletKeyExportScreen-SnvHNrgu.js} +4 -4
  28. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-osK2tW68.js +1 -0
  29. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DKWmdrJ6.js +1 -0
  30. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-DqSEVO7w.js +1 -0
  31. package/dist/cjs/{EnrollTotp-BzmjXzYC.js → EnrollTotp-CXMhvYqd.js} +8 -8
  32. package/dist/cjs/ErrorScreen-CPJ98NuU.js +4 -0
  33. package/dist/cjs/{FarcasterConnectStatusScreen-s3pS-ZH-.js → FarcasterConnectStatusScreen-D13iXt7h.js} +5 -5
  34. package/dist/cjs/FarcasterSignerStatusScreen-Bf_kP9J_.js +29 -0
  35. package/dist/cjs/FiatOnrampScreen-BV4GPQv0.js +97 -0
  36. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-85QbPj5Z.js +2 -0
  37. package/dist/cjs/FundWalletMethodHeader-CcRikV5C.js +1 -0
  38. package/dist/cjs/FundWithBankDepositScreen-CETUOydb.js +58 -0
  39. package/dist/cjs/FundingEditAmountScreen-ro3pfZTg.js +1 -0
  40. package/dist/cjs/FundingMethodSelectionScreen-ecxVf53z.js +1 -0
  41. package/dist/cjs/InAppBrowserLoginNotPossible-BaL0j2oh.js +1 -0
  42. package/dist/cjs/InstallWalletScreen-D8WdMq8Y.js +1 -0
  43. package/dist/cjs/LandingScreen-D3EKQEkC.js +1 -0
  44. package/dist/cjs/{LinkConflictScreen-DnHf7IMX.js → LinkConflictScreen-Ch0YDBOh.js} +3 -3
  45. package/dist/cjs/LinkEmailScreen-BiHRv43F.js +1 -0
  46. package/dist/cjs/{LinkPasskeyScreen-CTN6f7yX.js → LinkPasskeyScreen-BkAhVm_K.js} +12 -12
  47. package/dist/cjs/LinkPhoneScreen-SMbGlFFp.js +1 -0
  48. package/dist/cjs/LoginFailedScreen-gThOR4ql.js +1 -0
  49. package/dist/cjs/ManualTransferScreen-C6_MKYQa.js +1 -0
  50. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BGwEDhYM.js +1 -0
  51. package/dist/cjs/MfaAuthVerifyFlowScreen-FkpTmQLM.js +1 -0
  52. package/dist/cjs/MfaEnrollmentFlowScreen-D68k3d6k.js +1 -0
  53. package/dist/cjs/MfaVerifyFlowScreen-DPiE_Oju.js +1 -0
  54. package/dist/cjs/{ModalHeader-CakS8Dcu.js → ModalHeader-DGIBNq1A.js} +1 -1
  55. package/dist/cjs/MoonpayStatusScreen-Bwey-ZFS.js +16 -0
  56. package/dist/cjs/OAuthStatusScreen-DCIvmlua.js +1 -0
  57. package/dist/cjs/PasskeySelectSignupOrLogin-BrsgZDWY.js +1 -0
  58. package/dist/cjs/PasskeyStatusScreen-CRdrwEDq.js +3 -0
  59. package/dist/cjs/PasswordRecoveryScreen-nT66Ca8q.js +20 -0
  60. package/dist/cjs/{QrCode-C-Mk5-26.js → QrCode-Di8xGbem.js} +1 -1
  61. package/dist/cjs/RecoveryOAuthStatusScreen-BC6heUn-.js +1 -0
  62. package/dist/cjs/RecoveryPasswordCreateScreen-D6M_6kN8.js +1 -0
  63. package/dist/cjs/{RecoverySelectionScreen-BAJ1nLeO.js → RecoverySelectionScreen-BDCnVnE6.js} +2 -2
  64. package/dist/cjs/{Screen-Dp9-H_S8.js → Screen-B1vrS1Ly.js} +1 -1
  65. package/dist/cjs/{ScreenLayout-DANQ0V5E.js → ScreenLayout-yf03MRVf.js} +1 -1
  66. package/dist/cjs/SelectSourceAsset-BzCWfa5L.js +112 -0
  67. package/dist/cjs/SetAutomaticRecoveryScreen-CVn23TKd.js +14 -0
  68. package/dist/cjs/{SetWalletPasswordForm-B7bBDQ8N.js → SetWalletPasswordForm-0S2ymSzL.js} +4 -4
  69. package/dist/cjs/{SignRequestScreen-BUvgSx9X.js → SignRequestScreen-CPgU7Wo3.js} +4 -4
  70. package/dist/cjs/{StandardSignAndSendTransactionScreen-CzfhyIDP.js → StandardSignAndSendTransactionScreen-C-E3j4dP.js} +2 -2
  71. package/dist/cjs/TelegramAuthScreen-DiYpzHoT.js +1 -0
  72. package/dist/cjs/{TransactionDetails-BlPOqfEn.js → TransactionDetails-CHdkf5Rb.js} +1 -1
  73. package/dist/cjs/{TransactionErrorView-BpXI1X_G.js → TransactionErrorView-D1Nh7N_d.js} +4 -4
  74. package/dist/cjs/{TransferFromWalletScreen-Ds1sknGn.js → TransferFromWalletScreen-h9tRPXBH.js} +2 -2
  75. package/dist/cjs/{TransferOrBridgeLoadingScreen-CAYUlR4u.js → TransferOrBridgeLoadingScreen-DQZIn6hw.js} +2 -2
  76. package/dist/cjs/UpdateEmailScreen-BY3xMHK8.js +1 -0
  77. package/dist/cjs/UpdatePhoneScreen-ChbBiqBC.js +1 -0
  78. package/dist/cjs/UserLimitReachedScreen-AJZpREqN.js +1 -0
  79. package/dist/cjs/{WalletInfoCard-CRZt0t3t.js → WalletInfoCard-BfZ3_ji-.js} +6 -6
  80. package/dist/cjs/WalletInterstitialScreen-DRz63LSO.js +1 -0
  81. package/dist/cjs/{WalletLink-Cx_Zda0m.js → WalletLink--xpsJ0_X.js} +5 -5
  82. package/dist/cjs/{WalletOverflowButton-cnlzyqcK.js → WalletOverflowButton-B81EzN7L.js} +1 -1
  83. package/dist/cjs/{WarningBanner-COl_Q0K3.js → WarningBanner-DUcGaIpZ.js} +1 -1
  84. package/dist/cjs/abstract-smart-wallets.js +1 -1
  85. package/dist/cjs/{context-BAmjgwZ7.js → context-DTLyrNSs.js} +1 -1
  86. package/dist/cjs/{ethers-D8g2mvSK.js → ethers-DkYZ2n_L.js} +1 -1
  87. package/dist/cjs/extended-chains.js +1 -1
  88. package/dist/cjs/{getErc20Balance-C6ZUC_1B.js → getErc20Balance-CZkdpSqJ.js} +1 -1
  89. package/dist/cjs/{getErc20TokenInfo-DprFN1Dj.js → getErc20TokenInfo-B7OUw6ca.js} +1 -1
  90. package/dist/cjs/{index-BohqOluI.js → index-BbTBzvbB.js} +5 -5
  91. package/dist/cjs/{index-DIKBRogK.js → index-DLnQPdlD.js} +2 -2
  92. package/dist/cjs/index-DVVwP01f.js +1 -0
  93. package/dist/cjs/index.js +1 -1
  94. package/dist/cjs/internal.js +1 -1
  95. package/dist/cjs/privy-context-CqCBaHHR.js +1 -0
  96. package/dist/cjs/{shared-C-w7sNT2.js → shared-BrHBD7Qj.js} +1 -1
  97. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DAiUXgPZ.js → shouldProceedtoEmbeddedWalletCreationFlow-By7HZi5X.js} +1 -1
  98. package/dist/cjs/smart-wallets-CXiwZqOu.js +1 -0
  99. package/dist/cjs/smart-wallets.js +1 -1
  100. package/dist/cjs/solana.js +1 -1
  101. package/dist/cjs/{styles-s2f3dL_6.js → styles-BU6XkGeI.js} +4 -4
  102. package/dist/cjs/{to-ui-error-CqnwRcKJ.js → to-ui-error-Bxoctv93.js} +1 -1
  103. package/dist/cjs/ui.js +1 -1
  104. package/dist/cjs/use-export-wallet-B4aMG55I.js +1 -0
  105. package/dist/cjs/use-export-wallet-CJFX3PX0.js +1 -0
  106. package/dist/cjs/{useActiveWallet-CYUR_x0A.js → useActiveWallet-DEJxYDtx.js} +1 -1
  107. package/dist/cjs/{useGetTokenPrice-X3dW0I3y.js → useGetTokenPrice-zMimik1y.js} +1 -1
  108. package/dist/cjs/{useI18n-BsableMs.js → useI18n-CttJorXw.js} +1 -1
  109. package/dist/cjs/usePrivy-B61TDDeF.js +1 -0
  110. package/dist/cjs/{useSolanaRpcClient-BhX1Bzre.js → useSolanaRpcClient-B5g3sWrW.js} +1 -1
  111. package/dist/cjs/{useWalletBalance-CcicA-jd.js → useWalletBalance-BD5uRFtG.js} +1 -1
  112. package/dist/cjs/useWallets-BsO73htS.js +1 -0
  113. package/dist/cjs/useWallets-CAFhVWLf.js +1 -0
  114. package/dist/dts/{events-context-DJ7XN_9I.d.mts → events-context-BXis4NRh.d.mts} +1 -1
  115. package/dist/dts/{events-context-DJ7XN_9I.d.ts → events-context-BXis4NRh.d.ts} +1 -1
  116. package/dist/dts/extended-chains.d.mts +1 -1
  117. package/dist/dts/extended-chains.d.ts +1 -1
  118. package/dist/dts/farcaster.d.mts +1 -1
  119. package/dist/dts/farcaster.d.ts +1 -1
  120. package/dist/dts/index.d.mts +41 -8
  121. package/dist/dts/index.d.ts +41 -8
  122. package/dist/dts/internal.d.mts +1 -1
  123. package/dist/dts/internal.d.ts +1 -1
  124. package/dist/dts/smart-wallets.d.mts +1 -1
  125. package/dist/dts/smart-wallets.d.ts +1 -1
  126. package/dist/dts/solana.d.mts +3 -3
  127. package/dist/dts/solana.d.ts +3 -3
  128. package/dist/dts/{types-CrwMc83t.d.mts → types-Bc9w_mgT.d.mts} +3 -2
  129. package/dist/dts/{types-CrwMc83t.d.ts → types-Bc9w_mgT.d.ts} +3 -2
  130. package/dist/dts/ui.d.mts +1 -1
  131. package/dist/dts/ui.d.ts +1 -1
  132. package/dist/esm/AccountNotFoundScreen-qafr9ivT.mjs +1 -0
  133. package/dist/esm/{Address-Cbulz6Wu.mjs → Address-B99EaiMb.mjs} +1 -1
  134. package/dist/esm/AffirmativeConsentScreen-CIqvK8m6.mjs +6 -0
  135. package/dist/esm/AllowlistRejectionScreen-DU4DWBPE.mjs +1 -0
  136. package/dist/esm/AuthenticateWithWalletScreen-XPD7DrVO.mjs +1 -0
  137. package/dist/esm/AwaitingEvmToSolBridgingScreen-DD0jtqOa.mjs +2 -0
  138. package/dist/esm/AwaitingExternalEthereumTransferScreen-DzTmic9m.mjs +2 -0
  139. package/dist/esm/AwaitingPasswordlessCodeScreen-7QOTS6b-.mjs +103 -0
  140. package/dist/esm/AwaitingSolToEvmBridgingScreen-DYZZooDp.mjs +2 -0
  141. package/dist/esm/{BridgeNetworkSelectionView-nrYQOGZA.mjs → BridgeNetworkSelectionView-CmMVzAX5.mjs} +5 -5
  142. package/dist/esm/CaptchaScreen-DhwS3FJh.mjs +1 -0
  143. package/dist/esm/CoinbaseOnrampStatusScreen-CTrA4xKy.mjs +16 -0
  144. package/dist/esm/ConnectEmailForm-yaDsKJmn.mjs +3 -0
  145. package/dist/esm/ConnectLedgerScreen-O8ZnkCDn.mjs +9 -0
  146. package/dist/esm/ConnectOnlyLandingScreen-BUO28erJ.mjs +1 -0
  147. package/dist/esm/ConnectOnlyStatusScreen-Dy6oAk17.mjs +1 -0
  148. package/dist/esm/ConnectOrCreateScreen-H52RmK3k.mjs +1 -0
  149. package/dist/esm/{ConnectPhoneForm-D8SHd_ge.mjs → ConnectPhoneForm-SXho-ZCl.mjs} +1 -1
  150. package/dist/esm/{ConnectWalletView-By6eXfKl.mjs → ConnectWalletView-mm5nV3qj.mjs} +1 -1
  151. package/dist/esm/ConnectionStatusScreen-XXeNlflJ.mjs +7 -0
  152. package/dist/esm/CrossAppAuthScreen-bAev2vFm.mjs +1 -0
  153. package/dist/esm/{CustomLandingScreenView-Co0nHKPw.mjs → CustomLandingScreenView-e-NPZniC.mjs} +4 -4
  154. package/dist/esm/DelegatedActionsConsentScreen-C2uGvUf3.mjs +1 -0
  155. package/dist/esm/DelegatedActionsRevokeScreen-DIURa5L6.mjs +1 -0
  156. package/dist/esm/EmbeddedWalletConnectingScreen-CznyXfNg.mjs +1 -0
  157. package/dist/esm/EmbeddedWalletCreatedScreen-Vch95Jje.mjs +1 -0
  158. package/dist/esm/EmbeddedWalletKeyExportScreen-kW2-IWjW.mjs +40 -0
  159. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DtrWxrnI.mjs +1 -0
  160. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-QLodnJ1t.mjs +1 -0
  161. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-B0gtNXG6.mjs +1 -0
  162. package/dist/esm/{EnrollTotp-nZPSS3Ux.mjs → EnrollTotp-Du2Tjgrx.mjs} +5 -5
  163. package/dist/esm/ErrorScreen-P5oZf9cz.mjs +4 -0
  164. package/dist/esm/{FarcasterConnectStatusScreen-BdwUuSkv.mjs → FarcasterConnectStatusScreen-dpPMJ4I7.mjs} +8 -8
  165. package/dist/esm/FarcasterSignerStatusScreen-COkxl1bH.mjs +28 -0
  166. package/dist/esm/FiatOnrampScreen-Ci0mAJY4.mjs +97 -0
  167. package/dist/esm/FundSolWalletWithExternalSolanaWallet-DW0tS4tS.mjs +1 -0
  168. package/dist/esm/FundWalletMethodHeader-D38FBVVM.mjs +1 -0
  169. package/dist/esm/FundWithBankDepositScreen-Dk_IouhM.mjs +58 -0
  170. package/dist/esm/FundingEditAmountScreen-BLsQoL4e.mjs +1 -0
  171. package/dist/esm/FundingMethodSelectionScreen-OlDe5HS2.mjs +1 -0
  172. package/dist/esm/InAppBrowserLoginNotPossible-BV3tTire.mjs +1 -0
  173. package/dist/esm/InstallWalletScreen-BMmSUe34.mjs +1 -0
  174. package/dist/esm/LandingScreen-B83IEgoc.mjs +1 -0
  175. package/dist/esm/{LinkConflictScreen-DNGVg8dW.mjs → LinkConflictScreen-DNiusVkA.mjs} +3 -3
  176. package/dist/esm/LinkEmailScreen-1OEkvtrp.mjs +1 -0
  177. package/dist/esm/{LinkPasskeyScreen-CTYGeo1r.mjs → LinkPasskeyScreen-CHPataTs.mjs} +5 -5
  178. package/dist/esm/LinkPhoneScreen-DiwKH2Mt.mjs +1 -0
  179. package/dist/esm/LoginFailedScreen-CDmqpAN2.mjs +1 -0
  180. package/dist/esm/ManualTransferScreen-DyN3_kBX.mjs +1 -0
  181. package/dist/esm/MfaAuthEnrollmentFlowScreen-BNV7WReW.mjs +1 -0
  182. package/dist/esm/MfaAuthVerifyFlowScreen-B-ukVyrA.mjs +1 -0
  183. package/dist/esm/MfaEnrollmentFlowScreen-COe5FpFP.mjs +1 -0
  184. package/dist/esm/MfaVerifyFlowScreen-DCIPle0Z.mjs +1 -0
  185. package/dist/esm/{ModalHeader-DfHxv9fE.mjs → ModalHeader-DpkEBdQv.mjs} +1 -1
  186. package/dist/esm/MoonpayStatusScreen-_owltgjZ.mjs +16 -0
  187. package/dist/esm/OAuthStatusScreen-KZmCHc_b.mjs +1 -0
  188. package/dist/esm/PasskeySelectSignupOrLogin-CQ_DHbaT.mjs +1 -0
  189. package/dist/esm/PasskeyStatusScreen-eu3lPB6M.mjs +3 -0
  190. package/dist/esm/PasswordRecoveryScreen-DndhFHx6.mjs +20 -0
  191. package/dist/esm/{QrCode-D4XZQrgi.mjs → QrCode-D-J14re9.mjs} +1 -1
  192. package/dist/esm/RecoveryOAuthStatusScreen-CwCRvxCX.mjs +1 -0
  193. package/dist/esm/RecoveryPasswordCreateScreen-DrRcz4CY.mjs +1 -0
  194. package/dist/esm/{RecoverySelectionScreen-DVBTi436.mjs → RecoverySelectionScreen-CPHkQlGF.mjs} +2 -2
  195. package/dist/esm/{Screen-CDEd4p2a.mjs → Screen-B0u1eY7p.mjs} +3 -3
  196. package/dist/esm/{ScreenLayout-BdRrZJd_.mjs → ScreenLayout-CyK-vOMq.mjs} +1 -1
  197. package/dist/esm/SelectSourceAsset-ac3FApgI.mjs +112 -0
  198. package/dist/esm/{SetAutomaticRecoveryScreen-DBcSNU6R.mjs → SetAutomaticRecoveryScreen-DLY7WHVZ.mjs} +2 -2
  199. package/dist/esm/{SetWalletPasswordForm-DdWjdu2s.mjs → SetWalletPasswordForm-CQWh647N.mjs} +4 -4
  200. package/dist/esm/SignRequestScreen-BYHN19dO.mjs +26 -0
  201. package/dist/esm/{StandardSignAndSendTransactionScreen-DIJRS8NR.mjs → StandardSignAndSendTransactionScreen-5sT-AMvv.mjs} +2 -2
  202. package/dist/esm/TelegramAuthScreen-DATrHQkr.mjs +1 -0
  203. package/dist/esm/{TransactionDetails-Ce_Cnzo2.mjs → TransactionDetails-D9GBw9C3.mjs} +4 -4
  204. package/dist/esm/{TransactionErrorView-JiZmO7NJ.mjs → TransactionErrorView-3qTJ_97m.mjs} +5 -5
  205. package/dist/esm/{TransferFromWalletScreen-ad5b7GV7.mjs → TransferFromWalletScreen-w3c3g8ys.mjs} +2 -2
  206. package/dist/esm/{TransferOrBridgeLoadingScreen-Cwzefd9j.mjs → TransferOrBridgeLoadingScreen-koaJdk-2.mjs} +1 -1
  207. package/dist/esm/UpdateEmailScreen-BKTgKvoR.mjs +1 -0
  208. package/dist/esm/UpdatePhoneScreen-z7-7NbIO.mjs +1 -0
  209. package/dist/esm/UserLimitReachedScreen-BK77vZJo.mjs +1 -0
  210. package/dist/esm/{WalletInfoCard-D2dCT7_H.mjs → WalletInfoCard-hC5PhrNs.mjs} +1 -1
  211. package/dist/esm/WalletInterstitialScreen-DzDGk-y-.mjs +1 -0
  212. package/dist/esm/{WalletLink-DNraFqEC.mjs → WalletLink-sGQdBvAh.mjs} +1 -1
  213. package/dist/esm/{WalletOverflowButton-Cn_nKCBf.mjs → WalletOverflowButton-BrrkHpeZ.mjs} +1 -1
  214. package/dist/esm/{WarningBanner-c8L53pJ2.mjs → WarningBanner-D5LqDt95.mjs} +2 -2
  215. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  216. package/dist/esm/{context-Cw2-86-G.mjs → context-Bj4czVEP.mjs} +1 -1
  217. package/dist/esm/{ethers-5oa3ZKLD.mjs → ethers-BozrzoVi.mjs} +1 -1
  218. package/dist/esm/extended-chains.mjs +1 -1
  219. package/dist/esm/{getErc20Balance-sCX8nL1s.mjs → getErc20Balance-NThD2gHO.mjs} +1 -1
  220. package/dist/esm/{getErc20TokenInfo-CwiO-mOs.mjs → getErc20TokenInfo-BtdscGyJ.mjs} +1 -1
  221. package/dist/esm/index-CuKtz_xL.mjs +12 -0
  222. package/dist/esm/index-DQp_5KKJ.mjs +174 -0
  223. package/dist/esm/index-Ds8yBPhi.mjs +1 -0
  224. package/dist/esm/index.mjs +1 -1
  225. package/dist/esm/internal.mjs +1 -1
  226. package/dist/esm/privy-context-DICqtyyT.mjs +1 -0
  227. package/dist/esm/{shared-Bw0pXSOO.mjs → shared-zCv-_9Pa.mjs} +1 -1
  228. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BkTDxfME.mjs → shouldProceedtoEmbeddedWalletCreationFlow-DLpCU-0h.mjs} +1 -1
  229. package/dist/esm/smart-wallets-B8GvSECb.mjs +1 -0
  230. package/dist/esm/smart-wallets.mjs +1 -1
  231. package/dist/esm/solana.mjs +1 -1
  232. package/dist/esm/{styles-D5Jf27-u.mjs → styles-pSKfqjN3.mjs} +15 -15
  233. package/dist/esm/{to-ui-error-DnDY_33E.mjs → to-ui-error-KRq5_d4z.mjs} +2 -2
  234. package/dist/esm/ui.mjs +1 -1
  235. package/dist/esm/use-export-wallet-D1P_g8O0.mjs +1 -0
  236. package/dist/esm/use-export-wallet-DVyBljMT.mjs +1 -0
  237. package/dist/esm/{useActiveWallet-CwS7ik68.mjs → useActiveWallet-DMrO7evY.mjs} +1 -1
  238. package/dist/esm/useGetTokenPrice-N5ZX6Yun.mjs +1 -0
  239. package/dist/esm/{useI18n-bIQlZhkW.mjs → useI18n-BiiKgmqw.mjs} +1 -1
  240. package/dist/esm/usePrivy-DDB15S8o.mjs +1 -0
  241. package/dist/esm/{useSolanaRpcClient-C2WlA-Ah.mjs → useSolanaRpcClient-B--BKNG3.mjs} +1 -1
  242. package/dist/esm/{useWalletBalance-DopZXXwh.mjs → useWalletBalance-C0WFIwSX.mjs} +1 -1
  243. package/dist/esm/useWallets-CJvLEQqE.mjs +1 -0
  244. package/dist/esm/useWallets-CS_W9ciB.mjs +1 -0
  245. package/package.json +5 -5
  246. package/dist/cjs/AccountNotFoundScreen-Bqh-CYrp.js +0 -1
  247. package/dist/cjs/AffirmativeConsentScreen-uogZ44HQ.js +0 -6
  248. package/dist/cjs/AllowlistRejectionScreen-3OKwgh23.js +0 -1
  249. package/dist/cjs/AuthenticateWithWalletScreen-DXy5TnZj.js +0 -1
  250. package/dist/cjs/AwaitingEvmToSolBridgingScreen-DR1RiU-S.js +0 -2
  251. package/dist/cjs/AwaitingExternalEthereumTransferScreen-DgQ9z_ck.js +0 -2
  252. package/dist/cjs/AwaitingPasswordlessCodeScreen-Bah7kXAV.js +0 -103
  253. package/dist/cjs/AwaitingSolToEvmBridgingScreen-HSwPZmzZ.js +0 -2
  254. package/dist/cjs/CaptchaScreen-BLoD3u63.js +0 -1
  255. package/dist/cjs/CoinbaseOnrampStatusScreen-CoSS2KfY.js +0 -16
  256. package/dist/cjs/ConnectEmailForm-BjXzo_T8.js +0 -3
  257. package/dist/cjs/ConnectLedgerScreen-Brfd_c8H.js +0 -9
  258. package/dist/cjs/ConnectOnlyLandingScreen-C41qgoJf.js +0 -1
  259. package/dist/cjs/ConnectOnlyStatusScreen-DPsh3aXI.js +0 -1
  260. package/dist/cjs/ConnectOrCreateScreen-Dpv9J_eC.js +0 -1
  261. package/dist/cjs/ConnectionStatusScreen-DfKCyYnE.js +0 -7
  262. package/dist/cjs/CrossAppAuthScreen-CAmbPQb0.js +0 -1
  263. package/dist/cjs/DelegatedActionsConsentScreen-DOvRMKf-.js +0 -1
  264. package/dist/cjs/DelegatedActionsRevokeScreen-5ecaxQ0D.js +0 -1
  265. package/dist/cjs/EmbeddedWalletConnectingScreen-B31DzW7n.js +0 -1
  266. package/dist/cjs/EmbeddedWalletCreatedScreen-BXEozrA_.js +0 -1
  267. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-DSrn-F5R.js +0 -1
  268. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DGlv7LlS.js +0 -1
  269. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-Byr5dLg5.js +0 -1
  270. package/dist/cjs/ErrorScreen-DJwJwrGn.js +0 -4
  271. package/dist/cjs/FarcasterSignerStatusScreen--CVrZRE9.js +0 -29
  272. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-3Fn4CnSA.js +0 -2
  273. package/dist/cjs/FundWalletMethodHeader-D2fapeXN.js +0 -1
  274. package/dist/cjs/FundWithBankDepositScreen-DUQAuyf5.js +0 -176
  275. package/dist/cjs/FundingEditAmountScreen-B3wEw9xm.js +0 -1
  276. package/dist/cjs/FundingMethodSelectionScreen-ChQNeyi6.js +0 -1
  277. package/dist/cjs/InAppBrowserLoginNotPossible-XFkxHwKR.js +0 -1
  278. package/dist/cjs/InstallWalletScreen-Cp3ZRRYf.js +0 -1
  279. package/dist/cjs/LandingScreen-DwFs0lRf.js +0 -1
  280. package/dist/cjs/LinkEmailScreen-_sfK6ECC.js +0 -1
  281. package/dist/cjs/LinkPhoneScreen-BjMfF3Kz.js +0 -1
  282. package/dist/cjs/LoginFailedScreen-BUnuwN-5.js +0 -1
  283. package/dist/cjs/ManualTransferScreen-D2hHGf6p.js +0 -1
  284. package/dist/cjs/MfaAuthEnrollmentFlowScreen-VFaXkogp.js +0 -1
  285. package/dist/cjs/MfaAuthVerifyFlowScreen-CVBdW4Cw.js +0 -1
  286. package/dist/cjs/MfaEnrollmentFlowScreen-DxkzCr5s.js +0 -1
  287. package/dist/cjs/MfaVerifyFlowScreen-AFZc7liT.js +0 -1
  288. package/dist/cjs/MoonpayStatusScreen-C66Eq4G4.js +0 -16
  289. package/dist/cjs/OAuthStatusScreen-NKl6SLvR.js +0 -1
  290. package/dist/cjs/PasskeySelectSignupOrLogin-D9VfPofR.js +0 -1
  291. package/dist/cjs/PasskeyStatusScreen-CBC-60D2.js +0 -3
  292. package/dist/cjs/PasswordRecoveryScreen-BSUhAJ63.js +0 -20
  293. package/dist/cjs/RecoveryOAuthStatusScreen-y2Z3cphT.js +0 -1
  294. package/dist/cjs/RecoveryPasswordCreateScreen-CoDYHaJk.js +0 -1
  295. package/dist/cjs/SetAutomaticRecoveryScreen-BLiDEmlE.js +0 -14
  296. package/dist/cjs/TelegramAuthScreen-BGB40HSe.js +0 -1
  297. package/dist/cjs/UpdateEmailScreen-Bgn5JxGJ.js +0 -1
  298. package/dist/cjs/UpdatePhoneScreen-DPAxfLv5.js +0 -1
  299. package/dist/cjs/UserLimitReachedScreen-BG8gj4ah.js +0 -1
  300. package/dist/cjs/WalletInterstitialScreen-CBH05HpE.js +0 -1
  301. package/dist/cjs/get-is-unified-wallet-DitrQ4hx.js +0 -1
  302. package/dist/cjs/index-CCY3tkwt.js +0 -1
  303. package/dist/cjs/smart-wallets-BtILJe_K.js +0 -1
  304. package/dist/cjs/use-export-wallet-C6DaLOxp.js +0 -1
  305. package/dist/cjs/use-export-wallet-eDTOzHRt.js +0 -1
  306. package/dist/cjs/usePrivy-CHcu9hX8.js +0 -1
  307. package/dist/cjs/useWallets-CbvzYOqg.js +0 -1
  308. package/dist/cjs/useWallets-Cy6axcvW.js +0 -1
  309. package/dist/esm/AccountNotFoundScreen-BSYd-8_2.mjs +0 -1
  310. package/dist/esm/AffirmativeConsentScreen-C_uGmdSa.mjs +0 -6
  311. package/dist/esm/AllowlistRejectionScreen-DBdNYwS-.mjs +0 -1
  312. package/dist/esm/AuthenticateWithWalletScreen-D-Aw0iYo.mjs +0 -1
  313. package/dist/esm/AwaitingEvmToSolBridgingScreen-BMr5CXgX.mjs +0 -2
  314. package/dist/esm/AwaitingExternalEthereumTransferScreen-aOEMTW-b.mjs +0 -2
  315. package/dist/esm/AwaitingPasswordlessCodeScreen-CjPJ7IMM.mjs +0 -103
  316. package/dist/esm/AwaitingSolToEvmBridgingScreen-xrFngED1.mjs +0 -2
  317. package/dist/esm/CaptchaScreen-BOKElE1r.mjs +0 -1
  318. package/dist/esm/CoinbaseOnrampStatusScreen-CTV5uUn3.mjs +0 -16
  319. package/dist/esm/ConnectEmailForm-Dp85JvZj.mjs +0 -3
  320. package/dist/esm/ConnectLedgerScreen-rxzesP5N.mjs +0 -9
  321. package/dist/esm/ConnectOnlyLandingScreen-CmImF7oZ.mjs +0 -1
  322. package/dist/esm/ConnectOnlyStatusScreen-Bo90w6P9.mjs +0 -1
  323. package/dist/esm/ConnectOrCreateScreen-Dc2VQF-B.mjs +0 -1
  324. package/dist/esm/ConnectionStatusScreen-C_fxSXJ2.mjs +0 -7
  325. package/dist/esm/CrossAppAuthScreen-DU0FD2ep.mjs +0 -1
  326. package/dist/esm/DelegatedActionsConsentScreen-Dr-DeIXC.mjs +0 -1
  327. package/dist/esm/DelegatedActionsRevokeScreen-kXOJxXu-.mjs +0 -1
  328. package/dist/esm/EmbeddedWalletConnectingScreen-tFedaOj3.mjs +0 -1
  329. package/dist/esm/EmbeddedWalletCreatedScreen-DCx4NdAp.mjs +0 -1
  330. package/dist/esm/EmbeddedWalletKeyExportScreen-CVflSsvz.mjs +0 -40
  331. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-vSzXa62f.mjs +0 -1
  332. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-B4szV9Hg.mjs +0 -1
  333. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BOBLnE_O.mjs +0 -1
  334. package/dist/esm/ErrorScreen-BGE6wldq.mjs +0 -4
  335. package/dist/esm/FarcasterSignerStatusScreen-C-crikPv.mjs +0 -28
  336. package/dist/esm/FundSolWalletWithExternalSolanaWallet-BX4gYmzv.mjs +0 -1
  337. package/dist/esm/FundWalletMethodHeader-CdXWChwL.mjs +0 -1
  338. package/dist/esm/FundWithBankDepositScreen-HyqTUpLq.mjs +0 -176
  339. package/dist/esm/FundingEditAmountScreen--ffFSUmf.mjs +0 -1
  340. package/dist/esm/FundingMethodSelectionScreen-Djr0jY03.mjs +0 -1
  341. package/dist/esm/InAppBrowserLoginNotPossible-D6wMCuzD.mjs +0 -1
  342. package/dist/esm/InstallWalletScreen-B6VSXUWR.mjs +0 -1
  343. package/dist/esm/LandingScreen-BV0xq-oc.mjs +0 -1
  344. package/dist/esm/LinkEmailScreen-CtMuCZvp.mjs +0 -1
  345. package/dist/esm/LinkPhoneScreen-2nnXZB2B.mjs +0 -1
  346. package/dist/esm/LoginFailedScreen-hHvIsH81.mjs +0 -1
  347. package/dist/esm/ManualTransferScreen-C0xJ3si8.mjs +0 -1
  348. package/dist/esm/MfaAuthEnrollmentFlowScreen-CznUpkq5.mjs +0 -1
  349. package/dist/esm/MfaAuthVerifyFlowScreen-DUmOZHGX.mjs +0 -1
  350. package/dist/esm/MfaEnrollmentFlowScreen-DeoSfYAS.mjs +0 -1
  351. package/dist/esm/MfaVerifyFlowScreen-JJ1crW_8.mjs +0 -1
  352. package/dist/esm/MoonpayStatusScreen-BIzQZK9f.mjs +0 -16
  353. package/dist/esm/OAuthStatusScreen-DhmaZBTY.mjs +0 -1
  354. package/dist/esm/PasskeySelectSignupOrLogin-BmiJnukl.mjs +0 -1
  355. package/dist/esm/PasskeyStatusScreen-BStwA1_J.mjs +0 -3
  356. package/dist/esm/PasswordRecoveryScreen-DyBDQADG.mjs +0 -20
  357. package/dist/esm/RecoveryOAuthStatusScreen-BfcxgkUL.mjs +0 -1
  358. package/dist/esm/RecoveryPasswordCreateScreen-CBfvjxht.mjs +0 -1
  359. package/dist/esm/SignRequestScreen-CxAuntSd.mjs +0 -26
  360. package/dist/esm/TelegramAuthScreen-BRDG8b6x.mjs +0 -1
  361. package/dist/esm/UpdateEmailScreen-C5lQJUiA.mjs +0 -1
  362. package/dist/esm/UpdatePhoneScreen-BwkzWVHl.mjs +0 -1
  363. package/dist/esm/UserLimitReachedScreen-ComDV9kj.mjs +0 -1
  364. package/dist/esm/WalletInterstitialScreen-riBB51NH.mjs +0 -1
  365. package/dist/esm/get-is-unified-wallet-CQc-E5dS.mjs +0 -1
  366. package/dist/esm/index-B5B9f4U9.mjs +0 -12
  367. package/dist/esm/index-Bvw5OxHl.mjs +0 -174
  368. package/dist/esm/index-yxF2V6XY.mjs +0 -1
  369. package/dist/esm/smart-wallets-Dl42tBUP.mjs +0 -1
  370. package/dist/esm/use-export-wallet-Bd5Sg5V-.mjs +0 -1
  371. package/dist/esm/use-export-wallet-NF9h_lS_.mjs +0 -1
  372. package/dist/esm/useGetTokenPrice-oI6b3gPZ.mjs +0 -1
  373. package/dist/esm/usePrivy-DAnfSvB5.mjs +0 -1
  374. package/dist/esm/useWallets-2_uCkhA8.mjs +0 -1
  375. package/dist/esm/useWallets-DpbBw4Vl.mjs +0 -1
@@ -3,7 +3,7 @@ import { PublicKeyCredentialCreationOptionsJSON } from '@simplewebauthn/browser'
3
3
  import { Rpc, SolanaRpcApi, RpcSubscriptions, SolanaRpcSubscriptionsApi } from '@solana/kit';
4
4
  import { ReactElement, ReactNode } from 'react';
5
5
  import { Hex } from 'viem';
6
- import { OAuthProviderID, WalletChainType, SmartWalletType, CustomOAuthProviderID, User as User$1, AppResponse, PasskeyAuthenticateRequestBody } from '@privy-io/api-types';
6
+ import { OAuthProviderID, WalletChainType, SmartWalletType, CustomOAuthProviderID, User as User$1, AppResponse, PasskeyAuthenticateRequestBody, OnrampProvider } from '@privy-io/api-types';
7
7
  import { CountryCode, Chain, ConnectedStandardSolanaWallet, RpcConfig, ChainLikeWithId } from '@privy-io/js-sdk-core';
8
8
  import { createBaseAccountSDK } from '@base-org/account';
9
9
  import { WalletWithFeatures, Wallet as Wallet$1 } from '@wallet-standard/base';
@@ -2462,6 +2462,7 @@ type LoginModalOptions = RuntimeLoginOverridableOptions & {
2462
2462
  isSigningInWithLedgerSolana?: boolean;
2463
2463
  };
2464
2464
  type ConnectWalletModalOptions = ExternalConnectWalletModalOptions;
2465
+ type BridgeProviders = OnrampProvider;
2465
2466
  type PrivyFarcasterSignerInitResponse = {
2466
2467
  public_key: string;
2467
2468
  status: 'pending_approval';
@@ -2581,4 +2582,4 @@ type SessionSignerInput = {
2581
2582
  }[];
2582
2583
  type SignerInput = SessionSignerInput;
2583
2584
 
2584
- export { type ExternalWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type AppConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type HDWalletWithMetadata as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginMethod as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SiwsMessageType as _, type LinkedAccountWithMetadata as a, createDataSuffixPlugin as a$, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type FundingResult as a8, type BaseAccountSdkType as a9, type Telegram as aA, type CrossAppAccount as aB, type LinkedAccountType as aC, type GoogleOAuthWithMetadata as aD, type TwitterOAuthWithMetadata as aE, type DiscordOAuthWithMetadata as aF, type GithubOAuthWithMetadata as aG, type TiktokOAuthWithMetadata as aH, type LineOAuthWithMetadata as aI, type LinkedInOAuthWithMetadata as aJ, type AppleOAuthWithMetadata as aK, type FarcasterWithMetadata as aL, type TelegramWithMetadata as aM, type CrossAppAccountWithMetadata as aN, type PasskeyWithMetadata as aO, type Email as aP, type Phone as aQ, type TransactionUIOptions as aR, type ContractUIOptions as aS, type FundingStatus as aT, type NativeFundingConfig as aU, type PriceDisplayOptions as aV, type Farcaster as aW, type Passkey as aX, type LoginMethodOrderOption as aY, type SiwsFlowState as aZ, type PrivyI18nStrings as a_, type UnsignedTransactionRequestWithChainId as aa, type BaseConnectedWalletType as ab, type SignerInput as ac, type TelegramAuthFlowState as ad, createCrossTabUserSyncPlugin as ae, createWalletCreationOnLoginPlugin as af, type TypedMessage as ag, type MessageTypes as ah, type SmartWallet as ai, type MoonpayCurrencyCode as aj, type MoonpayPaymentMethod as ak, type Quantity as al, type TransactionLog as am, type TransactionReceipt as an, type NonEmptyArray as ao, type EmailWithMetadata as ap, type PhoneWithMetadata as aq, type WalletWithMetadata as ar, type Google as as, type Twitter as at, type Discord as au, type Github as av, type LinkedIn as aw, type Apple as ax, type Tiktok as ay, type Line as az, type BaseConnectedSolanaWallet as b, type UserRecoveryMethod as c, type LoginToMiniApp as d, type SendTransactionModalUIOptions as e, type SignMessageModalUIOptions as f, type SessionSignerInput as g, type SolanaStandardWallet as h, type SolanaFundingConfig as i, SolanaWalletConnector as j, type MfaSubmitArgs as k, type SolanaRpcRequestType as l, type EthereumRpcResponseType as m, type SolanaRpcResponseType as n, type PrivyFarcasterSignerInitResponse as o, type EIP1193Provider as p, type EntropyIdVerifier as q, type RequestArguments as r, WalletConnector as s, toSolanaWalletConnectors as t, PrivyProxyProvider as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type PrivyClientConfig as x, type ConnectorType as y, type SetBaseAccountSdkType as z };
2585
+ export { type ExternalWalletMetadata as $, type WalletListEntry as A, type BaseConnectedEthereumWallet as B, type CreateWalletOptions as C, type AppConfig as D, type EthereumRpcRequestType as E, type FundingMethod as F, type BaseConnectedWallet as G, type HDWalletWithMetadata as H, type ConnectWalletModalOptions as I, type LoginModalOptions as J, type SetWalletRecoveryOptions as K, type LoginMethod as L, type MfaMethod as M, type SignTypedDataParams as N, type OAuthTokens as O, PrivyErrorCode as P, type UnsignedTransactionRequest as Q, type RuntimeLoginOverridableOptions as R, type SolanaChain as S, type FundWalletConfig as T, type User as U, type ConnectedWallet as V, type Wallet as W, type CrossAppProviderDetails as X, type MoonpaySignRequest as Y, type MoonpaySignResponse as Z, type SiwsMessageType as _, type LinkedAccountWithMetadata as a, type PrivyI18nStrings as a$, type TelegramAuthResult as a0, type TelegramWebAppData as a1, type OAuthUserInfo as a2, type OAuthFlowState as a3, type LoginWithCode as a4, type OtpFlowState as a5, type PasskeyFlowState as a6, type SiweFlowState as a7, type BridgeProviders as a8, type FundingResult as a9, type Line as aA, type Telegram as aB, type CrossAppAccount as aC, type LinkedAccountType as aD, type GoogleOAuthWithMetadata as aE, type TwitterOAuthWithMetadata as aF, type DiscordOAuthWithMetadata as aG, type GithubOAuthWithMetadata as aH, type TiktokOAuthWithMetadata as aI, type LineOAuthWithMetadata as aJ, type LinkedInOAuthWithMetadata as aK, type AppleOAuthWithMetadata as aL, type FarcasterWithMetadata as aM, type TelegramWithMetadata as aN, type CrossAppAccountWithMetadata as aO, type PasskeyWithMetadata as aP, type Email as aQ, type Phone as aR, type TransactionUIOptions as aS, type ContractUIOptions as aT, type FundingStatus as aU, type NativeFundingConfig as aV, type PriceDisplayOptions as aW, type Farcaster as aX, type Passkey as aY, type LoginMethodOrderOption as aZ, type SiwsFlowState as a_, type BaseAccountSdkType as aa, type UnsignedTransactionRequestWithChainId as ab, type BaseConnectedWalletType as ac, type SignerInput as ad, type TelegramAuthFlowState as ae, createCrossTabUserSyncPlugin as af, createWalletCreationOnLoginPlugin as ag, type TypedMessage as ah, type MessageTypes as ai, type SmartWallet as aj, type MoonpayCurrencyCode as ak, type MoonpayPaymentMethod as al, type Quantity as am, type TransactionLog as an, type TransactionReceipt as ao, type NonEmptyArray as ap, type EmailWithMetadata as aq, type PhoneWithMetadata as ar, type WalletWithMetadata as as, type Google as at, type Twitter as au, type Discord as av, type Github as aw, type LinkedIn as ax, type Apple as ay, type Tiktok as az, type BaseConnectedSolanaWallet as b, createDataSuffixPlugin as b0, type UserRecoveryMethod as c, type LoginToMiniApp as d, type SendTransactionModalUIOptions as e, type SignMessageModalUIOptions as f, type SessionSignerInput as g, type SolanaStandardWallet as h, type SolanaFundingConfig as i, SolanaWalletConnector as j, type MfaSubmitArgs as k, type SolanaRpcRequestType as l, type EthereumRpcResponseType as m, type SolanaRpcResponseType as n, type PrivyFarcasterSignerInitResponse as o, type EIP1193Provider as p, type EntropyIdVerifier as q, type RequestArguments as r, WalletConnector as s, toSolanaWalletConnectors as t, PrivyProxyProvider as u, type WalletClientType as v, type ConnectedWalletMetadata as w, type PrivyClientConfig as x, type ConnectorType as y, type SetBaseAccountSdkType as z };
package/dist/dts/ui.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-CrwMc83t.js';
2
+ import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-Bc9w_mgT.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain } from '@privy-io/js-sdk-core';
5
5
  import '@coinbase/wallet-sdk';
package/dist/dts/ui.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-CrwMc83t.js';
2
+ import { R as RuntimeLoginOverridableOptions, S as SolanaChain } from './types-Bc9w_mgT.js';
3
3
  import { Hex } from 'viem';
4
4
  import { Chain } from '@privy-io/js-sdk-core';
5
5
  import '@coinbase/wallet-sdk';
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{HelpCircle as o}from"lucide-react";import{u as e}from"./context-Bj4czVEP.mjs";import{u as r}from"./internal-context-Z-fyxadS.mjs";import{a as i}from"./privy-context-DICqtyyT.mjs";import{S as a}from"./ScreenLayout-CyK-vOMq.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-DpkEBdQv.mjs";import"styled-components";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"eventemitter3";import"viem/utils";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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:e="Account not found",subtitle:r,appName:i="this app",ctaText:n="Try logging in again",onRetry:m})=>/*#__PURE__*/t(a,{title:e,subtitle:r||`Please try logging in again or go to ${i} to create an account.`,icon:o,iconVariant:"warning",primaryCta:{label:n,onClick:m},watermark:!0}),m={component:()=>{let{navigate:o,setModalData:a,data:m}=i(),c=e(),{getAuthMeta:p,client:s}=r();/*#__PURE__*/return t(n,{appName:c?.name,onRetry:()=>{let t=p();a({...m,login:{...m?.login,...t?.disableSignup?{disableSignup:!0}:{}}}),s?.authFlow&&(s.authFlow=void 0),o("LandingScreen")}})}};export{m as AccountNotFoundScreen,n as AccountNotFoundScreenView,m as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as n,useEffect as l}from"react";import{styled as s}from"styled-components";import{v as a}from"./use-export-wallet-Bd5Sg5V-.mjs";import{S as c}from"./ModalHeader-DfHxv9fE.mjs";const p=({address:s,showCopyIcon:p,url:h,className:u})=>{let[g,x]=n(!1);function y(e){e.stopPropagation(),navigator.clipboard.writeText(s).then((()=>x(!0))).catch(console.error)}return l((()=>{if(g){let e=setTimeout((()=>x(!1)),3e3);return()=>clearTimeout(e)}}),[g]),/*#__PURE__*/e(d,h?{children:[/*#__PURE__*/r(f,{title:s,className:u,href:`${h}/address/${s}`,target:"_blank",children:a(s)}),p&&/*#__PURE__*/r(c,{onClick:y,size:"sm",style:{gap:"0.375rem"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(i,{size:16})]}:{children:["Copy",/*#__PURE__*/r(t,{size:16})]})})]}:{children:[/*#__PURE__*/r(m,{title:s,className:u,children:a(s)}),p&&/*#__PURE__*/r(c,{onClick:y,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(i,{size:14})]}:{children:["Copy",/*#__PURE__*/r(t,{size:14})]})})]})};let d=s.span`
1
+ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as t,Copy as i}from"lucide-react";import{useState as n,useEffect as l}from"react";import{styled as s}from"styled-components";import{v as a}from"./use-export-wallet-DVyBljMT.mjs";import{S as c}from"./ModalHeader-DpkEBdQv.mjs";const p=({address:s,showCopyIcon:p,url:h,className:u})=>{let[g,x]=n(!1);function y(e){e.stopPropagation(),navigator.clipboard.writeText(s).then((()=>x(!0))).catch(console.error)}return l((()=>{if(g){let e=setTimeout((()=>x(!1)),3e3);return()=>clearTimeout(e)}}),[g]),/*#__PURE__*/e(d,h?{children:[/*#__PURE__*/r(f,{title:s,className:u,href:`${h}/address/${s}`,target:"_blank",children:a(s)}),p&&/*#__PURE__*/r(c,{onClick:y,size:"sm",style:{gap:"0.375rem"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(t,{size:16})]}:{children:["Copy",/*#__PURE__*/r(i,{size:16})]})})]}:{children:[/*#__PURE__*/r(m,{title:s,className:u,children:a(s)}),p&&/*#__PURE__*/r(c,{onClick:y,size:"sm",style:{gap:"0.375rem",fontSize:"14px"},children:/*#__PURE__*/e(o,g?{children:["Copied",/*#__PURE__*/r(t,{size:14})]}:{children:["Copy",/*#__PURE__*/r(i,{size:14})]})})]})};let d=s.span`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  gap: 0.5rem;
@@ -0,0 +1,6 @@
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{FileCheck as r,ExternalLink as o}from"lucide-react";import"react";import{styled as i}from"styled-components";import{a as s}from"./ModalHeader-DpkEBdQv.mjs";import{u as a}from"./context-Bj4czVEP.mjs";import{u as n}from"./internal-context-Z-fyxadS.mjs";import{u as m,a as l}from"./privy-context-DICqtyyT.mjs";import{s as c}from"./shouldProceedtoEmbeddedWalletCreationFlow-DLpCU-0h.mjs";import{S as p}from"./ScreenLayout-CyK-vOMq.mjs";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";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"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-DQp_5KKJ.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-DDB15S8o.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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const d={component:()=>{let{user:t,logout:r}=m(),{onUserCloseViaDialogOrKeybindRef:o,setModalData:i,navigate:s}=l(),p=a(),{acceptTerms:d,closePrivyModal:y,createAnalyticsEvent:v}=n(),h=e=>{e?.preventDefault(),y({shouldCallAuthOnSuccess:!1}),r()};o.current=h;/*#__PURE__*/return e(u,{termsAndConditionsUrl:p?.legal.termsAndConditionsUrl,privacyPolicyUrl:p?.legal.privacyPolicyUrl,onAccept:async e=>{e?.preventDefault(),await d(),t&&c(t,p.embeddedWallets)?(i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AffirmativeConsentScreen"}}),r()},callAuthOnSuccessOnClose:!0}}),s("EmbeddedWalletOnAccountCreateScreen")):y()},onDecline:h})}},u=({termsAndConditionsUrl:i,privacyPolicyUrl:a,onAccept:n,onDecline:m,title:l="One last step",subtitle:c="By signing up, you agree to our terms and privacy policy."})=>/*#__PURE__*/e(p,{title:l,subtitle:c,icon:r,primaryCta:{label:"Accept",onClick:n},secondaryCta:{label:"No thanks",onClick:m},watermark:!0,children:(i||a)&&/*#__PURE__*/t(y,{children:[i&&/*#__PURE__*/t(s,{variant:"muted",href:i,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Terms",/*#__PURE__*/e(o,{width:16,height:16,strokeWidth:2.25})]}),a&&/*#__PURE__*/t(s,{variant:"muted",href:a,target:"_blank",size:"lg",style:{justifyContent:"space-between"},as:"a",children:["View Privacy Policy",/*#__PURE__*/e(o,{width:16,height:16,strokeWidth:2.25})]})]})});let y=i.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 12px;
5
+ margin-top: var(--screen-space);
6
+ `;export{d as AffirmativeConsentScreen,u as AffirmativeConsentScreenView,d as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{Lock as o}from"lucide-react";import"react";import{u as e}from"./context-Bj4czVEP.mjs";import{a as i}from"./privy-context-DICqtyyT.mjs";import{S as r}from"./ScreenLayout-CyK-vOMq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@privy-io/are-addresses-equal";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-DpkEBdQv.mjs";import"styled-components";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"eventemitter3";import"viem/utils";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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:e="You don't have access to this app",subtitle:i="Have you been invited?",ctaText:n="Try another account",ctaLink:a,onCtaClick:m})=>/*#__PURE__*/t(r,{title:e,subtitle:i,icon:o,iconVariant:"warning",primaryCta:{label:n,onClick:()=>{a?window.open(a,"_blank"):m?.()}},watermark:!0}),a={component:()=>{let{navigate:o}=i(),r=e(),a=r?.allowlistConfig.errorTitle||"You don't have access to this app",m=r?.allowlistConfig.errorDetail||"Have you been invited?",c=r?.allowlistConfig.errorCtaText||"Try another account",s=r?.allowlistConfig.errorCtaLink;/*#__PURE__*/return t(n,{title:a,subtitle:m,ctaText:c,ctaLink:s??void 0,onCtaClick:()=>{o("LandingScreen")}})}};export{a as AllowlistRejectionScreen,n as AllowlistRejectionScreenView,a as default};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useRef as t,useCallback as o}from"react";import{u as r}from"./context-Bj4czVEP.mjs";import{u as n,c as a,b as l}from"./internal-context-Z-fyxadS.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as c}from"./privy-context-DICqtyyT.mjs";import{i as s}from"./ConnectWalletView-mm5nV3qj.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-DpkEBdQv.mjs";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"eventemitter3";import"viem/utils";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./CopyableText-BCytXyJL.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-D-J14re9.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-BiiKgmqw.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{setWalletConnectionStatus:m,closePrivyModal:p,inProgressAuthFlowRef:u}=n(),{data:d,navigate:C}=c(),W=r(),j=i(),E=d?.externalConnectWallet?.description,w=t(d?.externalConnectWallet?.walletList??W.appearance.walletList),x=t(d?.externalConnectWallet?.walletChainType??W.appearance.walletChainType),v=w.current,h=x.current,y="link"===u.current?void 0:()=>C("LandingScreen");/*#__PURE__*/return e(s,{walletList:v,walletChainType:h,onClose:p,onConnect:o((({connector:e,wallet:t})=>{j("connectWallet","onSuccess",{wallet:t}),m({status:"connected",connectedWallet:t,connector:e,connectError:null,connectRetry:()=>null}),C("ConnectionStatusScreen",!d?.externalConnectWallet?.preSelectedWalletId)}),[m,C,d?.login?.disableSignup,d?.externalConnectWallet?.preSelectedWalletId]),onConnectError:e=>{e instanceof a?(console.warn(e.cause?e.cause:e.message),j("connectWallet","onError",e.privyErrorCode||l.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),j("connectWallet","onError",l.UNKNOWN_CONNECT_WALLET_ERROR))},onBack:y,customDescription:E||"",preSelectedWalletId:d?.externalConnectWallet?.preSelectedWalletId,app:W})},isUnauthenticatedScreem:!0};export{m as AuthenticateWithWalletScreen,m as default};
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,Fragment as t,jsx as i}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as r,useEffect as n}from"react";import{createWalletClient as o,custom as s,publicActions as c,createPublicClient as d,http as m,formatUnits as l}from"viem";import{addToDefaultChains as u}from"@privy-io/js-sdk-core";import{b as p,c as h,R as g}from"./Layouts-BlFm53ED.mjs";import{B as f}from"./ModalHeader-DpkEBdQv.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as j}from"./FundWalletMethodHeader-D38FBVVM.mjs";import{N as y}from"./index-Dq_xe9dz.mjs";import{u as I,t as w}from"./context-Bj4czVEP.mjs";import{u as T,a as C,b}from"./internal-context-Z-fyxadS.mjs";import{z as S}from"./useActiveWallet-DMrO7evY.mjs";import{a as x}from"./privy-context-DICqtyyT.mjs";import{u as N}from"./useGetTokenPrice-N5ZX6Yun.mjs";import{u as A,b as k}from"./useWallets-CS_W9ciB.mjs";import{O as E}from"./analytics-mkkvFRju.mjs";import{g as F,t as L,a as U,b as B,c as P,u as M}from"./reservoir-0wfhnc0j.mjs";import{x as W}from"./index-DQp_5KKJ.mjs";import{g as q}from"./getChainName-DjpPdUSc.mjs";import{g as H,a as O}from"./transaction-CnfuREWo.mjs";import{g as R,B as D}from"./BridgeNetworkSelectionView-CmMVzAX5.mjs";import{v as $}from"./use-export-wallet-DVyBljMT.mjs";import{T as _}from"./TransferOrBridgeLoadingScreen-koaJdk-2.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"@privy-io/are-addresses-equal";import"./useGetSolPrice-DwwjjGbd.mjs";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DDB15S8o.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./getErc20Balance-NThD2gHO.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Chip-D2-wZOHJ.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./formatErc20TokenAmount-BuPk9xcy.mjs";import"./ethers-BozrzoVi.mjs";import"./styles-pSKfqjN3.mjs";import"./LinkPasskeyScreen-CHPataTs.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-CyK-vOMq.mjs";import"./Screen-B0u1eY7p.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-B99EaiMb.mjs";const G={component:()=>{let G=I(),{rpcConfig:V,appId:z,closePrivyModal:Q,createAnalyticsEvent:X}=T(),{navigate:Y,setModalData:J,data:K}=x(),Z=I(),{wallets:ee}=A(),[te,ie]=r(null),[ae,re]=r(null),[ne,oe]=r([]),[se,ce]=r(0),[de,me]=r(!1),[le,ue]=r(!1),[pe,he]=r(!1),[ge,fe]=r(!1),[ve,je]=r(),[ye,Ie]=r();if(!K?.funding||"solana"!==K.funding.chainType)throw Error("Invalid funding data");let{address:we,chain:Te,connectedWallet:Ce}=K.funding,[be,Se]=r(K.funding.amount),xe=("ethereum"===Ce?.type?Ce:void 0)??ee[0],Ne=S(xe?.walletClientType||"unknown"),Ae=Ne?.name||"wallet",[ke,Ee]=r(null);n((()=>{(async()=>{if(!xe)return;let e=await xe.getEthereumProvider();Ee(o({account:xe.address,transport:s(e)}).extend(c))})().catch(console.error)}),[xe]);let[Fe,Le]=r(0n),Ue=H(Fe);n((()=>{let e=G.solanaRpcs[Te];e?W({rpc:e.rpc,address:we}).then((e=>Le(BigInt(e)))).catch(console.error):console.warn("Unable to load solana rpc, skipping balance")}),[]);let[Be,Pe]=r(),{tokenPrice:Me}=N("solana"),{fundingAmountInBaseUnit:We,fundingAmountInUsd:qe}=O({amount:be,fee:0n,tokenPrice:Me,isUsdc:K.funding.isUSDC});if(n((()=>{(async()=>{if(!ke||!xe)return;let e=["solana:testnet","solana:devnet"].includes(Te);e&&console.warn("Solana testnets are not supported for bridging");let t=u(Z.chains).filter((({testnet:t})=>!!t===e)),i=(await R({chains:t,address:xe.address,appId:z,rpcConfig:V})).filter((e=>e.balance>0n));if(i.length<1)return void ie(new C(`Wallet ${$(xe.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE));i.sort(((e,t)=>Number(t.balance-e.balance)));let a=(await Promise.allSettled(i.map((async e=>({...e,quote:await F({isTestnet:!1,input:L({appId:z,amount:We.toString(),user:xe.address,recipient:we,destinationChainId:B,destinationCurrency:U,originChainId:e.chain.id})})}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(a.length<1)return void ie(new C(`Unable to fetch quotes for bridging. Wallet ${$(xe.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE));let r=a.map((({quote:e,balance:t,chain:i})=>({bridgeTx:P(e),balance:t,chain:i,isErc20Quote:!1}))).filter((({bridgeTx:e})=>!!e));if(r.length>1)return void oe(r);let n=r.at(0);n?(ue(!0),Pe({data:n.bridgeTx.data,to:n.bridgeTx.to,value:n.bridgeTx.value,chain:n.chain})):ie(new C(`Unable to select bridge option from quotes. Wallet ${$(xe.address)} does not have enough funds.`,void 0,b.INSUFFICIENT_BALANCE))})().catch(console.error)}),[ke]),n((()=>{(async()=>{let e,t;if(!ke||!xe||de||pe||!Be)return;me(!0);let i=d({chain:Be.chain,transport:m(k(Be.chain,V,z))});try{e=await i.prepareTransactionRequest({account:xe.address,to:Be.to,chain:Be.chain,data:Be.data,value:BigInt(Be.value??0)})}catch(e){console.error(e),ne.length>1&&re(e.shortMessage??"Something went wrong")}if(e){me(!1),he(!0);try{await ke.switchChain({id:Be.chain.id})}catch(e){await ke.addChain({chain:Be.chain}),await ke.switchChain({id:Be.chain.id})}try{t=await ke.sendTransaction(e)}catch(e){console.error(e),"TransactionExecutionError"===e.name&&(ne.length<1?ie(new C(e.shortMessage,void 0,b.TRANSACTION_FAILURE)):re(e.shortMessage??"Something went wrong"))}if(t)return await ke.waitForTransactionReceipt({hash:t}),le?(Ie("pending"),void je(t)):(he(!1),fe(!0),void X({eventName:E,payload:{provider:"external",status:"success",txHash:t,address:xe.address,chainId:Be.chain.id,chainType:"ethereum",value:Be.value?l(BigInt(Be.value),18):void 0,token:"ETH",destination:we,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:l(We,9),destinationToken:"SOL"}}));he(!1)}else me(!1)})().catch(console.error)}),[ke,Be]),M({transactionHash:ve,isTestnet:!1,bridgingStatus:ye,setBridgingStatus:Ie,onSuccess({transactionHash:e}){ue(!1),fe(!0),X({eventName:E,payload:{provider:"external",status:"success",txHash:e,address:xe?.address,chainId:Be?.chain.id,chainType:"ethereum",value:Be?.value?l(BigInt(Be.value),18):void 0,token:"ETH",destination:we,destinationClusterName:"mainnet-beta",destinationChainType:"solana",destinationValue:l(We,9),destinationToken:"SOL"}})},onFailure({error:e}){ue(!1),ie(e)}}),n((()=>{te&&(J({funding:K?.funding,solanaFundingData:K?.solanaFundingData,sendTransaction:K?.sendTransaction,errorModalData:{error:te,previousScreen:"TransferFromWalletScreen"}}),Y("ErrorScreen",!1))}),[te]),n((()=>{if(!ge)return;let e=setTimeout(Q,w);return()=>clearTimeout(e)}),[ge]),ge/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/i(j,{}),/*#__PURE__*/i(p,{}),/*#__PURE__*/e(h,{children:[/*#__PURE__*/i(a,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/i(v,{title:"Success!",description:`You’ve successfully added ${be} SOL to your ${Z.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/i(g,{}),/*#__PURE__*/i(f,{})]});let He=ne[se];return ne.length>1&&He?/*#__PURE__*/i(D,{displayName:Ae,configuredFundingChain:Te,formattedBalance:Ue,fundingAmount:be,fundingCurrency:"SOL",fundingAmountInUsd:qe,options:ne,selectedOption:He,isPreparing:de,isSubmitting:pe,addressToFund:we,fundingWalletAddress:xe?.address||"",errorMessage:ae,onSubmit:()=>{K.funding?.amount!==be?async function(){if(xe&&He)try{let e=await F({isTestnet:!1,input:L({appId:z,amount:We.toString(),user:xe.address,recipient:we,destinationChainId:B,destinationCurrency:U,originChainId:He.chain.id})}),t=P(e);if(!t)throw Error("Invalid transaction request");ue(!0),Pe({data:t.data,to:t.to,value:t.value,chain:He.chain})}catch(e){console.error(e),ie(new C("Unable to fetch quotes for bridging",e,b.INSUFFICIENT_BALANCE))}}().catch(console.error):Pe({to:He.bridgeTx.to,data:He.bridgeTx.data,value:He.bridgeTx.value,chain:He.chain})},onSelect:e=>{e!==se&&(re(null),ce(e))},onAmountChange:Se}):pe&&xe?/*#__PURE__*/i(_,{walletClientType:xe?.walletClientType||"unknown",displayName:Ae,addressToFund:we,isBridging:le,isErc20Flow:!1,chainId:"solana",chainName:q(Te),totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
2
+ /*#__PURE__*/e(t,{children:[/*#__PURE__*/i(j,{}),/*#__PURE__*/i(y,{}),/*#__PURE__*/i("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/i(f,{})]})}};export{G as AwaitingEvmToSolBridgingScreen,G as default};
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as i,useEffect as n}from"react";import{parseEther as o,createWalletClient as s,custom as d,publicActions as c,createPublicClient as l,http as m,encodeFunctionData as u,formatUnits as p}from"viem";import{addToDefaultChains as h}from"@privy-io/js-sdk-core";import{b as f,c as g,R as v}from"./Layouts-BlFm53ED.mjs";import{B as y}from"./ModalHeader-DpkEBdQv.mjs";import{C}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as I}from"./FundWalletMethodHeader-D38FBVVM.mjs";import{N as w}from"./index-Dq_xe9dz.mjs";import{u as j,t as T}from"./context-Bj4czVEP.mjs";import{u as b,a as E,b as S}from"./internal-context-Z-fyxadS.mjs";import{z as N}from"./useActiveWallet-DMrO7evY.mjs";import{a as A}from"./privy-context-DICqtyyT.mjs";import{u as x}from"./useGetTokenPrice-N5ZX6Yun.mjs";import{u as k,b as F}from"./useWallets-CS_W9ciB.mjs";import{E as B,a as P}from"./transfer-6YztDh-t.mjs";import{f as U}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{c as L,a as M,g as W,s as H}from"./ethers-BozrzoVi.mjs";import{O as q}from"./analytics-mkkvFRju.mjs";import{t as $,g as D,c as R,u as _}from"./reservoir-0wfhnc0j.mjs";import{y as O}from"./index-DQp_5KKJ.mjs";import{g as Q,B as G}from"./BridgeNetworkSelectionView-CmMVzAX5.mjs";import{g as V}from"./getErc20Balance-NThD2gHO.mjs";import{v as z}from"./use-export-wallet-DVyBljMT.mjs";import{T as X}from"./TransferOrBridgeLoadingScreen-koaJdk-2.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"@privy-io/are-addresses-equal";import"./useGetSolPrice-DwwjjGbd.mjs";import"uuid";import"jose";import"eventemitter3";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DDB15S8o.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./Row-C9vrS4Zi.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./getChainName-DjpPdUSc.mjs";import"./Chip-D2-wZOHJ.mjs";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";import"./shared-FM0rljBt.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"./styles-pSKfqjN3.mjs";import"./LinkPasskeyScreen-CHPataTs.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-CyK-vOMq.mjs";import"./Screen-B0u1eY7p.mjs";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"./Address-B99EaiMb.mjs";const Y={component:()=>{let{rpcConfig:Y,appId:Z,closePrivyModal:J,createAnalyticsEvent:K}=b(),{navigate:ee,setModalData:te,data:re}=A(),ae=j(),{wallets:ie}=k(),[ne,oe]=i(!1),[se,de]=i(0n),[ce,le]=i(!1),[me,ue]=i(null),[pe,he]=i(null),[fe,ge]=i([]),[ve,ye]=i(0),[Ce,Ie]=i(!1),[we,je]=i(!1),[Te,be]=i(!1),[Ee,Se]=i(!1),[Ne,Ae]=i(),[xe,ke]=i();if(!re?.funding||"ethereum"!==re.funding.chainType)throw Error("Invalid funding data");let{erc20ContractInfo:Fe,chain:Be,connectedWallet:Pe}=re.funding,Ue=re.funding.address,Le=re.funding.erc20Address,[Me,We]=i(re.funding.amount);n((()=>{Le&&!Fe&&ue(Error("Unable to fetch token details"))}),[]);let He=!!Le&&!!Fe,qe=He?BigInt(parseFloat(Me)*10**Fe.decimals):o(Me),$e=("ethereum"===Pe?.type?Pe:void 0)??ie[0],De=N($e?.walletClientType||"unknown"),Re=De?.name||"wallet",[_e,Oe]=i(null);n((()=>{(async()=>{if(!$e)return;let e=await $e.getEthereumProvider();Oe(s({account:$e.address,transport:d(e)}).extend(c))})().catch(console.error)}),[$e]);let[Qe,Ge]=i(0n);n((()=>{l({chain:Be,transport:m(F(Be,Y,Z))}).getBalance({address:Ue}).then(Ge).catch(console.error)}),[]);let[Ve,ze]=i(0n);n((()=>{He&&V({chain:Be,address:Ue,appId:Z,rpcConfig:Y,erc20Address:Le}).then((e=>ze(e.balance))).catch(console.error)}),[]);let{tokenPrice:Xe}=x(Be.id),[Ye,Ze]=i({to:Ue,chain:Be,value:qe,data:void 0});n((()=>{(async()=>{let e,t;if(!_e||!$e||Ce||Te)return;Ie(!0);let r=l({chain:Ye.chain,transport:m(F(Ye.chain,Y,Z))});if(He&&!Ye.data)return await r.simulateContract({address:Le,chain:Ye.chain,abi:B,functionName:"transfer",args:[Ue,qe],account:$e.address}).catch((e=>{if("ContractFunctionZeroDataError"===e?.cause?.name||e?.message?.includes("returned no data"))return r.simulateContract({address:Le,chain:Ye.chain,abi:P,functionName:"transfer",args:[Ue,qe],account:$e.address}).catch((e=>{console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}));console.warn("Simulated token transfer failed with error, fetching bridge options.",e)}))?(Ie(!1),void Ze({to:Le,chain:Ye.chain,data:u({abi:B,functionName:"transfer",args:[Ue,qe]}),value:"0x0"})):(Ie(!1),void le(!0));try{e=await r.prepareTransactionRequest({account:$e.address,to:Ye.to,chain:Ye.chain,data:Ye.data,value:BigInt(Ye.value??0)})}catch(e){if(console.error(e),fe.length>1)he(e.shortMessage??"Something went wrong");else if(we&&0===fe.length)return void ue(new E(`Wallet ${z($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE))}if(!e)return Ie(!1),void le(!0);Ie(!1),be(!0),oe(!0),de(e.gas);try{await _e.switchChain({id:Ye.chain.id})}catch(e){await _e.addChain({chain:Ye.chain}),await _e.switchChain({id:Ye.chain.id})}try{t=await _e.sendTransaction(e)}catch(e){if(console.error(e),"TransactionExecutionError"===e.name)if(fe.length<1){let t=e.shortMessage;(e.shortMessage.includes("rejected the request")||e.details.includes("rejected the request"))&&(t="User rejected the request."),ue(new E(t,void 0,S.TRANSACTION_FAILURE))}else he(e.shortMessage??"Something went wrong")}if(t)return await _e.waitForTransactionReceipt({hash:t}),be(!1),we?(Ae(t),void ke("pending")):(Se(!0),te(O(re,"completed",t,$e?.walletClientType,He,Fe,Be)),void K({eventName:q,payload:{provider:"external",status:"success",txHash:t,address:$e.address,chainId:Ye.chain.id,chainType:"ethereum",value:Ye.value?p(BigInt(Ye.value),Fe?.decimals??18):void 0,token:Fe?.symbol??Le??"ETH",destinationAddress:Ue,destinationChainId:Be.id,destinationChainType:"ethereum",destinationValue:qe?p(qe,Fe?.decimals??18):void 0,destinationToken:Fe?.symbol??Le??Be.nativeCurrency.name}}));be(!1)})().catch(console.error)}),[_e,Ye]),n((()=>{(async()=>{if(!ce||!_e||!$e)return;let e=h(ae.chains).filter((e=>e.id!==Be.id&&!!e.testnet==!!Be.testnet));He&&e.unshift(Be);let t=await Q({chains:e,address:$e.address,appId:Z,rpcConfig:Y,includeUsdc:re.funding?.isUSDC}),r=He?t.filter((e=>e.balance>0n)):t.filter((e=>e.balance>qe)),a=He&&t.every((e=>0n===e.balance));if(r.length<1)return void ue(new E(a?`Wallet ${z($e.address)} doesn't have enough funds to cover gas fees. Top up your wallet and try again.`:`Wallet ${z($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE));r.sort(((e,t)=>Number(He?(t.erc20Balance??0n)-(e.erc20Balance??0n):t.balance-e.balance)));let i=r.flatMap((e=>{let t=[{...e,isErc20Quote:!1,isTestnet:!!Be.testnet,input:$({appId:Z,amount:qe.toString(),user:$e.address,recipient:Ue,destinationChainId:Be.id,destinationCurrency:Le,originChainId:e.chain.id})}];return He&&Le&&(e.erc20Balance??0n)>=qe&&t.push({...e,isErc20Quote:!0,isTestnet:!!Be.testnet,input:$({appId:Z,amount:qe.toString(),user:$e.address,recipient:Ue,destinationChainId:Be.id,destinationCurrency:Le,originChainId:e.chain.id,originCurrency:e.erc20Address})}),t})),n=(await Promise.allSettled(i.map((async e=>({...e,quote:await D(e)}))))).filter((e=>"fulfilled"===e.status)).map((e=>e.value));if(n.length<1)return void ue(new E(`Wallet ${z($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE));let o=n.map((e=>({bridgeTx:R(e.quote),balance:e.balance,chain:e.chain,erc20Balance:e.erc20Balance,isErc20Quote:e.isErc20Quote}))).filter((e=>!!e.bridgeTx));if(o.length>1)return void ge(o);let s=o[0];s?(je(!0),Ze({data:s.bridgeTx.data,to:s.bridgeTx.to,value:s.bridgeTx.value,chain:s.chain})):ue(new E(`Wallet ${z($e.address)} does not have enough funds.`,void 0,S.INSUFFICIENT_BALANCE))})().catch(console.error)}),[ce]),_({transactionHash:Ne,isTestnet:!!Be.testnet,bridgingStatus:xe,setBridgingStatus:ke,onSuccess({transactionHash:e}){je(!1),Se(!0),te(O(re,"completed",e,$e?.walletClientType,He,Fe,Be)),K({eventName:q,payload:{provider:"external",status:"success",txHash:e,address:$e?.address,chainId:Ye.chain.id,chainType:"ethereum",value:Ye.value?p(BigInt(Ye.value),Fe?.decimals??18):void 0,token:Fe?.symbol??Le??"ETH",destinationAddress:Ue,destinationChainId:Be.id,destinationChainType:"ethereum",destinationValue:qe?p(qe,Fe?.decimals??18):void 0,destinationToken:Fe?.symbol??Le??Be.nativeCurrency.name}})},onFailure({error:e}){je(!1),ue(e)}}),n((()=>{me&&(te({funding:re?.funding,solanaFundingData:re?.solanaFundingData,sendTransaction:re?.sendTransaction,errorModalData:{error:me,previousScreen:"TransferFromWalletScreen"}}),ee("ErrorScreen",!1))}),[me]);let Je=!He&&Xe?L(Me??"0",Xe):void 0,Ke=He?se:H([se,qe]),et=Ke&&Xe?M(Ke,Xe):void 0,tt=Ke?W(Ke,re?.funding?.erc20Address?re?.funding?.erc20ContractInfo?.symbol||"ETH":re?.funding?.chain.nativeCurrency.symbol||"ETH"):void 0,rt=se&&Xe?M(se,Xe):void 0,at=se?W(se,Be?.nativeCurrency?.symbol||"ETH"):void 0;if(n((()=>{if(!Ee)return;let e=setTimeout(J,T);return()=>clearTimeout(e)}),[Ee]),Ee/*#__PURE__*/)return e(t,{children:[/*#__PURE__*/r(I,{}),/*#__PURE__*/r(f,{}),/*#__PURE__*/e(g,{children:[/*#__PURE__*/r(a,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/r(C,{title:"Success!",description:`You’ve successfully added ${Me} ${He?Fe.symbol:Be.nativeCurrency.symbol} to your ${ae.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/r(v,{}),/*#__PURE__*/r(y,{})]});let it=He?`${U({amount:Ve,decimals:Fe.decimals})} ${Fe.symbol}`:W(Qe,Be.nativeCurrency.symbol,3,!0),nt=fe[ve];return fe.length>1&&nt?/*#__PURE__*/r(G,{displayName:Re,configuredFundingChain:Be,erc20ContractInfo:Fe,formattedBalance:it,fundingAmount:Me,fundingCurrency:He?Fe.symbol:Be.nativeCurrency.symbol,fundingAmountInUsd:Je,options:fe,selectedOption:nt,isPreparing:Ce,isSubmitting:Te,addressToFund:Ue,fundingWalletAddress:$e?.address||"",errorMessage:pe,onSubmit:()=>{re.funding?.amount!==Me?async function(){if($e&&nt)try{let e=await D({isTestnet:!!Be.testnet,input:$({appId:Z,amount:qe.toString(),user:$e.address,recipient:Ue,destinationChainId:Be.id,destinationCurrency:Le,originChainId:nt.chain.id})}),t=R(e);if(!t)throw Error("Invalid transaction request");je(!0),Ze({data:t.data,to:t.to,value:t.value,chain:nt.chain})}catch(e){console.error(e),ue(new E("Unable to fetch quotes for bridging",e,S.INSUFFICIENT_BALANCE))}}().catch(console.error):Ze({to:nt.bridgeTx.to,data:nt.bridgeTx.data,value:nt.bridgeTx.value,chain:nt.chain})},onSelect:e=>{e!==ve&&(he(null),ye(e))},onAmountChange:We}):ne&&se&&$e&&re?.funding?/*#__PURE__*/r(X,{walletClientType:$e?.walletClientType||"unknown",displayName:Re,addressToFund:Ue,isBridging:we,isErc20Flow:He,totalPriceInUsd:et,totalPriceInNativeCurrency:tt,gasPriceInUsd:rt,gasPriceInNativeCurrency:at,chainId:Be.id,chainName:Be.name}):
2
+ /*#__PURE__*/e(t,{children:[/*#__PURE__*/r(I,{}),/*#__PURE__*/r(w,{}),/*#__PURE__*/r("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/r(y,{})]})}};export{Y as AwaitingExternalEthereumTransferScreen,Y as default};
@@ -0,0 +1,103 @@
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import o from"@heroicons/react/20/solid/CheckIcon";import t from"@heroicons/react/24/outline/EnvelopeIcon";import i from"@heroicons/react/24/outline/PhoneIcon";import{useState as n,useEffect as a}from"react";import{isMobile as s}from"react-device-detect";import{styled as c}from"styled-components";import{H as l}from"./Layouts-BlFm53ED.mjs";import{L as d}from"./Link-DJ5gq9Di.mjs";import{u as p,q as m}from"./context-Bj4czVEP.mjs";import{u,e as v,b as f,k as h}from"./internal-context-Z-fyxadS.mjs";import{a as y,u as g}from"./privy-context-DICqtyyT.mjs";import{s as x}from"./shouldProceedtoEmbeddedWalletCreationFlow-DLpCU-0h.mjs";import{S as E}from"./ScreenLayout-CyK-vOMq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-DQp_5KKJ.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DDB15S8o.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-DpkEBdQv.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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const b=({contactMethod:c,authFlow:p,appName:m="Privy",whatsAppEnabled:u=!1,onBack:v,onCodeSubmit:f,onResend:h,errorMessage:y,success:g=!1,resendCountdown:x=0,onInvalidInput:b,onClearError:A})=>{let[w,T]=n(S);a((()=>{y||T(S)}),[y]);let k=async e=>{e.preventDefault();let r=e.currentTarget.value.replace(" ","");if(""===r)return;if(isNaN(Number(r)))return void b?.("Code should be numeric");A?.();let o=Number(e.currentTarget.name?.charAt(5)),t=[...r||[""]].slice(0,C-o),i=[...w.slice(0,o),...t,...w.slice(o+t.length)];T(i);let n=Math.min(Math.max(o+t.length,0),C-1);if(!isNaN(Number(e.currentTarget.value))){let e=document.querySelector(`input[name=code-${n}]`);e?.focus()}if(i.every((e=>e&&!isNaN(+e)))){let e=document.querySelector(`input[name=code-${n}]`);e?.blur(),await(f?.(i.join("")))}};/*#__PURE__*/return e(E,{title:"Enter confirmation code",subtitle:/*#__PURE__*/r("span","email"===p?{children:["Please check ",/*#__PURE__*/e(M,{children:c})," for an email from privy.io and enter your code below."]}:{children:["Please check ",/*#__PURE__*/e(M,{children:c})," for a",u?" WhatsApp":""," message from ",m," and enter your code below."]}),icon:"email"===p?t:i,onBack:v,showBack:!0,helpText:/*#__PURE__*/r(L,{children:[/*#__PURE__*/r("span",{children:["Didn't get ","email"===p?"an email":"a message","?"]}),x?/*#__PURE__*/r(R,{children:[/*#__PURE__*/e(o,{color:"var(--privy-color-foreground)",strokeWidth:1.33,height:"12px",width:"12px"}),/*#__PURE__*/e("span",{children:"Code sent"})]}):/*#__PURE__*/e(d,{as:"button",size:"sm",onClick:h,children:"Resend code"})]}),children:/*#__PURE__*/e(_,{children:/*#__PURE__*/e(l,{children:/*#__PURE__*/r(j,{children:[/*#__PURE__*/e("div",{children:w.map(((r,o)=>/*#__PURE__*/e("input",{name:`code-${o}`,type:"text",value:w[o],onChange:k,onKeyUp:e=>{"Backspace"===e.key&&(e=>{if(A?.(),T([...w.slice(0,e),"",...w.slice(e+1)]),e>0){let r=document.querySelector(`input[name=code-${e-1}]`);r?.focus()}})(o)},inputMode:"numeric",autoFocus:0===o,pattern:"[0-9]",className:`${g?"success":""} ${y?"fail":""}`,autoComplete:s?"one-time-code":"off"},o)))}),/*#__PURE__*/e(I,{$fail:!!y,$success:g,children:/*#__PURE__*/e("span",{children:"Invalid or expired verification code"===y?"Incorrect code":y||(g?"Success!":"")})})]})})})})};let C=6,S=Array(6).fill("");var A,w,T=((A=T||{})[A.RESET_AFTER_DELAY=0]="RESET_AFTER_DELAY",A[A.CLEAR_ON_NEXT_VALID_INPUT=1]="CLEAR_ON_NEXT_VALID_INPUT",A),k=((w=k||{})[w.EMAIL=0]="EMAIL",w[w.SMS=1]="SMS",w);const N={component:()=>{let{navigate:r,lastScreen:o,navigateBack:t,setModalData:i,onUserCloseViaDialogOrKeybindRef:s}=y(),c=p(),{closePrivyModal:l,resendEmailCode:d,resendSmsCode:E,getAuthMeta:C,loginWithCode:S,updateWallets:A,createAnalyticsEvent:w}=u(),{authenticated:T,logout:k,user:N}=g(),{whatsAppEnabled:_}=p(),[j,I]=n(!1),[L,R]=n(null),[M,D]=n(null),[O,P]=n(0);s.current=()=>null;let U=C()?.email?0:1,W=0===U?C()?.email||"":C()?.phoneNumber||"",F=m-500;a((()=>{if(O){let e=setTimeout((()=>{P(O-1)}),1e3);return()=>clearTimeout(e)}}),[O]),a((()=>{if(T&&j&&N){if(c?.legal.requireUsersAcceptTerms&&!N.hasAcceptedTerms){let e=setTimeout((()=>{r("AffirmativeConsentScreen")}),F);return()=>clearTimeout(e)}if(x(N,c.embeddedWallets)){let e=setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),w({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"AwaitingPasswordlessCodeScreen"}}),k()},callAuthOnSuccessOnClose:!0}}),r("EmbeddedWalletOnAccountCreateScreen")}),F);return()=>clearTimeout(e)}{A();let e=setTimeout((()=>l({shouldCallAuthOnSuccess:!0,isSuccess:!0})),m);return()=>clearTimeout(e)}}}),[T,j,N]),a((()=>{if(L&&0===M){let e=setTimeout((()=>{R(null),D(null);let e=document.querySelector("input[name=code-0]");e?.focus()}),1400);return()=>clearTimeout(e)}}),[L,M]);/*#__PURE__*/return e(b,{contactMethod:W,authFlow:0===U?"email":"sms",appName:c?.name,whatsAppEnabled:_,onBack:()=>t(),onCodeSubmit:async e=>{try{await S(e),I(!0)}catch(e){if(e instanceof v&&e.privyErrorCode===f.INVALID_CREDENTIALS)R("Invalid or expired verification code"),D(0);else if(e instanceof v&&e.privyErrorCode===f.CANNOT_LINK_MORE_OF_TYPE)R(e.message);else{if(e instanceof v&&e.privyErrorCode===f.USER_LIMIT_REACHED)return console.error(new h(e).toString()),void r("UserLimitReachedScreen");if(e instanceof v&&e.privyErrorCode===f.USER_DOES_NOT_EXIST)return void r("AccountNotFoundScreen");if(e instanceof v&&e.privyErrorCode===f.LINKED_TO_ANOTHER_USER)return i({errorModalData:{error:e,previousScreen:o??"AwaitingPasswordlessCodeScreen"}}),void r("ErrorScreen",!1);if(e instanceof v&&e.privyErrorCode===f.DISALLOWED_PLUS_EMAIL)return i({inlineError:{error:e}}),void r("ConnectOrCreateScreen",!1);if(e instanceof v&&e.privyErrorCode===f.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return i({accountTransfer:{nonce:e.data?.data?.nonce,account:W,displayName:e.data?.data?.account?.displayName,linkMethod:0===U?"email":"sms",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void r("LinkConflictScreen");R("Issue verifying code"),D(0)}}},onResend:async()=>{P(30),0===U?await d():await E()},errorMessage:L||void 0,success:j,resendCountdown:O,onInvalidInput:e=>{R(e),D(1)},onClearError:()=>{1===M&&(R(null),D(null))}})}};let _=c.div`
2
+ display: flex;
3
+ flex-direction: column;
4
+ align-items: center;
5
+ justify-content: center;
6
+ margin: auto;
7
+ gap: 16px;
8
+ flex-grow: 1;
9
+ width: 100%;
10
+ `,j=c.div`
11
+ display: flex;
12
+ flex-direction: column;
13
+ width: 100%;
14
+ gap: 12px;
15
+
16
+ > div:first-child {
17
+ display: flex;
18
+ justify-content: center;
19
+ gap: 0.5rem;
20
+ width: 100%;
21
+ border-radius: var(--privy-border-radius-sm);
22
+
23
+ > input {
24
+ border: 1px solid var(--privy-color-foreground-4);
25
+ background: var(--privy-color-background);
26
+ border-radius: var(--privy-border-radius-sm);
27
+ padding: 8px 10px;
28
+ height: 48px;
29
+ width: 40px;
30
+ text-align: center;
31
+ font-size: 18px;
32
+ font-weight: 600;
33
+ color: var(--privy-color-foreground);
34
+ transition: all 0.2s ease;
35
+ }
36
+
37
+ > input:focus {
38
+ border: 1px solid var(--privy-color-foreground);
39
+ box-shadow: 0 0 0 1px var(--privy-color-foreground);
40
+ }
41
+
42
+ > input:invalid {
43
+ border: 1px solid var(--privy-color-error);
44
+ }
45
+
46
+ > input.success {
47
+ border: 1px solid var(--privy-color-border-success);
48
+ background: var(--privy-color-success-bg);
49
+ }
50
+
51
+ > input.fail {
52
+ border: 1px solid var(--privy-color-border-error);
53
+ background: var(--privy-color-error-bg);
54
+ animation: shake 180ms;
55
+ animation-iteration-count: 2;
56
+ }
57
+ }
58
+
59
+ @keyframes shake {
60
+ 0% {
61
+ transform: translate(1px, 0px);
62
+ }
63
+ 33% {
64
+ transform: translate(-1px, 0px);
65
+ }
66
+ 67% {
67
+ transform: translate(-1px, 0px);
68
+ }
69
+ 100% {
70
+ transform: translate(1px, 0px);
71
+ }
72
+ }
73
+ `,I=c.div`
74
+ line-height: 20px;
75
+ min-height: 20px;
76
+ font-size: 14px;
77
+ font-weight: 400;
78
+ color: ${e=>e.$success?"var(--privy-color-success-dark)":e.$fail?"var(--privy-color-error-dark)":"transparent"};
79
+ display: flex;
80
+ justify-content: center;
81
+ width: 100%;
82
+ text-align: center;
83
+ `,L=c.div`
84
+ display: flex;
85
+ gap: 8px;
86
+ align-items: center;
87
+ justify-content: center;
88
+ width: 100%;
89
+ color: var(--privy-color-foreground-2);
90
+ `,R=c.div`
91
+ display: flex;
92
+ align-items: center;
93
+ justify-content: center;
94
+ border-radius: var(--privy-border-radius-sm);
95
+ padding: 2px 8px;
96
+ gap: 4px;
97
+ background: var(--privy-color-background-2);
98
+ color: var(--privy-color-foreground-2);
99
+ `,M=c.span`
100
+ font-weight: 500;
101
+ word-break: break-all;
102
+ color: var(--privy-color-foreground);
103
+ `;export{N as AwaitingPasswordlessCodeScreen,b as AwaitingPasswordlessCodeScreenView,N as default};
@@ -0,0 +1,2 @@
1
+ import{jsxs as e,jsx as t,Fragment as r}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useRef as o,useState as a,useMemo as i,useEffect as s}from"react";import{parseEther as c}from"viem";import{ConnectedStandardSolanaWallet as l}from"@privy-io/js-sdk-core";import{b as d,c as m,R as u}from"./Layouts-BlFm53ED.mjs";import{B as p}from"./ModalHeader-DpkEBdQv.mjs";import{C as f}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as h}from"./FundWalletMethodHeader-D38FBVVM.mjs";import{N as g}from"./index-Dq_xe9dz.mjs";import{u as v,t as w}from"./context-Bj4czVEP.mjs";import{u as I,a as y,b as C}from"./internal-context-Z-fyxadS.mjs";import{z as T}from"./useActiveWallet-DMrO7evY.mjs";import{a as S}from"./privy-context-DICqtyyT.mjs";import{O as j}from"./analytics-mkkvFRju.mjs";import{g as A,t as b,d as N,a as F,b as U,u as x}from"./reservoir-0wfhnc0j.mjs";import{u as E}from"./PrivyPluginContext-2QN2dVUw.mjs";import{S as k}from"./usePrivy-DDB15S8o.mjs";import{H as W,I as R}from"./use-export-wallet-DVyBljMT.mjs";import{T as L}from"./TransferOrBridgeLoadingScreen-koaJdk-2.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./useWallets-CS_W9ciB.mjs";import"@privy-io/are-addresses-equal";import"eventemitter3";import"./InjectedWalletIcon-DLcYOGDj.mjs";import"@heroicons/react/24/outline/WalletIcon";import"./Row-C9vrS4Zi.mjs";import"./Value-tcJV9e0L.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./Address-B99EaiMb.mjs";import"lucide-react";import"./NetworkIcon-B48ilzF8.mjs";import"@heroicons/react/24/outline/GlobeAltIcon";const P={component:function(){let P=v(),{closePrivyModal:B,createAnalyticsEvent:D,connectors:H}=I(),{navigate:$,setModalData:M,data:q}=S(),O=v(),_=o(!1),z=E(),[G,Q]=a(!1),[V,X]=a(!1),[Y,J]=a(null),[K,Z]=a(),[ee,te]=a();if(!q?.funding||"ethereum"!==q.funding.chainType)throw Error("Invalid funding data");let{amount:re,connectedWallet:ne,chain:oe,solanaChain:ae,isUSDC:ie}=q.funding,se=q.funding.address,ce=q.funding.erc20Address,le=q.funding.isUSDC?"USDC":oe.nativeCurrency.symbol,de=i((()=>"solana"===ne?.type?ne.provider:function({connectors:e,connectedWalletAddress:t}){let r=e.find((e=>"solana"===e.chainType&&e.wallets.some((e=>e.address===t)))),n=r?.wallet.accounts.find((e=>e.address===t));if(!r||!n)throw new y("Unable to find source wallet connector");return new l({wallet:r.wallet,account:n})}({connectors:H,connectedWalletAddress:ne?.address||""})),[ne,H]),me=i((()=>{let e=z(k);if(!e)throw new y("Unable to load solana plugin");let t=P.solanaRpcs["solana:mainnet"];if(!t)throw new y("Unable to load mainnet RPC");return e.getSolanaRpcClient({rpc:t.rpc,rpcSubscriptions:t.rpcSubscriptions,chain:"solana:mainnet",blockExplorerUrl:t.blockExplorerUrl??"https://explorer.solana.com"})}),[]),ue=T(W(de?.standardWallet.name||"unknown")),pe=ue?.name||"wallet";return s((()=>{(async function(){if(!de||!oe||_.current)return;let e=z(k);if(!e)return void J(new y("Unable to solana plugin"));_.current=!0,oe?.testnet&&console.warn("Solana testnets are not supported for bridging");let t=ie?1e6*parseFloat(re):c(re),r=await A({isTestnet:!!oe.testnet,input:b({appId:O.id,amount:t.toString(),user:de.address,recipient:se,destinationChainId:oe.id,originChainId:U,originCurrency:ie?N:F,destinationCurrency:ie?ce:void 0})}).catch(console.error);if(!r)return void J(new y(`Unable to fetch quotes for bridging. Wallet ${R(de.address)} does not have enough funds.`,void 0,C.INSUFFICIENT_BALANCE));let n=await e.createTransactionFromRelayQuote({quote:r,source:de.address,solanaClient:me});if(n)try{Q(!0);let t=await e.simulateTransaction({solanaClient:me,tx:n});if(t.hasError)return t.hasFunds?(console.error("Transaction failed:",t.error),void J(new y("Something went wrong",void 0,C.TRANSACTION_FAILURE))):void J(new y(`Wallet ${R(de?.address)} does not have enough funds. ${r.details.currencyIn.amountFormatted} ${le} are needed to complete the transaction.`,void 0,C.INSUFFICIENT_BALANCE));let{signature:o}=await de.signAndSendTransaction({chain:"solana:mainnet",transaction:n}),a=e.getAddressFromBuffer(o);Z(a),te("pending")}catch(e){if(console.error(e),/user rejected the request/gi.test(e.message||""))return void J(new y("Transaction was rejected by the user",void 0,C.TRANSACTION_FAILURE));J(new y("Something went wrong",void 0,C.TRANSACTION_FAILURE))}else J(new y(`Unable to select bridge option from quotes. Wallet ${R(de.address)} does not have enough funds.`,void 0,C.INSUFFICIENT_BALANCE))})().catch(console.error)}),[]),x({transactionHash:K,isTestnet:!1,bridgingStatus:ee,setBridgingStatus:te,onSuccess({transactionHash:e}){Q(!1),X(!0),D({eventName:j,payload:{provider:"external",status:"success",txHash:e,address:de.address,chainType:"solana",clusterName:ae,token:"SOL",destinationAddress:se,destinationChainId:oe.id,destinationChainType:"ethereum",destinationValue:re,destinationToken:ie?"USDC":"ETH"}})},onFailure({error:e}){Q(!1),J(e)}}),s((()=>{if(!V)return;let e=setTimeout(B,w);return()=>clearTimeout(e)}),[V]),s((()=>{Y&&(M({funding:q?.funding,solanaFundingData:q?.solanaFundingData,sendTransaction:q?.sendTransaction,errorModalData:{error:Y,previousScreen:"TransferFromWalletScreen"}}),$("ErrorScreen",!1))}),[Y]),V?/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(d,{}),/*#__PURE__*/e(m,{children:[/*#__PURE__*/t(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/t(f,{title:"Success!",description:`You’ve successfully added ${re} ${le} to your ${O.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/t(u,{}),/*#__PURE__*/t(p,{})]}):G&&de?/*#__PURE__*/t(L,{walletClientType:W(de?.standardWallet.name||"unknown"),displayName:pe,addressToFund:se,isBridging:G,isErc20Flow:!1,chainId:oe.id,chainName:oe.name,totalPriceInUsd:void 0,totalPriceInNativeCurrency:void 0,gasPriceInUsd:void 0,gasPriceInNativeCurrency:void 0}):
2
+ /*#__PURE__*/e(r,{children:[/*#__PURE__*/t(h,{}),/*#__PURE__*/t(g,{}),/*#__PURE__*/t("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/t(p,{})]})}};export{P as AwaitingSolToEvmBridgingScreen,P as default};
@@ -1,17 +1,17 @@
1
- import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,formatWalletAddress as o}from"@privy-io/js-sdk-core";import{b as i}from"./useWallets-2_uCkhA8.mjs";import{g as n}from"./getErc20Balance-sCX8nL1s.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as l}from"react";import{c as m,B as d}from"./ModalHeader-DfHxv9fE.mjs";import{b as h,R as p}from"./Layouts-BlFm53ED.mjs";import{t as u}from"./FundWalletMethodHeader-CdXWChwL.mjs";import{R as f}from"./Row-C9vrS4Zi.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{V as b,L as y}from"./Value-tcJV9e0L.mjs";import{S as v}from"./Subtitle-CV-2yKE4.mjs";import{T as j}from"./Title-BnzYV3Is.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as x}from"styled-components";import{g as C}from"./getChainName-DjpPdUSc.mjs";import{C as k}from"./Chip-D2-wZOHJ.mjs";import{N}from"./NetworkIcon-B48ilzF8.mjs";import{B as T,a as B}from"./shared-FM0rljBt.mjs";import{Menu as $,MenuButton as I,MenuItems as S,MenuItem as A}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as M}from"./ethers-5oa3ZKLD.mjs";import{F as P,a as W,b as L,c as R,d as z}from"./styles-D5Jf27-u.mjs";const H=({chains:o,appId:t,address:s,rpcConfig:c,includeUsdc:l})=>Promise.all(o.map((async o=>{let m=e({chain:o,transport:r(i(o,c,t))}),d=await m.getBalance({address:s}).catch((()=>0n)),h=null,p=a[o.id];if(l&&p){let{balance:e}=await n({address:s,chain:o,rpcConfig:c,appId:t,erc20Address:p});h=e}return{balance:d,erc20Balance:h,erc20Address:p,chain:o}}))),Q=({balance:e,className:r,chain:a})=>/*#__PURE__*/t(T,{className:r,$state:void 0,children:/*#__PURE__*/t(U,{balance:e,chain:a})}),U=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(V,{children:[/*#__PURE__*/t(O,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:C(r)})]}),/*#__PURE__*/s(k,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(D,{children:/*#__PURE__*/t(w,{})}),e]})]});let V=x.div`
1
+ import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,formatWalletAddress as o}from"@privy-io/js-sdk-core";import{b as i}from"./useWallets-CS_W9ciB.mjs";import{g as n}from"./getErc20Balance-NThD2gHO.mjs";import{jsx as t,jsxs as s,Fragment as c}from"react/jsx-runtime";import{useRef as m}from"react";import{c as l,B as d}from"./ModalHeader-DpkEBdQv.mjs";import{b as h,R as p}from"./Layouts-BlFm53ED.mjs";import{t as u}from"./FundWalletMethodHeader-D38FBVVM.mjs";import{R as f}from"./Row-C9vrS4Zi.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{V as b,L as y}from"./Value-tcJV9e0L.mjs";import{S as v}from"./Subtitle-CV-2yKE4.mjs";import{T as j}from"./Title-BnzYV3Is.mjs";import w from"@heroicons/react/24/outline/WalletIcon";import{styled as x}from"styled-components";import{g as C}from"./getChainName-DjpPdUSc.mjs";import{C as k}from"./Chip-D2-wZOHJ.mjs";import{N}from"./NetworkIcon-B48ilzF8.mjs";import{B as T,a as B}from"./shared-FM0rljBt.mjs";import{Menu as $,MenuButton as A,MenuItems as I,MenuItem as S}from"@headlessui/react";import E from"@heroicons/react/24/outline/ChevronDownIcon";import{f as F}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as M}from"./ethers-BozrzoVi.mjs";import{F as P,a as W,b as L,c as R,d as U}from"./styles-pSKfqjN3.mjs";const H=({chains:o,appId:t,address:s,rpcConfig:c,includeUsdc:m})=>Promise.all(o.map((async o=>{let l=e({chain:o,transport:r(i(o,c,t))}),d=await l.getBalance({address:s}).catch((()=>0n)),h=null,p=a[o.id];if(m&&p){let{balance:e}=await n({address:s,chain:o,rpcConfig:c,appId:t,erc20Address:p});h=e}return{balance:d,erc20Balance:h,erc20Address:p,chain:o}}))),Q=({balance:e,className:r,chain:a})=>/*#__PURE__*/t(T,{className:r,$state:void 0,children:/*#__PURE__*/t(V,{balance:e,chain:a})}),V=({balance:e,chain:r})=>/*#__PURE__*/s(c,{children:[/*#__PURE__*/s(q,{children:[/*#__PURE__*/t(D,{chainId:"object"==typeof r?r.id:"solana"}),/*#__PURE__*/t(b,{children:"object"==typeof r?r.name:C(r)})]}),/*#__PURE__*/s(k,{isLoading:!1,isPulsing:!1,color:"gray",children:[/*#__PURE__*/t(z,{children:/*#__PURE__*/t(w,{})}),e]})]});let q=x.div`
2
2
  display: flex;
3
3
  align-items: center;
4
- `,D=x.div`
4
+ `,z=x.div`
5
5
  height: 0.75rem;
6
6
  width: 0.75rem;
7
7
  margin-right: 0.2rem;
8
- `,O=x(N)`
8
+ `,D=x(N)`
9
9
  height: 1.25rem;
10
10
  width: 1.25rem;
11
11
  display: inline-block;
12
12
  margin-right: 0.5rem;
13
13
  border-radius: 4px;
14
- `;const Y=({options:e,onSelect:r,selected:a,className:o})=>/*#__PURE__*/s($,{as:q,children:[/*#__PURE__*/s(I,{as:X,children:[/*#__PURE__*/t(U,{balance:a.balance,chain:a.chain}),/*#__PURE__*/t(K,{height:16})]}),/*#__PURE__*/t(S,{as:G,className:o,children:e.map(((e,a)=>/*#__PURE__*/t(A,{as:J,onClick:()=>r(a),children:/*#__PURE__*/t(U,{balance:e.balance,chain:e.chain})},a)))})]});let q=x.div`
14
+ `;const O=({options:e,onSelect:r,selected:a,className:o})=>/*#__PURE__*/s($,{as:Y,children:[/*#__PURE__*/s(A,{as:X,children:[/*#__PURE__*/t(V,{balance:a.balance,chain:a.chain}),/*#__PURE__*/t(K,{height:16})]}),/*#__PURE__*/t(I,{as:G,className:o,children:e.map(((e,a)=>/*#__PURE__*/t(S,{as:J,onClick:()=>r(a),children:/*#__PURE__*/t(V,{balance:e.balance,chain:e.chain})},a)))})]});let Y=x.div`
15
15
  width: 100%;
16
16
  position: relative;
17
17
  `,G=x.div`
@@ -66,4 +66,4 @@ import{createPublicClient as e,http as r}from"viem";import{UsdcAddressMap as a,f
66
66
  rotate: -180deg;
67
67
  }
68
68
  }
69
- `;const Z=({displayName:e,errorMessage:r,configuredFundingChain:a,formattedBalance:i,fundingAmount:n,fundingCurrency:b,fundingAmountInUsd:w,options:x,selectedOption:k,isPreparing:N,isSubmitting:T,addressToFund:B,fundingWalletAddress:$,onSubmit:I,onSelect:S,onAmountChange:A,erc20ContractInfo:E})=>{let H=l(null);/*#__PURE__*/return s(c,{children:[/*#__PURE__*/t(u,{}),/*#__PURE__*/t(h,{}),/*#__PURE__*/t(j,{children:"Transfer from another network"}),/*#__PURE__*/s(v,{children:["You need more funds on the"," ","object"==typeof a?a.name:C(a)," ","network. Bridge from another blockchain network."]}),/*#__PURE__*/s(P,{style:{marginTop:"2rem"},children:[/*#__PURE__*/s(W,{onClick:()=>H.current?.focus(),children:[/*#__PURE__*/t(L,{ref:H,value:n,onChange:e=>{let r=e.target.value;if(/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1){let e=/\.$/.test(r)?".":"",a=Number(r.replace(/\.$/,"")||"0");if(Number.isNaN(a))return void A("0");A(a.toString()+e)}}}),/*#__PURE__*/t(R,{children:b})]}),w&&/*#__PURE__*/t(z,{children:w})]}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"From"}),/*#__PURE__*/t(y,{children:o($)})]}),/*#__PURE__*/t(Y,{selected:{chain:k.chain,balance:k.isErc20Quote?F({amount:k.erc20Balance??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(k.balance,k.chain.nativeCurrency.symbol,3,!0)},options:x.map((({chain:e,balance:r,isErc20Quote:a,erc20Balance:o})=>({chain:e,balance:a?F({amount:o??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(r,e.nativeCurrency.symbol,3,!0)}))),onSelect:S}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"To"}),/*#__PURE__*/t(y,{children:o(B)})]}),/*#__PURE__*/t(Q,{chain:a,balance:i}),/*#__PURE__*/t(g,{style:{marginTop:"1rem"},children:r}),/*#__PURE__*/s(m,{style:{marginTop:"1rem"},loading:T||N,disabled:N||T,onClick:I,children:["Confirm with ",e]}),/*#__PURE__*/t(p,{}),/*#__PURE__*/t(d,{})]})};export{Z as B,H as g};
69
+ `;const Z=({displayName:e,errorMessage:r,configuredFundingChain:a,formattedBalance:i,fundingAmount:n,fundingCurrency:b,fundingAmountInUsd:w,options:x,selectedOption:k,isPreparing:N,isSubmitting:T,addressToFund:B,fundingWalletAddress:$,onSubmit:A,onSelect:I,onAmountChange:S,erc20ContractInfo:E})=>{let H=m(null);/*#__PURE__*/return s(c,{children:[/*#__PURE__*/t(u,{}),/*#__PURE__*/t(h,{}),/*#__PURE__*/t(j,{children:"Transfer from another network"}),/*#__PURE__*/s(v,{children:["You need more funds on the"," ","object"==typeof a?a.name:C(a)," ","network. Bridge from another blockchain network."]}),/*#__PURE__*/s(P,{style:{marginTop:"2rem"},children:[/*#__PURE__*/s(W,{onClick:()=>H.current?.focus(),children:[/*#__PURE__*/t(L,{ref:H,value:n,onChange:e=>{let r=e.target.value;if(/^[0-9.]*$/.test(r)&&r.split(".").length-1<=1){let e=/\.$/.test(r)?".":"",a=Number(r.replace(/\.$/,"")||"0");if(Number.isNaN(a))return void S("0");S(a.toString()+e)}}}),/*#__PURE__*/t(R,{children:b})]}),w&&/*#__PURE__*/t(U,{children:w})]}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"From"}),/*#__PURE__*/t(y,{children:o($)})]}),/*#__PURE__*/t(O,{selected:{chain:k.chain,balance:k.isErc20Quote?F({amount:k.erc20Balance??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(k.balance,k.chain.nativeCurrency.symbol,3,!0)},options:x.map((({chain:e,balance:r,isErc20Quote:a,erc20Balance:o})=>({chain:e,balance:a?F({amount:o??0n,decimals:E?.decimals??6})+` ${E?.symbol||""}`:M(r,e.nativeCurrency.symbol,3,!0)}))),onSelect:I}),/*#__PURE__*/s(f,{style:{marginTop:"1.5rem"},children:[/*#__PURE__*/t(y,{children:"To"}),/*#__PURE__*/t(y,{children:o(B)})]}),/*#__PURE__*/t(Q,{chain:a,balance:i}),/*#__PURE__*/t(g,{style:{marginTop:"1rem"},children:r}),/*#__PURE__*/s(l,{style:{marginTop:"1rem"},loading:T||N,disabled:N||T,onClick:A,children:["Confirm with ",e]}),/*#__PURE__*/t(p,{}),/*#__PURE__*/t(d,{})]})};export{Z as B,H as g};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t,XCircle as r}from"lucide-react";import{useMemo as i,useRef as o,useState as s,useEffect as a}from"react";import{a as n,C as c}from"./index-DQp_5KKJ.mjs";import{a as m}from"./privy-context-DICqtyyT.mjs";import{S as u}from"./ScreenLayout-CyK-vOMq.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"./context-Bj4czVEP.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-DVyBljMT.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./useWallets-CS_W9ciB.mjs";import"viem";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DDB15S8o.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-DpkEBdQv.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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const p=({status:o,title:s,description:a,userIntentRequired:n,retriesRemaining:c,hasSelectedCta:m,onContinue:p,onRetry:l})=>{let d=i((()=>{switch(o){case"loading":default:return;case"success":return n?{label:m?"Continuing...":"Continue",onClick:p,disabled:m,loading:m}:void 0;case"error":return c>0?{label:"Retry",onClick:l}:void 0}}),[o,m,p,l]),y=i((()=>({loading:"loading",ready:"subtle",disabled:"subtle",success:"success",error:"error"}[o]||"loading")),[o]);/*#__PURE__*/return e(u,{icon:"loading"===o||"ready"===o?void 0:"success"===o?t:r,iconVariant:y,title:s,subtitle:a,primaryCta:d,watermark:!0})},l={component:()=>{let{lastScreen:t,data:r,navigate:i,setModalData:u}=m(),{status:l,token:d,waitForResult:y,reset:g,execute:v}=n(),h=o([]),j=e=>{h.current=[e,...h.current]},[f,C]=s(!0);a((()=>(j(setTimeout(C,1e3,!1)),()=>{h.current.forEach((e=>clearTimeout(e))),h.current=[]})),[]);let[b,k]=s(""),[w,R]=s("Checking that you are a human..."),[S,x]=s(!1),[I,T]=s(3),q=r?.captchaModalData,A=async e=>{try{await(q?.callback(e)),q?.onSuccessNavigateTo&&i(q?.onSuccessNavigateTo,!1)}catch(e){if(e instanceof c)return;u({errorModalData:{error:e,previousScreen:t||"LandingScreen"}}),i(q?.onErrorNavigateTo||"ErrorScreen",!1)}};a((()=>{"success"===l?j(setTimeout((async()=>{let e=await y();!e||q?.userIntentRequired||A(e)}),1e3)):"ready"===l&&j(setTimeout((()=>{"ready"===l&&v()}),500))}),[l]),a((()=>{if(!f)switch(l){case"success":k("Success!"),R("CAPTCHA passed successfully."),q?.userIntentRequired||setTimeout((()=>{x(!0),A(d)}),2e3);break;case"loading":k(""),R("Checking that you are a human...");break;case"error":k("Something went wrong"),R(I<=0?"If you use an adblocker or VPN, try disabling and re-attempting.":"You did not pass CAPTCHA. Please try again.")}}),[l,f,S]);/*#__PURE__*/return e(p,{status:l,title:b,description:w,userIntentRequired:q?.userIntentRequired,retriesRemaining:I,hasSelectedCta:S,onContinue:()=>{x(!0),A(d)},onRetry:async()=>{if(I<=0)return;T((e=>e-1)),g(),v();let e=await y();!e||q?.userIntentRequired||A(e)}})}};export{l as CaptchaScreen,p as CaptchaScreenView,l as default};
@@ -0,0 +1,16 @@
1
+ import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import i from"@heroicons/react/24/solid/CheckCircleIcon";import{useState as n,useRef as a,useEffect as s,useMemo as c}from"react";import{styled as m}from"styled-components";import{M as l,B as d,P as p}from"./ModalHeader-DpkEBdQv.mjs";import{a as u}from"./Layouts-BlFm53ED.mjs";import{L as g,O as f}from"./useActiveWallet-DMrO7evY.mjs";import{u as h}from"./internal-context-Z-fyxadS.mjs";import{a as v}from"./privy-context-DICqtyyT.mjs";import{O as y}from"./analytics-mkkvFRju.mjs";import{I as b}from"./index-DQp_5KKJ.mjs";import"./context-Bj4czVEP.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"zustand";import"react-device-detect";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DDB15S8o.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";const w={component:()=>{let{data:o,setModalData:i,navigate:c,navigateBack:m}=v(),{closePrivyModal:p,createAnalyticsEvent:u,client:g}=h(),[f,b]=n("pending-in-flow"),w=a(0),C={...o?.funding,showAlternateFundingMethod:!0};C.usingDefaultFundingMethod&&(C.usingDefaultFundingMethod=!1);let{partnerUserId:k,popup:x}=o?.coinbaseOnrampStatus??{};return s((()=>{if("pending-in-flow"===f||"pending-after-flow"===f){let e=setInterval((async()=>{if(k)try{let{status:e}=await g.getCoinbaseOnRampStatus({partnerUserId:k});if("success"===e)return void b("success");if("failure"===e)throw Error("There was an error completing Coinbase Onramp flow.");if(w.current>=3)return i({funding:C,solanaFundingData:o?.solanaFundingData}),void c("FundingMethodSelectionScreen");x?.closed&&(w.current=w.current+1,b("pending-after-flow"))}catch(e){console.error(e),b("error"),u({eventName:y,payload:{status:"failure",provider:"coinbase-onramp",error:e.message}}),i({funding:{...C,errorMessage:"Something went wrong adding funds. Please try again or use another method."},solanaFundingData:o?.solanaFundingData}),c("FundingMethodSelectionScreen")}}),1500);return()=>clearInterval(e)}}),[k,x,f]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/t(l,{title:"Fund account",backFn:()=>{i({funding:C,solanaFundingData:o?.solanaFundingData}),m()}},"header"),/*#__PURE__*/t(j,{status:f,onClickCta:p}),/*#__PURE__*/t(d,{})]})}};let j=({status:o,onClickCta:i})=>{let{title:n,body:a,cta:s}=c((()=>(e=>{switch(e){case"success":return{title:"You've funded your account!",body:"It may take a few minutes for the assets to appear.",cta:"Continue"};case"pending-after-flow":return{title:"In Progress",body:"Almost done. Retrieving transaction status from Coinbase",cta:""};case"error":case"pending-in-flow":return{title:"In Progress",body:"Go back to Coinbase Onramp to finish funding your account.",cta:""}}})(o)),[o]);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(x,{children:[/*#__PURE__*/t(C,{isSucccess:"success"===o}),/*#__PURE__*/e(u,{children:[/*#__PURE__*/t("h3",{children:n}),/*#__PURE__*/t(k,{children:a})]})]}),s&&/*#__PURE__*/t(p,{onClick:i,children:s})]})},C=({isSucccess:r})=>{if(!r){let r="var(--privy-color-foreground-4)";/*#__PURE__*/return e("div",{style:{position:"relative"},children:[/*#__PURE__*/t(g,{color:r,style:{position:"absolute"}}),/*#__PURE__*/t(f,{color:r}),/*#__PURE__*/t(b,{style:{position:"absolute",width:"2.8rem",height:"2.8rem",top:"1.2rem",left:"1.2rem"}})]})}let n=r?i:()=>/*#__PURE__*/t(o,{width:"3rem",height:"3rem",style:{backgroundColor:"var(--privy-color-foreground-4)",color:"var(--privy-color-background)",borderRadius:"100%",padding:"0.5rem",margin:"0.5rem"}}),a=r?"var(--privy-color-success)":"var(--privy-color-foreground-4)";/*#__PURE__*/return t("div",{style:{borderColor:a,display:"flex",justifyContent:"center",alignItems:"center",borderRadius:"100%",borderWidth:2,padding:"0.5rem",marginBottom:"0.5rem"},children:n&&/*#__PURE__*/t(n,{width:"4rem",height:"4rem",color:a})})},k=m.p`
2
+ font-size: 1rem;
3
+ color: var(--privy-color-foreground-3);
4
+ margin-bottom: 1rem;
5
+ display: flex;
6
+ flex-direction: column;
7
+ gap: 1rem;
8
+ `,x=m.div`
9
+ display: flex;
10
+ flex-direction: column;
11
+ align-items: center;
12
+ justify-content: center;
13
+ margin-left: 1.75rem;
14
+ margin-right: 1.75rem;
15
+ padding: 2rem 0;
16
+ `;export{w as CoinbaseOnrampStatusScreen,w as default};
@@ -0,0 +1,3 @@
1
+ import{jsxs as e,Fragment as r,jsx as a}from"react/jsx-runtime";import{Mail as i}from"lucide-react";import{forwardRef as t,useState as o,useEffect as n}from"react";import{styled as l}from"styled-components";import{u as s}from"./context-Bj4czVEP.mjs";import{u as m,c,b as d}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./index-DQp_5KKJ.mjs";import{u,a as h}from"./privy-context-DICqtyyT.mjs";import{r as g,C as f}from"./useActiveWallet-DMrO7evY.mjs";import{B as y}from"./use-export-wallet-DVyBljMT.mjs";import{E,P as S}from"./ModalHeader-DpkEBdQv.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";import{I as b,a as j}from"./EmailInputForm-Dgoii4vf.mjs";import{E as k}from"./ErrorMessage-D8VaAP5m.mjs";const C=/*#__PURE__*/t(((t,l)=>{let[f,b]=o(t.defaultValue||""),[j,C]=o(""),[T,A]=o(!1),{authenticated:D}=u(),{initLoginWithEmail:L}=m(),{navigate:M,setModalData:I,currentScreen:U,data:N}=h(),{enabled:W,token:F}=p(),[R,_]=o(!1),{accountType:q}=g(),B=s();n((()=>{!f&&B.disablePlusEmails&&N?.inlineError?.error instanceof c&&N?.inlineError?.error.privyErrorCode===d.DISALLOWED_PLUS_EMAIL&&!j&&C("Please enter a valid email address without a '+'."),j&&C("")}),[f]);let H=y(f),K=T||!H,O=()=>{var e;I({login:N?.login,inlineError:void 0}),!W||F||D?(e=F,A(!0),L({email:f,captchaToken:e,disableSignup:N?.login?.disableSignup,withPrivyUi:!0}).then((()=>{M("AwaitingPasswordlessCodeScreen")})).catch((e=>{I({errorModalData:{error:e,previousScreen:U||"LandingScreen"}}),M("ErrorScreen")})).finally((()=>{A(!1)}))):(I({captchaModalData:{callback:e=>L({email:f,captchaToken:e,withPrivyUi:!0}),userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),M("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(x,{children:[j&&/*#__PURE__*/a(k,{style:{display:"block",marginTop:"0.25rem",textAlign:"left"},children:j}),/*#__PURE__*/e(w,{stacked:t.stacked,$error:!!j,children:[/*#__PURE__*/a(P,{children:/*#__PURE__*/a(i,{})}),/*#__PURE__*/a("input",{ref:l,id:"email-input",className:"login-method-button",type:"email",placeholder:"your@email.com",onFocus:()=>_(!0),onChange:e=>b(e.target.value),onKeyUp:e=>{"Enter"===e.key&&O()},value:f,autoComplete:"email"}),"email"!==q||R?t.stacked?/*#__PURE__*/a("span",{}):/*#__PURE__*/a(E,{isSubmitting:T,onClick:O,disabled:K,children:"Submit"}):/*#__PURE__*/a(v,{color:"gray",children:"Recent"})]})]}),t.stacked?/*#__PURE__*/a(S,{loadingText:null,loading:T,disabled:K,onClick:O,style:{width:"100%"},children:"Submit"}):null]})}));let x=b,w=j,P=l(f)`
2
+ display: inline-flex;
3
+ `;export{C};
@@ -0,0 +1,9 @@
1
+ import{jsx as t,jsxs as e}from"react/jsx-runtime";import{ArrowRightLeft as i}from"lucide-react";import{styled as o}from"styled-components";import{a as r}from"./privy-context-DICqtyyT.mjs";import{S as n}from"./ScreenLayout-CyK-vOMq.mjs";import{H as m}from"./index-DQp_5KKJ.mjs";import"@privy-io/are-addresses-equal";import"react";import"./context-Bj4czVEP.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-DpkEBdQv.mjs";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"eventemitter3";import"viem/utils";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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DDB15S8o.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";const s=e=>/*#__PURE__*/t("svg",{id:"Layer_1",xmlns:"http://www.w3.org/2000/svg",viewBox:"-0.625 12.48 397.647 399.546",width:"2500",height:"674",preserveAspectRatio:"none",...e,children:/*#__PURE__*/t("g",{children:/*#__PURE__*/t("path",{fill:"#333745",d:"M 333.9 12.8 L 150.9 12.8 L 150.9 258.4 L 396.5 258.4 L 396.5 76.7 C 396.6 42.2 368.4 12.8 333.9 12.8 Z M 94.7 12.8 L 64 12.8 C 29.5 12.8 0 40.9 0 76.8 L 0 107.5 L 94.7 107.5 L 94.7 12.8 Z M 0 165 L 94.7 165 L 94.7 259.7 L 0 259.7 L 0 165 Z M 301.9 410.6 L 332.6 410.6 C 367.1 410.6 396.6 382.5 396.6 346.6 L 396.6 316 L 301.9 316 L 301.9 410.6 Z M 150.9 316 L 245.6 316 L 245.6 410.7 L 150.9 410.7 L 150.9 316 Z M 0 316 L 0 346.7 C 0 381.2 28.1 410.7 64 410.7 L 94.7 410.7 L 94.7 316 L 0 316 Z"})})}),p=({onContinueWithLedger:o,onContinueWithoutLedger:r,title:p="Phantom supports Ledger",subtitle:a="Are you using a Ledger hardware wallet?\nContinue to sign with Ledger"})=>/*#__PURE__*/t(n,{title:p,subtitle:/*#__PURE__*/t(d,{children:a}),primaryCta:{label:"Continue with Ledger",onClick:o},secondaryCta:{label:"Continue without Ledger",onClick:r},watermark:!0,children:/*#__PURE__*/e(l,{children:[/*#__PURE__*/t(m,{style:{width:"48px",height:"48px"}}),/*#__PURE__*/t(i,{strokeWidth:2,color:"var(--privy-color-icon-subtle)",width:22,height:22}),/*#__PURE__*/t(s,{style:{width:"48px",height:"48px"}})]})});function a(){let{data:e,setModalData:i,navigate:o}=r();/*#__PURE__*/return t(p,{onContinueWithLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!0}}),o("ConnectionStatusScreen")},onContinueWithoutLedger:function(){i({...e,login:{...e?.login,isSigningInWithLedgerSolana:!1}}),o("ConnectionStatusScreen")}})}const c={component:a};let l=o.div`
2
+ display: flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ gap: 8px;
6
+ margin-bottom: var(--screen-space);
7
+ `,d=o.span`
8
+ white-space: pre-wrap;
9
+ `;export{c as ConnectLedgerScreen,a as ConnectLedgerScreenComponent,p as ConnectLedgerScreenView,c as default};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useRef as t}from"react";import{u as o}from"./context-Bj4czVEP.mjs";import{u as r,c as n,b as a}from"./internal-context-Z-fyxadS.mjs";import{a as i}from"./events-context-CI0iqAXA.mjs";import{a as l}from"./privy-context-DICqtyyT.mjs";import{i as c}from"./ConnectWalletView-mm5nV3qj.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"react-device-detect";import"styled-components";import"./ModalHeader-DpkEBdQv.mjs";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"./use-export-wallet-DVyBljMT.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"eventemitter3";import"viem/utils";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./CopyableText-BCytXyJL.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-D-J14re9.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-BiiKgmqw.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const m={component:()=>{let{closePrivyModal:m}=r(),{data:s,navigate:p}=l(),d=o(),C=i(),u=s?.externalConnectWallet?.description,j=t(s?.externalConnectWallet?.walletList??d.appearance.walletList),E=t(s?.externalConnectWallet?.walletChainType??d.appearance.walletChainType);/*#__PURE__*/return e(c,{walletList:j.current,walletChainType:E.current,preSelectedWalletId:s?.externalConnectWallet?.preSelectedWalletId,hideHeader:s?.externalConnectWallet?.hideHeader,onBack:s?.funding?()=>p("FundingMethodSelectionScreen"):void 0,onClose:()=>{C("connectWallet","onError",a.GENERIC_CONNECT_WALLET_ERROR),m()},onConnect:({connector:e,wallet:t})=>{C("connectWallet","onSuccess",{wallet:t});let o=s?.externalConnectWallet?.onCompleteNavigateTo;o?p(o({address:t.address,walletClientType:e?.walletClientType,walletChainType:e?.chainType})):m()},onConnectError:e=>{e instanceof n?(console.warn(e.cause?e.cause:e.message),C("connectWallet","onError",e.privyErrorCode||a.GENERIC_CONNECT_WALLET_ERROR)):(console.warn(e),C("connectWallet","onError",a.UNKNOWN_CONNECT_WALLET_ERROR))},customDescription:u,app:d,connectOnly:!0})},isUnauthenticatedScreem:!0};export{m as ConnectOnlyLandingScreen,m as default};
@@ -0,0 +1 @@
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as o}from"react";import{isMobile as r}from"react-device-detect";import{C as i}from"./use-export-wallet-DVyBljMT.mjs";import{q as n}from"./context-Bj4czVEP.mjs";import{z as a}from"./useActiveWallet-DMrO7evY.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./privy-context-DICqtyyT.mjs";import{S as c}from"./ScreenLayout-CyK-vOMq.mjs";import{B as m}from"./index-DQp_5KKJ.mjs";import{getErrorDetails as p}from"./ConnectionStatusScreen-XXeNlflJ.mjs";import"./useWallets-CS_W9ciB.mjs";import"viem";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"tinycolor2";import"zustand";import"styled-components";import"./events-context-CI0iqAXA.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-DpkEBdQv.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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-DDB15S8o.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./Link-DJ5gq9Di.mjs";import"./useI18n-BiiKgmqw.mjs";import"./shouldProceedtoEmbeddedWalletCreationFlow-DLpCU-0h.mjs";const u=({walletLogo:t,success:o,errorMessage:r,title:n,subtitle:a,onRetry:s,onUseDifferentWallet:l,onBack:m,numRetries:p,maxRetries:u})=>/*#__PURE__*/e(c,{title:n,subtitle:a,icon:t,iconVariant:"loading",iconLoadingStatus:{success:o,fail:!!r},primaryCta:r===i.ERROR_USER_EXISTS?{label:"Use a different wallet",onClick:l}:!o&&r?.retryable&&p<u?{label:"Retry",onClick:s,disabled:!r?.retryable||p>=u}:!o&&r&&p>=u?{label:"Use a different wallet",onClick:l}:void 0,onBack:m,watermark:!0}),d={component:()=>{let i,{navigateBack:c,navigate:d,lastScreen:w,currentScreen:f,data:y,setModalData:v}=l(),{walletConnectionStatus:j,closePrivyModal:g}=s(),[h,C]=t(void 0),[k,b]=t(0),x=a(j?.connector?.walletClientType||"unknown"),S="connected"===j?.status,R="switching_to_supported_chain"===j?.status;o((()=>{if(S){let e;if(y?.externalConnectWallet?.onCompleteNavigateTo){let t=y.externalConnectWallet.onCompleteNavigateTo,o=j.connectedWallet?.address;e=setTimeout((()=>{if(y.funding&&j.connector){let e=j.connector.wallets.find((e=>e.address===o));v({...y,funding:{...y.funding,connectedWallet:e}})}d(t({address:o,walletClientType:j.connector?.walletClientType,walletChainType:j.connector?.chainType}))}),n)}else e=setTimeout(g,n);return()=>clearTimeout(e)}}),[S]);o((()=>{var e;j?.connectError&&(e=j?.connectError,C(p(e)))}),[j]);let T=j?.connector?.connectorType||"injected",W=j?.connector?.walletClientType||"unknown",B=x?.metadata?.shortName||x?.name||j?.connector?.walletBranding.name||"Browser Extension",E=x?.image_url?.md||j?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(m,{...t})),M="Browser Extension"===B?B.toLowerCase():B;i=S?`Successfully connected with ${M}`:h?h.message:R?"Switching networks":`Waiting for ${M}`;let _="Don’t see your wallet? Check your other browser windows.";return S?_="You’re good to go!":k>=2&&h?_="Unable to connect wallet":h?_=h.detail:R?_="Switch your wallet to the requested network.":"metamask"===W&&r?_="Click to continue to open and connect MetaMask.":"metamask"===W?_="For the best experience, connect only one wallet at a time.":"wallet_connect_v2"===T?_="Open your mobile wallet app to continue":"coinbase_wallet"===T&&(_="Confirm in the Coinbase app/popup to continue."),/*#__PURE__*/e(u,{walletName:B,walletLogo:E,success:S,errorMessage:h,title:i,subtitle:_,onRetry:()=>{b(k+1),C(void 0),j?.connectRetry()},onUseDifferentWallet:c,onBack:f===w?void 0:c,numRetries:k,maxRetries:2})}};export{d as ConnectOnlyStatusScreen,u as ConnectOnlyStatusScreenView,d as default};
@@ -0,0 +1 @@
1
+ import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-Bj4czVEP.mjs";import{C as r,L as i}from"./CustomLandingScreenView-e-NPZniC.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-DpkEBdQv.mjs";import"./useActiveWallet-DMrO7evY.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-DVyBljMT.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./useWallets-CS_W9ciB.mjs";import"./privy-context-DICqtyyT.mjs";import"@privy-io/are-addresses-equal";import"viem";import"eventemitter3";import"viem/utils";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-DQp_5KKJ.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-DDB15S8o.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"./ConnectWalletView-mm5nV3qj.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"./CopyableText-BCytXyJL.mjs";import"lucide-react";import"./Link-DJ5gq9Di.mjs";import"./QrCode-D-J14re9.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-BiiKgmqw.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";import"./ConnectEmailForm-yaDsKJmn.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-SXho-ZCl.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-BrrkHpeZ.mjs";import"./ScreenLayout-CyK-vOMq.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!0}):/*#__PURE__*/t(i,{connectOnly:!0})}};export{e as ConnectOrCreateScreen,e as default};
@@ -1,4 +1,4 @@
1
- import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-Cw2-86-G.mjs";import{r as m}from"./useActiveWallet-CwS7ik68.mjs";import{E as b,P as x}from"./ModalHeader-DfHxv9fE.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[N,P]=t(""),[S,j]=t(d?.intl.defaultCountry??"US"),V=l(N,S),z=c(S),T=p(S),U=u(S),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;j(e),P(""),n.onChange&&n.onChange({rawPhoneNumber:N,qualifiedPhoneNumber:s(N,e),countryCode:e,isValid:l(N,S)})},I=(o,e)=>{try{let r=o.replace(/\D/g,"")===N.replace(/\D/g,"")?o:z.input(o);P(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},R=()=>{E(!0);let o=s(N,S);n.onSubmit({rawPhoneNumber:N,qualifiedPhoneNumber:o,countryCode:S,isValid:l(N,S)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),I(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:S,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{I(o.target.value,S)},onKeyUp:o=>{"Enter"===o.key&&R()},value:N,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:R,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:R,disabled:L,children:"Submit"}):null]})}));let y=a.div`
1
+ import{jsx as o,jsxs as e,Fragment as r}from"react/jsx-runtime";import{forwardRef as n,useState as t,useEffect as i}from"react";import{styled as a}from"styled-components";import{countryCodesAndNumbers as d,validatePhoneNumber as l,phoneNumberTypingFormatter as c,getPlaceholderPhoneNumber as p,getCountryCallingCode as u,getPhoneCountryCodeAndNumber as h,formatPhoneNumber as s}from"@privy-io/js-sdk-core";import{u as g}from"./context-Bj4czVEP.mjs";import{r as m}from"./useActiveWallet-DMrO7evY.mjs";import{E as b,P as x}from"./ModalHeader-DpkEBdQv.mjs";import{C as v}from"./Chip-D2-wZOHJ.mjs";const f=({value:r,onChange:n})=>/*#__PURE__*/o("select",{value:r,onChange:n,children:d.map((o=>/*#__PURE__*/e("option",{value:o.code,children:[o.code," +",o.callCode]},o.code)))}),w=/*#__PURE__*/n(((n,a)=>{let d=g(),[w,k]=t(!1),{accountType:$}=m(),[j,N]=t(""),[P,S]=t(d?.intl.defaultCountry??"US"),V=l(j,P),z=c(P),T=p(P),U=u(P),L=!V,[q,E]=t(!1),B=U.length,D=o=>{let e=o.target.value;S(e),N(""),n.onChange&&n.onChange({rawPhoneNumber:j,qualifiedPhoneNumber:s(j,e),countryCode:e,isValid:l(j,P)})},I=(o,e)=>{try{let r=o.replace(/\D/g,"")===j.replace(/\D/g,"")?o:z.input(o);N(r),n.onChange&&n.onChange({rawPhoneNumber:r,qualifiedPhoneNumber:s(o,e),countryCode:e,isValid:l(o,e)})}catch(o){console.error("Error processing phone number:",o)}},R=()=>{E(!0);let o=s(j,P);n.onSubmit({rawPhoneNumber:j,qualifiedPhoneNumber:o,countryCode:P,isValid:l(j,P)}).finally((()=>E(!1)))};return i((()=>{if(n.defaultValue){let o=h(n.defaultValue);z.reset(),D({target:{value:o.countryCode}}),I(o.phone,o.countryCode)}}),[n.defaultValue]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(y,{children:/*#__PURE__*/e(C,{$callingCodeLength:B,$stacked:n.stacked,children:[/*#__PURE__*/o(f,{value:P,onChange:D}),/*#__PURE__*/o("input",{ref:a,id:"phone-number-input",className:"login-method-button",type:"tel",placeholder:T,onFocus:()=>k(!0),onChange:o=>{I(o.target.value,P)},onKeyUp:o=>{"Enter"===o.key&&R()},value:j,autoComplete:"tel"}),"phone"!==$||w||n.hideRecent?n.stacked||n.noIncludeSubmitButton?/*#__PURE__*/o("span",{}):/*#__PURE__*/o(b,{isSubmitting:q,onClick:R,disabled:L,children:"Submit"}):/*#__PURE__*/o(v,{color:"gray",children:"Recent"})]})}),n.stacked&&!n.noIncludeSubmitButton?/*#__PURE__*/o(x,{loading:q,loadingText:null,onClick:R,disabled:L,children:"Submit"}):null]})}));let y=a.div`
2
2
  width: 100%;
3
3
  `,C=a.label`
4
4
  --country-code-dropdown-width: calc(54px + calc(12 * ${o=>o.$callingCodeLength}px));
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useMemo as a,useState as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as u,T as m}from"./ModalHeader-DfHxv9fE.mjs";import{C as p}from"./CopyableText-BCytXyJL.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{Q as w}from"./QrCode-D4XZQrgi.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as f,q as v}from"./context-Cw2-86-G.mjs";import{u as b}from"./useI18n-bIQlZhkW.mjs";import{M as C,m as T,c as x,s as _,w as W,C as k,k as L,S as z}from"./useActiveWallet-CwS7ik68.mjs";import{W as S,c as A,A as E}from"./use-export-wallet-Bd5Sg5V-.mjs";import{u as j,P as B,b as K}from"./internal-context-Z-fyxadS.mjs";import{W as q}from"./WalletCards-DH1rqayz.mjs";import{S as N}from"./Screen-CDEd4p2a.mjs";const I={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:C,md:C}}};class O{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=O.normalize(e);return this.normalizedAllowList.some((e=>t===O.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e||"agw"===O.normalize(e)}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,n,t,l){let i=O.normalize(e);for(let e of this.normalizedAllowList||[])if(i===O.normalize(e))return e;if("connector"===n){if(("injected"===t||"solana_adapter"===t)&&"ethereum"===l&&this.detectedEth)return"detected_ethereum_wallets";if(("injected"===t||"solana_adapter"===t)&&"solana"===l&&this.detectedSol)return"detected_solana_wallets"}if("listing"===n&&this.includeWalletConnect)return"wallet_connect"}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,l=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing),!n.allowListKey&&e.allowListKey&&(n.allowListKey=e.allowListKey)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=O.normalize(e.walletClientType);l({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"],allowListKey:this.getAllowListKey(e.walletClientType,"connector",e.connectorType,e.chainType)})}));let i=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>O.normalize(e.walletClientType)===O.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||i||n.mobile.native||n.mobile.universal||T[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>O.normalize(e.walletClientType)===O.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||T[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=O.normalize(n.slug),r=I[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")}),t.some((e=>e.includes("solana:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")})})),this.includeWalletConnectQr&&i&&l({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:i,chainType:"ethereum",icon:S,url:void 0,chains:["eip155"],allowListKey:"wallet_connect_qr"}),this.includeWalletConnectQrSolana&&a&&l({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:S,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let o=Array.from(t.values());o.forEach((e=>{let n=I[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(O.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{if(e.allowListKey&&n.allowListKey){let t=this.normalizedAllowList?.findIndex((n=>O.normalize(n)===O.normalize(e.allowListKey)))??-1,l=this.normalizedAllowList?.findIndex((e=>O.normalize(e)===O.normalize(n.allowListKey)))??-1;if(t!==l&&t>=0&&l>=0)return t-l}if(e.allowListKey&&!n.allowListKey)return-1;if(!e.allowListKey&&n.allowListKey)return 1;let t=O.normalize(e.id),l=O.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===l?l="binance":"universalprofiles"===l?l="universal_profile":"cryptocom-defi"===l?l="cryptocom":"bitkeep"===l&&(l="bitget_wallet");let i=r.has(t),a=r.has(l);return i&&a?r.get(t)-r.get(l):i?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){this.chainFilter=e,n&&n.length>0&&(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var U=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),$=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const F=h.div`
1
+ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{MagnifyingGlassIcon as l}from"@heroicons/react/24/outline";import{useVirtualizer as i}from"@tanstack/react-virtual";import{useMemo as a,useState as o,useCallback as r,useRef as c,useEffect as s}from"react";import{isMobile as d}from"react-device-detect";import{styled as h}from"styled-components";import{a as u,T as m}from"./ModalHeader-DpkEBdQv.mjs";import{C as p}from"./CopyableText-BCytXyJL.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{Q as w}from"./QrCode-D-J14re9.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as f,q as v}from"./context-Bj4czVEP.mjs";import{u as b}from"./useI18n-BiiKgmqw.mjs";import{M as C,m as T,c as x,s as _,w as W,C as k,k as L,S as z}from"./useActiveWallet-DMrO7evY.mjs";import{W as S,c as A,A as E}from"./use-export-wallet-DVyBljMT.mjs";import{u as j,P as B,b as K}from"./internal-context-Z-fyxadS.mjs";import{W as q}from"./WalletCards-DH1rqayz.mjs";import{S as N}from"./Screen-B0u1eY7p.mjs";const I={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:C,md:C}}};class O{static normalize(e){return e.replace(/[-_]wallet$/,"").replace(/[-_]extension$/,"").toLowerCase()}isEth(e){return e.chains.some((e=>e.includes("eip155:")))}isSol(e){return e.chains.some((e=>e.includes("solana:")))}inAllowList(e,n){if(!this.normalizedAllowList||0===this.normalizedAllowList.length||"listing"===n&&this.includeWalletConnect)return!0;let t=O.normalize(e);return this.normalizedAllowList.some((e=>t===O.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e||"agw"===O.normalize(e)}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,n,t,l){let i=O.normalize(e);for(let e of this.normalizedAllowList||[])if(i===O.normalize(e))return e;if("connector"===n){if(("injected"===t||"solana_adapter"===t)&&"ethereum"===l&&this.detectedEth)return"detected_ethereum_wallets";if(("injected"===t||"solana_adapter"===t)&&"solana"===l&&this.detectedSol)return"detected_solana_wallets"}if("listing"===n&&this.includeWalletConnect)return"wallet_connect"}connectorOk(e){return!!("null"!==e.connectorType&&"walletconnect_solana"!==e.walletBranding.id&&this.chainMatches(e.chainType)&&(this.inAllowList(e.walletClientType,"connector")||("injected"===e.connectorType||"solana_adapter"===e.connectorType)&&("ethereum"===e.chainType&&this.detectedEth||"solana"===e.chainType&&this.detectedSol)))}listingOk(e){if(e.slug.includes("coinbase"))return!1;if("ethereum-only"===this.chainFilter){if(!this.isEth(e))return!1}else if("solana-only"===this.chainFilter&&!this.isSol(e))return!1;return!(!this.inAllowList(e.slug,"listing")||this.inDenyList(e.slug,"listing"))}getWallets(e,n){let t=new Map,l=e=>{let n=t.get(e.id);if(n){n.chainType!==e.chainType&&(n.chainType="multi");let t=new Set(n.chains);e.chains.forEach((e=>t.add(e))),n.chains=Array.from(t),!n.icon&&e.icon&&(n.icon=e.icon),!n.url&&e.url&&(n.url=e.url),!n.listing&&e.listing&&(n.listing=e.listing),!n.allowListKey&&e.allowListKey&&(n.allowListKey=e.allowListKey)}else t.set(e.id,e)};e.filter((e=>this.connectorOk(e))).forEach((e=>{let n=O.normalize(e.walletClientType);l({id:n,label:e.walletBranding?.name??n,source:"connector",connector:e,chainType:e.chainType,icon:e.walletBranding?.icon,url:void 0,chains:["ethereum"===e.chainType?"eip155":"solana"],allowListKey:this.getAllowListKey(e.walletClientType,"connector",e.connectorType,e.chainType)})}));let i=e.find((e=>"wallet_connect_v2"===e.connectorType)),a=e.find((e=>"walletconnect_solana"===e.walletBranding.id));n.filter((e=>this.listingOk(e))).forEach((n=>{let t=[...n.chains].filter((e=>e.includes("eip155:")||e.includes("solana:")));if(e.some((e=>O.normalize(e.walletClientType)===O.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||i||n.mobile.native||n.mobile.universal||T[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>O.normalize(e.walletClientType)===O.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||T[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=O.normalize(n.slug),r=I[n.slug],c=r?.image_url?.sm||n.image_url?.sm;t.some((e=>e.includes("eip155:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"ethereum",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")}),t.some((e=>e.includes("solana:")))&&l({id:o,label:n.name||o,source:"listing",listing:n,chainType:"solana",icon:c,url:n.homepage,chains:t,allowListKey:this.getAllowListKey(n.slug,"listing")})})),this.includeWalletConnectQr&&i&&l({id:"wallet_connect_qr",label:"WalletConnect",source:"connector",connector:i,chainType:"ethereum",icon:S,url:void 0,chains:["eip155"],allowListKey:"wallet_connect_qr"}),this.includeWalletConnectQrSolana&&a&&l({id:"wallet_connect_qr_solana",label:"WalletConnect",source:"connector",connector:a,chainType:"solana",icon:S,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let o=Array.from(t.values());o.forEach((e=>{let n=I[e.listing?.slug||e.id];n?.image_url?.sm&&(e.icon=n.image_url.sm)}));let r=new Map;return this.normalizedAllowList?.forEach(((e,n)=>{r.set(O.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{if(e.allowListKey&&n.allowListKey){let t=this.normalizedAllowList?.findIndex((n=>O.normalize(n)===O.normalize(e.allowListKey)))??-1,l=this.normalizedAllowList?.findIndex((e=>O.normalize(e)===O.normalize(n.allowListKey)))??-1;if(t!==l&&t>=0&&l>=0)return t-l}if(e.allowListKey&&!n.allowListKey)return-1;if(!e.allowListKey&&n.allowListKey)return 1;let t=O.normalize(e.id),l=O.normalize(n.id);"binance-defi"===t?t="binance":"universalprofiles"===t?t="universal_profile":"cryptocom-defi"===t?t="cryptocom":"bitkeep"===t&&(t="bitget_wallet"),"binance-defi"===l?l="binance":"universalprofiles"===l?l="universal_profile":"cryptocom-defi"===l?l="cryptocom":"bitkeep"===l&&(l="bitget_wallet");let i=r.has(t),a=r.has(l);return i&&a?r.get(t)-r.get(l):i?-1:a?1:"connector"===e.source&&"listing"===n.source?-1:"listing"===e.source&&"connector"===n.source?1:e.label.toLowerCase().localeCompare(n.label.toLowerCase())})),walletCount:o.length}}constructor(e,n){this.chainFilter=e,n&&n.length>0&&(this.normalizedAllowList=n.map(String),this.normalizedAllowList.includes("binance")&&this.normalizedAllowList.push("binance-defi-wallet"),this.normalizedAllowList.includes("bitget_wallet")&&this.normalizedAllowList.push("bitkeep")),this.detectedEth=this.normalizedAllowList?.includes("detected_ethereum_wallets")??!1,this.detectedSol=this.normalizedAllowList?.includes("detected_solana_wallets")??!1,this.includeWalletConnect=this.normalizedAllowList?.includes("wallet_connect")??!1,this.includeWalletConnectQr=this.normalizedAllowList?.includes("wallet_connect_qr")??!1,this.includeWalletConnectQrSolana=this.normalizedAllowList?.includes("wallet_connect_qr_solana")??!1}}var U=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#5469d4"}),/*#__PURE__*/n("path",{d:"m15.997 5.333-.143.486v14.106l.143.143 6.548-3.87z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 5.333-6.548 10.865 6.548 3.87z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.997 21.306-.08.098v5.025l.08.236 6.552-9.227z",fill:"#c2ccf4"}),/*#__PURE__*/n("path",{d:"m15.996 26.665v-5.36l-6.548-3.867z",fill:"#fff"}),/*#__PURE__*/n("path",{d:"m15.995 20.07 6.548-3.87-6.548-2.976v6.847z",fill:"#8698e8"}),/*#__PURE__*/n("path",{d:"m9.448 16.2 6.548 3.87v-6.846z",fill:"#c2ccf4"})]}),$=t=>/*#__PURE__*/e("svg",{viewBox:"0 0 32 32",xmlns:"http://www.w3.org/2000/svg",...t,children:[/*#__PURE__*/e("linearGradient",{id:"a",gradientUnits:"userSpaceOnUse",x1:"7.233",x2:"24.766",y1:"24.766",y2:"7.234",children:[/*#__PURE__*/n("stop",{offset:"0",stopColor:"#9945ff"}),/*#__PURE__*/n("stop",{offset:".2",stopColor:"#7962e7"}),/*#__PURE__*/n("stop",{offset:"1",stopColor:"#00d18c"})]}),/*#__PURE__*/n("path",{d:"m0 0h32v32h-32z",fill:"#10111a"}),/*#__PURE__*/n("path",{clipRule:"evenodd",d:"m9.873 20.41a.645.645 0 0 1 .476-.21l14.662.012a.323.323 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54zm15.376-2.862a.322.322 0 0 1 -.238.54l-14.662.012a.642.642 0 0 1 -.476-.21l-3.122-3.44a.323.323 0 0 1 .238-.54l14.662-.012a.644.644 0 0 1 .475.21zm-15.376-9.738a.644.644 0 0 1 .476-.21l14.662.012a.322.322 0 0 1 .238.54l-3.123 3.438a.643.643 0 0 1 -.475.21l-14.662-.012a.323.323 0 0 1 -.238-.54z",fill:"url(#a)",fillRule:"evenodd"})]});const F=h.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  align-items: center;
@@ -0,0 +1,7 @@
1
+ import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as a,useState as i,useCallback as r}from"react";import{isMobile as c}from"react-device-detect";import{styled as l}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-DQp_5KKJ.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as h}from"./context-Bj4czVEP.mjs";import{u as y}from"./useI18n-BiiKgmqw.mjs";import{C as S,P as f,w as C,k as v,y as b}from"./use-export-wallet-DVyBljMT.mjs";import{isHex as T,getAddress as _}from"viem";import{b as E,u as R,k}from"./internal-context-Z-fyxadS.mjs";import{z as A}from"./useActiveWallet-DMrO7evY.mjs";import{u as W,a as L}from"./privy-context-DICqtyyT.mjs";import{s as I}from"./shouldProceedtoEmbeddedWalletCreationFlow-DLpCU-0h.mjs";import{u as j}from"./PrivyPluginContext-2QN2dVUw.mjs";import{e as U}from"./usePrivy-DDB15S8o.mjs";import{S as O}from"./ScreenLayout-CyK-vOMq.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-CS_W9ciB.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"viem/utils";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./events-context-CI0iqAXA.mjs";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-DpkEBdQv.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-B0u1eY7p.mjs";import"./index-Dq_xe9dz.mjs";const N=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>T(e,{strict:!0}))).map((e=>_(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const x=e=>e?.privyErrorCode===E.LINKED_TO_ANOTHER_USER?S.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?S.ERROR_TIMED_OUT:e?.privyErrorCode===E.CANNOT_LINK_MORE_OF_TYPE?S.ERROR_USER_LIMIT_REACHED:S.ERROR_WALLET_CONNECTION,M=({walletLogo:o,title:a,subtitle:i,signSuccess:r,errorMessage:c,connectSuccess:l,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:v,onCoinbaseReset:b,onDifferentWallet:T})=>{let{t:_}=y(),E=w?{label:"Use a different wallet",onClick:b,disabled:r}:c===S.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:l&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&c?.retryable&&h<2?{label:"Retry",onClick:v,disabled:!1}:r||c?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:a,subtitle:i,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!c},primaryCta:E,onBack:f,watermark:!0,children:!l&&m&&!p&&/*#__PURE__*/t(B,{children:[_("connectionStatus.stillHere")," ",/*#__PURE__*/e(g,{href:m,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.tryConnectingAgain")}),u&&/*#__PURE__*/t(n,{children:[" ",_("connectionStatus.or")," ",/*#__PURE__*/e(g,{href:u,target:"_blank",variant:"underlined",size:"sm",children:_("connectionStatus.useDifferentLink")})]})]})})},D={component:()=>{let t,[n,l]=i(!1),[g,f]=i(!1),[C,T]=i(void 0),{authenticated:_,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:z}=L(),H=w(),{t:X}=y(),{getAuthFlow:Y,walletConnectionStatus:K,closePrivyModal:Q,initLoginWithWallet:V,loginWithWallet:G,updateWallets:J,createAnalyticsEvent:$}=R(),{walletConnectors:Z}=W(),[ee,te]=i(0),{user:ne}=W(),oe=j(),[ae]=i(ne?.linkedAccounts.length||0),[ie,re]=i(""),[ce,le]=i(""),[se,de]=i(!1),{hasTabbedAway:me}=function(){let[e,t]=i(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return a((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=A(K?.connector?.walletClientType||"unknown"),we=c&&"wallet_connect_v2"===K?.connector?.connectorType||c&&"coinbase_wallet"===K?.connector?.connectorType||c&&"base_account"===K?.connector?.connectorType||c&&"injected"===K?.connector?.connectorType&&"phantom"===K?.connector?.walletClientType||c&&"solana_adapter"===K?.connector?.connectorType&&"mobile_wallet_adapter"===K.connector.walletClientType,he="connected"===K?.status,ye="switching_to_supported_chain"===K?.status;a((()=>{let e=Y(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===K.connector?.chainType&&"phantom"===K.connector?.walletClientType&&oe(U)&&void 0===z?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||_?V(K.connectedWallet,pe,z?.login?.disableSignup,z?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>V(K.connectedWallet,e,z?.login?.disableSignup,z?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&z?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),T(void 0);try{"wallet_connect_v2"===K?.connector?.connectorType&&"metamask"===K?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),a((()=>{if(ne&&n){let e=h-500;if(H?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(I(ne,H.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),$({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}J();let t=setTimeout((()=>Q({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let Se=e=>{if(e?.privyErrorCode!==E.ALLOWLIST_REJECTED){if(e?.privyErrorCode===E.USER_LIMIT_REACHED)return console.error(new k(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==E.USER_DOES_NOT_EXIST)return e?.privyErrorCode===E.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:Y()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:Y()?.meta.walletClientType,chainId:Y()?.meta.chainId,connectorType:Y()?.meta.connectorType},linkMethod:Y()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void T(x(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await G(),l(!0)}catch(e){Se(e)}finally{f(!1)}}a((()=>{K?.connectError&&Se(K?.connectError)}),[K]),((e,t)=>{let n=o((()=>{}));a((()=>{n.current=e})),a((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&K?.connector instanceof m?K.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&K?.connector instanceof m?K.connector.fallbackUniversalRedirectUri:void 0;t&&le(t)}),K?.connector instanceof m&&!ie?500:null);let Ce=K?.connector?.connectorType||"injected",ve=K?.connector?.walletClientType||"unknown",be=ge?.metadata?.shortName||ge?.name||K?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||K?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===be?be.toLowerCase():be;t=n?X("connectionStatus.successfullyConnected",{walletName:_e}):C?X("connectionStatus.errorTitle",{errorMessage:C.message}):ye?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=X("connectionStatus.checkOtherWindows");n?Ee=ae===(ne?.linkedAccounts.length||0)?"Wallet was already linked.":"You're good to go!":ee>=2&&C?Ee="Unable to connect wallet":C?Ee=C.detail:ye?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===ve&&c?Ee="Click continue to open and connect MetaMask.":"metamask"===ve?Ee="For the best experience, connect only one wallet at a time.":"wallet_connect"===Ce?Ee="Open your mobile wallet app to continue":"coinbase_wallet"===Ce?b()||(Ee=N(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):z?.login?.isSigningInWithLedgerSolana&&(Ee="Ledger requires a transaction to verify your identity. You'll sign a transaction that performs no onchain action.");let Re=Z?.walletConnectors?.find((e=>"coinbase_wallet"===e.walletClientType)),ke="coinbase_wallet"===ve&&(N(ne)||C===S.ERROR_USER_EXISTS);/*#__PURE__*/return e(M,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ie,walletConnectFallbackUniversalUri:ce,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),T(void 0),he?(f(!0),fe()):K?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=l.p`
2
+ text-align: center;
3
+ color: var(--privy-color-foreground-2);
4
+ font-size: 14px;
5
+ line-height: 22px;
6
+ margin: 16px 0;
7
+ `;export{D as ConnectionStatusScreen,M as ConnectionStatusView,D as default,x as getErrorDetails};