@privy-io/react-auth 3.13.1 → 3.14.0-beta-20260213175842

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (363) hide show
  1. package/dist/cjs/AccountNotFoundScreen-5vIT9Vj5.js +1 -0
  2. package/dist/cjs/{Address-BAzd87pQ.js → Address-CSvwjtZr.js} +1 -1
  3. package/dist/cjs/AffirmativeConsentScreen-CkZG9t3r.js +6 -0
  4. package/dist/cjs/AllowlistRejectionScreen-BIpHpSsP.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-DxE4Mo3e.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-C4cZT6jZ.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-DysfSqRu.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-BKgo7WSz.js +103 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-By2XqcuD.js +2 -0
  10. package/dist/cjs/{BridgeNetworkSelectionView-BBifxbuQ.js → BridgeNetworkSelectionView-Cbcwjeju.js} +7 -7
  11. package/dist/cjs/CaptchaScreen-DLafB2fk.js +1 -0
  12. package/dist/cjs/CoinbaseOnrampStatusScreen-BOecfziJ.js +16 -0
  13. package/dist/cjs/{ConnectEmailForm-DSB_ECav.js → ConnectEmailForm-DxGEbc_v.js} +1 -1
  14. package/dist/cjs/ConnectLedgerScreen-Bt6fqaYQ.js +9 -0
  15. package/dist/cjs/ConnectOnlyLandingScreen-Drw33dcK.js +1 -0
  16. package/dist/cjs/ConnectOnlyStatusScreen-Bo8cxqDk.js +1 -0
  17. package/dist/cjs/ConnectOrCreateScreen-L6lv1fMf.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-lBXP5nI1.js → ConnectPhoneForm-H8tbcWjZ.js} +1 -1
  19. package/dist/cjs/ConnectWalletView-C90zRo3A.js +147 -0
  20. package/dist/cjs/ConnectionStatusScreen-B0xQfUL_.js +7 -0
  21. package/dist/cjs/CopyToClipboard-CC0DCGEH.js +39 -0
  22. package/dist/cjs/CopyableText-DbFeIZI0.js +23 -0
  23. package/dist/cjs/CrossAppAuthScreen-DmbfWG4K.js +1 -0
  24. package/dist/cjs/{CustomLandingScreenView-CQqBEerN.js → CustomLandingScreenView-F5WyUe3t.js} +3 -3
  25. package/dist/cjs/DelegatedActionsConsentScreen-DaARlIlY.js +1 -0
  26. package/dist/cjs/DelegatedActionsRevokeScreen-Ckwh9Fde.js +1 -0
  27. package/dist/cjs/EmbeddedWalletConnectingScreen-Dt0qglpB.js +1 -0
  28. package/dist/cjs/EmbeddedWalletCreatedScreen-D-U2qhvc.js +1 -0
  29. package/dist/cjs/{EmbeddedWalletKeyExportScreen-CLwKZG9l.js → EmbeddedWalletKeyExportScreen-DHAE6n6A.js} +3 -3
  30. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-BLM0P_Et.js +1 -0
  31. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-DDwEP_VK.js +1 -0
  32. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-xcFuRZ6Q.js +1 -0
  33. package/dist/cjs/{EnrollTotp-Dzazx21f.js → EnrollTotp-BrTAAhHi.js} +8 -8
  34. package/dist/cjs/ErrorScreen-CDPwlNzs.js +4 -0
  35. package/dist/cjs/{FarcasterConnectStatusScreen-B7w0TBzB.js → FarcasterConnectStatusScreen-DbxK9gJn.js} +6 -6
  36. package/dist/cjs/FarcasterSignerStatusScreen-BOMNzi1f.js +29 -0
  37. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-Dmqm7veU.js +2 -0
  38. package/dist/cjs/{FundWalletMethodHeader-2kXHTrGK.js → FundWalletMethodHeader-DJyBd0Vy.js} +1 -1
  39. package/dist/cjs/FundWithBankDepositScreen-Czy1E-yH.js +175 -0
  40. package/dist/cjs/FundingEditAmountScreen-6frvmbbd.js +1 -0
  41. package/dist/cjs/FundingMethodSelectionScreen-yOWUZZMX.js +1 -0
  42. package/dist/cjs/InAppBrowserLoginNotPossible-B4w2nX7Y.js +1 -0
  43. package/dist/cjs/{InfoBanner-C15hE_sj.js → InfoBanner-D5_XYHKY.js} +9 -6
  44. package/dist/cjs/InstallWalletScreen-CzTSvUdl.js +1 -0
  45. package/dist/cjs/LandingScreen-DNxGiYzs.js +1 -0
  46. package/dist/cjs/{LinkConflictScreen-CQiPRZsR.js → LinkConflictScreen-BPOi68lz.js} +3 -3
  47. package/dist/cjs/LinkEmailScreen-DhYoI9Vx.js +1 -0
  48. package/dist/cjs/{LinkPasskeyScreen-DR1inEW4.js → LinkPasskeyScreen-BVFUwWQG.js} +11 -11
  49. package/dist/cjs/LinkPhoneScreen-BqHYoNzR.js +1 -0
  50. package/dist/cjs/LoginFailedScreen-D0WLbTBb.js +1 -0
  51. package/dist/cjs/ManualTransferScreen-CRJmPuoR.js +1 -0
  52. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BOZc_N-x.js +1 -0
  53. package/dist/cjs/MfaAuthVerifyFlowScreen-CN0qs3DP.js +1 -0
  54. package/dist/cjs/MfaEnrollmentFlowScreen-BpP8OUm7.js +1 -0
  55. package/dist/cjs/MfaVerifyFlowScreen-B8ij23uJ.js +1 -0
  56. package/dist/cjs/{ModalHeader-CabvEpAG.js → ModalHeader-CSz_JC8Q.js} +18 -12
  57. package/dist/cjs/MoonpayStatusScreen-CBADlt11.js +16 -0
  58. package/dist/cjs/OAuthStatusScreen-DQ5Tw8M1.js +1 -0
  59. package/dist/cjs/PasskeySelectSignupOrLogin-DsjVGCMc.js +1 -0
  60. package/dist/cjs/PasskeyStatusScreen-l2rYZ1IG.js +3 -0
  61. package/dist/cjs/PasswordRecoveryScreen-V3DheMKe.js +20 -0
  62. package/dist/cjs/{QrCode-B5K0VLPw.js → QrCode-CeAi1LRZ.js} +1 -1
  63. package/dist/cjs/RecoveryOAuthStatusScreen-tu_yyjoG.js +1 -0
  64. package/dist/cjs/RecoveryPasswordCreateScreen-Z7ucSNLS.js +1 -0
  65. package/dist/cjs/{RecoverySelectionScreen-C2tuntn9.js → RecoverySelectionScreen-DWqGXp3l.js} +2 -2
  66. package/dist/cjs/{Screen-BXzBiTIN.js → Screen-D6ig-IDr.js} +20 -10
  67. package/dist/cjs/ScreenLayout-Dkt0mrht.js +1 -0
  68. package/dist/cjs/{SetAutomaticRecoveryScreen-DDVOX064.js → SetAutomaticRecoveryScreen-DHNuiSgK.js} +2 -2
  69. package/dist/cjs/{SetWalletPasswordForm-CjifRxS3.js → SetWalletPasswordForm-R9Somnyp.js} +2 -2
  70. package/dist/cjs/{SignRequestScreen-B6fS5qTS.js → SignRequestScreen-ZokQxsYU.js} +2 -2
  71. package/dist/cjs/{StandardSignAndSendTransactionScreen-B5BX6LFZ.js → StandardSignAndSendTransactionScreen-wTGPTlgg.js} +2 -2
  72. package/dist/cjs/TelegramAuthScreen-BFDvy3uz.js +1 -0
  73. package/dist/cjs/{TransactionDetails-CGZ0hDXd.js → TransactionDetails-ddaXz8YV.js} +1 -1
  74. package/dist/cjs/{TransactionErrorView-C5-4kCDL.js → TransactionErrorView-CrjFmgNv.js} +5 -5
  75. package/dist/cjs/{TransferFromWalletScreen-Be_N5MeO.js → TransferFromWalletScreen-Rt6vEVf4.js} +2 -2
  76. package/dist/cjs/{TransferOrBridgeLoadingScreen-BGp5x3h8.js → TransferOrBridgeLoadingScreen-Dp_vpEYG.js} +2 -2
  77. package/dist/cjs/UpdateEmailScreen-6gNNAUvB.js +1 -0
  78. package/dist/cjs/UpdatePhoneScreen-C7qjXMNn.js +1 -0
  79. package/dist/cjs/UserLimitReachedScreen-DWgXgQyy.js +1 -0
  80. package/dist/cjs/{WalletInfoCard-BYZGsWwj.js → WalletInfoCard-CO7fOCNd.js} +4 -4
  81. package/dist/cjs/WalletInterstitialScreen-C05fMGUR.js +1 -0
  82. package/dist/cjs/{WalletLink-Bj02lEf9.js → WalletLink-Bldwftgh.js} +5 -5
  83. package/dist/cjs/{WalletOverflowButton-p3vpo0QR.js → WalletOverflowButton-D6xV7e4O.js} +1 -1
  84. package/dist/cjs/abstract-smart-wallets.js +1 -1
  85. package/dist/cjs/{context-CuNnvCIL.js → context-6PrkFAzG.js} +1 -1
  86. package/dist/cjs/{ethers-C_dhPYcC.js → ethers-_hdpXGqQ.js} +1 -1
  87. package/dist/cjs/extended-chains.js +1 -1
  88. package/dist/cjs/{get-is-unified-wallet-C2yi08Zy.js → get-is-unified-wallet-Cd_IhZS9.js} +1 -1
  89. package/dist/cjs/{getErc20Balance-CJvcxOe9.js → getErc20Balance-D2jXMvJ8.js} +1 -1
  90. package/dist/cjs/{getErc20TokenInfo-DqY-nDYo.js → getErc20TokenInfo-DxDd_HN6.js} +1 -1
  91. package/dist/cjs/{index-CKUeuhfu.js → index-BlUF144d.js} +1 -1
  92. package/dist/cjs/index-CaGJR6Wm.js +174 -0
  93. package/dist/cjs/{index-TUET0BYX.js → index-rArQaM8n.js} +3 -3
  94. package/dist/cjs/index.js +1 -1
  95. package/dist/cjs/internal.js +1 -1
  96. package/dist/cjs/{shared-AII0g-d1.js → shared-hn3VMWc8.js} +1 -1
  97. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DE4oGpYl.js → shouldProceedtoEmbeddedWalletCreationFlow-KizljXLw.js} +1 -1
  98. package/dist/cjs/{smart-wallets-BypZdOsC.js → smart-wallets-B7Oeb874.js} +1 -1
  99. package/dist/cjs/smart-wallets.js +1 -1
  100. package/dist/cjs/solana.js +1 -1
  101. package/dist/cjs/{styles-D7QQZERY.js → styles-Dthqo7lh.js} +4 -4
  102. package/dist/cjs/{to-ui-error-DNNop_FY.js → to-ui-error-DfSSp7Nk.js} +2 -2
  103. package/dist/cjs/ui.js +40 -40
  104. package/dist/cjs/{use-export-wallet-B7CUqWdP.js → use-export-wallet-Ce_CCutn.js} +1 -1
  105. package/dist/cjs/use-export-wallet-DZ-GzASy.js +1 -0
  106. package/dist/cjs/{useActiveWallet-D5qqs3GS.js → useActiveWallet-B-qt_lhr.js} +1 -1
  107. package/dist/cjs/{useGetTokenPrice-BRQnbdi2.js → useGetTokenPrice-C8Me29xD.js} +1 -1
  108. package/dist/cjs/{useI18n-DKrZl8KW.js → useI18n-Bffg27Cp.js} +1 -1
  109. package/dist/cjs/{usePrivy-BKHhRZMn.js → usePrivy-CLwa9i8X.js} +1 -1
  110. package/dist/cjs/{useSolanaRpcClient-DXykrMtX.js → useSolanaRpcClient-COyhHAzq.js} +1 -1
  111. package/dist/cjs/{useWallets-CP2-zXxW.js → useWallets-C3RaxJM1.js} +1 -1
  112. package/dist/cjs/{useWallets-Bv9SU-di.js → useWallets-DMj2ztZn.js} +1 -1
  113. package/dist/dts/{events-context-CV9PiG6M.d.ts → events-context-JU6EgMXK.d.mts} +1 -1
  114. package/dist/dts/{events-context-CV9PiG6M.d.mts → events-context-JU6EgMXK.d.ts} +1 -1
  115. package/dist/dts/extended-chains.d.mts +1 -1
  116. package/dist/dts/extended-chains.d.ts +1 -1
  117. package/dist/dts/farcaster.d.mts +1 -1
  118. package/dist/dts/farcaster.d.ts +1 -1
  119. package/dist/dts/index.d.mts +27 -7
  120. package/dist/dts/index.d.ts +27 -7
  121. package/dist/dts/internal.d.mts +1 -1
  122. package/dist/dts/internal.d.ts +1 -1
  123. package/dist/dts/smart-wallets.d.mts +1 -1
  124. package/dist/dts/smart-wallets.d.ts +1 -1
  125. package/dist/dts/solana.d.mts +3 -3
  126. package/dist/dts/solana.d.ts +3 -3
  127. package/dist/dts/{types-xIUh0rN4.d.mts → types-BVn8nTiQ.d.mts} +48 -2
  128. package/dist/dts/{types-xIUh0rN4.d.ts → types-BVn8nTiQ.d.ts} +48 -2
  129. package/dist/dts/ui.d.mts +1 -1
  130. package/dist/dts/ui.d.ts +1 -1
  131. package/dist/esm/AccountNotFoundScreen-C2pbqBG5.mjs +1 -0
  132. package/dist/esm/{Address-BmCgxKQR.mjs → Address-BUuQgiKx.mjs} +1 -1
  133. package/dist/esm/AffirmativeConsentScreen-Dzep5iOm.mjs +6 -0
  134. package/dist/esm/AllowlistRejectionScreen-BsdZulEI.mjs +1 -0
  135. package/dist/esm/AuthenticateWithWalletScreen-CsJMj128.mjs +1 -0
  136. package/dist/esm/AwaitingEvmToSolBridgingScreen-DLbhkxwX.mjs +2 -0
  137. package/dist/esm/AwaitingExternalEthereumTransferScreen-DnC6EHU3.mjs +2 -0
  138. package/dist/esm/AwaitingPasswordlessCodeScreen-C7ijDazf.mjs +103 -0
  139. package/dist/esm/AwaitingSolToEvmBridgingScreen-Dyj2FHsc.mjs +2 -0
  140. package/dist/esm/{BridgeNetworkSelectionView-tyz86GlM.mjs → BridgeNetworkSelectionView-BxMqN8K9.mjs} +2 -2
  141. package/dist/esm/CaptchaScreen-whJmro23.mjs +1 -0
  142. package/dist/esm/CoinbaseOnrampStatusScreen-BUQ33EPn.mjs +16 -0
  143. package/dist/esm/ConnectEmailForm-7WKXyLIX.mjs +3 -0
  144. package/dist/esm/ConnectLedgerScreen-0KV09asJ.mjs +9 -0
  145. package/dist/esm/ConnectOnlyLandingScreen-zmLwJak1.mjs +1 -0
  146. package/dist/esm/ConnectOnlyStatusScreen-1icMWuif.mjs +1 -0
  147. package/dist/esm/ConnectOrCreateScreen-2TykrLcn.mjs +1 -0
  148. package/dist/esm/{ConnectPhoneForm-nVYECWzo.mjs → ConnectPhoneForm-Bww6OFqd.mjs} +1 -1
  149. package/dist/esm/ConnectWalletView-DQNMKorC.mjs +147 -0
  150. package/dist/esm/ConnectionStatusScreen-VsYDFXuf.mjs +7 -0
  151. package/dist/esm/CopyToClipboard-DSTf_eKU.mjs +39 -0
  152. package/dist/esm/CopyableText-BCytXyJL.mjs +23 -0
  153. package/dist/esm/CrossAppAuthScreen-C--90PAJ.mjs +1 -0
  154. package/dist/esm/{CustomLandingScreenView-B4a5Rc9z.mjs → CustomLandingScreenView-By1LM9_0.mjs} +4 -4
  155. package/dist/esm/DelegatedActionsConsentScreen-8g9H15c_.mjs +1 -0
  156. package/dist/esm/DelegatedActionsRevokeScreen-zc8PZT7I.mjs +1 -0
  157. package/dist/esm/EmbeddedWalletConnectingScreen-BGVioYgV.mjs +1 -0
  158. package/dist/esm/EmbeddedWalletCreatedScreen-Mhhj67RG.mjs +1 -0
  159. package/dist/esm/{EmbeddedWalletKeyExportScreen-B-6Lfc6D.mjs → EmbeddedWalletKeyExportScreen-yqPvQfdO.mjs} +3 -3
  160. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-BOhuDYCL.mjs +1 -0
  161. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-X518ZR44.mjs +1 -0
  162. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-DC4MfkYK.mjs +1 -0
  163. package/dist/esm/{EnrollTotp-D6VGtjIL.mjs → EnrollTotp-BcCG_2JB.mjs} +5 -5
  164. package/dist/esm/ErrorScreen-CfvFq4SG.mjs +4 -0
  165. package/dist/esm/{FarcasterConnectStatusScreen-BN_wRxNV.mjs → FarcasterConnectStatusScreen-BOCl_7jx.mjs} +6 -6
  166. package/dist/esm/FarcasterSignerStatusScreen-u4I-WK_R.mjs +28 -0
  167. package/dist/esm/FundSolWalletWithExternalSolanaWallet-BUIK74Vs.mjs +1 -0
  168. package/dist/esm/{FundWalletMethodHeader-Ce0vLrUa.mjs → FundWalletMethodHeader-CIBx6zhp.mjs} +1 -1
  169. package/dist/esm/FundWithBankDepositScreen-3QErhg-G.mjs +175 -0
  170. package/dist/esm/FundingEditAmountScreen-BgoXDEQJ.mjs +1 -0
  171. package/dist/esm/FundingMethodSelectionScreen-DtehXUD4.mjs +1 -0
  172. package/dist/esm/InAppBrowserLoginNotPossible-CQh8AsKB.mjs +1 -0
  173. package/dist/esm/{InfoBanner-Dk1KghcK.mjs → InfoBanner-DkQEPd77.mjs} +7 -4
  174. package/dist/esm/InstallWalletScreen-DM3c8LSP.mjs +1 -0
  175. package/dist/esm/LandingScreen-YPDnWhWL.mjs +1 -0
  176. package/dist/esm/{LinkConflictScreen-B-yRqIRn.mjs → LinkConflictScreen-hKT_zmu4.mjs} +3 -3
  177. package/dist/esm/LinkEmailScreen-Df1znKnY.mjs +1 -0
  178. package/dist/esm/{LinkPasskeyScreen-BfGROb2f.mjs → LinkPasskeyScreen-bcve9Yp2.mjs} +5 -5
  179. package/dist/esm/LinkPhoneScreen-o7rW47jd.mjs +1 -0
  180. package/dist/esm/LoginFailedScreen-C0I8TCwN.mjs +1 -0
  181. package/dist/esm/ManualTransferScreen-BvZ-uUht.mjs +1 -0
  182. package/dist/esm/MfaAuthEnrollmentFlowScreen-DK5SBNG1.mjs +1 -0
  183. package/dist/esm/MfaAuthVerifyFlowScreen-uFMuo7rY.mjs +1 -0
  184. package/dist/esm/MfaEnrollmentFlowScreen-D5btQxJc.mjs +1 -0
  185. package/dist/esm/MfaVerifyFlowScreen-DJVq1as_.mjs +1 -0
  186. package/dist/esm/{ModalHeader-CvLNEZ0F.mjs → ModalHeader-D0p4fONI.mjs} +31 -25
  187. package/dist/esm/MoonpayStatusScreen-Cfm8Qiby.mjs +16 -0
  188. package/dist/esm/OAuthStatusScreen-5eCQuPjc.mjs +1 -0
  189. package/dist/esm/PasskeySelectSignupOrLogin-Cv5Q8ywD.mjs +1 -0
  190. package/dist/esm/PasskeyStatusScreen-BvG8ib-c.mjs +3 -0
  191. package/dist/esm/PasswordRecoveryScreen-DxqMp8Jc.mjs +20 -0
  192. package/dist/esm/{QrCode-AKgpho6r.mjs → QrCode-DZulv1E7.mjs} +1 -1
  193. package/dist/esm/RecoveryOAuthStatusScreen-CAgXyVJk.mjs +1 -0
  194. package/dist/esm/RecoveryPasswordCreateScreen-DKt0Ntjx.mjs +1 -0
  195. package/dist/esm/{RecoverySelectionScreen-CJG-J3Aj.mjs → RecoverySelectionScreen-DCrjjtfj.mjs} +2 -2
  196. package/dist/esm/{Screen-DnEl8dVF.mjs → Screen-BVipC9vr.mjs} +21 -11
  197. package/dist/esm/ScreenLayout-jvcCZKF1.mjs +1 -0
  198. package/dist/esm/{SetAutomaticRecoveryScreen-CXNCqRU4.mjs → SetAutomaticRecoveryScreen-BfeoWlEq.mjs} +1 -1
  199. package/dist/esm/{SetWalletPasswordForm-Bns8qtXn.mjs → SetWalletPasswordForm-A8PITZIA.mjs} +4 -4
  200. package/dist/esm/{SignRequestScreen-7t8KCRXP.mjs → SignRequestScreen-BeJ09qE0.mjs} +4 -4
  201. package/dist/esm/{StandardSignAndSendTransactionScreen-BIJeFjT1.mjs → StandardSignAndSendTransactionScreen-D7QXH5p4.mjs} +2 -2
  202. package/dist/esm/TelegramAuthScreen-I0g5mHaE.mjs +1 -0
  203. package/dist/esm/{TransactionDetails-DhYW2qjK.mjs → TransactionDetails-JIdNJKup.mjs} +4 -4
  204. package/dist/esm/{TransactionErrorView-DtnhZ5P5.mjs → TransactionErrorView-UHPbTcc8.mjs} +8 -8
  205. package/dist/esm/{TransferFromWalletScreen-BdIo62Cg.mjs → TransferFromWalletScreen-DtSbt6rX.mjs} +3 -3
  206. package/dist/esm/{TransferOrBridgeLoadingScreen-C9hX5Ost.mjs → TransferOrBridgeLoadingScreen-bbU-Tw1f.mjs} +1 -1
  207. package/dist/esm/UpdateEmailScreen-B4t4yIw5.mjs +1 -0
  208. package/dist/esm/UpdatePhoneScreen-BeYLqIY0.mjs +1 -0
  209. package/dist/esm/UserLimitReachedScreen-Bj4M7xcN.mjs +1 -0
  210. package/dist/esm/{WalletInfoCard-CVCh-Z5E.mjs → WalletInfoCard-B-r0es4h.mjs} +2 -2
  211. package/dist/esm/WalletInterstitialScreen-CWc04MMh.mjs +1 -0
  212. package/dist/esm/{WalletLink-xufwYyQh.mjs → WalletLink-DlGvmqW7.mjs} +1 -1
  213. package/dist/esm/{WalletOverflowButton-qXN0KcGe.mjs → WalletOverflowButton-DHr4glN7.mjs} +1 -1
  214. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  215. package/dist/esm/context-Drt9FC1y.mjs +1 -0
  216. package/dist/esm/{ethers-DGsvPPEp.mjs → ethers-UlIaNUWW.mjs} +1 -1
  217. package/dist/esm/extended-chains.mjs +1 -1
  218. package/dist/esm/get-is-unified-wallet-BC-7_b8O.mjs +1 -0
  219. package/dist/esm/{getErc20Balance-D0MGUaOw.mjs → getErc20Balance-DA4dGV9O.mjs} +1 -1
  220. package/dist/esm/{getErc20TokenInfo-CZJTqd4c.mjs → getErc20TokenInfo-1Q6w1Ibq.mjs} +1 -1
  221. package/dist/esm/{index-BMpFxPbi.mjs → index-B7hLnfAQ.mjs} +1 -1
  222. package/dist/esm/index-BZ6FAPh7.mjs +174 -0
  223. package/dist/esm/{index--X7RfrXS.mjs → index-Df3Phxz2.mjs} +3 -3
  224. package/dist/esm/index.mjs +1 -1
  225. package/dist/esm/internal.mjs +1 -1
  226. package/dist/esm/{shared-CSN6-8CF.mjs → shared-BpuV-mxk.mjs} +1 -1
  227. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs → shouldProceedtoEmbeddedWalletCreationFlow-COZ-_baJ.mjs} +1 -1
  228. package/dist/esm/{smart-wallets-DjBZWleC.mjs → smart-wallets-EqV3QCuS.mjs} +1 -1
  229. package/dist/esm/smart-wallets.mjs +1 -1
  230. package/dist/esm/solana.mjs +1 -1
  231. package/dist/esm/{styles-aArPlAod.mjs → styles-Dl341B8G.mjs} +15 -15
  232. package/dist/esm/{to-ui-error-DKeOToXI.mjs → to-ui-error-DvLMlZKC.mjs} +2 -2
  233. package/dist/esm/ui.mjs +16 -16
  234. package/dist/esm/use-export-wallet-BlKa-i97.mjs +1 -0
  235. package/dist/esm/{use-export-wallet-BcHSx5WT.mjs → use-export-wallet-CqWaIkKU.mjs} +1 -1
  236. package/dist/esm/{useActiveWallet-36SuARye.mjs → useActiveWallet-DGV02YBT.mjs} +1 -1
  237. package/dist/esm/useGetTokenPrice-CyEyHBvW.mjs +1 -0
  238. package/dist/esm/{useI18n-CbESkJQ7.mjs → useI18n-De-HiNn7.mjs} +1 -1
  239. package/dist/esm/usePrivy-pdKy_IjS.mjs +1 -0
  240. package/dist/esm/{useSolanaRpcClient-DajzMnxc.mjs → useSolanaRpcClient-DlKLUp1h.mjs} +1 -1
  241. package/dist/esm/{useWalletBalance-BDrbQBDX.mjs → useWalletBalance-CDyi5_iR.mjs} +1 -1
  242. package/dist/esm/{useWallets-BwdySlks.mjs → useWallets-BAZolsyf.mjs} +1 -1
  243. package/dist/esm/{useWallets-02TRgRMN.mjs → useWallets-CV3WTwML.mjs} +1 -1
  244. package/package.json +4 -3
  245. package/dist/cjs/AccountNotFoundScreen-iNQ-eJ82.js +0 -1
  246. package/dist/cjs/AffirmativeConsentScreen-Ba1XAxqh.js +0 -6
  247. package/dist/cjs/AllowlistRejectionScreen-CMZahkkw.js +0 -1
  248. package/dist/cjs/AuthenticateWithWalletScreen-BpfHRQ17.js +0 -1
  249. package/dist/cjs/AwaitingEvmToSolBridgingScreen-BWaBsau9.js +0 -2
  250. package/dist/cjs/AwaitingExternalEthereumTransferScreen-DN7h9ETe.js +0 -2
  251. package/dist/cjs/AwaitingPasswordlessCodeScreen-D2KbYvKF.js +0 -103
  252. package/dist/cjs/AwaitingSolToEvmBridgingScreen-C06q4jjQ.js +0 -2
  253. package/dist/cjs/CaptchaScreen-Bj5yik5Q.js +0 -1
  254. package/dist/cjs/CoinbaseOnrampStatusScreen-CP5PYZBV.js +0 -16
  255. package/dist/cjs/ConnectLedgerScreen-BazfRtiX.js +0 -9
  256. package/dist/cjs/ConnectOnlyLandingScreen-CsbSt3la.js +0 -1
  257. package/dist/cjs/ConnectOnlyStatusScreen-5aAg7ONz.js +0 -1
  258. package/dist/cjs/ConnectOrCreateScreen-C0t-tK0s.js +0 -1
  259. package/dist/cjs/ConnectWalletView-EuTf-6Vt.js +0 -171
  260. package/dist/cjs/ConnectionStatusScreen-BL6n6Ct-.js +0 -7
  261. package/dist/cjs/CopyToClipboard-BCe_l6_D.js +0 -39
  262. package/dist/cjs/CrossAppAuthScreen-fjiTzpoh.js +0 -1
  263. package/dist/cjs/DelegatedActionsConsentScreen-C2DG4aoM.js +0 -1
  264. package/dist/cjs/DelegatedActionsRevokeScreen-CCr2Kw57.js +0 -1
  265. package/dist/cjs/EmbeddedWalletConnectingScreen-BW3TLACZ.js +0 -1
  266. package/dist/cjs/EmbeddedWalletCreatedScreen-yTh0CETA.js +0 -1
  267. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-BJ9tuKSI.js +0 -1
  268. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-C3Pu2FvV.js +0 -1
  269. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-Dzvq3GAs.js +0 -1
  270. package/dist/cjs/ErrorScreen-Dbie0wkk.js +0 -4
  271. package/dist/cjs/FarcasterSignerStatusScreen-CTZRoFL3.js +0 -29
  272. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-Czi1l_qS.js +0 -2
  273. package/dist/cjs/FundingEditAmountScreen-xtC8kXZ9.js +0 -1
  274. package/dist/cjs/FundingMethodSelectionScreen-CwORHNKY.js +0 -1
  275. package/dist/cjs/InAppBrowserLoginNotPossible-D9m4nJvR.js +0 -1
  276. package/dist/cjs/InstallWalletScreen-D2iE62NY.js +0 -1
  277. package/dist/cjs/LandingScreen-Cclv1lfx.js +0 -1
  278. package/dist/cjs/LinkEmailScreen-DaTzx7Fk.js +0 -1
  279. package/dist/cjs/LinkPhoneScreen-Den2l7u5.js +0 -1
  280. package/dist/cjs/LoginFailedScreen-CG5VpqB1.js +0 -1
  281. package/dist/cjs/ManualTransferScreen-QVz0bbM4.js +0 -1
  282. package/dist/cjs/MfaAuthEnrollmentFlowScreen-CgEdqCAi.js +0 -1
  283. package/dist/cjs/MfaAuthVerifyFlowScreen-BmhIWVUg.js +0 -1
  284. package/dist/cjs/MfaEnrollmentFlowScreen-BSALpHSu.js +0 -1
  285. package/dist/cjs/MfaVerifyFlowScreen-NBi3M6EX.js +0 -1
  286. package/dist/cjs/MoonpayStatusScreen-DQCYOZ0M.js +0 -16
  287. package/dist/cjs/OAuthStatusScreen-Dzo0z0tK.js +0 -1
  288. package/dist/cjs/PasskeySelectSignupOrLogin-D6KxIann.js +0 -1
  289. package/dist/cjs/PasskeyStatusScreen-DfcsZHZm.js +0 -3
  290. package/dist/cjs/PasswordRecoveryScreen-DfpNr526.js +0 -20
  291. package/dist/cjs/RecoveryOAuthStatusScreen-CaoYW19J.js +0 -1
  292. package/dist/cjs/RecoveryPasswordCreateScreen-BEEpGGv7.js +0 -1
  293. package/dist/cjs/ScreenLayout-SSjax2iq.js +0 -1
  294. package/dist/cjs/TelegramAuthScreen-CrpOhr2m.js +0 -1
  295. package/dist/cjs/UpdateEmailScreen-GKUeQDLE.js +0 -1
  296. package/dist/cjs/UpdatePhoneScreen-BUA9FZ9k.js +0 -1
  297. package/dist/cjs/UserLimitReachedScreen-ByQxJS_K.js +0 -1
  298. package/dist/cjs/WalletInterstitialScreen-t0tp0uiQ.js +0 -1
  299. package/dist/cjs/copy-BiZ7dtqy.js +0 -1
  300. package/dist/cjs/index-DyCLWLpL.js +0 -174
  301. package/dist/cjs/use-export-wallet-COKs2yxH.js +0 -1
  302. package/dist/esm/AccountNotFoundScreen-Dty9AII6.mjs +0 -1
  303. package/dist/esm/AffirmativeConsentScreen-CZ3QtNmP.mjs +0 -6
  304. package/dist/esm/AllowlistRejectionScreen-DUd4GJIK.mjs +0 -1
  305. package/dist/esm/AuthenticateWithWalletScreen-Fa-n1Sey.mjs +0 -1
  306. package/dist/esm/AwaitingEvmToSolBridgingScreen-DCpcHpQX.mjs +0 -2
  307. package/dist/esm/AwaitingExternalEthereumTransferScreen-D1V2_vDk.mjs +0 -2
  308. package/dist/esm/AwaitingPasswordlessCodeScreen-DGAxwdL6.mjs +0 -103
  309. package/dist/esm/AwaitingSolToEvmBridgingScreen-B6Xv92AB.mjs +0 -2
  310. package/dist/esm/CaptchaScreen-BL1nWi7c.mjs +0 -1
  311. package/dist/esm/CoinbaseOnrampStatusScreen-DhIZ3gwP.mjs +0 -16
  312. package/dist/esm/ConnectEmailForm-DvQJmoTc.mjs +0 -3
  313. package/dist/esm/ConnectLedgerScreen-CURsQoYz.mjs +0 -9
  314. package/dist/esm/ConnectOnlyLandingScreen-CBjbbuDg.mjs +0 -1
  315. package/dist/esm/ConnectOnlyStatusScreen-VM7nNu6X.mjs +0 -1
  316. package/dist/esm/ConnectOrCreateScreen-8FxDiOyl.mjs +0 -1
  317. package/dist/esm/ConnectWalletView-BXqs6pWG.mjs +0 -171
  318. package/dist/esm/ConnectionStatusScreen-SAx7YO5y.mjs +0 -7
  319. package/dist/esm/CopyToClipboard-BGTSFnT3.mjs +0 -39
  320. package/dist/esm/CrossAppAuthScreen-V6LW9fie.mjs +0 -1
  321. package/dist/esm/DelegatedActionsConsentScreen-0_shAgnh.mjs +0 -1
  322. package/dist/esm/DelegatedActionsRevokeScreen-olNf5JQw.mjs +0 -1
  323. package/dist/esm/EmbeddedWalletConnectingScreen-Dleo6nTw.mjs +0 -1
  324. package/dist/esm/EmbeddedWalletCreatedScreen-Dx0eaEaV.mjs +0 -1
  325. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-DbiGNXpt.mjs +0 -1
  326. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-fA9JGXuz.mjs +0 -1
  327. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-CTPO_C5V.mjs +0 -1
  328. package/dist/esm/ErrorScreen-Ba4Ml9CI.mjs +0 -4
  329. package/dist/esm/FarcasterSignerStatusScreen-B8IyPJhe.mjs +0 -28
  330. package/dist/esm/FundSolWalletWithExternalSolanaWallet-B3Y84dbg.mjs +0 -1
  331. package/dist/esm/FundingEditAmountScreen-DeM_ClwN.mjs +0 -1
  332. package/dist/esm/FundingMethodSelectionScreen-Be8LIw6i.mjs +0 -1
  333. package/dist/esm/InAppBrowserLoginNotPossible-7kqa69SP.mjs +0 -1
  334. package/dist/esm/InstallWalletScreen-EfqvUoSZ.mjs +0 -1
  335. package/dist/esm/LandingScreen-DPaqiLpx.mjs +0 -1
  336. package/dist/esm/LinkEmailScreen-CQ5mnYS9.mjs +0 -1
  337. package/dist/esm/LinkPhoneScreen-CVNSbTfD.mjs +0 -1
  338. package/dist/esm/LoginFailedScreen-B2KtCyAw.mjs +0 -1
  339. package/dist/esm/ManualTransferScreen-C2Rl54K3.mjs +0 -1
  340. package/dist/esm/MfaAuthEnrollmentFlowScreen-D6ujM0kh.mjs +0 -1
  341. package/dist/esm/MfaAuthVerifyFlowScreen-zG9ps8-7.mjs +0 -1
  342. package/dist/esm/MfaEnrollmentFlowScreen-gELi8Ppl.mjs +0 -1
  343. package/dist/esm/MfaVerifyFlowScreen-6eccLZxg.mjs +0 -1
  344. package/dist/esm/MoonpayStatusScreen-u9OjnVb2.mjs +0 -16
  345. package/dist/esm/OAuthStatusScreen-C4KNGm-v.mjs +0 -1
  346. package/dist/esm/PasskeySelectSignupOrLogin-DM959Ikc.mjs +0 -1
  347. package/dist/esm/PasskeyStatusScreen-BfUHTu2T.mjs +0 -3
  348. package/dist/esm/PasswordRecoveryScreen-BnkB7Xwe.mjs +0 -20
  349. package/dist/esm/RecoveryOAuthStatusScreen-DaP1Oh1u.mjs +0 -1
  350. package/dist/esm/RecoveryPasswordCreateScreen-B-dLBQVH.mjs +0 -1
  351. package/dist/esm/ScreenLayout-kyRBwF5n.mjs +0 -1
  352. package/dist/esm/TelegramAuthScreen-D-cJY_dj.mjs +0 -1
  353. package/dist/esm/UpdateEmailScreen-0TGU13Qv.mjs +0 -1
  354. package/dist/esm/UpdatePhoneScreen-C7fQ2ohl.mjs +0 -1
  355. package/dist/esm/UserLimitReachedScreen-dLjGUBN-.mjs +0 -1
  356. package/dist/esm/WalletInterstitialScreen-C8UPLmif.mjs +0 -1
  357. package/dist/esm/context-CwMpvKNV.mjs +0 -1
  358. package/dist/esm/copy-Bx2Jwc5_.mjs +0 -1
  359. package/dist/esm/get-is-unified-wallet-C6sEzDpG.mjs +0 -1
  360. package/dist/esm/index-C47JxA4c.mjs +0 -174
  361. package/dist/esm/use-export-wallet-CwQ5-CS4.mjs +0 -1
  362. package/dist/esm/useGetTokenPrice-CgGm0Ecu.mjs +0 -1
  363. package/dist/esm/usePrivy-D_kd_mMH.mjs +0 -1
@@ -1,171 +0,0 @@
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{useState as a,useMemo 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 m,T as u}from"./ModalHeader-CvLNEZ0F.mjs";import p from"@heroicons/react/24/outline/CheckIcon";import{C as g}from"./copy-Bx2Jwc5_.mjs";import{L as w}from"./Link-DJ5gq9Di.mjs";import{Q as f}from"./QrCode-AKgpho6r.mjs";import{E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{u as v,q as b}from"./context-CwMpvKNV.mjs";import{u as C}from"./useI18n-CbESkJQ7.mjs";import{M as x,q as _,d as k,e as L,K as W,V as z,w as T,S}from"./useActiveWallet-36SuARye.mjs";import{u as A,P as E,b as j}from"./internal-context-Z-fyxadS.mjs";import{W as K}from"./WalletCards-DH1rqayz.mjs";import{W as B,h as q}from"./use-export-wallet-CwQ5-CS4.mjs";import{S as I}from"./Screen-DnEl8dVF.mjs";let O=h.button`
2
- display: flex;
3
- align-items: center;
4
- gap: 0.5rem;
5
-
6
- &:hover {
7
- text-decoration: underline;
8
- }
9
-
10
- svg {
11
- width: 0.875rem;
12
- height: 0.875rem;
13
- }
14
- `,N=h.span`
15
- display: flex;
16
- align-items: center;
17
- gap: 0.25rem;
18
- font-size: 0.875rem;
19
- color: var(--privy-color-foreground-2);
20
- `,U=h(p)`
21
- color: var(--privy-color-success);
22
- `,$=h(g)`
23
- color: var(--privy-color-foreground-3);
24
- opactiy: 0.5;
25
- `;function F({children:t,iconOnly:l,value:i,hideCopyIcon:o,...r}){let[c,s]=a(!1);/*#__PURE__*/return e(O,{...r,onClick:()=>{navigator.clipboard.writeText(i||t).catch(console.error),s(!0),setTimeout((()=>s(!1)),1500)},children:[t," ",c?/*#__PURE__*/e(N,{children:[/*#__PURE__*/n(U,{})," ",!l&&"Copied"]}):!o&&/*#__PURE__*/n($,{})]})}const M={phantom:{mobile:{native:"phantom://",universal:"https://phantom.app/ul/"}},solflare:{mobile:{native:void 0,universal:"https://solflare.com/ul/v1/"}},metamask:{image_url:{sm:x,md:x}}};class P{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=P.normalize(e);return this.normalizedAllowList.some((e=>t===P.normalize(e)))}inDenyList(e,n){return"listing"===n&&"rabby"===e||"agw"===P.normalize(e)}chainMatches(e){return"ethereum-only"===this.chainFilter?"ethereum"===e:"solana-only"!==this.chainFilter||"solana"===e}getAllowListKey(e,n,t,l){let i=P.normalize(e);for(let e of this.normalizedAllowList||[])if(i===P.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=P.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=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"ethereum"===e.chainType&&"null"!==e.connectorType))||i||n.mobile.native||n.mobile.universal||_[n.slug]?.chainTypes.includes("ethereum")||(t=t.filter((e=>!e.includes("eip155:")))),e.some((e=>P.normalize(e.walletClientType)===P.normalize(n.slug)&&"solana"===e.chainType&&"null"!==e.connectorType))||a||n.mobile.native||n.mobile.universal||_[n.slug]?.chainTypes.includes("solana")||(t=t.filter((e=>!e.includes("solana:")))),!t.length)return;let o=P.normalize(n.slug),r=M[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:B,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:B,url:void 0,chains:["solana"],allowListKey:"wallet_connect_qr_solana"});let o=Array.from(t.values());o.forEach((e=>{let n=M[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(P.normalize(e),n)})),{wallets:o.slice().sort(((e,n)=>{if(e.allowListKey&&n.allowListKey){let t=this.normalizedAllowList?.findIndex((n=>P.normalize(n)===P.normalize(e.allowListKey)))??-1,l=this.normalizedAllowList?.findIndex((e=>P.normalize(e)===P.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=P.normalize(e.id),l=P.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 Q=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"})]}),D=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 R=h.div`
26
- display: flex;
27
- justify-content: space-between;
28
- align-items: center;
29
- `,H=h.button`
30
- padding: 0.25rem;
31
- height: 30px;
32
- width: 30px;
33
-
34
- display: flex;
35
- align-items: center;
36
- justify-content: center;
37
- border-radius: var(--privy-border-radius-full);
38
- background: var(--privy-color-background-2);
39
- `,V=h.div`
40
- position: relative;
41
- display: inline-flex;
42
- align-items: center;
43
-
44
- &::after {
45
- content: ' ';
46
- border-radius: var(--privy-border-radius-full);
47
- height: 6px;
48
- width: 6px;
49
- background-color: var(--privy-color-icon-success);
50
- position: absolute;
51
- right: -3px;
52
- top: -3px;
53
- }
54
- `,Y=h.img`
55
- width: 32px;
56
- height: 32px;
57
- border-radius: 0.25rem;
58
- object-fit: contain;
59
- `,G=h.span`
60
- display: flex;
61
- gap: 0.25rem;
62
- align-items: center;
63
- padding: 0.25rem 0.5rem;
64
- font-size: 0.75rem;
65
- font-weight: 500;
66
- line-height: 1.125rem; /* 150% */
67
- border-radius: var(--privy-border-radius-sm);
68
- background-color: var(--privy-color-background-2);
69
-
70
- svg {
71
- width: 100%;
72
- max-width: 1rem;
73
- max-height: 1rem;
74
- stroke-width: 2;
75
- }
76
- `,J=h.div`
77
- display: flex;
78
- flex-direction: column;
79
- gap: 0.5rem;
80
- max-height: 24rem;
81
- overflow-y: scroll;
82
-
83
- &::-webkit-scrollbar {
84
- display: none;
85
- }
86
-
87
- scrollbar-gutter: stable both-edges;
88
- scrollbar-width: none;
89
- -ms-overflow-style: none;
90
-
91
- ${e=>"light"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, 0.06)) bottom;":"dark"===e.$colorScheme?"background: linear-gradient(var(--privy-color-background), var(--privy-color-background) 70%) bottom, linear-gradient(rgba(255, 255, 255, 0) 20%, rgba(255, 255, 255, 0.06)) bottom;":void 0}
92
-
93
- background-repeat: no-repeat;
94
- background-size:
95
- 100% 32px,
96
- 100% 16px;
97
- background-attachment: local, scroll;
98
- `;function X({enabled:e=!0,walletList:n,walletChainType:t}){let l=v(),{connectors:i}=A(),{listings:r,loading:c}=k(e),s=t??l.appearance.walletChainType,d=n??l.appearance?.walletList,h=o((()=>new P(s,d)),[s,d]),{wallets:m,walletCount:u}=o((()=>h.getWallets(i,r)),[h,i,r]),[p,g]=a(""),w=o((()=>p?m.filter((e=>e.label.toLowerCase().includes(p.toLowerCase()))):m),[p,m]),[f,y]=a();return{selected:f,setSelected:y,search:p,setSearch:g,loadingListings:c,wallets:w,walletCount:u}}let Z=e=>!e||"string"!=typeof e&&(e instanceof T||e instanceof S);const ee=({index:l,style:i,data:a,recent:o})=>{let r=a.wallets[l],{walletChainType:c,handleWalletClick:s}=a,{t:d}=C(),h={...i,boxSizing:"border-box"};return r?/*#__PURE__*/e(ie,{style:h,onClick:()=>s(r),children:[r.icon&&(r.connector&&!Z(r.connector)?/*#__PURE__*/n(V,{children:"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})}):"string"==typeof r.icon?/*#__PURE__*/n(Y,{src:r.icon}):/*#__PURE__*/n(r.icon,{style:{width:"32px",height:"32px"}})),/*#__PURE__*/n(re,{children:r.label}),o?/*#__PURE__*/e(t,{children:[/*#__PURE__*/n(G,{children:d("connectWallet.lastUsed")}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/e(t,{children:["ethereum-only"===c&&/*#__PURE__*/n(Q,{}),"solana-only"===c&&/*#__PURE__*/n(D,{})]})})]}):/*#__PURE__*/n(ae,{children:!("ethereum-only"===c||"solana-only"===c)&&/*#__PURE__*/e(t,{children:[r.chains?.some((e=>e.startsWith("eip155")))&&/*#__PURE__*/n(Q,{}),r.chains?.some((e=>e.startsWith("solana")))&&/*#__PURE__*/n(D,{})]})})]}):null};var ne=({className:h,customDescription:p,connectOnly:g,preSelectedWalletId:x,hideHeader:k,...B})=>{let O=v(),{t:N}=C(),{connectors:U}=A(),$=B.walletChainType||O.appearance.walletChainType,F=B.walletList||O.appearance?.walletList,{onBack:R,onClose:H,app:V}=B,{selected:G,setSelected:J,qrUrl:ne,setQrUrl:de,connecting:he,uiState:me,errorCode:ue,wallets:pe,walletCount:ge,handleConnect:we,handleBack:fe,showSearchBar:ye,isInitialConnectView:ve,title:be,search:Ce,setSearch:xe}=function({onConnect:e,onBack:n,onClose:t,onConnectError:l,walletList:i,walletChainType:c,app:s}){let h=v(),{connectors:m}=A(),{t:u}=C(),{wallets:p,walletCount:g,search:w,setSearch:f,selected:y,setSelected:x}=X({enabled:L(i??[]),walletList:i,walletChainType:c}),[_,k]=a(),[z,T]=a(),[S,j]=a(),[K,B]=a(),q=!y&&!S&&!K,I=q&&(g>6||w.length>0),O=m.find((e=>"wallet_connect_v2"===e.connectorType)),N=r((async(n,t)=>{if(n){if(K?.connector===n&&"loading"===_)return void console.log("Already connecting to this wallet, skipping duplicate attempt");if(k("loading"),"string"==typeof n)return B({connector:n,name:t?.name??"Wallet",icon:t?.icon,id:t?.id,url:t?.url}),void window.open(n,"_blank");B({connector:n,name:t?.name??n.walletBranding.name??"Wallet",icon:t?.icon??n.walletBranding.icon,id:t?.id,url:t?.url});try{let t=await n.connect({showPrompt:!0});if(!t)return k("error"),T(void 0),void l?.(new E("Unable to connect wallet"));k("success"),T(void 0),W({address:t.address,client:t.walletClientType,appId:h.id}),setTimeout((()=>{e({connector:n,wallet:t})}),b)}catch(n){if(console.error("ERROR: ",{e:n}),n?.message?.includes("already pending for origin")||n?.message?.includes("wallet_requestPermissions"))return void console.log("Connection request already pending, maintaining loading state");k("error"),T(n?.privyErrorCode),l?.(n instanceof Error?n:new E(n?.message||"Unable to connect wallet"))}}}),[h.id,e,K,_]),U=r((()=>S?(k(void 0),T(void 0),B(void 0),void j(void 0)):K?(k(void 0),T(void 0),void B(void 0)):y?(k(void 0),T(void 0),B(void 0),void x(void 0)):"error"===_||"loading"===_?(k(void 0),T(void 0),void B(void 0)):void n?.()),[S,K,y,_,n]),$=o((()=>K?.connector===O&&S&&d&&K?.name?u("connectWallet.goToWallet",{walletName:K.name}):K?.connector===O&&S&&K?.name?u("connectWallet.scanToConnect",{walletName:K.name}):S&&K?.name?u(d?"connectWallet.goToWallet":"connectWallet.scanToConnect",{walletName:K.name}):"string"==typeof K?.connector?u("connectWallet.openOrInstall",{walletName:K.name}):y&&!K?u("connectWallet.selectNetwork"):K?null:u("connectWallet.selectYourWallet")),[K,S,y,O,u]);return{selected:y,setSelected:x,qrUrl:S,setQrUrl:j,connecting:K,uiState:_,errorCode:z,search:w,setSearch:f,wallets:p,walletCount:g,wc:O,isInitialConnectView:q,showSearchBar:I,title:$,handleConnect:N,handleBack:U,onClose:t,onConnect:e,app:s}}({...B,walletList:F,walletChainType:$}),_e=U.find((e=>"wallet_connect_v2"===e.connectorType)),ke=U.find((e=>"walletconnect_solana"===e.walletBranding.id)),Le=c(null),We=i({count:pe.length,getScrollElement:()=>Le.current,estimateSize:()=>56,overscan:6,gap:5}),ze=r((async e=>{let n="solana-only"!==$&&e.chains?.some((e=>e.startsWith("eip155"))),t="ethereum-only"!==$&&e.chains?.some((e=>e.startsWith("solana"))),l=()=>{let n=e.id;return _[n]||_[`${n}_wallet`]},i=n=>{let t=P.normalize(e.id);return U.find((e=>P.normalize(e.walletClientType)===t&&e.chainType===n&&!("ethereum"===e.chainType&&e instanceof T||"solana"===e.chainType&&e instanceof S)))},a=async()=>{if(!_e||!e.listing)return!1;let n=M[e.listing.slug]?{...e.listing,...M[e.listing.slug]}:e.listing;return _e.setWalletEntry(n,de),await _e.resetConnection(e.id),await we(_e,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0},o=async()=>!!ke&&!!e.listing&&(await ke.disconnect(),ke.wallet.setWalletEntry(e.listing,de),await new Promise((e=>setTimeout(e,100))),await we(ke,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0),r=async n=>{let t=(e=>{let n=l();if(n)return n.getMobileRedirect({isSolana:e,connectOnly:!!g,useUniversalLink:!1})})(n);return!!t&&(await we(t,{name:e.label,icon:e.icon,id:e.id,url:e.url}),!0)};if(n&&t)J(e);else{if(n&&!t){let n=i("ethereum");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d&&l()){if(await r(!1)||await a())return}else if(await a()||await r(!1))return}if(t&&!n){let n=i("solana");if(n&&!Z(n))return void await we(n,{name:e.label,icon:e.icon,id:e.id,url:e.url});if(d){if(await r(!0)||await o())return}else if(await o()||await r(!0))return}if(!Z(e.connector)){if(_e&&"wallet_connect_v2"===e.connector?.connectorType)if(await _e.resetConnection(e.id),"wallet_connect_qr"!==e.id&&e.listing){let n=M[e.listing.slug]?{...e.listing,...M[e.listing.slug]}:e.listing;_e.setWalletEntry(n,de)}else _e.setWalletEntry({id:"wallet_connect_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect",homepage:"",chains:["eip155"],mobile:{native:"",universal:void 0}},de);return ke&&"walletconnect_solana"===e.connector?.walletBranding.id&&(await ke.disconnect(),"wallet_connect_qr_solana"!==e.id&&e.listing?ke.wallet.setWalletEntry(e.listing,de):ke.wallet.setWalletEntry({id:"wallet_connect_solana_qr",name:"WalletConnect",rdns:"",slug:"wallet-connect-solana",homepage:"",chains:["solana"],mobile:{native:"",universal:void 0}},de),await new Promise((e=>setTimeout(e,100)))),void await we(e.connector,{name:e.label,icon:e.icon,id:e.id,url:e.url})}e.url&&await we(e.url,{name:e.label,icon:e.icon,id:e.id,url:e.url})}}),[_e,ke,we,J,de,$,g,U]);return s((()=>{if(!x)return;let e=pe.find((({id:e})=>e===x));e&&ze(e).catch(console.error)}),[x]),/*#__PURE__*/e(I,{className:h,children:[/*#__PURE__*/n(I.Header,{icon:k&&ve?void 0:he&&!ne||ne&&d&&he?.icon?he.icon:he?void 0:K,iconVariant:he&&!ne||ne&&d?"loading":void 0,iconLoadingStatus:he&&!ne||ne&&d?{success:"success"===me,fail:"error"===me}:void 0,title:k&&ve?void 0:he&&!ne?N("connectWallet.waitingForWallet",{walletName:he.name}):ne&&d?N("connectWallet.waitingForWallet",{walletName:he?.name??"connection"}):be,subtitle:k&&ve?void 0:he&&!ne&&"string"==typeof he.connector?N("connectWallet.installAndConnect",{walletName:he.name}):he&&!ne&&"string"!=typeof he.connector?"error"===me?ue===j.NO_SOLANA_ACCOUNTS?`The connected wallet has no Solana accounts. Please add a Solana account in ${he.name} and try again.`:N("connectWallet.tryConnectingAgain"):N("connectionStatus.connectOneWallet"):ve?p??(V?N("connectWallet.connectToAccount",{appName:V.name}):null):null,showBack:!!R||!ve,showClose:!0,onBack:R||fe,onClose:H}),/*#__PURE__*/e(I.Body,{ref:Le,$colorScheme:O.appearance.palette.colorScheme,style:{marginBottom:ne?"0.5rem":void 0},children:[ye&&/*#__PURE__*/n(te,{children:/*#__PURE__*/e(y,{style:{background:"transparent"},children:[/*#__PURE__*/n(z,{children:/*#__PURE__*/n(l,{})}),/*#__PURE__*/n("input",{className:"login-method-button",type:"text",placeholder:N("connectWallet.searchPlaceholder",{count:String(ge)}),onChange:e=>xe(e.target.value),value:Ce})]})}),ne&&d&&"loading"===me&&/*#__PURE__*/e("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:[/*#__PURE__*/n(m,{variant:"primary",onClick:()=>window.open(ne.universal??ne.native,"_blank"),style:{width:"100%"},children:N("connectWallet.openInApp")}),/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:"Copy link"})]}),ne&&!d&&"loading"===me&&/*#__PURE__*/n("div",{style:{display:"flex",flexDirection:"column",alignItems:"center",gap:"1rem"},children:/*#__PURE__*/n(ce,{value:ne.universal??ne.native,iconOnly:!0,children:N("connectWallet.copyLink")})}),ne&&!d&&/*#__PURE__*/n(f,{size:280,url:ne.universal??ne.native,squareLogoElement:he?.icon?"string"==typeof he.icon?e=>/*#__PURE__*/n("svg",{...e,children:/*#__PURE__*/n("image",{href:he.icon,height:e.height,width:e.width})}):he.icon:q}),ne&&!d&&he?.url&&("binance"===he.id||"binanceus"===he.id||"binance-defi"===he.id)&&/*#__PURE__*/e(se,{children:[/*#__PURE__*/e("span",{children:["Don't have ",he.name,"? "]}),/*#__PURE__*/n(w,{href:he.url,target:"_blank",size:"sm",children:"Download here"})]}),/*#__PURE__*/e(le,{children:[he&&!ne&&"string"==typeof he.connector&&/*#__PURE__*/e(ie,{onClick:()=>window.open(he.connector,"_blank"),children:[he.icon&&("string"==typeof he.icon?/*#__PURE__*/n(Y,{src:he.icon}):/*#__PURE__*/n(he.icon,{})),/*#__PURE__*/n(re,{children:he.name})]}),G?.chains.some((e=>e.startsWith("eip155")))&&!he&&/*#__PURE__*/e(ie,{onClick:()=>ze({...G,chains:G.chains.filter((e=>e.startsWith("eip155")))}),children:[G.icon&&("string"==typeof G.icon?/*#__PURE__*/n(Y,{src:G.icon}):/*#__PURE__*/n(G.icon,{})),/*#__PURE__*/n(re,{children:G.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(Q,{})})]}),G?.chains.some((e=>e.startsWith("solana")))&&!he&&/*#__PURE__*/e(ie,{onClick:()=>ze({...G,chains:G.chains.filter((e=>e.startsWith("solana")))}),children:[G.icon&&("string"==typeof G.icon?/*#__PURE__*/n(Y,{src:G.icon}):/*#__PURE__*/n(G.icon,{})),/*#__PURE__*/n(re,{children:G.label}),/*#__PURE__*/n(ae,{children:/*#__PURE__*/n(D,{})})]}),ve&&/*#__PURE__*/e(t,{children:[!(ge>0)&&/*#__PURE__*/n(oe,{children:N("connectWallet.noWalletsFound")}),ge>0&&!ne&&/*#__PURE__*/n("div",{style:{maxHeight:56*Math.min(pe.length,5)+5,width:"100%"},children:/*#__PURE__*/n("div",{style:{height:`${We.getTotalSize()}px`,width:"100%",position:"relative"},children:We.getVirtualItems().map((e=>/*#__PURE__*/n(ee,{index:e.index,style:{position:"absolute",top:0,left:0,height:`${e.size}px`,transform:`translateY(${e.start}px)`},data:{wallets:pe,walletChainType:$,handleWalletClick:ze}},e.key)))})})]})]})]}),/*#__PURE__*/e(I.Footer,{children:[he&&!ne&&"string"!=typeof he.connector&&"error"===me&&/*#__PURE__*/n(I.Actions,{children:/*#__PURE__*/n(m,{style:{width:"100%",alignItems:"center"},variant:"error",onClick:()=>we(he.connector,{name:he.name,icon:he.icon,id:he.id,url:he.url}),children:N("connectWallet.retry")})}),!!(V&&V.legal.privacyPolicyUrl&&V.legal.termsAndConditionsUrl)&&/*#__PURE__*/n(u,{app:V,alwaysShowImplicitConsent:!0}),/*#__PURE__*/n(I.Watermark,{})]})]})};let te=h.div`
99
- position: sticky;
100
- // Offset by negative margin to account for focus outline
101
- margin-top: -3px;
102
- padding-top: 3px;
103
- top: -3px;
104
- z-index: 1;
105
- background: var(--privy-color-background);
106
- padding-bottom: calc(var(--screen-space) / 2);
107
- `,le=h.div`
108
- display: flex;
109
- flex-direction: column;
110
- gap: ${5}px;
111
- `,ie=h.button`
112
- && {
113
- gap: 0.5rem;
114
- align-items: center;
115
- display: flex;
116
- position: relative;
117
- text-align: left;
118
- font-weight: 500;
119
- transition: background 200ms ease-in;
120
- width: calc(100% - 4px);
121
- border-radius: var(--privy-border-radius-md);
122
- padding: 0.75em;
123
- border: 1px solid var(--privy-color-foreground-4);
124
- justify-content: space-between;
125
- }
126
-
127
- &:hover {
128
- background: var(--privy-color-background-2);
129
- }
130
- `,ae=h.span`
131
- display: flex;
132
- align-items: center;
133
- justify-content: end;
134
- position: relative;
135
-
136
- & > svg {
137
- border-radius: var(--privy-border-radius-full);
138
- stroke-width: 2.5;
139
- width: 100%;
140
- max-height: 1rem;
141
- max-width: 1rem;
142
- flex-shrink: 0;
143
- }
144
-
145
- & > svg:not(:last-child) {
146
- border-radius: var(--privy-border-radius-full);
147
- margin-right: -0.375rem;
148
- }
149
- `,oe=h.div`
150
- height: 60px;
151
- display: flex;
152
- align-items: center;
153
- justify-content: center;
154
- text-align: center;
155
- `,re=h.span`
156
- text-overflow: ellipsis;
157
- white-space: nowrap;
158
- color: var(--privy-color-foreground);
159
- font-weight: 400;
160
- flex: 1;
161
- `,ce=h(F)`
162
- && {
163
- margin: 0.5rem auto 0 auto;
164
- }
165
- `,se=h.div`
166
- text-align: center;
167
- margin-top: 1rem;
168
- font-size: 0.875rem;
169
- font-weight: 400;
170
- color: var(--privy-color-foreground-3);
171
- `;export{F as C,R as H,J as S,Y as W,G as a,H as b,P as c,ee as d,ne as i,X as u};
@@ -1,7 +0,0 @@
1
- import{jsx as e,jsxs as t,Fragment as n}from"react/jsx-runtime";import{useRef as o,useEffect as i,useState as a,useCallback as r}from"react";import{isMobile as l}from"react-device-detect";import{styled as c}from"styled-components";import{a as s,S as d,W as m,B as u,b as p}from"./index-C47JxA4c.mjs";import{L as g}from"./Link-DJ5gq9Di.mjs";import{u as w,q as h}from"./context-CwMpvKNV.mjs";import{u as S}from"./useI18n-CbESkJQ7.mjs";import{C as y,P as f,d as C}from"./use-export-wallet-CwQ5-CS4.mjs";import{Q as b,k as v,T}from"./useActiveWallet-36SuARye.mjs";import{isHex as _,getAddress as E}from"viem";import{b as R,u as k,k as A}from"./internal-context-Z-fyxadS.mjs";import{u as W,a as I}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{s as L}from"./shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs";import{u as j}from"./PrivyPluginContext-2QN2dVUw.mjs";import{e as U}from"./usePrivy-D_kd_mMH.mjs";import{S as O}from"./ScreenLayout-kyRBwF5n.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useWallets-02TRgRMN.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"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"tinycolor2";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const N=e=>{let t=localStorage.getItem("-walletlink:https://www.walletlink.org:Addresses")?.split(" ").filter((e=>_(e,{strict:!0}))).map((e=>E(e)));return!!t?.length&&!!e?.linkedAccounts.filter((e=>"wallet"==e.type&&t.includes(e.address))).length};const x=e=>e?.privyErrorCode===R.LINKED_TO_ANOTHER_USER?y.ERROR_USER_EXISTS:e instanceof f&&!e.details.default?e.details:e instanceof C?y.ERROR_TIMED_OUT:e?.privyErrorCode===R.CANNOT_LINK_MORE_OF_TYPE?y.ERROR_USER_LIMIT_REACHED:y.ERROR_WALLET_CONNECTION,M=({walletLogo:o,title:i,subtitle:a,signSuccess:r,errorMessage:l,connectSuccess:c,separateConnectAndSign:s,signing:d,walletConnectRedirectUri:m,walletConnectFallbackUniversalUri:u,hasTabbedAway:p,showCoinbaseWalletResetCta:w,numRetries:h,onBack:f,onSign:C,onRetry:b,onCoinbaseReset:v,onDifferentWallet:T})=>{let{t:_}=S(),E=w?{label:"Use a different wallet",onClick:v,disabled:r}:l===y.ERROR_USER_EXISTS&&f?{label:"Use a different wallet",onClick:T}:c&&!r&&s?{label:d?"Signing":"Sign with your wallet",onClick:C,disabled:d}:!r&&l?.retryable&&h<2?{label:"Retry",onClick:b,disabled:!1}:r||l?void 0:{label:_("connectionStatus.connecting"),onClick:()=>{},disabled:!0};/*#__PURE__*/return e(O,{title:i,subtitle:a,icon:o,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!l},primaryCta:E,onBack:f,watermark:!0,children:!c&&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,c]=a(!1),[g,f]=a(!1),[C,_]=a(void 0),{authenticated:E,logout:O}=W(),{navigate:D,navigateBack:B,lastScreen:F,currentScreen:P,setModalData:q,data:H}=I(),X=w(),{t:z}=S(),{getAuthFlow:K,walletConnectionStatus:Q,closePrivyModal:Y,initLoginWithWallet:J,loginWithWallet:V,updateWallets:$,createAnalyticsEvent:G}=k(),{walletConnectors:Z}=W(),[ee,te]=a(0),{user:ne}=W(),oe=j(),[ie]=a(ne?.linkedAccounts.length||0),[ae,re]=a(""),[le,ce]=a(""),[se,de]=a(!1),{hasTabbedAway:me}=function(){let[e,t]=a(!1),n=r((()=>{document.hidden&&t(!0)}),[]);return i((()=>(document.addEventListener("visibilitychange",n),()=>document.removeEventListener("visibilitychange",n))),[n]),{hasTabbedAway:e,reset:()=>t(!1)}}(),{enabled:ue,token:pe}=s(),ge=b(Q?.connector?.walletClientType||"unknown"),we=l&&"wallet_connect_v2"===Q?.connector?.connectorType||l&&"coinbase_wallet"===Q?.connector?.connectorType||l&&"base_account"===Q?.connector?.connectorType||l&&"injected"===Q?.connector?.connectorType&&"phantom"===Q?.connector?.walletClientType||l&&"solana_adapter"===Q?.connector?.connectorType&&"mobile_wallet_adapter"===Q.connector.walletClientType,he="connected"===Q?.status,Se="switching_to_supported_chain"===Q?.status;i((()=>{let e=K(),t=e instanceof p||e instanceof d?e:void 0;he&&"solana"===Q.connector?.chainType&&"phantom"===Q.connector?.walletClientType&&oe(U)&&void 0===H?.login?.isSigningInWithLedgerSolana?D("ConnectLedgerScreen",!1):(he&&!t&&(!ue||pe||E?J(Q.connectedWallet,pe,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})):(q({captchaModalData:{callback:e=>J(Q.connectedWallet,e,H?.login?.disableSignup,H?.login?.isSigningInWithLedgerSolana?"transaction":"plain").then((()=>{de(!0)})),userIntentRequired:!1,onSuccessNavigateTo:"ConnectionStatusScreen",onErrorNavigateTo:"ErrorScreen"}}),D("CaptchaScreen",!1))),t instanceof d&&H?.login?.isSigningInWithLedgerSolana&&(t.messageType="transaction"),t&&we&&he&&!t.preparedMessage?t.buildMessage():t&&!we&&he&&(g||(async()=>{f(!0),_(void 0);try{"wallet_connect_v2"===Q?.connector?.connectorType&&"metamask"===Q?.connector?.walletClientType&&await v(2500),await fe()}catch(e){console.warn("Auto-prompted signature failed",e)}finally{f(!1)}})()))}),[ee,he,se]),i((()=>{if(ne&&n){let e=h-500;if(X?.legal.requireUsersAcceptTerms&&!ne.hasAcceptedTerms){let t=setTimeout((()=>{D("AffirmativeConsentScreen")}),e);return()=>clearTimeout(t)}if(L(ne,X.embeddedWallets)){let t=setTimeout((()=>{q({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),G({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"ConnectionStatusScreen"}}),O()},callAuthOnSuccessOnClose:!0}}),D("EmbeddedWalletOnAccountCreateScreen")}),e);return()=>clearTimeout(t)}$();let t=setTimeout((()=>Y({shouldCallAuthOnSuccess:!0,isSuccess:!0})),h);return()=>clearTimeout(t)}}),[ne,n]);let ye=e=>{if(e?.privyErrorCode!==R.ALLOWLIST_REJECTED){if(e?.privyErrorCode===R.USER_LIMIT_REACHED)return console.error(new A(e).toString()),void D("UserLimitReachedScreen");if(e?.privyErrorCode!==R.USER_DOES_NOT_EXIST)return e?.privyErrorCode===R.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce?(q({accountTransfer:{nonce:e.data?.data?.nonce,account:K()?.meta.address,displayName:e.data?.data?.account?.displayName,externalWalletMetadata:{walletClientType:K()?.meta.walletClientType,chainId:K()?.meta.chainId,connectorType:K()?.meta.connectorType},linkMethod:K()instanceof p?"siwe":"siws",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void D("LinkConflictScreen")):void _(x(e));D("AccountNotFoundScreen")}else D("AllowlistRejectionScreen")};async function fe(){try{await V(),c(!0)}catch(e){ye(e)}finally{f(!1)}}i((()=>{Q?.connectError&&ye(Q?.connectError)}),[Q]),((e,t)=>{let n=o((()=>{}));i((()=>{n.current=e})),i((()=>{if(null!==t){let e=setInterval((()=>n.current()),t||0);return()=>clearInterval(e)}}),[t])})((()=>{let e="wallet_connect_v2"===Ce&&Q?.connector instanceof m?Q.connector.redirectUri:void 0;e&&re(e);let t="wallet_connect_v2"===Ce&&Q?.connector instanceof m?Q.connector.fallbackUniversalRedirectUri:void 0;t&&ce(t)}),Q?.connector instanceof m&&!ae?500:null);let Ce=Q?.connector?.connectorType||"injected",be=Q?.connector?.walletClientType||"unknown",ve=ge?.metadata?.shortName||ge?.name||Q?.connector?.walletBranding.name||"Browser Extension",Te=ge?.image_url?.md||Q?.connector?.walletBranding.icon||(t=>/*#__PURE__*/e(u,{...t})),_e="Browser Extension"===ve?ve.toLowerCase():ve;t=n?z("connectionStatus.successfullyConnected",{walletName:_e}):C?z("connectionStatus.errorTitle",{errorMessage:C.message}):Se?"Switching networks":he?g&&we?"Signing":"Sign to verify":`Waiting for ${_e}`;let Ee=z("connectionStatus.checkOtherWindows");n?Ee=ie===(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:Se?Ee="Switch your wallet to the requested network.":he&&we?Ee="Sign the message in your wallet to verify it belongs to you.":"metamask"===be&&l?Ee="Click continue to open and connect MetaMask.":"metamask"===be?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?T()||(Ee=N(ne)?"Continue with the Coinbase app. Not the right wallet? Reset your connection below.":"Confirm in the Coinbase app/popup to continue."):H?.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"===be&&(N(ne)||C===y.ERROR_USER_EXISTS);/*#__PURE__*/return e(M,{walletLogo:Te,title:t,subtitle:Ee,signSuccess:n,errorMessage:C,connectSuccess:he,separateConnectAndSign:we,signing:g,walletConnectRedirectUri:ae,walletConnectFallbackUniversalUri:le,hasTabbedAway:me,showCoinbaseWalletResetCta:ke,numRetries:ee,onBack:F&&P!==F?B:void 0,onSign:()=>{f(!0),fe()},onRetry:()=>{te(ee+1),_(void 0),he?(f(!0),fe()):Q?.connectRetry()},onCoinbaseReset:()=>{Re&&Re?.disconnect()},onDifferentWallet:B})}};let B=c.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};
@@ -1,39 +0,0 @@
1
- import{jsx as o,jsxs as r}from"react/jsx-runtime";import{useState as e}from"react";import{styled as t}from"styled-components";import{C as i}from"./copy-Bx2Jwc5_.mjs";const n=({style:r,color:e,...t})=>/*#__PURE__*/o("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:e||"currentColor",style:{height:"1.5rem",width:"1.5rem",...r},...t,children:/*#__PURE__*/o("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 12.75l6 6 9-13.5"})}),p=t=>{let[p,s]=e(!1);/*#__PURE__*/return r(l,{color:t.color,onClick:()=>{s(!0),navigator.clipboard.writeText(t.text),setTimeout((()=>s(!1)),1500)},$justCopied:p,children:[p?/*#__PURE__*/o(n,{style:{height:"14px",width:"14px"},strokeWidth:"2"}):/*#__PURE__*/o(i,{style:{height:"14px",width:"14px"}}),p?"Copied":"Copy"," ",t.itemName?t.itemName:"to Clipboard"]})};let l=t.button`
2
- display: flex;
3
- align-items: center;
4
- gap: 6px;
5
-
6
- && {
7
- margin: 8px 2px;
8
- font-size: 14px;
9
- color: ${o=>o.$justCopied?"var(--privy-color-foreground)":o.color||"var(--privy-color-foreground-3)"};
10
- font-weight: ${o=>o.$justCopied?"medium":"normal"};
11
- transition: color 350ms ease;
12
-
13
- :focus,
14
- :active {
15
- background-color: transparent;
16
- border: none;
17
- outline: none;
18
- box-shadow: none;
19
- }
20
-
21
- :hover {
22
- color: ${o=>o.$justCopied?"var(--privy-color-foreground)":"var(--privy-color-foreground-2)"};
23
- }
24
-
25
- :active {
26
- color: 'var(--privy-color-foreground)';
27
- font-weight: medium;
28
- }
29
-
30
- @media (max-width: 440px) {
31
- margin: 12px 2px;
32
- }
33
- }
34
-
35
- svg {
36
- width: 14px;
37
- height: 14px;
38
- }
39
- `;export{p as C};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useMemo as t,useState as o,useEffect as r}from"react";import{u as i,q as a}from"./context-CwMpvKNV.mjs";import{R as s}from"./index-C47JxA4c.mjs";import{u as n,a as c,e as p,b as l}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{z as u}from"./useActiveWallet-36SuARye.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs";import{S as f}from"./ScreenLayout-kyRBwF5n.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-02TRgRMN.mjs";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"styled-components";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const h=({providerApp:o,success:r,error:i,onClose:a})=>{let{title:s,subtitle:n}=t((()=>r?{title:`Successfully connected with ${o.name}`,subtitle:"You're good to go!"}:i?{title:"Authentication failed",subtitle:i.message}:{title:`Connecting to ${o.name}`,subtitle:`Please check the pop-up from ${o.name} to continue`}),[r,i,o.name]);/*#__PURE__*/return e(f,{title:s,subtitle:n,icon:o.logoUrl,iconVariant:"loading",iconLoadingStatus:{success:r,fail:!!i},onBack:a,watermark:!0})},v={component:()=>{let t=i(),{data:f,navigate:v,setModalData:g,onUserCloseViaDialogOrKeybindRef:y}=m(),{crossAppAuthFlow:A,updateWallets:j,closePrivyModal:b,createAnalyticsEvent:S}=n(),{logout:w}=u(),[C,I]=o({}),U=f?.crossAppAuth,T=new c(`There was an issue connecting your ${U?.name} account. Please try again.`),x=new s((async e=>{if(U?.popup)try{let t=await A({appId:e,popup:U.popup,action:U.action,disableSignup:U.disableSignup});I({data:t})}catch(e){if(e instanceof c)I({error:e});else if(e instanceof p){if(e.privyErrorCode===l.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return g({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,displayName:e.data?.data?.account?.displayName,linkMethod:`privy:${U.appId}`,embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress,oAuthUserInfo:e.data?.data?.otherUser?.oAuthUserInfo}}),void v("LinkConflictScreen");U.popup&&U.popup.close(),I({error:T})}else I({error:T})}else I({error:T})})),k=()=>{C.data&&(j(),U?.onSuccess(C.data),b({shouldCallAuthOnSuccess:!0,isSuccess:!0})),U?.onError(C.error??new c("User canceled flow")),b({shouldCallAuthOnSuccess:!1,isSuccess:!1})};return y.current=k,r((()=>{U?.appId?.length&&x.execute(U.appId)}),[U?.appId]),r((()=>{if(!C.data)return;let e=C.data;if(t.legal.requireUsersAcceptTerms&&!e.hasAcceptedTerms){let e=setTimeout((()=>{v("AffirmativeConsentScreen")}),a);return()=>clearTimeout(e)}if(d(e,t.embeddedWallets)){let e=setTimeout((()=>{g({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),S({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:`privy:${U?.appId}`,screen:"CrossAppAuthScreen"}}),w()},callAuthOnSuccessOnClose:!0}}),v("EmbeddedWalletOnAccountCreateScreen")}),a);return()=>clearTimeout(e)}let o=setTimeout(k,a);return()=>clearTimeout(o)}),[C.data]),U?.appId?/*#__PURE__*/e(h,{providerApp:{id:U?.appId,logoUrl:U?.logoUrl,name:U?.name},success:!!C.data,error:C.error,onClose:k}):(console.warn("Missing data for Screen"),null)},isShownBeforeReady:!0};export{v as CrossAppAuthScreen,h as CrossAppAuthScreenView,v as default};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import{AlertCircle as t,CheckCircle as o,CloudUpload as r}from"lucide-react";import{useState as s,useEffect as i}from"react";import{W as a}from"./WalletInfoCard-CVCh-Z5E.mjs";import{u as n,r as c}from"./context-CwMpvKNV.mjs";import{u as m,a as l}from"./internal-context-Z-fyxadS.mjs";import{a as p}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as u}from"./ScreenLayout-kyRBwF5n.mjs";import"styled-components";import"./ModalHeader-CvLNEZ0F.mjs";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-BmCgxKQR.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const d=({appName:s,address:i,success:n,error:c,onAccept:m,onDecline:l,onClose:p})=>/*#__PURE__*/e(u,n||c?{title:c?"Something went wrong":"Success!",subtitle:c?"Please try again.":`You've successfully granted delegated action permissions to ${s}.`,icon:c?t:o,iconVariant:c?"error":"success",onBack:p,watermark:!0}:{title:"Enable offline access",subtitle:`By confirming, ${s} will be able to use your wallet for you even when you're not around. You can revoke this later.`,icon:r,primaryCta:{label:"Accept",onClick:m},secondaryCta:{label:"Not now",onClick:l},onBack:p,watermark:!0,children:/*#__PURE__*/e(a,{address:i,title:"Wallet"})}),j={component:()=>{let{data:t}=p(),o=n(),{closePrivyModal:r}=m(),[a,u]=s(!1),[j,f]=s(),{address:y,onDelegate:g,onSuccess:h,onError:w}=t.delegatedActions.consent,v=async()=>{a?h():w(j??new l("User declined delegating actions.")),r({shouldCallAuthOnSuccess:!1})};return i((()=>{if(!a&&!j)return;let e=setTimeout(v,c);return()=>clearTimeout(e)}),[a,j]),/*#__PURE__*/e(d,{appName:o.name,address:y,success:a,error:j,onAccept:async()=>{try{await g(),u(!0)}catch(e){f(e)}},onDecline:()=>{v()},onClose:v})}};export{j as DelegatedActionsConsentScreen,d as DelegatedActionsConsentScreenView,j as default};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import{AlertCircle as o,CheckCircle as t,Ban as r}from"lucide-react";import{useState as i,useEffect as n}from"react";import{u as s,r as a}from"./context-CwMpvKNV.mjs";import{u as c,a as m}from"./internal-context-Z-fyxadS.mjs";import{a as l}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as p}from"./ScreenLayout-kyRBwF5n.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"viem";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const u=({appName:i,success:n,error:s,onRevoke:a,onDeny:c,onClose:m})=>/*#__PURE__*/e(p,n||s?{title:s?"Something went wrong":"Success!",subtitle:s?"Please try again.":"You've successfully revoked permissions.",icon:s?o:t,iconVariant:s?"error":"success",onBack:m,watermark:!0}:{title:"Revoke offline access to wallet",subtitle:`By confirming, ${i} will no longer be able to use this wallet on your behalf when you are not online.`,icon:r,primaryCta:{label:"Confirm",onClick:a},secondaryCta:{label:"Deny",onClick:c},onBack:m,watermark:!0}),d={component:()=>{let{data:o}=l(),t=s(),{closePrivyModal:r}=c(),[p,d]=i(!1),[f,y]=i(),{onRevoke:k,onSuccess:v,onError:w}=o.delegatedActions.revoke,h=async()=>{p?v():w(f??new m("User declined revoking access to their delegated wallet.")),r({shouldCallAuthOnSuccess:!1})};return n((()=>{if(!p&&!f)return;let e=setTimeout(h,a);return()=>clearTimeout(e)}),[p,f]),/*#__PURE__*/e(u,{appName:t.name,success:p,error:f,onRevoke:async()=>{try{await k(),d(!0)}catch(e){y(e)}},onDeny:()=>{h()},onClose:h})}};export{d as DelegatedActionsRevokeScreen,u as DelegatedActionsRevokeScreenView,d as default};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-C47JxA4c.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{u as l,a as c}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as m}from"./ScreenLayout-kyRBwF5n.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"./context-CwMpvKNV.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:w,setModalData:f,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[C,g]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:P,recoveryMethod:S,connectingWalletAddress:T,isUnifiedWallet:W=!1}=w?.connectWallet,F=e=>{C||(g(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return F("User must be authenticated and have a Privy wallet before it can be connected");try{if(!W){if(!x||!P)return F("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:P})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===S){let e=await d.getAccessToken();if(!e)return F("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:T}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:P}));t?.entropyId||F(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:T}}),h(A)}catch(e){F("An error has occurred, please try again.")}}else a(e)&&"privy"!==S&&"privy-v2"!==S?(f({...w,recoverWallet:{entropyId:x,entropyIdVerifier:P,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:S,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(S))):F(e)}})(),()=>clearTimeout(e)):void 0:F("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{F("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:C,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,c as s,d as c}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as m,r as a}from"./context-CwMpvKNV.mjs";import{u as n}from"./internal-context-Z-fyxadS.mjs";import{S as l}from"./ScreenLayout-kyRBwF5n.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=n(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=m(),{onSuccess:v,onFailure:C,callAuthOnSuccessOnClose:w}=j.createWallet,x=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):C(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:w})};return o((()=>{let e=setTimeout(x,a);return()=>clearTimeout(e)}),[]),f.current=x,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:x})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-CwMpvKNV.mjs";import{v as s,s as l,k as n,F as m,R as c}from"./index-C47JxA4c.mjs";import{u as d,m as p}from"./internal-context-Z-fyxadS.mjs";import{a as u,u as h}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as y}from"./ScreenLayout-kyRBwF5n.mjs";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(y,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),v={component:()=>{let{setModalData:t,navigate:y,data:v,onUserCloseViaDialogOrKeybindRef:C}=u(),g=a(),[j,f]=r(""),{embeddedWallets:b}=a(),{authenticated:S,user:x}=h(),{closePrivyModal:W,walletProxy:O,client:A}=d(),{onSuccess:k,onFailure:P,callAuthOnSuccessOnClose:I,shouldCreateEth:M,shouldCreateSol:R}=v.createWallet,U="legacy-embedded-wallets-only"===g.embeddedWallets.mode&&!0===g?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[E,K]=r(null),{create:L}=s(),T=M??(!!x&&l(x,g.embeddedWallets.ethereum.createOnLogin)),F=R??(!!x&&n(x,g.embeddedWallets.solana.createOnLogin)),D=new c((async()=>{let e=await A.getAccessToken();if(x&&e&&O)try{let e,t=await i(x.id,"ethereum"),r=await i(x.id,"solana");if(T&&F)e=await L({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t}),e=await L({chainType:"solana",walletIndex:0,latestUser:e.user,idempotencyKey:r});else if(F)e=await L({chainType:"solana",walletIndex:0,latestUser:x,idempotencyKey:r});else{if(!T)return void W({shouldCallAuthOnSuccess:I});e=await L({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t})}K(e),y("EmbeddedWalletCreatedScreen")}catch(e){f(e.message)}}));return o((()=>S&&x?U?(t({...v,createWallet:{...v.createWallet,shouldCreateEth:T,shouldCreateSol:F},recoverySelection:{...v?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:T,shouldCreateSol:F}}),y(m({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:b.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void D.execute():(y("LandingScreen"),void P(Error("User must be authenticated before creating a Privy wallet")))),[U,S]),C.current=()=>null/*#__PURE__*/,e(w,{errorMessage:j||void 0,onClose:()=>{E?(k(E),W({shouldCallAuthOnSuccess:I})):(P(new p("User wallet creation failed")),W({shouldCallAuthOnSuccess:!1}))}})}};export{v as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,v as default};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as i}from"./context-CwMpvKNV.mjs";import{u as n,o as d,m as c}from"./internal-context-Z-fyxadS.mjs";import{g as l}from"./useWallets-02TRgRMN.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-Bns8qtXn.mjs";import"viem";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"styled-components";import"./ModalHeader-CvLNEZ0F.mjs";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./shared-CSN6-8CF.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,_]=o(""),{authenticated:A,user:I}=t(),{client:M,walletProxy:b,refreshSessionAndUser:j,closePrivyModal:C,createAnalyticsEvent:R}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:N}=x.setWalletPassword,D=a(I),O="user-passcode"===u?.recoveryMethod,T="user-passcode"===D?.recoveryMethod;r((()=>{A||(P("LandingScreen"),N(new d("User must be authenticated before setting a password on a Privy wallet")))}),[A]);let L=()=>v?(N(v),void C({shouldCallAuthOnSuccess:!1})):O?(k(u),void C({shouldCallAuthOnSuccess:!1})):(N(new c("Exited before password was added to wallet")),void C({shouldCallAuthOnSuccess:!1}));S.current=L;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:L},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:T,onPasswordGenerate:()=>_(p()),onPasswordChange:_,onSubmit:async()=>{O?(k(u),C({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await M.getAccessToken();if(e&&I&&D?.address&&f&&b)try{R({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T}});let{entropyId:o,entropyIdVerifier:r}=l(I);if(!(await b.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void R({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T,reason:"error setting password"}});let t=await j(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void R({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T,reason:"wallet disconnected"}});w(s),R({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:T}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),R({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:D.address,reason:e}})}})(),h(!1))},onClose:L})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-Z-fyxadS.mjs";import{a}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as c}from"./ScreenLayout-kyRBwF5n.mjs";import"ofetch";import"react";import"viem";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const m=({onClose:i,onProceed:s})=>/*#__PURE__*/e(c,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),n={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:c}=a(),{onFailure:n}=t.setWalletPassword,l=()=>{n(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return c.current=l,/*#__PURE__*/e(m,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{n as EmbeddedWalletPasswordUpdateSplashScreen,m as EmbeddedWalletPasswordUpdateSplashView,n as default};
@@ -1,4 +0,0 @@
1
- import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-CwMpvKNV.mjs";import{a as c,P as l}from"./index-C47JxA4c.mjs";import{c as m,b as p,a as u,e as d}from"./internal-context-Z-fyxadS.mjs";import{a as T}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{R as g}from"./reservoir-0wfhnc0j.mjs";import{S as h}from"./ScreenLayout-kyRBwF5n.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const y=({error:n,allowlistConfig:s,onRetry:c,onCaptchaReset:T,onBack:y})=>{let f=((n,s)=>{if(n instanceof g)return{title:"Transaction failed",detail:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:n.message}),/*#__PURE__*/e("span",{children:[" ","Check the"," ",/*#__PURE__*/t(w,{href:n.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(n instanceof u)switch(n.privyErrorCode){case p.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:n.message,ctaText:"Try again",icon:i};case p.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:n.message,ctaText:"Try again",icon:i};case p.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:n.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(n instanceof l&&"twilio_verification_failed"===n.type)return{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:a};if(!(n instanceof m))return n instanceof d&&n.status&&[400,422].includes(n.status)?{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(n.privyErrorCode){case p.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case p.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:n.message,ctaText:"Try another method",icon:i};case p.ALLOWLIST_REJECTED:return{title:s.errorTitle||"You don't have access to this app",detail:s.errorDetail||"Have you been invited?",ctaText:s.errorCtaText||"Try another account",icon:o};case p.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case p.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case p.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(n,s);/*#__PURE__*/return t(h,{title:f.title,subtitle:f.detail,icon:f.icon,onBack:y,iconVariant:"error",primaryCta:{label:f.ctaText,onClick:()=>{n instanceof m&&(n.privyErrorCode===p.INVALID_CAPTCHA&&T?.(),n.privyErrorCode===p.ALLOWLIST_REJECTED&&s.errorCtaLink)?window.location.href=s.errorCtaLink:c?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:i,currentScreen:a}=T(),o=s(),{reset:n}=c(),l=r?.errorModalData?.previousScreen||(i===a?void 0:i);/*#__PURE__*/return t(y,{error:r?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(l||"LandingScreen",!1)},onCaptchaReset:n})}};let w=n.a`
2
- color: var(--privy-color-accent) !important;
3
- font-weight: 600;
4
- `;export{f as ErrorScreen,y as ErrorScreenView,f as default};
@@ -1,28 +0,0 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-BGTSFnT3.mjs";import{L as c}from"./useActiveWallet-36SuARye.mjs";import{O as m}from"./OpenLink-DZHy38vr.mjs";import{Q as p}from"./QrCode-AKgpho6r.mjs";import{u as d,q as u}from"./context-CwMpvKNV.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as f}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as h}from"./ScreenLayout-kyRBwF5n.mjs";import{F as v}from"./farcaster-DPlSjvF5.mjs";import"./copy-Bx2Jwc5_.mjs";import"zustand";import"./use-export-wallet-CwQ5-CS4.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"tinycolor2";import"ofetch";import"./ModalHeader-CvLNEZ0F.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-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";let y="#8a63d2";const w=({appName:r,loading:o,success:a,errorMessage:n,connectUri:d,onBack:u,onClose:g,onOpenFarcaster:f})=>/*#__PURE__*/e(h,i||o?s?{title:n?n.message:"Add a signer to Farcaster",subtitle:n?n.detail:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},primaryCta:d&&f?{label:"Open Farcaster app",onClick:f}:void 0,onBack:u,onClose:g,watermark:!0}:{title:n?n.message:"Requesting signer from Farcaster",subtitle:n?n.detail:"This should only take a moment",icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},onBack:u,onClose:g,watermark:!0,children:d&&i&&/*#__PURE__*/e(k,{children:/*#__PURE__*/e(m,{text:"Take me to Farcaster",url:d,color:y})})}:{title:"Add a signer to Farcaster",subtitle:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,onBack:u,onClose:g,watermark:!0,children:/*#__PURE__*/t(j,{children:[/*#__PURE__*/e(x,{children:d?/*#__PURE__*/e(p,{url:d,size:275,squareLogoElement:v}):/*#__PURE__*/e(S,{children:/*#__PURE__*/e(c,{})})}),/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(b,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),d&&/*#__PURE__*/e(l,{text:d,itemName:"link",color:y})]})]})});let k=n.div`
2
- margin-top: 24px;
3
- `,j=n.div`
4
- display: flex;
5
- flex-direction: column;
6
- align-items: center;
7
- gap: 24px;
8
- `,x=n.div`
9
- padding: 24px;
10
- position: relative;
11
- display: flex;
12
- align-items: center;
13
- justify-content: center;
14
- min-height: 275px;
15
- `,C=n.div`
16
- display: flex;
17
- flex-direction: column;
18
- align-items: center;
19
- gap: 16px;
20
- `,b=n.div`
21
- font-size: 0.875rem;
22
- text-align: center;
23
- color: var(--privy-color-foreground-2);
24
- `,S=n.div`
25
- position: relative;
26
- width: 82px;
27
- height: 82px;
28
- `;const I={component:()=>{let{lastScreen:t,navigateBack:i,data:s}=f(),n=d(),{requestFarcasterSignerStatus:l,closePrivyModal:c}=g(),[m,p]=r(void 0),[h,v]=r(!1),[y,k]=r(!1),j=o([]),x=s?.farcasterSigner;a((()=>{let e=Date.now(),t=setInterval((async()=>{if(!x?.public_key)return clearInterval(t),void p({retryable:!0,message:"Connect failed",detail:"Something went wrong. Please try again."});"approved"===x.status&&(clearInterval(t),v(!1),k(!0),j.current.push(setTimeout((()=>c({shouldCallAuthOnSuccess:!1,isSuccess:!0})),u)));let r=await l(x?.public_key),o=Date.now()-e;"approved"===r.status?(clearInterval(t),v(!1),k(!0),j.current.push(setTimeout((()=>c({shouldCallAuthOnSuccess:!1,isSuccess:!0})),u))):o>3e5?(clearInterval(t),p({retryable:!0,message:"Connect failed",detail:"The request timed out. Try again."})):"revoked"===r.status&&(clearInterval(t),p({retryable:!0,message:"Request rejected",detail:"The request was rejected. Please try again."}))}),2e3);return()=>{clearInterval(t),j.current.forEach((e=>clearTimeout(e)))}}),[]);let C="pending_approval"===x?.status?x.signer_approval_url:void 0;/*#__PURE__*/return e(w,{appName:n.name,loading:h,success:y,errorMessage:m,connectUri:C,onBack:t?i:void 0,onClose:c,onOpenFarcaster:()=>{C&&(window.location.href=C)}})}};export{I as FarcasterSignerStatusScreen,w as FarcasterSignerStatusView,I as default};
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-CvLNEZ0F.mjs";import{b as m,c,R as u,e as d}from"./Layouts-BlFm53ED.mjs";import{C as p}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as f}from"./FundWalletMethodHeader-Ce0vLrUa.mjs";import{I as g}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as h}from"./index-Dq_xe9dz.mjs";import{L as I,V as w}from"./Value-tcJV9e0L.mjs";import{a as v,R as S}from"./Row-C9vrS4Zi.mjs";import{u as j,t as C}from"./context-CwMpvKNV.mjs";import{u as y,a as L,b as x}from"./internal-context-Z-fyxadS.mjs";import{a as k}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as F,g as U}from"./useWallets-BwdySlks.mjs";import{u as T}from"./useGetTokenPrice-CgGm0Ecu.mjs";import{O as b}from"./analytics-mkkvFRju.mjs";import{getTransferSolInstruction as A}from"@solana-program/system";import{pipe as W,createTransactionMessage as P,setTransactionMessageFeePayerSigner as D,setTransactionMessageLifetimeUsingBlockhash as N,appendTransactionMessageInstruction as O,compileTransaction as E,getTransactionEncoder as M}from"@solana/kit";import{findAssociatedTokenPda as B,getCreateAssociatedTokenIdempotentInstruction as $,getTransferInstruction as R}from"@solana-program/token";import{T as H,L as G,g as V}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as _}from"./getUsdcMintAddress-DFI1hv05.mjs";import{u as q,f as z,s as Q,w as X}from"./useSolanaRpcClient-DajzMnxc.mjs";import{g as Y}from"./getChainName-DjpPdUSc.mjs";import{t as J}from"./use-export-wallet-CwQ5-CS4.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-02TRgRMN.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/WalletIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"./usePrivy-D_kd_mMH.mjs";import"eventemitter3";import"@scure/base";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";function K({rows:a}){/*#__PURE__*/return e(v,{children:a.filter((e=>!!e)).map(((a,n)=>null!=a.value||a.isLoading?/*#__PURE__*/t(S,{children:[/*#__PURE__*/e(I,{children:a.label}),/*#__PURE__*/e(w,{$isLoading:a.isLoading,children:a.value})]},n):null))})}function Z(e){return BigInt(Math.floor(1e9*parseFloat(e)))}function ee(e){return+te.format(parseFloat(e.toString())/1e9)}let te=Intl.NumberFormat(void 0,{maximumFractionDigits:8});async function ae({tx:e,solanaClient:t,amount:a,asset:n,tokenPrice:o}){if(!e)return null;if("SOL"===n&&o){let n=Z(a),r=V(n,o),s=await z({solanaClient:t,tx:e});return{amountInUsd:r,feeInUsd:o?V(s,o):void 0,totalInUsd:V(n+s,o)}}if("USDC"===n&&o){let n="$"+a,r=await z({solanaClient:t,tx:e}),s=function(e,t){let a=parseFloat(e.toString())/G*t;return a<.01?0:a}(r,o);return{amountInUsd:n,feeInUsd:V(r,o),totalInUsd:"$"+(parseFloat(a)+s).toFixed(2)}}if("SOL"===n){let n=Z(a),o=await z({solanaClient:t,tx:e});return{amountInSol:a+" SOL",feeInSol:ee(o)+" SOL",totalInSol:ee(n+o)+" SOL"}}return{amountInUsdc:a+" USDC",feeInSol:ee(await z({solanaClient:t,tx:e}))+" SOL"}}const ne={component:function(){let I=j(),{closePrivyModal:w,createAnalyticsEvent:v}=y(),{data:S,setModalData:G,navigate:z}=k(),{wallets:ee}=F(),[te,ne]=o("preparing"),[oe,re]=o(),[se,ie]=o(),[le,me]=o();if(!S?.solanaFundingData)throw Error("Funding config is missing");if(!S.solanaFundingData.sourceWalletData)throw Error("Funding config is missing source wallet data");let{amount:ce,asset:ue,chain:de,sourceWalletData:pe,destinationAddress:fe,afterSuccessScreen:ge}=S.solanaFundingData,he=ee.find((e=>e.address===pe.address&&J(pe.walletClientType)===J(e.standardWallet.name))),Ie=q()(de),{tokenPrice:we,isTokenPriceLoading:ve}=T("solana");return r((()=>{if("preparing"!==te||ve||!he)return;let e="SOL"===ue?Z(ce):function(e){return BigInt(Math.floor(1e6*parseFloat(e)))}(ce);ie({amount:("SOL"===ue&&we?V(e,we):ce)??ce}),("SOL"===ue?async function({solanaClient:e,source:t,destination:a,amountInLamports:n}){let{value:o}=await e.rpc.getLatestBlockhash().send(),r={address:t},s=W(P({version:0}),(e=>D(r,e)),(e=>N(o,e)),(e=>O(A({amount:n,source:r,destination:a}),e)),(e=>E(e)));return new Uint8Array(M().encode(s))}({solanaClient:Ie,source:he.address,destination:fe,amountInLamports:e}):async function({solanaClient:e,source:t,destination:a,amountInBaseUnits:n}){let o=_(e.chain),{value:r}=await e.rpc.getLatestBlockhash().send(),s={address:t},[i]=await B({mint:o,owner:t,tokenProgram:H}),[l]=await B({mint:o,owner:a,tokenProgram:H}),[m,c]=await Promise.all([e.rpc.getAccountInfo(i,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null)),e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null))]);if(!m?.value)throw Error(`Source token account does not exist for address: ${t}`);let u=$({payer:s,ata:l,owner:a,mint:o}),d=W(P({version:0}),(e=>D(s,e)),(e=>N(r,e)),(e=>c?.value?e:O(u,e)),(e=>O(R({source:i,destination:l,authority:s,amount:n}),e)),(e=>E(e)));return new Uint8Array(M().encode(d))}({solanaClient:Ie,source:he.address,destination:fe,amountInBaseUnits:e})).then(re).catch((e=>{ne("error"),me(e)}))}),[te,ce,ue,de,he,fe,ve,we]),r((()=>{"preparing"===te&&oe&&ae({tx:oe,solanaClient:Ie,amount:ce,asset:ue,tokenPrice:we}).then((e=>{ne("loaded"),ie({amount:e?.amountInUsd??e?.amountInUsdc??e?.amountInSol??ce,fee:e?.feeInUsd??e?.feeInSol,total:e?.totalInUsd??e?.totalInSol})})).catch((e=>{ne("error"),me(e)}))}),[oe,ce,ue,te,we]),r((()=>{"error"===te&&le&&(G({errorModalData:{error:le,previousScreen:"FundSolWalletWithExternalSolanaWallet"},solanaFundingData:S.solanaFundingData}),z("ErrorScreen",!1))}),[te,z]),r((()=>{if("success"!==te)return;let e=setTimeout(ge?()=>z(ge):w,C);return()=>clearTimeout(e)}),[te]),/*#__PURE__*/t(a,"success"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(m,{}),/*#__PURE__*/t(c,{children:[/*#__PURE__*/e(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e(p,{title:"Success!",description:`You’ve successfully added ${ce} ${ue} to your ${I.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/e(u,{}),/*#__PURE__*/e(i,{})]}:"preparing"===te||"loaded"===te||"sending"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(d,{style:{marginTop:"16px"},children:/*#__PURE__*/e(g,{icon:he?.standardWallet.icon,name:he?.standardWallet.name})}),/*#__PURE__*/e(p,{style:{marginTop:"8px",marginBottom:"12px"},title:"sending"===te&&he?`Confirming with ${he.standardWallet.name}`:"Confirm transaction"}),/*#__PURE__*/e(K,{rows:[{label:"Source",value:s(pe.address)},{label:"Destination",value:s(fe)},{label:"Network",value:Y(de)},{label:"Amount",value:se?.amount,isLoading:"preparing"===te},{label:"Estimated fee",value:se?.fee,isLoading:"preparing"===te},{label:"Total",value:se?.total,isLoading:"preparing"===te}]}),/*#__PURE__*/e(l,{style:{marginTop:"1rem"},loading:"preparing"===te||"sending"===te,onClick:function(){"loaded"===te&&oe&&he&&(ne("sending"),async function({transaction:e,chain:t,sourceWallet:a,solanaClient:n}){let{hasFunds:o}=await Q({solanaClient:n,tx:e});if(!o)throw new L(`Wallet ${s(a.address)} does not have enough funds.`,void 0,x.INSUFFICIENT_BALANCE);let r=U((await a.signAndSendTransaction({transaction:e,chain:t}).catch((e=>{throw new L("Transaction was rejected by the user",e,x.TRANSACTION_FAILURE)}))).signature);return await X({rpcSubscriptions:n.rpcSubscriptions,signature:r,timeout:2e4}),r}({solanaClient:Ie,transaction:oe,chain:de,sourceWallet:he}).then((e=>{ne("success"),v({eventName:b,payload:{provider:"external",status:"success",txHash:e,address:he.address,value:ce,chainType:"solana",clusterName:de,token:ue,destinationAddress:fe,destinationValue:ce,destinationChainType:"solana",destinationClusterName:de,destinationToken:ue}})})).catch((e=>{ne("error"),me(e)})))},children:"Confirm"}),/*#__PURE__*/e(i,{})]}:{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(h,{}),/*#__PURE__*/e("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/e(i,{})]})}};export{ne as FundSolWalletWithExternalSolanaWallet,ne as default};
@@ -1 +0,0 @@
1
- import{jsxs as t,Fragment as e,jsx as o}from"react/jsx-runtime";import{useRef as r}from"react";import{c as i,B as n}from"./ModalHeader-CvLNEZ0F.mjs";import{F as s}from"./Layouts-BlFm53ED.mjs";import{t as m}from"./FundWalletMethodHeader-Ce0vLrUa.mjs";import{N as a}from"./index-Dq_xe9dz.mjs";import{T as c}from"./Title-BnzYV3Is.mjs";import{a as l}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as p}from"./useGetTokenPrice-CgGm0Ecu.mjs";import{c as d}from"./ethers-DGsvPPEp.mjs";import{F as u,a as h,h as j,c as f,d as C}from"./styles-aArPlAod.mjs";import"styled-components";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./useGetSolPrice-DwwjjGbd.mjs";import"./LinkPasskeyScreen-BfGROb2f.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.mjs";const g={component:()=>{let{data:g,setModalData:v}=l(),y=g?.funding,x="solana"===y.chainType,k=r(null),{tokenPrice:D}=p(x?"solana":y.chain.id),S=x?void 0:y,T=!(!S?.erc20Address||S?.erc20ContractInfo),F=x?y.isUSDC?"USDC":"SOL":y.erc20Address?y.erc20ContractInfo?.symbol:y.chain.nativeCurrency.symbol||"ETH",A=parseFloat(y.amount),I=!isNaN(A)&&A>0,L=D?d(y.amount,D):void 0;/*#__PURE__*/return t(e,{children:[/*#__PURE__*/o(m,{}),/*#__PURE__*/o(c,{children:"Confirm or edit amount"}),/*#__PURE__*/t(s,{style:{marginTop:"32px"},children:[/*#__PURE__*/o(u,{children:T?/*#__PURE__*/o(a,{size:"50px"}):/*#__PURE__*/t(e,{children:[/*#__PURE__*/t(h,{onClick:()=>k.current?.focus(),children:[/*#__PURE__*/o(j,{ref:k,value:y.amount,onChange:t=>{let e=t.target.value;/^[0-9.]*$/.test(e)&&e.split(".").length-1<=1&&v({...g,funding:{...y,amount:e},solanaFundingData:g?.solanaFundingData?{...g.solanaFundingData,amount:e}:void 0})}}),/*#__PURE__*/o(f,{children:F})]}),!S?.erc20Address&&!(x&&y.isUSDC)&&/*#__PURE__*/o(C,{children:L&&I?`${L} USD`:""})]})}),/*#__PURE__*/o(i,{style:{marginTop:"1rem"},disabled:!I,onClick:y.onContinueWithExternalWallet,children:"Continue"})]}),/*#__PURE__*/o(n,{})]})}};export{g as FundingAmountEditScreen,g as default};
@@ -1 +0,0 @@
1
- import{jsx as e,jsxs as n,Fragment as t}from"react/jsx-runtime";import a from"@heroicons/react/24/outline/CreditCardIcon";import i from"@heroicons/react/24/outline/QrCodeIcon";import o from"@heroicons/react/24/solid/ArrowsRightLeftIcon";import{useState as r,useEffect as c,useMemo as d}from"react";import{getAddress as s}from"viem/utils";import{B as l}from"./ModalHeader-CvLNEZ0F.mjs";import{t as h}from"./FundWalletMethodHeader-Ce0vLrUa.mjs";import{E as p}from"./ErrorBanner-CQERa7bL.mjs";import{I as m}from"./InfoBanner-Dk1KghcK.mjs";import{u}from"./context-CwMpvKNV.mjs";import{v as f,Q as g,U as y}from"./useActiveWallet-36SuARye.mjs";import{a as C,u as v}from"./internal-context-Z-fyxadS.mjs";import{a as w}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as F}from"./useWallets-02TRgRMN.mjs";import{W as M}from"./WalletCards-DH1rqayz.mjs";import{g as b}from"./getErc20TokenInfo-CZJTqd4c.mjs";import{avalanche as S,arbitrum as W,polygon as x,optimism as I,base as j,mainnet as D,toCoinbaseAssetId as T,getCoinbaseOnRampUrl as k,chainToMoonpayCurrency as A,isSupportedChainIdForMoonpay as z,isSupportedChainIdForCoinbaseOnramp as L}from"@privy-io/js-sdk-core";import{trigger as E}from"@privy-io/popup";import{a as U}from"./index-BMpFxPbi.mjs";import{e as O,I as _,f as H,g as P}from"./styles-aArPlAod.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"tinycolor2";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"./analytics-mkkvFRju.mjs";import"./LinkPasskeyScreen-BfGROb2f.mjs";import"lucide-react";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-kyRBwF5n.mjs";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const B=n=>/*#__PURE__*/e("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 210.2",xmlSpace:"preserve",...n,children:/*#__PURE__*/e("path",{d:"M93.6,27.1C87.6,34.2,78,39.8,68.4,39c-1.2-9.6,3.5-19.8,9-26.1c6-7.3,16.5-12.5,25-12.9 C103.4,10,99.5,19.8,93.6,27.1 M102.3,40.9c-13.9-0.8-25.8,7.9-32.4,7.9c-6.7,0-16.8-7.5-27.8-7.3c-14.3,0.2-27.6,8.3-34.9,21.2 c-15,25.8-3.9,64,10.6,85c7.1,10.4,15.6,21.8,26.8,21.4c10.6-0.4,14.8-6.9,27.6-6.9c12.9,0,16.6,6.9,27.8,6.7 c11.6-0.2,18.9-10.4,26-20.8c8.1-11.8,11.4-23.3,11.6-23.9c-0.2-0.2-22.4-8.7-22.6-34.3c-0.2-21.4,17.5-31.6,18.3-32.2 C123.3,42.9,107.7,41.3,102.3,40.9 M182.6,11.9v155.9h24.2v-53.3h33.5c30.6,0,52.1-21,52.1-51.4c0-30.4-21.1-51.2-51.3-51.2H182.6z M206.8,32.3h27.9c21,0,33,11.2,33,30.9c0,19.7-12,31-33.1,31h-27.8V32.3z M336.6,169c15.2,0,29.3-7.7,35.7-19.9h0.5v18.7h22.4V90.2 c0-22.5-18-37-45.7-37c-25.7,0-44.7,14.7-45.4,34.9h21.8c1.8-9.6,10.7-15.9,22.9-15.9c14.8,0,23.1,6.9,23.1,19.6v8.6l-30.2,1.8 c-28.1,1.7-43.3,13.2-43.3,33.2C298.4,155.6,314.1,169,336.6,169z M343.1,150.5c-12.9,0-21.1-6.2-21.1-15.7c0-9.8,7.9-15.5,23-16.4 l26.9-1.7v8.8C371.9,140.1,359.5,150.5,343.1,150.5z M425.1,210.2c23.6,0,34.7-9,44.4-36.3L512,54.7h-24.6l-28.5,92.1h-0.5 l-28.5-92.1h-25.3l41,113.5l-2.2,6.9c-3.7,11.7-9.7,16.2-20.4,16.2c-1.9,0-5.6-0.2-7.1-0.4v18.7C417.3,210,423.3,210.2,425.1,210.2z"})}),R=t=>/*#__PURE__*/n("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 80 38.1",xmlSpace:"preserve",...t,children:[/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M37.8,19.7V29h-3V6h7.8c1.9,0,3.7,0.7,5.1,2c1.4,1.2,2.1,3,2.1,4.9c0,1.9-0.7,3.6-2.1,4.9c-1.4,1.3-3.1,2-5.1,2 L37.8,19.7L37.8,19.7z M37.8,8.8v8h5c1.1,0,2.2-0.4,2.9-1.2c1.6-1.5,1.6-4,0.1-5.5c0,0-0.1-0.1-0.1-0.1c-0.8-0.8-1.8-1.3-2.9-1.2 L37.8,8.8L37.8,8.8z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M56.7,12.8c2.2,0,3.9,0.6,5.2,1.8s1.9,2.8,1.9,4.8V29H61v-2.2h-0.1c-1.2,1.8-2.9,2.7-4.9,2.7 c-1.7,0-3.2-0.5-4.4-1.5c-1.1-1-1.8-2.4-1.8-3.9c0-1.6,0.6-2.9,1.8-3.9c1.2-1,2.9-1.4,4.9-1.4c1.8,0,3.2,0.3,4.3,1v-0.7 c0-1-0.4-2-1.2-2.6c-0.8-0.7-1.8-1.1-2.9-1.1c-1.7,0-3,0.7-3.9,2.1l-2.6-1.6C51.8,13.8,53.9,12.8,56.7,12.8z M52.9,24.2 c0,0.8,0.4,1.5,1,1.9c0.7,0.5,1.5,0.8,2.3,0.8c1.2,0,2.4-0.5,3.3-1.4c1-0.9,1.5-2,1.5-3.2c-0.9-0.7-2.2-1.1-3.9-1.1 c-1.2,0-2.2,0.3-3,0.9C53.3,22.6,52.9,23.3,52.9,24.2z"}),/*#__PURE__*/e("path",{style:{fill:"#5F6368"},d:"M80,13.3l-9.9,22.7h-3l3.7-7.9l-6.5-14.7h3.2l4.7,11.3h0.1l4.6-11.3H80z"}),/*#__PURE__*/e("path",{style:{fill:"#4285F4"},d:"M25.9,17.7c0-0.9-0.1-1.8-0.2-2.7H13.2v5.1h7.1c-0.3,1.6-1.2,3.1-2.6,4v3.3H22C24.5,25.1,25.9,21.7,25.9,17.7z"}),/*#__PURE__*/e("path",{style:{fill:"#34A853"},d:"M13.2,30.6c3.6,0,6.6-1.2,8.8-3.2l-4.3-3.3c-1.2,0.8-2.7,1.3-4.5,1.3c-3.4,0-6.4-2.3-7.4-5.5H1.4v3.4 C3.7,27.8,8.2,30.6,13.2,30.6z"}),/*#__PURE__*/e("path",{style:{fill:"#FBBC04"},d:"M5.8,19.9c-0.6-1.6-0.6-3.4,0-5.1v-3.4H1.4c-1.9,3.7-1.9,8.1,0,11.9L5.8,19.9z"}),/*#__PURE__*/e("path",{style:{fill:"#EA4335"},d:"M13.2,9.4c1.9,0,3.7,0.7,5.1,2l0,0l3.8-3.8c-2.4-2.2-5.6-3.5-8.8-3.4c-5,0-9.6,2.8-11.8,7.3l4.4,3.4 C6.8,11.7,9.8,9.4,13.2,9.4z"})]}),V=e=>{let[n,t]=r();return c((()=>{e().then((e=>{t(e)})).catch((()=>{}))}),[]),n};function q(e){let n=N[e];if(!n)throw new C(`Unsupported chainId: ${e} for Coinbase Onramp`);return n}let N={[D.id]:"ethereum",[j.id]:"base",[I.id]:"optimism",[x.id]:"polygon",[W.id]:"arbitrum",[S.id]:"avacchain"};const Q=(e,n,t,a,i,o)=>new Promise((async(r,c)=>{let d=E();if(!d)return void c(Error("Unable to initialize flow"));let s="ethereum"===n.chainType?q(n.chain.id):"solana",l=n.isUSDC?"USDC":"ethereum"===n.chainType?T(n.chain.id,"native-currency"):"SOL",h=await e.initCoinbaseOnRamp({addresses:[{address:n.address,blockchains:[s]}],assets:[l]}),{url:p}=k({appId:e.getAppId(),input:h,amount:n.amount,blockchain:s,asset:l,experience:o});d.location=p.toString();let m={...i?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(m.usingDefaultFundingMethod=!1),t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{popup:d}}),a("CoinbaseOnrampStatusScreen"),e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"coinbase-onramp",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),setTimeout((()=>{t({funding:m,solanaFundingData:i?.solanaFundingData,coinbaseOnrampStatus:{partnerUserId:h.partner_user_id,popup:d}})}),5e3),r()})),$=async(e,n,t,a,i,o,r,c)=>{let d=E();if(!d)throw Error("Unable to initialize flow");let s="ethereum"===n.chainType?A(n.chain.id,a):n.isUSDC?"USDC_SOL":"SOL",{signedUrl:l,externalTransactionId:h}=await e.signMoonpayOnRampUrl({address:n.address,useSandbox:t.fundingMethodConfig.moonpay.useSandbox??!1,config:{uiConfig:{accentColor:t.appearance.palette.accent,theme:t.appearance.palette.colorScheme},paymentMethod:c,currencyCode:s,quoteCurrencyAmount:U(n.amount)}});e.createAnalyticsEvent({eventName:"sdk_fiat_on_ramp_started",payload:{provider:"moonpay",value:n.amount,chainType:n.chainType,chainId:"ethereum"===n.chainType?n.chain.id:n.chain}}),d.location=l;let p={...r?.funding,showAlternateFundingMethod:!0};n.usingDefaultFundingMethod&&(p.usingDefaultFundingMethod=!1),i({moonpayStatus:{},funding:p,solanaFundingData:r?.solanaFundingData}),o("MoonpayStatusScreen"),setTimeout((()=>{i({moonpayStatus:{externalTransactionId:h},funding:p,solanaFundingData:r?.solanaFundingData})}),8e3)};let K=async e=>"undefined"!=typeof window&&"PaymentRequest"in window&&await new window.PaymentRequest([{supportedMethods:e}],{id:"0",total:{label:"Item",amount:{currency:"USD",value:"1.00"}}}).canMakePayment();const X=()=>K("https://apple.com/apple-pay"),G=()=>K("https://google.com/pay"),J={component:()=>{let{wallets:r}=F(),{connectors:C}=v(),S=C.filter(f).flatMap((e=>e.wallets)),{navigate:W,data:x,setModalData:I}=w(),{client:j}=v(),D=u(),T=x?.funding,k=V(X),A=V(G),E="solana"===T.chainType,U=E?void 0:T,q=d((()=>((e,n,t,a,i,o)=>{let r,c,d="solana"===t.chainType,s=d?void 0:t,l=t.isUSDC?"USDC":s?.erc20Address?void 0:"native-currency",h=!!d||l&&z(Number(t.chain.id),l),p=!!d||l&&L(Number(t.chain.id),l),m=[];for(let r of(t.preferredCardProvider&&t.supportedOptions.sort((e=>e.provider===t.preferredCardProvider?-1:1)),t.supportedOptions))"card"===r.method&&"coinbase"===r.provider&&p&&m.push((()=>Q(n,t,a,i,o,"buy"))),"card"===r.method&&"moonpay"===r.provider&&h&&l&&m.push((()=>$(n,t,e,l,a,i,o,"credit_debit_card")));for(let e of t.supportedOptions)"exchange"===e.method&&"coinbase"===e.provider&&p&&(r=()=>Q(n,t,a,i,o,"buy"));for(let e of o?.funding?.supportedOptions??[])"wallets"===e.method&&(c=()=>i("TransferFromWalletScreen"));return{onFundWithCard:m,onFundWithExchange:r,onFundWithWallet:c}})(D,j,T,I,W,x)),[D,j,T,x,I,W]),N=E?S.find((({address:e})=>e===T.address)):r.find((({address:e})=>s(e)===s(T.address))),K=g(N?.walletClientType||"unknown"),J=K?.name||"wallet",Y=N&&"privy"!==N.walletClientType?J:D.name,Z=d((()=>T.uiConfig?.landing?.title?T.uiConfig?.landing?.title:`Add funds to your ${Y?.toLowerCase().endsWith("wallet")?Y:Y+" wallet"}`),[T.uiConfig?.landing?.title,Y]);c((()=>{if(T?.defaultFundingMethod&&T.usingDefaultFundingMethod)switch(I({funding:{...T,usingDefaultFundingMethod:!1},solanaFundingData:x?.solanaFundingData}),T?.defaultFundingMethod){case"card":q.onFundWithCard[0]&&q.onFundWithCard[0]();break;case"exchange":q.onFundWithExchange&&q.onFundWithExchange();break;case"wallet":q.onFundWithWallet&&q.onFundWithWallet();break;case"manual":W("ManualTransferScreen")}}),[]),c((()=>{U?.erc20Address&&!U.erc20ContractInfo&&b({address:U.erc20Address,chain:U.chain,rpcConfig:D.rpcConfig,privyAppId:D.id}).then((e=>{I({...x,funding:{...U,erc20ContractInfo:e?{symbol:e.symbol,decimals:e.decimals}:void 0}})})).catch(console.error)}),[U?.erc20Address,U?.chain]);let ee=!(!U?.erc20Address||U?.erc20ContractInfo);/*#__PURE__*/return n(t,{children:[/*#__PURE__*/e(h,{}),/*#__PURE__*/e("h3",{children:Z}),/*#__PURE__*/n(O,{children:[T.errorMessage&&/*#__PURE__*/e(p,{theme:D.appearance.palette.colorScheme,children:T.errorMessage}),q.onFundWithCard?.[0]&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithCard[0],children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(a,{style:{width:24}})}),"Pay with card",k?/*#__PURE__*/e(B,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):A?/*#__PURE__*/e(R,{style:{marginLeft:"auto",maxWidth:"100%",width:"auto",height:"0.875rem"}}):null]}),q.onFundWithExchange&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithExchange,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(o,{style:{width:24}})}),"Transfer from an exchange"]}),q.onFundWithWallet&&/*#__PURE__*/n(y,{disabled:ee,onClick:q.onFundWithWallet,children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(M,{style:{width:24}})}),"Transfer from wallet"]}),/*#__PURE__*/n(y,{disabled:ee,onClick:()=>W("ManualTransferScreen"),children:[/*#__PURE__*/e(_,{children:/*#__PURE__*/e(i,{style:{width:24}})}),"Receive funds"]}),T?.showAlternateFundingMethod&&q.onFundWithCard?.[1]&&/*#__PURE__*/e(m,{theme:D.appearance.palette.colorScheme,children:/*#__PURE__*/n(H,{children:["Having trouble or facing location restrictions?"," ",/*#__PURE__*/e(P,{onClick:q.onFundWithCard[1],children:"Try a different provider."})]})})]}),/*#__PURE__*/e(l,{})]})}};export{J as FundingMethodSelectionScreen,J as default};
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import{ExternalLink as o}from"lucide-react";import{u as e}from"./internal-context-Z-fyxadS.mjs";import{S as r}from"./ScreenLayout-kyRBwF5n.mjs";import"ofetch";import"react";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./get-is-unified-wallet-C6sEzDpG.mjs";import"viem";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const i=({onClose:e})=>/*#__PURE__*/t(r,{title:"Could not log in with provider",subtitle:"It looks like you're using an in-app browser. To log in, please try again using an external browser.",icon:o,primaryCta:{label:"Close",onClick:e},watermark:!0}),m={component:()=>{let{closePrivyModal:o}=e();/*#__PURE__*/return t(i,{onClose:()=>o()})}};export{m as InAppBrowserLoginNotPossible,i as InAppBrowserLoginNotPossibleView,m as default};
@@ -1 +0,0 @@
1
- import{jsx as t,jsxs as e,Fragment as o}from"react/jsx-runtime";import{L as r}from"./Link-DJ5gq9Di.mjs";import{T as i,a as l}from"./TodoList-CgrU7uwu.mjs";import{a}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as n}from"./ScreenLayout-kyRBwF5n.mjs";import"styled-components";import"lucide-react";import"react";import"viem";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-CvLNEZ0F.mjs";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const s=({walletName:a,installLink:s,title:m,subtitle:c="Follow the instructions below to get started.",onReload:p,onBack:d})=>{let h=m||`Create a ${a} wallet`.replace(/wallet wallet/gi,"wallet");/*#__PURE__*/return t(n,{title:h,subtitle:c,onBack:d,showBack:!0,primaryCta:{label:"Reload the page to use your wallet",onClick:p},helpText:/*#__PURE__*/e(o,{children:[/*#__PURE__*/t("span",{children:"Still not sure? "}),/*#__PURE__*/t(r,{size:"sm",target:"_blank",href:"https://solana.com/docs/intro/wallets",children:"Learn more"})]}),watermark:!0,children:/*#__PURE__*/e(i,{children:[/*#__PURE__*/t(l,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/t("span",{children:"Install the "})," ",/*#__PURE__*/e(r,{href:s,target:"_blank",children:[a," browser extension"]})]})}),/*#__PURE__*/t(l,{children:"Set up your first wallet"}),/*#__PURE__*/t(l,{children:"Store your recovery phrase in a safe place!"})]})})},m={component:()=>{let{navigateBack:e,data:o}=a();if(!o?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:r}=o.installWalletModalData;/*#__PURE__*/return t(s,{walletName:r.name,installLink:r.installLink,onReload:()=>{window.location.reload()},onBack:e})}};export{m as InstallWalletScreen,s as InstallWalletScreenView,m as default};
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import{u as o}from"./context-CwMpvKNV.mjs";import{C as r,L as i}from"./CustomLandingScreenView-B4a5Rc9z.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"./ModalHeader-CvLNEZ0F.mjs";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"eventemitter3";import"viem/utils";import"./get-is-unified-wallet-C6sEzDpG.mjs";import"viem";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./index-C47JxA4c.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-D_kd_mMH.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-BXqs6pWG.mjs";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"./copy-Bx2Jwc5_.mjs";import"./Link-DJ5gq9Di.mjs";import"./QrCode-AKgpho6r.mjs";import"qrcode";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"./useI18n-CbESkJQ7.mjs";import"./WalletCards-DH1rqayz.mjs";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";import"lucide-react";import"./ConnectEmailForm-DvQJmoTc.mjs";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./farcaster-DPlSjvF5.mjs";import"@heroicons/react/24/outline/FingerPrintIcon";import"./ConnectPhoneForm-nVYECWzo.mjs";import"./twitter-BoAxhlj6.mjs";import"./twitch-5IOe4sIQ.mjs";import"./telegram-B-JqnkqZ.mjs";import"./WalletOverflowButton-qXN0KcGe.mjs";import"./ScreenLayout-kyRBwF5n.mjs";const e={component:()=>{let e=o();return e.loginMethodsAndOrder&&e.loginMethodsAndOrder.primary.length>0?/*#__PURE__*/t(r,{connectOnly:!1}):/*#__PURE__*/t(i,{connectOnly:!1})},isCaptchaRequired:!0,isUnauthenticatedScreem:!0};export{e as LandingScreen,e as default};
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import o from"@heroicons/react/24/outline/EnvelopeIcon";import{C as i}from"./ConnectEmailForm-DvQJmoTc.mjs";import{B as r}from"./Layouts-BlFm53ED.mjs";import{u as e}from"./context-CwMpvKNV.mjs";import{S as m}from"./ScreenLayout-kyRBwF5n.mjs";import"lucide-react";import"react";import"styled-components";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./index-C47JxA4c.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"./get-is-unified-wallet-C6sEzDpG.mjs";import"viem";import"eventemitter3";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.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-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"./EmailInputForm-Dgoii4vf.mjs";import"./ErrorMessage-D8VaAP5m.mjs";import"tinycolor2";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const p=({title:e="Connect your email",subtitle:p="Add your email to your account"})=>/*#__PURE__*/t(m,{title:e,subtitle:p,icon:o,watermark:!0,children:/*#__PURE__*/t(r,{children:/*#__PURE__*/t(i,{stacked:!0})})}),s={component:()=>{let o=e();/*#__PURE__*/return t(p,{subtitle:`Add your email to your ${o?.name} account`})}};export{s as LinkEmailScreen,p as LinkEmailScreenView,s as default};
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import e from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-nVYECWzo.mjs";import{u as i}from"./context-CwMpvKNV.mjs";import{u as n}from"./internal-context-Z-fyxadS.mjs";import{a as m}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as a}from"./ScreenLayout-kyRBwF5n.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"./ModalHeader-CvLNEZ0F.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Connect your phone",subtitle:n="Add your number to your account",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null),l=async()=>{c?.qualifiedPhoneNumber&&await m(c)};/*#__PURE__*/return t(a,{title:i,subtitle:n,icon:e,primaryCta:{label:s?"Submitting":"Submit",onClick:l,disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/t(r,{onChange:t=>{u(t)},onSubmit:l,noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:e,data:r,navigate:a,setModalData:c}=m(),u=i(),{initLoginWithSms:l}=n(),[p,d]=o(!1);/*#__PURE__*/return t(s,{subtitle:`Add your number to your ${u?.name} account`,onSubmit:async t=>{d(!0);try{await l({phoneNumber:t.qualifiedPhoneNumber,withPrivyUi:!0}),a("AwaitingPasswordlessCodeScreen")}catch(t){c({errorModalData:{error:t,previousScreen:r?.errorModalData?.previousScreen||e||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:p})}};export{c as LinkPhoneScreen,s as LinkPhoneScreenView,c as default};
@@ -1 +0,0 @@
1
- import{jsx as t}from"react/jsx-runtime";import{XCircle as e}from"lucide-react";import{u as o}from"./internal-context-Z-fyxadS.mjs";import{a as r}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{S as i}from"./ScreenLayout-kyRBwF5n.mjs";import"ofetch";import"react";import"viem";import"./context-CwMpvKNV.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-CvLNEZ0F.mjs";import"styled-components";import"./useActiveWallet-36SuARye.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-02TRgRMN.mjs";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-DnEl8dVF.mjs";import"./index-Dq_xe9dz.mjs";const n=({title:o="Could not connect with wallet",subtitle:r="Please check that Phantom multichain is enabled and try again.",primaryCtaText:n="Try again",secondaryCtaText:a="Cancel",onTryAgain:m,onCancel:c})=>/*#__PURE__*/t(i,{title:o,subtitle:r,icon:e,iconVariant:"error",primaryCta:{label:n,onClick:m},secondaryCta:{label:a,onClick:c},watermark:!0}),a={component:()=>{let{closePrivyModal:e}=o(),{navigate:i}=r();/*#__PURE__*/return t(n,{onTryAgain:()=>{i("LandingScreen")},onCancel:async()=>{await e()}})}};export{a as LoginFailedScreen,n as LoginFailedScreenView,a as default};
@@ -1 +0,0 @@
1
- import{jsx as e,Fragment as r,jsxs as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useMemo as s}from"react";import{formatUnits as a}from"viem";import{formatTokenAmount as n,formatWeiAmount as m}from"@privy-io/js-sdk-core";import{P as c,B as d}from"./ModalHeader-CvLNEZ0F.mjs";import{F as l}from"./Layouts-BlFm53ED.mjs";import{Q as p}from"./QrCode-AKgpho6r.mjs";import{t as u}from"./FundWalletMethodHeader-Ce0vLrUa.mjs";import{I as f}from"./InfoBanner-Dk1KghcK.mjs";import{S as h}from"./Subtitle-CV-2yKE4.mjs";import{T as v}from"./Title-BnzYV3Is.mjs";import{W as g}from"./WalletInfoCard-CVCh-Z5E.mjs";import{u as j}from"./context-CwMpvKNV.mjs";import{v as y,D as C}from"./useActiveWallet-36SuARye.mjs";import{u as S}from"./internal-context-Z-fyxadS.mjs";import{a as I}from"./get-is-unified-wallet-C6sEzDpG.mjs";import{u as T}from"./useWalletBalance-BDrbQBDX.mjs";import{u as b}from"./useWallets-02TRgRMN.mjs";import{O as w}from"./analytics-mkkvFRju.mjs";import{x as A,z as k}from"./index-C47JxA4c.mjs";import{g as F}from"./getChainName-DjpPdUSc.mjs";import{g as D}from"./getUsdcMintAddress-DFI1hv05.mjs";import{g as M}from"./transaction-CnfuREWo.mjs";import{g as U}from"./getErc20Balance-D0MGUaOw.mjs";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"qrcode";import"@heroicons/react/24/outline/InformationCircleIcon";import"lucide-react";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-BmCgxKQR.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"zustand";import"react-device-detect";import"./use-export-wallet-CwQ5-CS4.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D_kd_mMH.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";const x={component:()=>{let{wallets:k}=b(),{connectors:x}=S(),E=x.filter(y).flatMap((e=>e.wallets)),{data:$,setModalData:L,navigate:P,lastScreen:W}=I(),{rpcConfig:O,appId:R,createAnalyticsEvent:q,closePrivyModal:z}=S(),H=j(),[N,Q]=o(void 0),[X,Y]=o(!1),G=$?.funding,{reloadBalance:J}=T({rpcConfig:O,appId:R,address:"ethereum"===G.chainType?G.address:void 0,chain:"ethereum"===G.chainType?G.chain:void 0}),K="solana"===G.chainType,V=K?G.isUSDC?"USDC":"SOL":G.erc20Address?G.erc20ContractInfo?.symbol:G.chain.nativeCurrency.symbol,Z=K?E.find((({address:e})=>e===G.address)):k.find((({address:e})=>C(e)===C(G.address)));if(!G)return L({errorModalData:{error:Error("Couldn't find funding config"),previousScreen:W||"FundingMethodSelectionScreen"},funding:$?.funding,solanaFundingData:$?.solanaFundingData,sendTransaction:$?.sendTransaction}),P("ErrorScreen"),/*#__PURE__*/e(r,{});i((()=>{let e=K?async function(){if("solana"!==G.chainType)return;let e=H.solanaRpcs[G.chain];e?(G.isUSDC?async function({rpc:e,address:r,mintAddress:t}){let o=await e.getTokenAccountsByOwner(r,{mint:t},{encoding:"jsonParsed",commitment:"confirmed"}).send(),i=o.value[0]?.account;return i?BigInt(i.data.parsed.info.tokenAmount.amount):0n}({rpc:e.rpc,address:G.address,mintAddress:D(G.chain)}):A({rpc:e.rpc,address:G.address})).then((e=>{let r=BigInt(e);N&&r>N&&(Y(!0),q({eventName:w,payload:{provider:"manual",status:"success",chainType:"solana",address:Z?.address,value:G.isUSDC?a(r-N,6):a(r-N,9),token:G.isUSDC?"USDC":"SOL"}})),Q(r)})):console.warn("Unable to load solana rpc, skipping balance")}:async function(){"ethereum"===G.chainType&&(async()=>{if(!G.erc20Address)return await J()??BigInt(0);{let{balance:e}=await U({chain:G.chain,address:G.address,erc20Address:G.erc20Address,rpcConfig:O,appId:R});return e}})().then((e=>{N&&e>N&&(Y(!0),q({eventName:w,payload:{provider:"manual",status:"success",chainType:"ethereum",address:Z?.address,chainId:G.chain.id,value:a(e-N,G.erc20ContractInfo?.decimals??18),token:G.erc20ContractInfo?.symbol??G.erc20Address??"ETH"}})),Q(e)})).catch((()=>Q(void 0)))},r=setInterval(e,2e3);return e(),()=>clearInterval(r)}),[N]);let _=s((()=>null==N?"":G.isUSDC?n({amount:N,decimals:6}):K?M(N,3,!0,!0):null!=G.erc20ContractInfo?.decimals?n({amount:N,decimals:G.erc20ContractInfo.decimals}):m({wei:N})),[N,K,G]),ee="ethereum"===G.chainType?G.chain.name:F(G.chain),re=s((()=>""===G.uiConfig?.receiveFundsTitle?null:/*#__PURE__*/e(v,{children:G.uiConfig?.receiveFundsTitle??`Receive ${G.amount} ${V??""}`.trim()})),[G.uiConfig?.receiveFundsTitle,G.amount,V]),te=s((()=>""===G.uiConfig?.receiveFundsSubtitle?null:/*#__PURE__*/e(h,{children:G.uiConfig?.receiveFundsSubtitle??`Scan this code or copy your wallet address to receive funds on ${ee}.`})),[G.uiConfig?.receiveFundsSubtitle,ee]),oe="solana"===G.chainType&&G.isUSDC&&D(G.chain)?`?spl-token=${D(G.chain)}`:"";/*#__PURE__*/return t(r,{children:[/*#__PURE__*/e(u,{}),re,te,/*#__PURE__*/t(l,{style:{gap:"1rem",margin:re||te?"1rem 0":"0"},children:[/*#__PURE__*/e(p,{url:`${G.chainType}:${G.address}${oe}`,size:200,squareLogoElement:B}),/*#__PURE__*/t(f,{theme:H.appearance.palette.colorScheme,children:["Make sure to send funds on ",ee,"."]}),/*#__PURE__*/e(g,{title:"Your wallet",errMsg:void 0,showCopyButton:!0,balance:`${_} ${V}`,address:G.address}),X&&/*#__PURE__*/e(c,{onClick:()=>z({shouldCallAuthOnSuccess:!1,isSuccess:!0}),children:"Continue"})]}),/*#__PURE__*/e(d,{})]})}};let B=({...r})=>/*#__PURE__*/e(k,{color:"black",...r});export{x as ManualTransferScreen,x as default};