@privy-io/react-auth 3.13.1 → 3.14.0-snapshot-20260210202919

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 (246) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-iNQ-eJ82.js → AccountNotFoundScreen-DNUMjwCF.js} +1 -1
  2. package/dist/cjs/{Address-BAzd87pQ.js → Address-B-WU8e3D.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-Ba1XAxqh.js → AffirmativeConsentScreen-B8lK52OI.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-CMZahkkw.js → AllowlistRejectionScreen-AsvVSyDR.js} +1 -1
  5. package/dist/cjs/AuthenticateWithWalletScreen-CqGImE25.js +1 -0
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-BWaBsau9.js → AwaitingEvmToSolBridgingScreen-Dsadt2Fv.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-DN7h9ETe.js → AwaitingExternalEthereumTransferScreen-BppL--7R.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-D2KbYvKF.js → AwaitingPasswordlessCodeScreen-CJlNgLf2.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-C06q4jjQ.js → AwaitingSolToEvmBridgingScreen-CuUOuMHh.js} +2 -2
  10. package/dist/cjs/{BridgeNetworkSelectionView-BBifxbuQ.js → BridgeNetworkSelectionView-eDn7j1Dc.js} +6 -6
  11. package/dist/cjs/{CaptchaScreen-Bj5yik5Q.js → CaptchaScreen-CdrpNbYC.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-CP5PYZBV.js → CoinbaseOnrampStatusScreen-Cf5cbx9G.js} +1 -1
  13. package/dist/cjs/{ConnectEmailForm-DSB_ECav.js → ConnectEmailForm-7YVNWl4y.js} +1 -1
  14. package/dist/cjs/{ConnectLedgerScreen-BazfRtiX.js → ConnectLedgerScreen-BHkUM6T3.js} +1 -1
  15. package/dist/cjs/ConnectOnlyLandingScreen-DBKDoCfI.js +1 -0
  16. package/dist/cjs/{ConnectOnlyStatusScreen-5aAg7ONz.js → ConnectOnlyStatusScreen-BLvvvYgL.js} +1 -1
  17. package/dist/cjs/ConnectOrCreateScreen-DGsOVOri.js +1 -0
  18. package/dist/cjs/{ConnectPhoneForm-lBXP5nI1.js → ConnectPhoneForm-BmVjUjmG.js} +1 -1
  19. package/dist/cjs/ConnectWalletView-Cb01591v.js +169 -0
  20. package/dist/cjs/{ConnectionStatusScreen-BL6n6Ct-.js → ConnectionStatusScreen-DRu3wPUZ.js} +1 -1
  21. package/dist/cjs/CopyToClipboard-CC0DCGEH.js +39 -0
  22. package/dist/cjs/{CrossAppAuthScreen-fjiTzpoh.js → CrossAppAuthScreen-DLj1proN.js} +1 -1
  23. package/dist/cjs/{CustomLandingScreenView-CQqBEerN.js → CustomLandingScreenView-CGoiE-Ww.js} +3 -3
  24. package/dist/cjs/{DelegatedActionsConsentScreen-C2DG4aoM.js → DelegatedActionsConsentScreen-GLpwcyY9.js} +1 -1
  25. package/dist/cjs/{DelegatedActionsRevokeScreen-CCr2Kw57.js → DelegatedActionsRevokeScreen-N30KSLfw.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletConnectingScreen-BW3TLACZ.js → EmbeddedWalletConnectingScreen-B4g6iH9a.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletCreatedScreen-yTh0CETA.js → EmbeddedWalletCreatedScreen-D8KIpojM.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletKeyExportScreen-CLwKZG9l.js → EmbeddedWalletKeyExportScreen-D5EgSIZG.js} +2 -2
  29. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-BJ9tuKSI.js → EmbeddedWalletOnAccountCreateScreen-B4oS64WM.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-C3Pu2FvV.js → EmbeddedWalletPasswordUpdateScreen-cAYWzHIk.js} +1 -1
  31. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-Dzvq3GAs.js → EmbeddedWalletPasswordUpdateSplashScreen-BoeyN0tp.js} +1 -1
  32. package/dist/cjs/{EnrollTotp-Dzazx21f.js → EnrollTotp-B-9Eye0m.js} +7 -7
  33. package/dist/cjs/{ErrorScreen-Dbie0wkk.js → ErrorScreen-bMmc5gQ_.js} +1 -1
  34. package/dist/cjs/{FarcasterConnectStatusScreen-B7w0TBzB.js → FarcasterConnectStatusScreen-CIpqMvyl.js} +1 -1
  35. package/dist/cjs/FarcasterSignerStatusScreen-MFR4tCkV.js +29 -0
  36. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-Czi1l_qS.js → FundSolWalletWithExternalSolanaWallet-l8jBZLaN.js} +2 -2
  37. package/dist/cjs/{FundWalletMethodHeader-2kXHTrGK.js → FundWalletMethodHeader-DEG0gSQr.js} +1 -1
  38. package/dist/cjs/FundingEditAmountScreen-2ktIPVYi.js +1 -0
  39. package/dist/cjs/{FundingMethodSelectionScreen-CwORHNKY.js → FundingMethodSelectionScreen-r7iV7Ftb.js} +1 -1
  40. package/dist/cjs/{InAppBrowserLoginNotPossible-D9m4nJvR.js → InAppBrowserLoginNotPossible-C2VduxXy.js} +1 -1
  41. package/dist/cjs/{InstallWalletScreen-D2iE62NY.js → InstallWalletScreen-DPx7SL-z.js} +1 -1
  42. package/dist/cjs/LandingScreen-B-eNMi9V.js +1 -0
  43. package/dist/cjs/{LinkConflictScreen-CQiPRZsR.js → LinkConflictScreen-Cnh05aRC.js} +2 -2
  44. package/dist/cjs/{LinkEmailScreen-DaTzx7Fk.js → LinkEmailScreen-BY2X5Iqy.js} +1 -1
  45. package/dist/cjs/{LinkPasskeyScreen-DR1inEW4.js → LinkPasskeyScreen-CQYKVLhX.js} +1 -1
  46. package/dist/cjs/{LinkPhoneScreen-Den2l7u5.js → LinkPhoneScreen-DzLe9Fiy.js} +1 -1
  47. package/dist/cjs/{LoginFailedScreen-CG5VpqB1.js → LoginFailedScreen--rjnALVH.js} +1 -1
  48. package/dist/cjs/{ManualTransferScreen-QVz0bbM4.js → ManualTransferScreen-C8jSM6eb.js} +1 -1
  49. package/dist/cjs/MfaAuthEnrollmentFlowScreen-CRdqzHSW.js +1 -0
  50. package/dist/cjs/{MfaAuthVerifyFlowScreen-BmhIWVUg.js → MfaAuthVerifyFlowScreen-BD0AuWXf.js} +1 -1
  51. package/dist/cjs/MfaEnrollmentFlowScreen-B5ycifV_.js +1 -0
  52. package/dist/cjs/{MfaVerifyFlowScreen-NBi3M6EX.js → MfaVerifyFlowScreen-D7k62uSo.js} +1 -1
  53. package/dist/cjs/{ModalHeader-CabvEpAG.js → ModalHeader-CtKHzKGg.js} +17 -11
  54. package/dist/cjs/{MoonpayStatusScreen-DQCYOZ0M.js → MoonpayStatusScreen-CqqNZbjM.js} +1 -1
  55. package/dist/cjs/{OAuthStatusScreen-Dzo0z0tK.js → OAuthStatusScreen-Be_T97BL.js} +1 -1
  56. package/dist/cjs/{PasskeySelectSignupOrLogin-D6KxIann.js → PasskeySelectSignupOrLogin-BtC_DSMa.js} +1 -1
  57. package/dist/cjs/{PasskeyStatusScreen-DfcsZHZm.js → PasskeyStatusScreen-Bep_MVh0.js} +1 -1
  58. package/dist/cjs/{PasswordRecoveryScreen-DfpNr526.js → PasswordRecoveryScreen-BLjiikK6.js} +1 -1
  59. package/dist/cjs/{QrCode-B5K0VLPw.js → QrCode-jC-CR_0T.js} +1 -1
  60. package/dist/cjs/{RecoveryOAuthStatusScreen-CaoYW19J.js → RecoveryOAuthStatusScreen-DsFB_aGc.js} +1 -1
  61. package/dist/cjs/{RecoveryPasswordCreateScreen-BEEpGGv7.js → RecoveryPasswordCreateScreen-CNF0356T.js} +1 -1
  62. package/dist/cjs/{RecoverySelectionScreen-C2tuntn9.js → RecoverySelectionScreen-CXPcbLC4.js} +1 -1
  63. package/dist/cjs/{Screen-BXzBiTIN.js → Screen-BZt4LJMK.js} +6 -6
  64. package/dist/cjs/{ScreenLayout-SSjax2iq.js → ScreenLayout-B07q0ZPf.js} +1 -1
  65. package/dist/cjs/{SetAutomaticRecoveryScreen-DDVOX064.js → SetAutomaticRecoveryScreen-DI1qB2po.js} +1 -1
  66. package/dist/cjs/{SetWalletPasswordForm-CjifRxS3.js → SetWalletPasswordForm-BHF_A7Dk.js} +3 -3
  67. package/dist/cjs/{SignRequestScreen-B6fS5qTS.js → SignRequestScreen-CO86eseO.js} +4 -4
  68. package/dist/cjs/{StandardSignAndSendTransactionScreen-B5BX6LFZ.js → StandardSignAndSendTransactionScreen-CwpWBYar.js} +3 -3
  69. package/dist/cjs/{TelegramAuthScreen-CrpOhr2m.js → TelegramAuthScreen-DLqow-_l.js} +1 -1
  70. package/dist/cjs/{TransactionDetails-CGZ0hDXd.js → TransactionDetails-Bg5jCOCx.js} +1 -1
  71. package/dist/cjs/{TransactionErrorView-C5-4kCDL.js → TransactionErrorView-6tseFNpm.js} +7 -7
  72. package/dist/cjs/{TransferFromWalletScreen-Be_N5MeO.js → TransferFromWalletScreen-Ci0tFxZH.js} +2 -2
  73. package/dist/cjs/{TransferOrBridgeLoadingScreen-BGp5x3h8.js → TransferOrBridgeLoadingScreen-DXT4zz90.js} +2 -2
  74. package/dist/cjs/{UpdateEmailScreen-GKUeQDLE.js → UpdateEmailScreen-CVta1e7f.js} +1 -1
  75. package/dist/cjs/{UpdatePhoneScreen-BUA9FZ9k.js → UpdatePhoneScreen-CjJZkCNB.js} +1 -1
  76. package/dist/cjs/{UserLimitReachedScreen-ByQxJS_K.js → UserLimitReachedScreen-CXIbd9RI.js} +1 -1
  77. package/dist/cjs/{WalletInfoCard-BYZGsWwj.js → WalletInfoCard-DBa62siD.js} +1 -1
  78. package/dist/cjs/{WalletInterstitialScreen-t0tp0uiQ.js → WalletInterstitialScreen-CsL8VHXz.js} +1 -1
  79. package/dist/cjs/{WalletLink-Bj02lEf9.js → WalletLink-BOiDSVfa.js} +1 -1
  80. package/dist/cjs/{WalletOverflowButton-p3vpo0QR.js → WalletOverflowButton-DRG7e1fY.js} +1 -1
  81. package/dist/cjs/abstract-smart-wallets.js +1 -1
  82. package/dist/cjs/{context-CuNnvCIL.js → context-BC-5kj78.js} +1 -1
  83. package/dist/cjs/{ethers-C_dhPYcC.js → ethers-KrqK37LW.js} +1 -1
  84. package/dist/cjs/extended-chains.js +1 -1
  85. package/dist/cjs/{get-is-unified-wallet-C2yi08Zy.js → get-is-unified-wallet-BzEUbDK3.js} +1 -1
  86. package/dist/cjs/index-B6OzAz9u.js +174 -0
  87. package/dist/cjs/{index-TUET0BYX.js → index-Bk3J-obQ.js} +2 -2
  88. package/dist/cjs/{index-CKUeuhfu.js → index-CHVwKo_g.js} +1 -1
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/internal.js +1 -1
  91. package/dist/cjs/{shared-AII0g-d1.js → shared-BNxRpOKo.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DE4oGpYl.js → shouldProceedtoEmbeddedWalletCreationFlow-Cnc_Wnd5.js} +1 -1
  93. package/dist/cjs/{smart-wallets-BypZdOsC.js → smart-wallets-Brk6mOXb.js} +1 -1
  94. package/dist/cjs/smart-wallets.js +1 -1
  95. package/dist/cjs/solana.js +1 -1
  96. package/dist/cjs/{styles-D7QQZERY.js → styles-CcKJSwKY.js} +1 -1
  97. package/dist/cjs/{to-ui-error-DNNop_FY.js → to-ui-error-bCwYNt_S.js} +2 -2
  98. package/dist/cjs/ui.js +12 -12
  99. package/dist/cjs/use-export-wallet-1UzcKhL7.js +1 -0
  100. package/dist/cjs/{use-export-wallet-B7CUqWdP.js → use-export-wallet-Dd8Kpwba.js} +1 -1
  101. package/dist/cjs/{useActiveWallet-D5qqs3GS.js → useActiveWallet-CR03NUpG.js} +1 -1
  102. package/dist/cjs/{useGetTokenPrice-BRQnbdi2.js → useGetTokenPrice-iN4PCLKm.js} +1 -1
  103. package/dist/cjs/{useI18n-DKrZl8KW.js → useI18n-B_3-ntpk.js} +1 -1
  104. package/dist/cjs/{usePrivy-BKHhRZMn.js → usePrivy-OGD5cMxb.js} +1 -1
  105. package/dist/cjs/{useSolanaRpcClient-DXykrMtX.js → useSolanaRpcClient-DFZ8wsSW.js} +1 -1
  106. package/dist/cjs/{useWallets-Bv9SU-di.js → useWallets-Cuyz25d9.js} +1 -1
  107. package/dist/cjs/{useWallets-CP2-zXxW.js → useWallets-DtMRGL0-.js} +1 -1
  108. package/dist/dts/index.d.mts +2 -2
  109. package/dist/dts/index.d.ts +2 -2
  110. package/dist/esm/{AccountNotFoundScreen-Dty9AII6.mjs → AccountNotFoundScreen-kpo_wXTb.mjs} +1 -1
  111. package/dist/esm/{Address-BmCgxKQR.mjs → Address-Dc9fwaMF.mjs} +1 -1
  112. package/dist/esm/{AffirmativeConsentScreen-CZ3QtNmP.mjs → AffirmativeConsentScreen-HVhY1iYD.mjs} +1 -1
  113. package/dist/esm/{AllowlistRejectionScreen-DUd4GJIK.mjs → AllowlistRejectionScreen-BAf0N49J.mjs} +1 -1
  114. package/dist/esm/AuthenticateWithWalletScreen-DiSqjcWS.mjs +1 -0
  115. package/dist/esm/{AwaitingEvmToSolBridgingScreen-DCpcHpQX.mjs → AwaitingEvmToSolBridgingScreen-BjQ36yjF.mjs} +2 -2
  116. package/dist/esm/{AwaitingExternalEthereumTransferScreen-D1V2_vDk.mjs → AwaitingExternalEthereumTransferScreen-DP2JIEp3.mjs} +1 -1
  117. package/dist/esm/{AwaitingPasswordlessCodeScreen-DGAxwdL6.mjs → AwaitingPasswordlessCodeScreen-DKEvEwtc.mjs} +1 -1
  118. package/dist/esm/{AwaitingSolToEvmBridgingScreen-B6Xv92AB.mjs → AwaitingSolToEvmBridgingScreen-F5PFLObw.mjs} +1 -1
  119. package/dist/esm/{BridgeNetworkSelectionView-tyz86GlM.mjs → BridgeNetworkSelectionView-CzgPnmSN.mjs} +10 -10
  120. package/dist/esm/{CaptchaScreen-BL1nWi7c.mjs → CaptchaScreen-Bu46wWXz.mjs} +1 -1
  121. package/dist/esm/{CoinbaseOnrampStatusScreen-DhIZ3gwP.mjs → CoinbaseOnrampStatusScreen-COkmXcpj.mjs} +1 -1
  122. package/dist/esm/ConnectEmailForm-DeDXSXOw.mjs +3 -0
  123. package/dist/esm/{ConnectLedgerScreen-CURsQoYz.mjs → ConnectLedgerScreen-Bi1O0Lnl.mjs} +1 -1
  124. package/dist/esm/ConnectOnlyLandingScreen-DIkv-j5m.mjs +1 -0
  125. package/dist/esm/{ConnectOnlyStatusScreen-VM7nNu6X.mjs → ConnectOnlyStatusScreen-D9TWuaHq.mjs} +1 -1
  126. package/dist/esm/ConnectOrCreateScreen-czTLAMjE.mjs +1 -0
  127. package/dist/esm/{ConnectPhoneForm-nVYECWzo.mjs → ConnectPhoneForm-D3J7UDS4.mjs} +1 -1
  128. package/dist/esm/{ConnectWalletView-BXqs6pWG.mjs → ConnectWalletView-C0GcJSOP.mjs} +7 -9
  129. package/dist/esm/{ConnectionStatusScreen-SAx7YO5y.mjs → ConnectionStatusScreen-Cl_-0PvG.mjs} +2 -2
  130. package/dist/esm/CopyToClipboard-DSTf_eKU.mjs +39 -0
  131. package/dist/esm/{CrossAppAuthScreen-V6LW9fie.mjs → CrossAppAuthScreen-DJLQlQd-.mjs} +1 -1
  132. package/dist/esm/{CustomLandingScreenView-B4a5Rc9z.mjs → CustomLandingScreenView-BAs-WDHG.mjs} +4 -4
  133. package/dist/esm/{DelegatedActionsConsentScreen-0_shAgnh.mjs → DelegatedActionsConsentScreen-Da2g3sXL.mjs} +1 -1
  134. package/dist/esm/{DelegatedActionsRevokeScreen-olNf5JQw.mjs → DelegatedActionsRevokeScreen-Dfn7FXtL.mjs} +1 -1
  135. package/dist/esm/{EmbeddedWalletConnectingScreen-Dleo6nTw.mjs → EmbeddedWalletConnectingScreen-D6tpyyX6.mjs} +1 -1
  136. package/dist/esm/{EmbeddedWalletCreatedScreen-Dx0eaEaV.mjs → EmbeddedWalletCreatedScreen-c6ORbL8O.mjs} +1 -1
  137. package/dist/esm/{EmbeddedWalletKeyExportScreen-B-6Lfc6D.mjs → EmbeddedWalletKeyExportScreen-D7VLN_vu.mjs} +2 -2
  138. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-DbiGNXpt.mjs → EmbeddedWalletOnAccountCreateScreen-COzgE4dd.mjs} +1 -1
  139. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-fA9JGXuz.mjs → EmbeddedWalletPasswordUpdateScreen-BVMQP7yd.mjs} +1 -1
  140. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-CTPO_C5V.mjs → EmbeddedWalletPasswordUpdateSplashScreen-CWUgL7m1.mjs} +1 -1
  141. package/dist/esm/{EnrollTotp-D6VGtjIL.mjs → EnrollTotp-U0Jk_J--.mjs} +5 -5
  142. package/dist/esm/{ErrorScreen-Ba4Ml9CI.mjs → ErrorScreen-BaE0-mzx.mjs} +1 -1
  143. package/dist/esm/{FarcasterConnectStatusScreen-BN_wRxNV.mjs → FarcasterConnectStatusScreen-4SgMYfEP.mjs} +2 -2
  144. package/dist/esm/FarcasterSignerStatusScreen-BMwwcbSb.mjs +28 -0
  145. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-B3Y84dbg.mjs → FundSolWalletWithExternalSolanaWallet-BDe2TFOC.mjs} +1 -1
  146. package/dist/esm/{FundWalletMethodHeader-Ce0vLrUa.mjs → FundWalletMethodHeader-C3QM4h3L.mjs} +1 -1
  147. package/dist/esm/{FundingEditAmountScreen-DeM_ClwN.mjs → FundingEditAmountScreen-IalOk6gH.mjs} +1 -1
  148. package/dist/esm/{FundingMethodSelectionScreen-Be8LIw6i.mjs → FundingMethodSelectionScreen-BQAohPbk.mjs} +1 -1
  149. package/dist/esm/{InAppBrowserLoginNotPossible-7kqa69SP.mjs → InAppBrowserLoginNotPossible-B2zaxs1h.mjs} +1 -1
  150. package/dist/esm/{InstallWalletScreen-EfqvUoSZ.mjs → InstallWalletScreen-DVe8lA3J.mjs} +1 -1
  151. package/dist/esm/LandingScreen-B6yu6nWg.mjs +1 -0
  152. package/dist/esm/{LinkConflictScreen-B-yRqIRn.mjs → LinkConflictScreen-DzGN3f1P.mjs} +1 -1
  153. package/dist/esm/{LinkEmailScreen-CQ5mnYS9.mjs → LinkEmailScreen-BQbelwU_.mjs} +1 -1
  154. package/dist/esm/{LinkPasskeyScreen-BfGROb2f.mjs → LinkPasskeyScreen-DM05y9x2.mjs} +1 -1
  155. package/dist/esm/{LinkPhoneScreen-CVNSbTfD.mjs → LinkPhoneScreen-DeRWy-B0.mjs} +1 -1
  156. package/dist/esm/{LoginFailedScreen-B2KtCyAw.mjs → LoginFailedScreen-KBf-1t3h.mjs} +1 -1
  157. package/dist/esm/{ManualTransferScreen-C2Rl54K3.mjs → ManualTransferScreen-fwncmmcv.mjs} +1 -1
  158. package/dist/esm/MfaAuthEnrollmentFlowScreen-jwzT070s.mjs +1 -0
  159. package/dist/esm/{MfaAuthVerifyFlowScreen-zG9ps8-7.mjs → MfaAuthVerifyFlowScreen-ChKeIb2B.mjs} +1 -1
  160. package/dist/esm/MfaEnrollmentFlowScreen-OWHkPPKf.mjs +1 -0
  161. package/dist/esm/{MfaVerifyFlowScreen-6eccLZxg.mjs → MfaVerifyFlowScreen-Cw8SLRu1.mjs} +1 -1
  162. package/dist/esm/{ModalHeader-CvLNEZ0F.mjs → ModalHeader-Dgah8j-h.mjs} +28 -22
  163. package/dist/esm/{MoonpayStatusScreen-u9OjnVb2.mjs → MoonpayStatusScreen-BEKe2qdA.mjs} +1 -1
  164. package/dist/esm/{OAuthStatusScreen-C4KNGm-v.mjs → OAuthStatusScreen-J0C_mTYe.mjs} +1 -1
  165. package/dist/esm/{PasskeySelectSignupOrLogin-DM959Ikc.mjs → PasskeySelectSignupOrLogin-DY6xFBmQ.mjs} +1 -1
  166. package/dist/esm/{PasskeyStatusScreen-BfUHTu2T.mjs → PasskeyStatusScreen-ErT1tdQ8.mjs} +1 -1
  167. package/dist/esm/{PasswordRecoveryScreen-BnkB7Xwe.mjs → PasswordRecoveryScreen-Bgi9GfGJ.mjs} +1 -1
  168. package/dist/esm/{QrCode-AKgpho6r.mjs → QrCode-CV7y6Con.mjs} +1 -1
  169. package/dist/esm/RecoveryOAuthStatusScreen-CgpdP8kk.mjs +1 -0
  170. package/dist/esm/RecoveryPasswordCreateScreen-zbsBy0zO.mjs +1 -0
  171. package/dist/esm/{RecoverySelectionScreen-CJG-J3Aj.mjs → RecoverySelectionScreen-DPS-dNY6.mjs} +2 -2
  172. package/dist/esm/{Screen-DnEl8dVF.mjs → Screen-D4UVyUmz.mjs} +5 -5
  173. package/dist/esm/{ScreenLayout-kyRBwF5n.mjs → ScreenLayout-BxduQYcn.mjs} +1 -1
  174. package/dist/esm/{SetAutomaticRecoveryScreen-CXNCqRU4.mjs → SetAutomaticRecoveryScreen-DNZZB2sI.mjs} +1 -1
  175. package/dist/esm/{SetWalletPasswordForm-Bns8qtXn.mjs → SetWalletPasswordForm-DP0zxdTl.mjs} +4 -4
  176. package/dist/esm/{SignRequestScreen-7t8KCRXP.mjs → SignRequestScreen-iYnPeziQ.mjs} +3 -3
  177. package/dist/esm/{StandardSignAndSendTransactionScreen-BIJeFjT1.mjs → StandardSignAndSendTransactionScreen-D8byiEkI.mjs} +2 -2
  178. package/dist/esm/{TelegramAuthScreen-D-cJY_dj.mjs → TelegramAuthScreen-B73-F_A2.mjs} +1 -1
  179. package/dist/esm/{TransactionDetails-DhYW2qjK.mjs → TransactionDetails-DSClEY-S.mjs} +1 -1
  180. package/dist/esm/{TransactionErrorView-DtnhZ5P5.mjs → TransactionErrorView-DmcW7szz.mjs} +8 -8
  181. package/dist/esm/{TransferFromWalletScreen-BdIo62Cg.mjs → TransferFromWalletScreen-up6JSuSm.mjs} +2 -2
  182. package/dist/esm/{TransferOrBridgeLoadingScreen-C9hX5Ost.mjs → TransferOrBridgeLoadingScreen-BGi2Pwv6.mjs} +1 -1
  183. package/dist/esm/UpdateEmailScreen-BDhNAVjM.mjs +1 -0
  184. package/dist/esm/{UpdatePhoneScreen-C7fQ2ohl.mjs → UpdatePhoneScreen-BykKJQg4.mjs} +1 -1
  185. package/dist/esm/{UserLimitReachedScreen-dLjGUBN-.mjs → UserLimitReachedScreen-DlEmBPVa.mjs} +1 -1
  186. package/dist/esm/{WalletInfoCard-CVCh-Z5E.mjs → WalletInfoCard-Auf8KAhE.mjs} +2 -2
  187. package/dist/esm/{WalletInterstitialScreen-C8UPLmif.mjs → WalletInterstitialScreen-4rr799hK.mjs} +1 -1
  188. package/dist/esm/{WalletLink-xufwYyQh.mjs → WalletLink-Cn4LEfB8.mjs} +6 -6
  189. package/dist/esm/{WalletOverflowButton-qXN0KcGe.mjs → WalletOverflowButton-C1Qm1edE.mjs} +1 -1
  190. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  191. package/dist/esm/context-CiVjsvSu.mjs +1 -0
  192. package/dist/esm/{ethers-DGsvPPEp.mjs → ethers-DJb7a8Zi.mjs} +1 -1
  193. package/dist/esm/extended-chains.mjs +1 -1
  194. package/dist/esm/{get-is-unified-wallet-C6sEzDpG.mjs → get-is-unified-wallet-o1p06vNx.mjs} +1 -1
  195. package/dist/esm/index-Bwrmi8Zh.mjs +174 -0
  196. package/dist/esm/{index-BMpFxPbi.mjs → index-CSPS-alu.mjs} +1 -1
  197. package/dist/esm/{index--X7RfrXS.mjs → index-Dq6gowPx.mjs} +3 -3
  198. package/dist/esm/index.mjs +1 -1
  199. package/dist/esm/internal.mjs +1 -1
  200. package/dist/esm/{shared-CSN6-8CF.mjs → shared-xDqgT98p.mjs} +1 -1
  201. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BdpCzEJT.mjs → shouldProceedtoEmbeddedWalletCreationFlow-C8hGTGhw.mjs} +1 -1
  202. package/dist/esm/{smart-wallets-DjBZWleC.mjs → smart-wallets-BbVGC7zD.mjs} +1 -1
  203. package/dist/esm/smart-wallets.mjs +1 -1
  204. package/dist/esm/solana.mjs +1 -1
  205. package/dist/esm/{styles-aArPlAod.mjs → styles-C11VS_7r.mjs} +1 -1
  206. package/dist/esm/{to-ui-error-DKeOToXI.mjs → to-ui-error-Mi0mdU5e.mjs} +2 -2
  207. package/dist/esm/ui.mjs +1 -1
  208. package/dist/esm/{use-export-wallet-BcHSx5WT.mjs → use-export-wallet-BKlUCY84.mjs} +1 -1
  209. package/dist/esm/use-export-wallet-CP-hSjOG.mjs +1 -0
  210. package/dist/esm/{useActiveWallet-36SuARye.mjs → useActiveWallet-Dm548R2J.mjs} +1 -1
  211. package/dist/esm/{useGetTokenPrice-CgGm0Ecu.mjs → useGetTokenPrice-BYyTcAvM.mjs} +1 -1
  212. package/dist/esm/{useI18n-CbESkJQ7.mjs → useI18n-DHUnRp_f.mjs} +1 -1
  213. package/dist/esm/{usePrivy-D_kd_mMH.mjs → usePrivy-kABlAB4n.mjs} +1 -1
  214. package/dist/esm/{useSolanaRpcClient-DajzMnxc.mjs → useSolanaRpcClient-Bhhf26b_.mjs} +1 -1
  215. package/dist/esm/{useWallets-02TRgRMN.mjs → useWallets-BSSZRV2z.mjs} +1 -1
  216. package/dist/esm/{useWallets-BwdySlks.mjs → useWallets-HI_iUYAd.mjs} +1 -1
  217. package/package.json +5 -5
  218. package/dist/cjs/AuthenticateWithWalletScreen-BpfHRQ17.js +0 -1
  219. package/dist/cjs/ConnectOnlyLandingScreen-CsbSt3la.js +0 -1
  220. package/dist/cjs/ConnectOrCreateScreen-C0t-tK0s.js +0 -1
  221. package/dist/cjs/ConnectWalletView-EuTf-6Vt.js +0 -171
  222. package/dist/cjs/CopyToClipboard-BCe_l6_D.js +0 -39
  223. package/dist/cjs/FarcasterSignerStatusScreen-CTZRoFL3.js +0 -29
  224. package/dist/cjs/FundingEditAmountScreen-xtC8kXZ9.js +0 -1
  225. package/dist/cjs/LandingScreen-Cclv1lfx.js +0 -1
  226. package/dist/cjs/MfaAuthEnrollmentFlowScreen-CgEdqCAi.js +0 -1
  227. package/dist/cjs/MfaEnrollmentFlowScreen-BSALpHSu.js +0 -1
  228. package/dist/cjs/copy-BiZ7dtqy.js +0 -1
  229. package/dist/cjs/index-DyCLWLpL.js +0 -174
  230. package/dist/cjs/use-export-wallet-COKs2yxH.js +0 -1
  231. package/dist/esm/AuthenticateWithWalletScreen-Fa-n1Sey.mjs +0 -1
  232. package/dist/esm/ConnectEmailForm-DvQJmoTc.mjs +0 -3
  233. package/dist/esm/ConnectOnlyLandingScreen-CBjbbuDg.mjs +0 -1
  234. package/dist/esm/ConnectOrCreateScreen-8FxDiOyl.mjs +0 -1
  235. package/dist/esm/CopyToClipboard-BGTSFnT3.mjs +0 -39
  236. package/dist/esm/FarcasterSignerStatusScreen-B8IyPJhe.mjs +0 -28
  237. package/dist/esm/LandingScreen-DPaqiLpx.mjs +0 -1
  238. package/dist/esm/MfaAuthEnrollmentFlowScreen-D6ujM0kh.mjs +0 -1
  239. package/dist/esm/MfaEnrollmentFlowScreen-gELi8Ppl.mjs +0 -1
  240. package/dist/esm/RecoveryOAuthStatusScreen-DaP1Oh1u.mjs +0 -1
  241. package/dist/esm/RecoveryPasswordCreateScreen-B-dLBQVH.mjs +0 -1
  242. package/dist/esm/UpdateEmailScreen-0TGU13Qv.mjs +0 -1
  243. package/dist/esm/context-CwMpvKNV.mjs +0 -1
  244. package/dist/esm/copy-Bx2Jwc5_.mjs +0 -1
  245. package/dist/esm/index-C47JxA4c.mjs +0 -174
  246. package/dist/esm/use-export-wallet-CwQ5-CS4.mjs +0 -1
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline"),s=require("react"),n=require("styled-components"),i=require("@privy-io/js-sdk-core"),l=require("./ModalHeader-CabvEpAG.js"),o=require("./Value-mhPsfsxe.js"),t=require("./Row-CMqYn75Q.js"),a=require("./ErrorMessage-BfTVyue9.js"),d=require("./LabelXs-C8rLnCfU.js"),c=require("./Subtitle-CR8zM7ZJ.js"),x=require("./Title-ifTy35V5.js"),h=require("./Address-BAzd87pQ.js"),u=require("./WalletInfoCard-BYZGsWwj.js"),j=require("./context-CuNnvCIL.js"),m=require("./useActiveWallet-D5qqs3GS.js"),p=require("./LoadingSkeleton-BoyADunQ.js"),g=require("viem"),b=require("./shared-DBm7PUrg.js"),w=require("./Checkbox-DzxHC5tk.js"),f=require("./ErrorBanner-dOLclNms.js"),y=require("./WarningBanner-COl_Q0K3.js"),S=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),k=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),v=require("@heroicons/react/24/outline/ExclamationCircleIcon"),L=require("./internal-context-BJv4f_bO.js");function A(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=/*#__PURE__*/A(S),I=/*#__PURE__*/A(k),T=/*#__PURE__*/A(v);const V=n.styled(o.LabelSm)`
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline"),s=require("react"),n=require("styled-components"),i=require("@privy-io/js-sdk-core"),l=require("./ModalHeader-CtKHzKGg.js"),o=require("./Value-mhPsfsxe.js"),t=require("./Row-CMqYn75Q.js"),a=require("./ErrorMessage-BfTVyue9.js"),d=require("./LabelXs-C8rLnCfU.js"),c=require("./Subtitle-CR8zM7ZJ.js"),x=require("./Title-ifTy35V5.js"),h=require("./Address-B-WU8e3D.js"),u=require("./WalletInfoCard-DBa62siD.js"),j=require("./context-BC-5kj78.js"),m=require("./useActiveWallet-CR03NUpG.js"),p=require("./LoadingSkeleton-BoyADunQ.js"),g=require("viem"),b=require("./shared-DBm7PUrg.js"),w=require("./Checkbox-DzxHC5tk.js"),f=require("./ErrorBanner-dOLclNms.js"),y=require("./WarningBanner-COl_Q0K3.js"),S=require("@heroicons/react/24/outline/ClipboardDocumentCheckIcon"),k=require("@heroicons/react/24/outline/ClipboardDocumentIcon"),v=require("@heroicons/react/24/outline/ExclamationCircleIcon"),L=require("./internal-context-BJv4f_bO.js");function A(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var R=/*#__PURE__*/A(S),I=/*#__PURE__*/A(k),T=/*#__PURE__*/A(v);const V=n.styled(o.LabelSm)`
2
2
  cursor: pointer;
3
3
  display: inline-flex;
4
4
  gap: 8px;
@@ -7,7 +7,7 @@
7
7
  svg {
8
8
  fill: var(--privy-color-accent);
9
9
  }
10
- `;var C=({iconUrl:r,value:s,symbol:n,usdValue:i,nftName:l,nftCount:o,decimals:t,$isLoading:a})=>{if(a)/*#__PURE__*/return e.jsx(M,{$isLoading:a});let d=s&&i&&t?function(e,r,s){let n=parseFloat(e),i=parseFloat(s);if(0===n||0===i||Number.isNaN(n)||Number.isNaN(i))return e;let l=Math.ceil(-Math.log10(.01/(i/n))),o=Math.pow(10,l=Math.max(l=Math.min(l,r),1)),t=+(Math.floor(n*o)/o).toFixed(l).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:r}).format(t)}(s,t,i):s;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(M,{$isLoading:a,children:[r&&/*#__PURE__*/e.jsx(E,{src:r,alt:"Token icon"}),o&&o>1?o+"x":void 0," ",l,d," ",n]}),i&&/*#__PURE__*/e.jsxs(F,{$isLoading:a,children:["$",i]})]})};let M=n.styled.span`
10
+ `;var C=({iconUrl:r,value:s,symbol:n,usdValue:i,nftName:l,nftCount:o,decimals:t,$isLoading:a})=>{if(a)/*#__PURE__*/return e.jsx(M,{$isLoading:a});let d=s&&i&&t?function(e,r,s){let n=parseFloat(e),i=parseFloat(s);if(0===n||0===i||Number.isNaN(n)||Number.isNaN(i))return e;let l=Math.ceil(-Math.log10(.01/(i/n))),o=Math.pow(10,l=Math.max(l=Math.min(l,r),1)),t=+(Math.floor(n*o)/o).toFixed(l).replace(/\.?0+$/,"");return Intl.NumberFormat(void 0,{maximumFractionDigits:r}).format(t)}(s,t,i):s;/*#__PURE__*/return e.jsxs("div",{children:[/*#__PURE__*/e.jsxs(M,{$isLoading:a,children:[r&&/*#__PURE__*/e.jsx($,{src:r,alt:"Token icon"}),o&&o>1?o+"x":void 0," ",l,d," ",n]}),i&&/*#__PURE__*/e.jsxs(F,{$isLoading:a,children:["$",i]})]})};let M=n.styled.span`
11
11
  color: var(--privy-color-foreground);
12
12
  font-size: 0.875rem;
13
13
  font-weight: 500;
@@ -29,12 +29,12 @@
29
29
  justify-content: flex-end;
30
30
 
31
31
  ${p.LoadingSkeleton}
32
- `;let E=n.styled.img`
32
+ `;let $=n.styled.img`
33
33
  height: 14px;
34
34
  width: 14px;
35
35
  margin-right: 4px;
36
36
  object-fit: contain;
37
- `;const $=r=>{let{chain:s,transactionDetails:n,isTokenContractInfoLoading:i,symbol:l}=r,{action:a,functionName:d}=n;/*#__PURE__*/return e.jsx(b.Box,{children:/*#__PURE__*/e.jsxs(t.Rows,{children:["transaction"!==a&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Action"}),/*#__PURE__*/e.jsx(o.Value,{children:d})]}),"mint"===d&&"args"in n&&n.args.filter((e=>e)).map(((r,n)=>/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:`Param ${n}`}),/*#__PURE__*/e.jsx(o.Value,{children:"string"==typeof r&&g.isAddress(r)?/*#__PURE__*/e.jsx(h.Address,{address:r,url:s?.blockExplorers?.default?.url,showCopyIcon:!1}):r?.toString()})]},n))),"setApprovalForAll"===d&&n.operator&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Operator"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.operator,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===d&&void 0!==n.approved&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Set approval to"}),/*#__PURE__*/e.jsx(o.Value,{children:n.approved?"true":"false"})]}),"transfer"===d||"transferFrom"===d||"safeTransferFrom"===d||"approve"===d?/*#__PURE__*/e.jsxs(e.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(o.Value,{$isLoading:i,children:[n.formattedAmount," ",l]})]}),"tokenId"in n&&n.tokenId&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token ID"}),/*#__PURE__*/e.jsx(o.Value,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===d&&/*#__PURE__*/e.jsxs(e.Fragment,{children:["amounts"in n&&n.amounts&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amounts"}),/*#__PURE__*/e.jsx(o.Value,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token IDs"}),/*#__PURE__*/e.jsx(o.Value,{children:n.tokenIds.join(", ")})]})]}),"approve"===d&&n.spender&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.spender,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferFrom&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Transferring from"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.transferFrom,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferTo&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Transferring to"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.transferTo,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},q=({variant:r,setPreventMaliciousTransaction:s,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===r?/*#__PURE__*/e.jsx(D,{children:/*#__PURE__*/e.jsxs(y.WarningBanner,{theme:n,children:[/*#__PURE__*/e.jsx("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===r?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(D,{children:[/*#__PURE__*/e.jsx(f.ErrorBanner,{theme:n,children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/e.jsxs(O,{children:[/*#__PURE__*/e.jsx(w.Checkbox,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>s(!i)}),/*#__PURE__*/e.jsx("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let D=n.styled.div`
37
+ `;const E=r=>{let{chain:s,transactionDetails:n,isTokenContractInfoLoading:i,symbol:l}=r,{action:a,functionName:d}=n;/*#__PURE__*/return e.jsx(b.Box,{children:/*#__PURE__*/e.jsxs(t.Rows,{children:["transaction"!==a&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Action"}),/*#__PURE__*/e.jsx(o.Value,{children:d})]}),"mint"===d&&"args"in n&&n.args.filter((e=>e)).map(((r,n)=>/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:`Param ${n}`}),/*#__PURE__*/e.jsx(o.Value,{children:"string"==typeof r&&g.isAddress(r)?/*#__PURE__*/e.jsx(h.Address,{address:r,url:s?.blockExplorers?.default?.url,showCopyIcon:!1}):r?.toString()})]},n))),"setApprovalForAll"===d&&n.operator&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Operator"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.operator,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),"setApprovalForAll"===d&&void 0!==n.approved&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Set approval to"}),/*#__PURE__*/e.jsx(o.Value,{children:n.approved?"true":"false"})]}),"transfer"===d||"transferFrom"===d||"safeTransferFrom"===d||"approve"===d?/*#__PURE__*/e.jsxs(e.Fragment,{children:["formattedAmount"in n&&n.formattedAmount&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(o.Value,{$isLoading:i,children:[n.formattedAmount," ",l]})]}),"tokenId"in n&&n.tokenId&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token ID"}),/*#__PURE__*/e.jsx(o.Value,{children:n.tokenId.toString()})]})]}):null,"safeBatchTransferFrom"===d&&/*#__PURE__*/e.jsxs(e.Fragment,{children:["amounts"in n&&n.amounts&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amounts"}),/*#__PURE__*/e.jsx(o.Value,{children:n.amounts.join(", ")})]}),"tokenIds"in n&&n.tokenIds&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token IDs"}),/*#__PURE__*/e.jsx(o.Value,{children:n.tokenIds.join(", ")})]})]}),"approve"===d&&n.spender&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.spender,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferFrom&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Transferring from"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.transferFrom,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]}),("transferFrom"===d||"safeTransferFrom"===d||"safeBatchTransferFrom"===d)&&n.transferTo&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Transferring to"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:n.transferTo,url:s?.blockExplorers?.default?.url,showCopyIcon:!1})})]})]})})},q=({variant:r,setPreventMaliciousTransaction:s,colorScheme:n="light",preventMaliciousTransaction:i})=>"warn"===r?/*#__PURE__*/e.jsx(D,{children:/*#__PURE__*/e.jsxs(y.WarningBanner,{theme:n,children:[/*#__PURE__*/e.jsx("span",{style:{fontWeight:"500"},children:"Warning: Suspicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This has been flagged as a potentially deceptive request. Approving could put your assets or funds at risk."]})}):"error"===r?/*#__PURE__*/e.jsx(e.Fragment,{children:/*#__PURE__*/e.jsxs(D,{children:[/*#__PURE__*/e.jsx(f.ErrorBanner,{theme:n,children:/*#__PURE__*/e.jsxs("div",{children:[/*#__PURE__*/e.jsx("strong",{children:"This is a malicious transaction"}),/*#__PURE__*/e.jsx("br",{}),"This transaction transfers tokens to a known malicious address. Proceeding may result in the loss of valuable assets."]})}),/*#__PURE__*/e.jsxs(O,{children:[/*#__PURE__*/e.jsx(w.Checkbox,{color:"var(--privy-color-error)",checked:!i,readOnly:!0,onClick:()=>s(!i)}),/*#__PURE__*/e.jsx("span",{children:"I understand and want to proceed anyways."})]})]})}):null;let D=n.styled.div`
38
38
  margin-top: 1.5rem;
39
39
  `,O=n.styled.div`
40
40
  display: flex;
@@ -48,7 +48,7 @@
48
48
  border: 1px solid var(--privy-color-foreground-4);
49
49
  border-radius: var(--privy-border-radius-sm);
50
50
  padding: 0.5rem;
51
- `,X="There was an error preparing your transaction. Your transaction request will likely fail.",W=n.styled.div`
51
+ `,X="There was an error preparing your transaction. Your transaction request will likely fail.",z=n.styled.div`
52
52
  display: flex;
53
53
  width: 100%;
54
54
  justify-content: center;
@@ -58,7 +58,7 @@
58
58
  object-fit: contain;
59
59
  border-radius: var(--privy-border-radius-sm);
60
60
  }
61
- `,z=n.styled.span`
61
+ `,W=n.styled.span`
62
62
  display: inline-flex;
63
63
  align-items: center;
64
64
  gap: 0.3rem;
@@ -162,5 +162,5 @@
162
162
  right: 13px;
163
163
  width: 24px;
164
164
  height: 24px;
165
- `,oe=({clicked:r})=>r?/*#__PURE__*/e.jsx(le,{}):/*#__PURE__*/e.jsx(ie,{});exports.SendSolanaTransactionScreenView=({img:n,title:u,subtitle:p,cta:g,instructions:b,network:w,blockExplorerUrl:f,isMissingFunds:y,submitError:S,parseError:k,total:v,swap:L,transactingWalletAddress:A,fee:R,balance:I,disabled:T,isSubmitting:C,isPreparing:M,isTokenPriceLoading:F,onClick:E,onClose:$,onBack:q,isSponsored:D})=>{let O=M||F,[N,U]=s.useState(!1),G=j.useAppConfig();/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:$,backFn:q}),n&&/*#__PURE__*/e.jsx(W,{children:n}),/*#__PURE__*/e.jsx(x.Title,{style:{marginTop:n?"1.5rem":0},children:u}),/*#__PURE__*/e.jsx(c.Subtitle,{children:p}),/*#__PURE__*/e.jsxs(t.Rows,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(v||O)&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(o.Value,{$isLoading:O,children:v})]}),L&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Swap"}),/*#__PURE__*/e.jsx(o.Value,{children:L})]}),w&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(o.Value,{children:w})]}),(R||O||void 0!==D)&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(o.Value,{$isLoading:O,children:D&&!O?/*#__PURE__*/e.jsxs(z,{children:[/*#__PURE__*/e.jsxs(H,{children:["Sponsored by ",G.name]}),/*#__PURE__*/e.jsx(r.BoltIcon,{height:16,width:16})]}):R})]})]}),/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>U((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(r.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:N?"rotate(180deg)":void 0}})]})}),N&&/*#__PURE__*/e.jsx(e.Fragment,{children:b.map(((r,s)=>"sol-transfer"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Transfer ",r.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(o.Value,{children:[i.formatTokenAmount({amount:r.value,decimals:r.token.decimals})," ",r.token.symbol]})]}),!!r.toAccount&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.toAccount,url:f})})]})]},s):"spl-transfer"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Transfer ",r.token.symbol]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.value.toString()})]}),!!r.fromAta&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.fromAta,url:f})})]}),!!r.toAta&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.toAta,url:f})})]}),!!r.token.address&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.token.address,url:f})})]})]},s):"ata-creation"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.program,url:f})})]}),!!r.owner&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.owner,url:f})})]})]},s):"create-account"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Create account ",r.withSeed?"with seed":""]})}),!!r.account&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.account,url:f})})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(o.Value,{children:[i.formatTokenAmount({amount:r.value,decimals:9})," SOL"]})]})]},s):"spl-init-account"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Initialize token account"})}),!!r.account&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.account,url:f})})]}),!!r.mint&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Mint"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mint,url:f})})]}),!!r.owner&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.owner,url:f})})]})]},s):"spl-close-account"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Close token account"})}),!!r.source&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.source,url:f})})]}),!!r.destination&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.destination,url:f})})]}),!!r.owner&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.owner,url:f})})]})]},s):"spl-sync-native"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.program,url:f})})]})]},s):"raydium-swap-base-input"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Raydium swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount in"}),/*#__PURE__*/e.jsx(o.Value,{children:r.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(o.Value,{children:r.minimumAmountOut.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):"raydium-swap-base-output"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Raydium swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Max amount in"}),/*#__PURE__*/e.jsx(o.Value,{children:r.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(o.Value,{children:r.amountOut.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):"jupiter-swap-shared-accounts-route"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Jupiter swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"In amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.quotedOutAmount.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):"jupiter-swap-exact-out-route"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Jupiter swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(o.Value,{children:r.outAmount.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.program,url:f})})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Data"}),/*#__PURE__*/e.jsx(o.Value,{children:r.discriminator})]})]},s)))}),/*#__PURE__*/e.jsx(m.Grow,{}),S?/*#__PURE__*/e.jsx(a.ErrorMessage,{style:{marginTop:"2rem"},children:S.message}):k?/*#__PURE__*/e.jsx(a.ErrorMessage,{style:{marginTop:"2rem"},children:X}):null,/*#__PURE__*/e.jsx(B,{$useSmallMargins:!(!k&&!S),title:"",address:A,balance:I,errMsg:M||k||S||!y?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(l.PrimaryButton,{style:{marginTop:"1rem"},loading:C,disabled:T||M,onClick:E,children:g}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.SendTransactionScreenView=({img:n,submitError:i,prepareError:d,onClose:u,action:p,title:g,subtitle:b,to:w,tokenAddress:f,network:y,missingFunds:S,fee:k,from:v,cta:L,disabled:A,chain:R,isSubmitting:I,isPreparing:T,isTokenPriceLoading:M,isTokenContractInfoLoading:F,isSponsored:E,symbol:D,balance:O,onClick:P,transactionDetails:U,transactionIndex:G,maxIndex:J,onBack:Q,chainName:Y,validation:K,hasScanDetails:Z,setIsScanDetailsOpen:_,preventMaliciousTransaction:ee,setPreventMaliciousTransaction:re,tokensSent:se,tokensReceived:ne,isScanning:ie,isCancellable:le,functionName:oe})=>{let{showTransactionDetails:te,setShowTransactionDetails:ae,hasMoreDetails:de,isErc20Ish:ce}=(e=>{let[r,n]=s.useState(!1),i=!0,l=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(i=!1),i&&(l=Object.entries(e||{}).some((([e,r])=>r&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:r,setShowTransactionDetails:n,hasMoreDetails:i&&l,isErc20Ish:e?.isErc20Ish}})(U),xe=j.useAppConfig(),he=ce&&F||T||M||ie;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:u,backFn:Q}),n&&/*#__PURE__*/e.jsx(W,{children:n}),/*#__PURE__*/e.jsxs(x.Title,{style:{marginTop:n?"1.5rem":0},children:[g,/*#__PURE__*/e.jsx(N,{maxIndex:J,transactionIndex:G})]}),/*#__PURE__*/e.jsx(c.Subtitle,{children:b}),/*#__PURE__*/e.jsxs(t.Rows,{style:{marginTop:"2rem"},children:[(!!se[0]||he)&&/*#__PURE__*/e.jsxs(t.Row,{children:[ne.length>0?/*#__PURE__*/e.jsx(o.LabelSm,{children:"Send"}):/*#__PURE__*/e.jsx(o.LabelSm,{children:"approve"===p?"Approval amount":"Amount"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:se.map(((r,s)=>/*#__PURE__*/e.jsx(C,{iconUrl:r.iconUrl,value:"setApprovalForAll"===oe?"All":r.value,usdValue:r.usdValue,symbol:r.symbol,nftName:r.nftName,nftCount:r.nftCount,decimals:r.decimals},s)))})]}),ne.length>0&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Receive"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ne.map(((r,s)=>/*#__PURE__*/e.jsx(C,{iconUrl:r.iconUrl,value:r.value,usdValue:r.usdValue,symbol:r.symbol,nftName:r.nftName,nftCount:r.nftCount,decimals:r.decimals},s)))})]}),U&&"spender"in U&&U?.spender?/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:U.spender,url:R?.blockExplorers?.default?.url})})]}):null,w&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:w,url:R?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),f&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token address"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:f,url:R?.blockExplorers?.default?.url})})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(o.Value,{children:y})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(o.Value,{$isLoading:T||M||void 0===E,children:E?/*#__PURE__*/e.jsxs(z,{children:[/*#__PURE__*/e.jsxs(H,{children:["Sponsored by ",xe.name]}),/*#__PURE__*/e.jsx(r.BoltIcon,{height:16,width:16})]}):k})]}),de&&!Z&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.Row,{className:"cursor-pointer",onClick:()=>ae(!te),children:/*#__PURE__*/e.jsxs(o.LabelSmPrimary,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e.jsx(r.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:te?"rotate(180deg)":void 0}})]})}),te&&U&&/*#__PURE__*/e.jsx($,{action:p,chain:R,transactionDetails:U,isTokenContractInfoLoading:F,symbol:D})]}),Z&&/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>_(!0),children:[/*#__PURE__*/e.jsx("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e.jsx(r.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e.jsx(m.Grow,{}),i?/*#__PURE__*/e.jsx(a.ErrorMessage,{style:{marginTop:"2rem"},children:i.message}):d&&0===G?
165
+ `,oe=({clicked:r})=>r?/*#__PURE__*/e.jsx(le,{}):/*#__PURE__*/e.jsx(ie,{});exports.SendSolanaTransactionScreenView=({img:n,title:u,subtitle:p,cta:g,instructions:b,network:w,blockExplorerUrl:f,isMissingFunds:y,submitError:S,parseError:k,total:v,swap:L,transactingWalletAddress:A,fee:R,balance:I,disabled:T,isSubmitting:C,isPreparing:M,isTokenPriceLoading:F,onClick:$,onClose:E,onBack:q,isSponsored:D})=>{let O=M||F,[N,U]=s.useState(!1),G=j.useAppConfig();/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:E,backFn:q}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsx(x.Title,{style:{marginTop:n?"1.5rem":0},children:u}),/*#__PURE__*/e.jsx(c.Subtitle,{children:p}),/*#__PURE__*/e.jsxs(t.Rows,{style:{marginTop:"2rem",marginBottom:".5rem"},children:[(v||O)&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(o.Value,{$isLoading:O,children:v})]}),L&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Swap"}),/*#__PURE__*/e.jsx(o.Value,{children:L})]}),w&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(o.Value,{children:w})]}),(R||O||void 0!==D)&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(o.Value,{$isLoading:O,children:D&&!O?/*#__PURE__*/e.jsxs(W,{children:[/*#__PURE__*/e.jsxs(H,{children:["Sponsored by ",G.name]}),/*#__PURE__*/e.jsx(r.BoltIcon,{height:16,width:16})]}):R})]})]}),/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>U((e=>!e)),children:[/*#__PURE__*/e.jsx("span",{children:"Advanced"}),/*#__PURE__*/e.jsx(r.ChevronDownIcon,{height:"16px",width:"16px",strokeWidth:"2",style:{transition:"all 300ms",transform:N?"rotate(180deg)":void 0}})]})}),N&&/*#__PURE__*/e.jsx(e.Fragment,{children:b.map(((r,s)=>"sol-transfer"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Transfer ",r.withSeed?"with seed":""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(o.Value,{children:[i.formatTokenAmount({amount:r.value,decimals:r.token.decimals})," ",r.token.symbol]})]}),!!r.toAccount&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.toAccount,url:f})})]})]},s):"spl-transfer"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Transfer ",r.token.symbol]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.value.toString()})]}),!!r.fromAta&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.fromAta,url:f})})]}),!!r.toAta&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.toAta,url:f})})]}),!!r.token.address&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.token.address,url:f})})]})]},s):"ata-creation"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Create token account"})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.program,url:f})})]}),!!r.owner&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.owner,url:f})})]})]},s):"create-account"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Create account ",r.withSeed?"with seed":""]})}),!!r.account&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.account,url:f})})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount"}),/*#__PURE__*/e.jsxs(o.Value,{children:[i.formatTokenAmount({amount:r.value,decimals:9})," SOL"]})]})]},s):"spl-init-account"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Initialize token account"})}),!!r.account&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Account"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.account,url:f})})]}),!!r.mint&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Mint"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mint,url:f})})]}),!!r.owner&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.owner,url:f})})]})]},s):"spl-close-account"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Close token account"})}),!!r.source&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Source"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.source,url:f})})]}),!!r.destination&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Destination"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.destination,url:f})})]}),!!r.owner&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Owner"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.owner,url:f})})]})]},s):"spl-sync-native"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsx(d.LabelXs,{children:"Sync native"})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.program,url:f})})]})]},s):"raydium-swap-base-input"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Raydium swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount in"}),/*#__PURE__*/e.jsx(o.Value,{children:r.amountIn.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Minimum amount out"}),/*#__PURE__*/e.jsx(o.Value,{children:r.minimumAmountOut.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):"raydium-swap-base-output"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Raydium swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Max amount in"}),/*#__PURE__*/e.jsx(o.Value,{children:r.maxAmountIn.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(o.Value,{children:r.amountOut.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):"jupiter-swap-shared-accounts-route"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Jupiter swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"In amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.inAmount.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Quoted out amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.quotedOutAmount.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):"jupiter-swap-exact-out-route"===r.type?/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(d.LabelXs,{children:["Jupiter swap"," ",r.tokenIn&&r.tokenOut?`${r.tokenIn.symbol} → ${r.tokenOut.symbol}`:""]})}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Quoted in amount"}),/*#__PURE__*/e.jsx(o.Value,{children:r.quotedInAmount.toString()})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Amount out"}),/*#__PURE__*/e.jsx(o.Value,{children:r.outAmount.toString()})]}),r.mintIn&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token in"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintIn,url:f})})]}),r.mintOut&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token out"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.mintOut,url:f})})]})]},s):/*#__PURE__*/e.jsxs(P,{children:[/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Program ID"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:r.program,url:f})})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Data"}),/*#__PURE__*/e.jsx(o.Value,{children:r.discriminator})]})]},s)))}),/*#__PURE__*/e.jsx(m.Grow,{}),S?/*#__PURE__*/e.jsx(a.ErrorMessage,{style:{marginTop:"2rem"},children:S.message}):k?/*#__PURE__*/e.jsx(a.ErrorMessage,{style:{marginTop:"2rem"},children:X}):null,/*#__PURE__*/e.jsx(B,{$useSmallMargins:!(!k&&!S),title:"",address:A,balance:I,errMsg:M||k||S||!y?void 0:"Add funds on Solana to complete transaction."}),/*#__PURE__*/e.jsx(l.PrimaryButton,{style:{marginTop:"1rem"},loading:C,disabled:T||M,onClick:$,children:g}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.SendTransactionScreenView=({img:n,submitError:i,prepareError:d,onClose:u,action:p,title:g,subtitle:b,to:w,tokenAddress:f,network:y,missingFunds:S,fee:k,from:v,cta:L,disabled:A,chain:R,isSubmitting:I,isPreparing:T,isTokenPriceLoading:M,isTokenContractInfoLoading:F,isSponsored:$,symbol:D,balance:O,onClick:P,transactionDetails:U,transactionIndex:G,maxIndex:J,onBack:Q,chainName:Y,validation:K,hasScanDetails:Z,setIsScanDetailsOpen:_,preventMaliciousTransaction:ee,setPreventMaliciousTransaction:re,tokensSent:se,tokensReceived:ne,isScanning:ie,isCancellable:le,functionName:oe})=>{let{showTransactionDetails:te,setShowTransactionDetails:ae,hasMoreDetails:de,isErc20Ish:ce}=(e=>{let[r,n]=s.useState(!1),i=!0,l=!1;return(!e||e.isErc20Ish||"transaction"===e.action)&&(i=!1),i&&(l=Object.entries(e||{}).some((([e,r])=>r&&!["action","isErc20Ish","isNFTIsh"].includes(e)))),{showTransactionDetails:r,setShowTransactionDetails:n,hasMoreDetails:i&&l,isErc20Ish:e?.isErc20Ish}})(U),xe=j.useAppConfig(),he=ce&&F||T||M||ie;/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:u,backFn:Q}),n&&/*#__PURE__*/e.jsx(z,{children:n}),/*#__PURE__*/e.jsxs(x.Title,{style:{marginTop:n?"1.5rem":0},children:[g,/*#__PURE__*/e.jsx(N,{maxIndex:J,transactionIndex:G})]}),/*#__PURE__*/e.jsx(c.Subtitle,{children:b}),/*#__PURE__*/e.jsxs(t.Rows,{style:{marginTop:"2rem"},children:[(!!se[0]||he)&&/*#__PURE__*/e.jsxs(t.Row,{children:[ne.length>0?/*#__PURE__*/e.jsx(o.LabelSm,{children:"Send"}):/*#__PURE__*/e.jsx(o.LabelSm,{children:"approve"===p?"Approval amount":"Amount"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:se.map(((r,s)=>/*#__PURE__*/e.jsx(C,{iconUrl:r.iconUrl,value:"setApprovalForAll"===oe?"All":r.value,usdValue:r.usdValue,symbol:r.symbol,nftName:r.nftName,nftCount:r.nftCount,decimals:r.decimals},s)))})]}),ne.length>0&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Receive"}),/*#__PURE__*/e.jsx("div",{className:"flex flex-col",children:ne.map(((r,s)=>/*#__PURE__*/e.jsx(C,{iconUrl:r.iconUrl,value:r.value,usdValue:r.usdValue,symbol:r.symbol,nftName:r.nftName,nftCount:r.nftCount,decimals:r.decimals},s)))})]}),U&&"spender"in U&&U?.spender?/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Spender"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:U.spender,url:R?.blockExplorers?.default?.url})})]}):null,w&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:w,url:R?.blockExplorers?.default?.url,showCopyIcon:!0})})]}),f&&/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Token address"}),/*#__PURE__*/e.jsx(o.Value,{children:/*#__PURE__*/e.jsx(h.Address,{address:f,url:R?.blockExplorers?.default?.url})})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(o.Value,{children:y})]}),/*#__PURE__*/e.jsxs(t.Row,{children:[/*#__PURE__*/e.jsx(o.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(o.Value,{$isLoading:T||M||void 0===$,children:$?/*#__PURE__*/e.jsxs(W,{children:[/*#__PURE__*/e.jsxs(H,{children:["Sponsored by ",xe.name]}),/*#__PURE__*/e.jsx(r.BoltIcon,{height:16,width:16})]}):k})]}),de&&!Z&&/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.Row,{className:"cursor-pointer",onClick:()=>ae(!te),children:/*#__PURE__*/e.jsxs(o.LabelSmPrimary,{className:"flex items-center gap-x-1",children:["Details"," ",/*#__PURE__*/e.jsx(r.ChevronDownIcon,{style:{width:"0.75rem",marginLeft:"0.25rem",transform:te?"rotate(180deg)":void 0}})]})}),te&&U&&/*#__PURE__*/e.jsx(E,{action:p,chain:R,transactionDetails:U,isTokenContractInfoLoading:F,symbol:D})]}),Z&&/*#__PURE__*/e.jsx(t.Row,{children:/*#__PURE__*/e.jsxs(V,{onClick:()=>_(!0),children:[/*#__PURE__*/e.jsx("span",{className:"text-color-primary",children:"Details"}),/*#__PURE__*/e.jsx(r.ArrowRightIcon,{height:"14px",width:"14px",strokeWidth:"2"})]})})]}),/*#__PURE__*/e.jsx(m.Grow,{}),i?/*#__PURE__*/e.jsx(a.ErrorMessage,{style:{marginTop:"2rem"},children:i.message}):d&&0===G?
166
166
  /*#__PURE__*/e.jsx(a.ErrorMessage,{style:{marginTop:"2rem"},children:d.shortMessage??X}):null,/*#__PURE__*/e.jsx(q,{variant:K,preventMaliciousTransaction:ee,setPreventMaliciousTransaction:re}),/*#__PURE__*/e.jsx(B,{$useSmallMargins:!(!d&&!i&&"warn"!==K&&"error"!==K),address:v,balance:O,errMsg:T||d||i||!S?void 0:`Add funds on ${R?.name??Y} to complete transaction.`}),/*#__PURE__*/e.jsx(l.PrimaryButton,{style:{marginTop:"1rem"},loading:I,disabled:A||T,onClick:P,children:L}),le&&/*#__PURE__*/e.jsx(l.EmbeddedButton,{style:{marginTop:"1rem"},onClick:u,isSubmitting:!1,children:"Not now"}),/*#__PURE__*/e.jsx(l.BlobbyFooter,{})]})},exports.TransactionErrorView=({transactionError:r,chainId:n,onClose:i,onRetry:o,chainType:t,transactionHash:a})=>{let{chains:d}=L.usePrivyInternal(),[c,x]=s.useState(!1),{errorCode:h,errorMessage:u}=((e,r)=>{if("ethereum"===r)return{errorCode:e.details??e.message,errorMessage:e.shortMessage};let s=e.txSignature,n=e?.transactionMessage||"Something went wrong.";if(Array.isArray(e.logs)){let r=e.logs.find((e=>/insufficient (lamports|funds)/gi.test(e)));r&&(n=r)}return{transactionHash:s,errorMessage:n}})(r,t),j=(({chains:e,chainId:r,chainType:s,transactionHash:n})=>"ethereum"===s?e.find((e=>e.id===r))?.blockExplorers?.default.url??"https://etherscan.io":function(e,r){return`https://explorer.solana.com/tx/${e}?chain=${r}`}(n||"",r))({chains:d,chainId:n,chainType:t,transactionHash:a});/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.ModalHeader,{onClose:i}),/*#__PURE__*/e.jsxs(G,{children:[/*#__PURE__*/e.jsx(U,{}),/*#__PURE__*/e.jsx(J,{children:h}),/*#__PURE__*/e.jsx(Q,{children:"Please try again."}),/*#__PURE__*/e.jsxs(re,{children:[/*#__PURE__*/e.jsx(ee,{children:"Error message"}),/*#__PURE__*/e.jsx(ne,{$clickable:!1,children:u})]}),a&&/*#__PURE__*/e.jsxs(re,{children:[/*#__PURE__*/e.jsx(ee,{children:"Transaction hash"}),/*#__PURE__*/e.jsxs(se,{children:["Copy this hash to view details about the transaction on a"," ",/*#__PURE__*/e.jsx("u",{children:/*#__PURE__*/e.jsx("a",{href:j,children:"block explorer"})}),"."]}),/*#__PURE__*/e.jsxs(ne,{$clickable:!0,onClick:async()=>{await navigator.clipboard.writeText(a),x(!0)},children:[a,/*#__PURE__*/e.jsx(oe,{clicked:c})]})]}),/*#__PURE__*/e.jsx(_,{onClick:()=>o({resetNonce:!!a}),children:"Retry transaction"})]}),/*#__PURE__*/e.jsx(l.ModalFooter,{})]})};
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),n=require("react"),t=require("./ModalHeader-CabvEpAG.js"),l=require("./ScreenHeader-CgYJ5Fmg.js"),a=require("./FundWalletMethodHeader-2kXHTrGK.js"),i=require("./Chip-C6r7fZiR.js"),o=require("./Subtitle-CR8zM7ZJ.js"),r=require("./context-CuNnvCIL.js"),c=require("./useActiveWallet-D5qqs3GS.js"),s=require("./internal-context-BJv4f_bO.js"),u=require("./get-is-unified-wallet-C2yi08Zy.js"),d=require("./useWallets-Bv9SU-di.js"),p=require("./WalletOverflowButton-p3vpo0QR.js"),y=require("./index-DyCLWLpL.js"),h=require("react-device-detect"),w=require("styled-components"),m=require("./InjectedWalletIcon-UY3nMvZo.js"),C=require("./styles-D7QQZERY.js");require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./LoadingSkeleton-BoyADunQ.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("zustand"),require("./use-export-wallet-COKs2yxH.js"),require("eventemitter3"),require("viem/utils"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("ofetch"),require("lucide-react"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-BKHhRZMn.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("./PrivyPluginContext-DsgaS6n9.js"),require("./getEmbeddedConnectedWallet-pJd-l936.js"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("@heroicons/react/24/outline/WalletIcon"),require("./LinkPasskeyScreen-DR1inEW4.js"),require("./TodoList-Cii_KrAk.js"),require("./ScreenLayout-SSjax2iq.js"),require("./Screen-BXzBiTIN.js"),require("./index-ByFhjjzH.js");const g=({provider:n,displayName:t,logo:l,connectOnly:a,connector:i})=>{let o,{navigate:r,setModalData:d}=u.usePrivyModal(),{connectWallet:p}=s.usePrivyInternal(),w=c.useRecentlyUsedLogin(),C=c.useExternalWalletListing(n),g="wallet_connect_v2"===i.connectorType?n:i.walletClientType,x=window.matchMedia("(display-mode: standalone)").matches,q=c.getWalletConfigForConnector({connectorType:i.connectorType,walletClientType:g});o=q&&q.chainTypes.includes(i.chainType)?()=>{q.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,g),r(a?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):h.isMobile?(d({installWalletModalData:{walletConfig:q,chainType:i.chainType,connectOnly:a}}),r("WalletInterstitialScreen")):(d({installWalletModalData:{walletConfig:q,chainType:i.chainType,connectOnly:a}}),r("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!h.isMobile||x||c.isCoinbaseWalletInstalled()?()=>{(!y.e(window.navigator.userAgent)||event?.isTrusted)&&(p(i,g),a?"wallet_connect_v2"===i.connectorType?(d((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),r("ConnectOnlyLandingScreen")):r("ConnectOnlyStatusScreen"):r("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let v=t||C?.metadata?.shortName||C?.name||i.walletClientType;/*#__PURE__*/return e.jsxs(T,{onClick:o,children:[/*#__PURE__*/e.jsx(m.InjectedWalletIcon,{icon:l||C?.image_url?.md,name:v}),/*#__PURE__*/e.jsx("span",{children:v}),/*#__PURE__*/e.jsxs(j,{id:"chip-container",children:[w?.walletClientType===g&&w?.chainType===i.chainType?/*#__PURE__*/e.jsx(f,{color:"gray",children:"Recent"}):/*#__PURE__*/e.jsx("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/e.jsx(f,{color:"gray",children:"Solana"})]})]})};let T=w.styled(c.LoginMethodButton)`
1
+ "use strict";var e=require("react/jsx-runtime"),n=require("react"),t=require("./ModalHeader-CtKHzKGg.js"),l=require("./ScreenHeader-CgYJ5Fmg.js"),a=require("./FundWalletMethodHeader-DEG0gSQr.js"),i=require("./Chip-C6r7fZiR.js"),o=require("./Subtitle-CR8zM7ZJ.js"),r=require("./context-BC-5kj78.js"),c=require("./useActiveWallet-CR03NUpG.js"),s=require("./internal-context-BJv4f_bO.js"),u=require("./get-is-unified-wallet-BzEUbDK3.js"),d=require("./useWallets-Cuyz25d9.js"),p=require("./WalletOverflowButton-DRG7e1fY.js"),y=require("./index-B6OzAz9u.js"),h=require("react-device-detect"),w=require("styled-components"),m=require("./InjectedWalletIcon-UY3nMvZo.js"),C=require("./styles-CcKJSwKY.js");require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./LoadingSkeleton-BoyADunQ.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("zustand"),require("./use-export-wallet-1UzcKhL7.js"),require("eventemitter3"),require("viem/utils"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("ofetch"),require("lucide-react"),require("uuid"),require("jose"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-OGD5cMxb.js"),require("@scure/base"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("./PrivyPluginContext-DsgaS6n9.js"),require("./getEmbeddedConnectedWallet-pJd-l936.js"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("@heroicons/react/24/outline/WalletIcon"),require("./LinkPasskeyScreen-CQYKVLhX.js"),require("./TodoList-Cii_KrAk.js"),require("./ScreenLayout-B07q0ZPf.js"),require("./Screen-BZt4LJMK.js"),require("./index-ByFhjjzH.js");const g=({provider:n,displayName:t,logo:l,connectOnly:a,connector:i})=>{let o,{navigate:r,setModalData:d}=u.usePrivyModal(),{connectWallet:p}=s.usePrivyInternal(),w=c.useRecentlyUsedLogin(),C=c.useExternalWalletListing(n),g="wallet_connect_v2"===i.connectorType?n:i.walletClientType,x=window.matchMedia("(display-mode: standalone)").matches,q=c.getWalletConfigForConnector({connectorType:i.connectorType,walletClientType:g});o=q&&q.chainTypes.includes(i.chainType)?()=>{q.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,g),r(a?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):h.isMobile?(d({installWalletModalData:{walletConfig:q,chainType:i.chainType,connectOnly:a}}),r("WalletInterstitialScreen")):(d({installWalletModalData:{walletConfig:q,chainType:i.chainType,connectOnly:a}}),r("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!h.isMobile||x||c.isCoinbaseWalletInstalled()?()=>{(!y.e(window.navigator.userAgent)||event?.isTrusted)&&(p(i,g),a?"wallet_connect_v2"===i.connectorType?(d((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),r("ConnectOnlyLandingScreen")):r("ConnectOnlyStatusScreen"):r("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let v=t||C?.metadata?.shortName||C?.name||i.walletClientType;/*#__PURE__*/return e.jsxs(T,{onClick:o,children:[/*#__PURE__*/e.jsx(m.InjectedWalletIcon,{icon:l||C?.image_url?.md,name:v}),/*#__PURE__*/e.jsx("span",{children:v}),/*#__PURE__*/e.jsxs(j,{id:"chip-container",children:[w?.walletClientType===g&&w?.chainType===i.chainType?/*#__PURE__*/e.jsx(f,{color:"gray",children:"Recent"}):/*#__PURE__*/e.jsx("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/e.jsx(f,{color:"gray",children:"Solana"})]})]})};let T=w.styled(c.LoginMethodButton)`
2
2
  /* Wallet name text color */
3
3
  > span {
4
4
  color: var(--privy-color-foreground);
@@ -28,4 +28,4 @@
28
28
  flex-wrap: wrap;
29
29
  gap: 8px;
30
30
  margin-left: auto;
31
- `;const x=["coinbase_wallet","base_account"];let q=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const v=["safe"],_=["phantom","backpack","solflare","jupiter","universal_profile"],S={component:()=>{let i,{connectors:h}=s.usePrivyInternal(),{setModalData:w,data:m,navigate:C}=u.usePrivyModal(),T=r.useAppConfig(),{wallets:f}=d.useWallets(),j=h.filter(c.isSolanaWalletConnector).flatMap((e=>e.wallets)),[S,b]=n.useState("default"),$="solana"===m?.funding?.chainType,k=!!m?.funding?.crossChainBridgingEnabled;i="ethereum"===m?.funding?.chainType?m.funding.erc20Address&&!m.funding.isUSDC?"ethereum-only":k&&!m.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":k&&!m.funding?.isUSDC?"ethereum-and-solana":"solana-only";let I=f.filter((e=>"privy"!==e.walletClientType)),M=I.map((e=>e.walletClientType)),O=j.filter((e=>"privy"!==e.walletClientType)),A=O.map((e=>e.walletClientType)),B=[],D={...m.funding};D.usingDefaultFundingMethod&&(D.usingDefaultFundingMethod=!1);let F=({wallet:e,walletChainType:n})=>{w({...m,funding:{...D,connectedWallet:e,onContinueWithExternalWallet:()=>C(E({destChainType:$?"solana":"ethereum",sourceChainType:n}))},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e.address,walletClientType:e.walletClientType}}:void 0}),C("FundingAmountEditScreen")};"solana-only"!==i&&B.push(...I.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>F({wallet:n,walletChainType:"ethereum"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),"ethereum-only"!==i&&B.push(...O.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>F({wallet:n,walletChainType:"solana"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),B.push(...(({walletList:n,walletChainType:t,connectors:l,connectOnly:a,ignore:i,walletConnectEnabled:o,forceWallet:r})=>{let c=[],s=[],u=[],d=l.filter((e=>"ethereum-only"===t?"ethereum"===e.chainType:"solana-only"!==t||"solana"===e.chainType)),p=d.find((e=>"wallet_connect_v2"===e.connectorType));for(let[l,h]of(r?[r.wallet]:n).entries()){if("detected_ethereum_wallets"===h)for(let[n,t]of d.filter((({chainType:e,connectorType:n,walletClientType:t})=>"solana"!==e&&("uniswap_wallet_extension"===t||"uniswap_extension"===t?!i.includes("uniswap"):"crypto.com_wallet_extension"===t||"crypto.com_onchain"===t?!i.includes("cryptocom"):"injected"===n&&!i.includes(t)))).entries()){let{walletClientType:i,walletBranding:o,chainType:r}=t;("unknown"===i?s:c).push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:i,logo:o.icon,displayName:o.name,connector:t},`${l}-${h}-${i}-${r}-${n}`))}if("detected_solana_wallets"===h)for(let[n,o]of d.filter((({chainType:e,walletClientType:n})=>{if("solana"===e)return"ethereum-only"!==t&&!i.includes(n)})).entries()){let{walletClientType:t,walletBranding:i,chainType:r}=o;("unknown"===t?s:c).push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:t,logo:i.icon,displayName:i.name,connector:o},`${l}-${h}-${t}-${r}-${n}`))}if(_.includes(h)){let n=d.find((e=>"injected"===e.connectorType&&e.walletClientType===h||e.connectorType===h));if(n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(q.includes(h)){let n=d.find((e=>"uniswap"===h?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===h?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===h));if(o&&!n&&(n=p),n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n,logo:"injected"===n.connectorType?n.walletBranding.icon:void 0,displayName:"injected"===n.connectorType?n.walletBranding.name:void 0},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(x.includes(h)){let n=d.find((({connectorType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n,displayName:"coinbase_wallet"===n.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===n.walletClientType?y.COINBASE_WALLET_DATA_URI:y.BASE_ACCOUNT_DATA_URI},`${l}-${h}`))}else if(v.includes(h))p&&u.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:p},`${l}-${h}`));else if("wallet_connect"===h)p&&u.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:p,logo:p.walletBranding.icon,displayName:"WalletConnect"},`${l}-${h}`));else if(h===r?.wallet){let t="ethereum"===r.chainType&&n.includes("detected_ethereum_wallets"),i="solana"===r.chainType&&n.includes("detected_solana_wallets");if(t||i){let n=d.find((({walletClientType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,displayName:n.walletBranding?.name,logo:n.walletBranding?.icon,connector:n},`${l}-${h}`))}}}return[...s,...c,...u]})({walletList:T.appearance.walletList.filter((e=>!I.some((n=>n.walletClientType===e))&&!O.some((n=>n.walletClientType===e)))),walletChainType:i,connectors:h,connectOnly:!0,ignore:[...T.appearance.walletList,...M,...A],walletConnectEnabled:T.externalWallets.walletConnect.enabled}));let L=/*#__PURE__*/e.jsx(p.WalletOverflowButton,{text:"More wallets",onClick:()=>b("overflow")}),E=({sourceChainType:e,destChainType:n})=>"ethereum"===e&&"solana"===n?"AwaitingEvmToSolBridgingScreen":"ethereum"===e&&"ethereum"===n?"AwaitingExternalEthereumTransferScreen":"solana"===e&&"ethereum"===n?"AwaitingSolToEvmBridgingScreen":D.externalSolanaFundingScreen;return n.useEffect((()=>{w({...m,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:n,walletChainType:t})=>{let l=t??"ethereum",a="ethereum"===l?I.find((t=>t.address===e&&t.walletClientType===n)):O.find((t=>t.address===e&&t.walletClientType===n));return w({...m,funding:{...D,connectedWallet:a,onContinueWithExternalWallet:()=>{C(E({destChainType:$?"solana":"ethereum",sourceChainType:l}))}},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:n||""}}:void 0}),"FundingAmountEditScreen"}}})}),[]),"overflow"===S?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{backFn:()=>b("default")},"header"),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[/*#__PURE__*/e.jsx(o.Subtitle,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),B]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.t,{}),/*#__PURE__*/e.jsx(l.CenteredScreenHeader,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[B.length>4?B.slice(0,3):B,B.length>4&&L]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let W=({onClick:n,icon:t,name:l,chainType:a})=>/*#__PURE__*/e.jsxs(c.LoginMethodButton,{onClick:n,children:[/*#__PURE__*/e.jsx(C.IconContainer,{style:{width:20},children:/*#__PURE__*/e.jsx("img",{src:t})}),l,/*#__PURE__*/e.jsx(i.Chip,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===a&&/*#__PURE__*/e.jsx(i.Chip,{color:"gray",children:"Solana"})]});exports.TransferFromWalletScreen=S,exports.default=S;
31
+ `;const x=["coinbase_wallet","base_account"];let q=["metamask","okx_wallet","rainbow","uniswap","bybit_wallet","ronin_wallet","haha_wallet","uniswap_extension","zerion","rabby_wallet","cryptocom","binance","kraken_wallet"];const v=["safe"],_=["phantom","backpack","solflare","jupiter","universal_profile"],S={component:()=>{let i,{connectors:h}=s.usePrivyInternal(),{setModalData:w,data:m,navigate:C}=u.usePrivyModal(),T=r.useAppConfig(),{wallets:f}=d.useWallets(),j=h.filter(c.isSolanaWalletConnector).flatMap((e=>e.wallets)),[S,b]=n.useState("default"),$="solana"===m?.funding?.chainType,k=!!m?.funding?.crossChainBridgingEnabled;i="ethereum"===m?.funding?.chainType?m.funding.erc20Address&&!m.funding.isUSDC?"ethereum-only":k&&!m.funding.chain.testnet?"ethereum-and-solana":"ethereum-only":k&&!m.funding?.isUSDC?"ethereum-and-solana":"solana-only";let I=f.filter((e=>"privy"!==e.walletClientType)),M=I.map((e=>e.walletClientType)),O=j.filter((e=>"privy"!==e.walletClientType)),A=O.map((e=>e.walletClientType)),B=[],F={...m.funding};F.usingDefaultFundingMethod&&(F.usingDefaultFundingMethod=!1);let L=({wallet:e,walletChainType:n})=>{w({...m,funding:{...F,connectedWallet:e,onContinueWithExternalWallet:()=>C(E({destChainType:$?"solana":"ethereum",sourceChainType:n}))},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e.address,walletClientType:e.walletClientType}}:void 0}),C("FundingAmountEditScreen")};"solana-only"!==i&&B.push(...I.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>L({wallet:n,walletChainType:"ethereum"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),"ethereum-only"!==i&&B.push(...O.map(((n,t)=>/*#__PURE__*/e.jsx(W,{onClick:()=>L({wallet:n,walletChainType:"solana"}),icon:n.meta.icon,name:n.meta.name,chainType:n.type},t)))),B.push(...(({walletList:n,walletChainType:t,connectors:l,connectOnly:a,ignore:i,walletConnectEnabled:o,forceWallet:r})=>{let c=[],s=[],u=[],d=l.filter((e=>"ethereum-only"===t?"ethereum"===e.chainType:"solana-only"!==t||"solana"===e.chainType)),p=d.find((e=>"wallet_connect_v2"===e.connectorType));for(let[l,h]of(r?[r.wallet]:n).entries()){if("detected_ethereum_wallets"===h)for(let[n,t]of d.filter((({chainType:e,connectorType:n,walletClientType:t})=>"solana"!==e&&("uniswap_wallet_extension"===t||"uniswap_extension"===t?!i.includes("uniswap"):"crypto.com_wallet_extension"===t||"crypto.com_onchain"===t?!i.includes("cryptocom"):"injected"===n&&!i.includes(t)))).entries()){let{walletClientType:i,walletBranding:o,chainType:r}=t;("unknown"===i?s:c).push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:i,logo:o.icon,displayName:o.name,connector:t},`${l}-${h}-${i}-${r}-${n}`))}if("detected_solana_wallets"===h)for(let[n,o]of d.filter((({chainType:e,walletClientType:n})=>{if("solana"===e)return"ethereum-only"!==t&&!i.includes(n)})).entries()){let{walletClientType:t,walletBranding:i,chainType:r}=o;("unknown"===t?s:c).push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:t,logo:i.icon,displayName:i.name,connector:o},`${l}-${h}-${t}-${r}-${n}`))}if(_.includes(h)){let n=d.find((e=>"injected"===e.connectorType&&e.walletClientType===h||e.connectorType===h));if(n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(q.includes(h)){let n=d.find((e=>"uniswap"===h?"uniswap_wallet_extension"===e.walletClientType||"uniswap_extension"===e.walletClientType:"cryptocom"===h?"crypto.com_wallet_extension"===e.walletClientType||"crypto.com_onchain"===e.walletClientType:"injected"===e.connectorType&&e.walletClientType===h));if(o&&!n&&(n=p),n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n,logo:"injected"===n.connectorType?n.walletBranding.icon:void 0,displayName:"injected"===n.connectorType?n.walletBranding.name:void 0},`${l}-${h}`)),"solana-only"===t||"ethereum-and-solana"===t){let n=d.find((({chainType:e,walletClientType:n})=>"solana"===e&&n===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n},`${h}-solana`))}}else if(x.includes(h)){let n=d.find((({connectorType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:n,displayName:"coinbase_wallet"===n.walletClientType?"Coinbase":"Base",logo:"coinbase_wallet"===n.walletClientType?y.COINBASE_WALLET_DATA_URI:y.BASE_ACCOUNT_DATA_URI},`${l}-${h}`))}else if(v.includes(h))p&&u.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:p},`${l}-${h}`));else if("wallet_connect"===h)p&&u.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,connector:p,logo:p.walletBranding.icon,displayName:"WalletConnect"},`${l}-${h}`));else if(h===r?.wallet){let t="ethereum"===r.chainType&&n.includes("detected_ethereum_wallets"),i="solana"===r.chainType&&n.includes("detected_solana_wallets");if(t||i){let n=d.find((({walletClientType:e})=>e===h));n&&c.push(/*#__PURE__*/e.jsx(g,{connectOnly:a,provider:h,displayName:n.walletBranding?.name,logo:n.walletBranding?.icon,connector:n},`${l}-${h}`))}}}return[...s,...c,...u]})({walletList:T.appearance.walletList.filter((e=>!I.some((n=>n.walletClientType===e))&&!O.some((n=>n.walletClientType===e)))),walletChainType:i,connectors:h,connectOnly:!0,ignore:[...T.appearance.walletList,...M,...A],walletConnectEnabled:T.externalWallets.walletConnect.enabled}));let D=/*#__PURE__*/e.jsx(p.WalletOverflowButton,{text:"More wallets",onClick:()=>b("overflow")}),E=({sourceChainType:e,destChainType:n})=>"ethereum"===e&&"solana"===n?"AwaitingEvmToSolBridgingScreen":"ethereum"===e&&"ethereum"===n?"AwaitingExternalEthereumTransferScreen":"solana"===e&&"ethereum"===n?"AwaitingSolToEvmBridgingScreen":F.externalSolanaFundingScreen;return n.useEffect((()=>{w({...m,externalConnectWallet:{onCompleteNavigateTo:({address:e,walletClientType:n,walletChainType:t})=>{let l=t??"ethereum",a="ethereum"===l?I.find((t=>t.address===e&&t.walletClientType===n)):O.find((t=>t.address===e&&t.walletClientType===n));return w({...m,funding:{...F,connectedWallet:a,onContinueWithExternalWallet:()=>{C(E({destChainType:$?"solana":"ethereum",sourceChainType:l}))}},solanaFundingData:m?.solanaFundingData?{...m.solanaFundingData,sourceWalletData:{address:e||"",walletClientType:n||""}}:void 0}),"FundingAmountEditScreen"}}})}),[]),"overflow"===S?/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(t.ModalHeader,{backFn:()=>b("default")},"header"),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[/*#__PURE__*/e.jsx(o.Subtitle,{style:{color:"var(--privy-color-foreground-3)",textAlign:"left"},children:"More wallets"}),B]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]}):/*#__PURE__*/e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(a.t,{}),/*#__PURE__*/e.jsx(l.CenteredScreenHeader,{title:"Transfer from wallet",description:"Connect a wallet to deposit funds or send funds manually to your wallet address."}),/*#__PURE__*/e.jsxs(c.LoginMethodContainer,{children:[B.length>4?B.slice(0,3):B,B.length>4&&D]}),/*#__PURE__*/e.jsx(t.BlobbyFooter,{})]})}};let W=({onClick:n,icon:t,name:l,chainType:a})=>/*#__PURE__*/e.jsxs(c.LoginMethodButton,{onClick:n,children:[/*#__PURE__*/e.jsx(C.IconContainer,{style:{width:20},children:/*#__PURE__*/e.jsx("img",{src:t})}),l,/*#__PURE__*/e.jsx(i.Chip,{color:"gray",style:{marginLeft:"auto"},children:"Connected"}),"solana"===a&&/*#__PURE__*/e.jsx(i.Chip,{color:"gray",children:"Solana"})]});exports.TransferFromWalletScreen=S,exports.default=S;
@@ -1,6 +1,6 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),s=require("./Layouts-D3TOcPhm.js"),i=require("./ModalHeader-CabvEpAG.js"),n=require("./ScreenHeader-CgYJ5Fmg.js"),l=require("./FundWalletMethodHeader-2kXHTrGK.js"),t=require("./InjectedWalletIcon-UY3nMvZo.js"),a=require("./index-ByFhjjzH.js"),d=require("./Row-CMqYn75Q.js"),c=require("./Value-mhPsfsxe.js"),o=require("./Address-BAzd87pQ.js"),j=require("./NetworkIcon-BZ9Mj6vV.js"),x=require("./useActiveWallet-D5qqs3GS.js");let u=r.styled.div`
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),i=require("./Layouts-D3TOcPhm.js"),s=require("./ModalHeader-CtKHzKGg.js"),n=require("./ScreenHeader-CgYJ5Fmg.js"),l=require("./FundWalletMethodHeader-DEG0gSQr.js"),t=require("./InjectedWalletIcon-UY3nMvZo.js"),a=require("./index-ByFhjjzH.js"),d=require("./Row-CMqYn75Q.js"),c=require("./Value-mhPsfsxe.js"),o=require("./Address-B-WU8e3D.js"),j=require("./NetworkIcon-BZ9Mj6vV.js"),x=require("./useActiveWallet-CR03NUpG.js");let u=r.styled.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  align-items: center;
5
5
  gap: 4px;
6
- `;exports.TransferOrBridgeLoadingScreen=({walletClientType:r,displayName:h,addressToFund:g,chainId:m,chainName:w,isBridging:p,isErc20Flow:q,totalPriceInNativeCurrency:I,totalPriceInUsd:y,gasPriceInNativeCurrency:S,gasPriceInUsd:b})=>{let N=x.useExternalWalletListing(r);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.t,{}),/*#__PURE__*/e.jsx(a.NeutralSpinner,{centerIcon:/*#__PURE__*/e.jsx(t.InjectedWalletIcon,{icon:N?.image_url?.md,name:r})}),/*#__PURE__*/e.jsx(n.CenteredScreenHeader,{style:{marginTop:"8px",marginBottom:"12px"},title:`${p?"Bridging":"Confirming"} with ${h}`}),!p&&!q&&/*#__PURE__*/e.jsxs(d.Rows,{children:[/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Total"}),/*#__PURE__*/e.jsx(c.Value,{children:y||I})]}),/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsx(o.Address,{address:g,showCopyIcon:!1})})]}),/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsxs(u,{children:[/*#__PURE__*/e.jsx(j.NetworkIcon,{chainId:m,height:16,width:16})," ",w]})})]}),S&&/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(c.Value,{children:b||S})]})]}),/*#__PURE__*/e.jsx(s.ConfigurableSpacer,{height:24}),/*#__PURE__*/e.jsx(i.BlobbyFooter,{})]})};
6
+ `;exports.TransferOrBridgeLoadingScreen=({walletClientType:r,displayName:h,addressToFund:g,chainId:m,chainName:w,isBridging:q,isErc20Flow:I,totalPriceInNativeCurrency:p,totalPriceInUsd:y,gasPriceInNativeCurrency:S,gasPriceInUsd:C})=>{let N=x.useExternalWalletListing(r);/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsx(l.t,{}),/*#__PURE__*/e.jsx(a.NeutralSpinner,{centerIcon:/*#__PURE__*/e.jsx(t.InjectedWalletIcon,{icon:N?.image_url?.md,name:r})}),/*#__PURE__*/e.jsx(n.CenteredScreenHeader,{style:{marginTop:"8px",marginBottom:"12px"},title:`${q?"Bridging":"Confirming"} with ${h}`}),!q&&!I&&/*#__PURE__*/e.jsxs(d.Rows,{children:[/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Total"}),/*#__PURE__*/e.jsx(c.Value,{children:y||p})]}),/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"To"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsx(o.Address,{address:g,showCopyIcon:!1})})]}),/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Network"}),/*#__PURE__*/e.jsx(c.Value,{children:/*#__PURE__*/e.jsxs(u,{children:[/*#__PURE__*/e.jsx(j.NetworkIcon,{chainId:m,height:16,width:16})," ",w]})})]}),S&&/*#__PURE__*/e.jsxs(d.Row,{children:[/*#__PURE__*/e.jsx(c.LabelSm,{children:"Estimated fee"}),/*#__PURE__*/e.jsx(c.Value,{children:C||S})]})]}),/*#__PURE__*/e.jsx(i.ConfigurableSpacer,{height:24}),/*#__PURE__*/e.jsx(s.BlobbyFooter,{})]})};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/EnvelopeIcon"),i=require("./Layouts-D3TOcPhm.js"),t=require("lucide-react"),a=require("react"),s=require("./context-CuNnvCIL.js"),u=require("./index-DyCLWLpL.js"),o=require("./internal-context-BJv4f_bO.js"),n=require("./get-is-unified-wallet-C2yi08Zy.js"),l=require("./useActiveWallet-D5qqs3GS.js"),d=require("./ModalHeader-CabvEpAG.js"),c=require("./EmailInputForm-Y-nHsEtF.js"),q=require("./ErrorMessage-BfTVyue9.js"),m=require("./ScreenLayout-SSjax2iq.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("uuid"),require("jose"),require("eventemitter3"),require("./useWallets-Bv9SU-di.js"),require("./use-export-wallet-COKs2yxH.js"),require("viem/utils"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("react-device-detect"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-BKHhRZMn.js"),require("./events-context-Di6--rDg.js"),require("@scure/base"),require("zustand"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("viem"),require("./PrivyPluginContext-DsgaS6n9.js"),require("./getEmbeddedConnectedWallet-pJd-l936.js"),require("./getPublicClient-BsmZyCGX.js"),require("ofetch"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-BXzBiTIN.js"),require("./index-ByFhjjzH.js");var j=/*#__PURE__*/p(r);const h=/*#__PURE__*/a.forwardRef(((r,i)=>{let[c,m]=a.useState(""),[p,j]=a.useState(""),[h,x]=a.useState(!1),{authenticated:g,user:w}=n.usePrivyContext(),{initUpdateEmail:S}=o.usePrivyInternal(),{navigate:f,setModalData:b,currentScreen:E}=n.usePrivyModal(),{enabled:k,token:C}=u.useCaptcha(),A=s.useAppConfig(),P=l.validateEmail(c)&&(A.disablePlusEmails&&c.includes("+")?(p||j("Please enter a valid email address without a '+'."),!1):(p&&j(""),!0)),M=h||!P,I=()=>{!k||C||g?(async e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");x(!0);try{await S({oldAddress:w.email.address,newAddress:c,captchaToken:e}),f("AwaitingPasswordlessCodeScreen")}catch(e){b({errorModalData:{error:e,previousScreen:E||"LandingScreen"}}),f("ErrorScreen")}x(!1)})(C):(b({captchaModalData:{callback:e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");return S({oldAddress:w.email.address,newAddress:c,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),f("CaptchaScreen"))};/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(v,{children:[p&&/*#__PURE__*/e.jsx(q.ErrorMessage,{style:{marginTop:"0.25rem",textAlign:"left"},children:p}),/*#__PURE__*/e.jsxs(y,{$error:!!p,children:[/*#__PURE__*/e.jsx(l.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(t.Mail,{})}),/*#__PURE__*/e.jsx("input",{ref:i,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>m(e.target.value),onKeyUp:e=>{"Enter"===e.key&&I()},value:c,autoComplete:"email"}),r.stacked?null:/*#__PURE__*/e.jsx(d.EmbeddedButton,{isSubmitting:h,onClick:I,disabled:M,children:"Submit"})]})]}),r.stacked?/*#__PURE__*/e.jsx(d.PrimaryButton,{loadingText:null,loading:h,disabled:M,onClick:I,style:{width:"100%"},children:"Submit"}):null]})}));let v=c.InputContainerForm,y=c.EmailUpdateForm;const x=({title:r="Update your email",subtitle:t="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/e.jsx(m.ScreenLayout,{title:r,subtitle:t,icon:j.default,watermark:!0,children:/*#__PURE__*/e.jsx(i.BottomPusherContainer,{children:/*#__PURE__*/e.jsx(h,{stacked:!0})})}),g={component:()=>/*#__PURE__*/e.jsx(x,{})};exports.UpdateEmailScreen=g,exports.UpdateEmailScreenView=x,exports.default=g;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/EnvelopeIcon"),i=require("./Layouts-D3TOcPhm.js"),t=require("lucide-react"),a=require("react"),s=require("./context-BC-5kj78.js"),u=require("./index-B6OzAz9u.js"),o=require("./internal-context-BJv4f_bO.js"),n=require("./get-is-unified-wallet-BzEUbDK3.js"),l=require("./useActiveWallet-CR03NUpG.js"),d=require("./ModalHeader-CtKHzKGg.js"),c=require("./EmailInputForm-Y-nHsEtF.js"),q=require("./ErrorMessage-BfTVyue9.js"),m=require("./ScreenLayout-B07q0ZPf.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("uuid"),require("jose"),require("eventemitter3"),require("./useWallets-Cuyz25d9.js"),require("./use-export-wallet-1UzcKhL7.js"),require("viem/utils"),require("@coinbase/wallet-sdk"),require("@privy-io/ethereum"),require("mipd"),require("react-device-detect"),require("@privy-io/popup"),require("./paths-DizMb-lU.js"),require("./usePrivy-OGD5cMxb.js"),require("./events-context-Di6--rDg.js"),require("@scure/base"),require("zustand"),require("@headlessui/react"),require("@walletconnect/ethereum-provider"),require("@privy-io/urls"),require("viem"),require("./PrivyPluginContext-DsgaS6n9.js"),require("./getEmbeddedConnectedWallet-pJd-l936.js"),require("./getPublicClient-BsmZyCGX.js"),require("ofetch"),require("js-cookie"),require("./frame-Oz7volks.js"),require("@privy-io/routes"),require("x402/client"),require("@privy-io/api-base"),require("viem/accounts"),require("./use-sign-with-user-signer-Cu_6Bx7m.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-BZt4LJMK.js"),require("./index-ByFhjjzH.js");var j=/*#__PURE__*/p(r);const h=/*#__PURE__*/a.forwardRef(((r,i)=>{let[c,m]=a.useState(""),[p,j]=a.useState(""),[h,x]=a.useState(!1),{authenticated:g,user:w}=n.usePrivyContext(),{initUpdateEmail:S}=o.usePrivyInternal(),{navigate:f,setModalData:b,currentScreen:E}=n.usePrivyModal(),{enabled:k,token:C}=u.useCaptcha(),P=s.useAppConfig(),A=l.validateEmail(c)&&(P.disablePlusEmails&&c.includes("+")?(p||j("Please enter a valid email address without a '+'."),!1):(p&&j(""),!0)),M=h||!A,I=()=>{!k||C||g?(async e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");x(!0);try{await S({oldAddress:w.email.address,newAddress:c,captchaToken:e}),f("AwaitingPasswordlessCodeScreen")}catch(e){b({errorModalData:{error:e,previousScreen:E||"LandingScreen"}}),f("ErrorScreen")}x(!1)})(C):(b({captchaModalData:{callback:e=>{if(!w?.email)throw Error("User is required to have an email address to update it.");return S({oldAddress:w.email.address,newAddress:c,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),f("CaptchaScreen"))};/*#__PURE__*/return e.jsxs(e.Fragment,{children:[/*#__PURE__*/e.jsxs(v,{children:[p&&/*#__PURE__*/e.jsx(q.ErrorMessage,{style:{marginTop:"0.25rem",textAlign:"left"},children:p}),/*#__PURE__*/e.jsxs(y,{$error:!!p,children:[/*#__PURE__*/e.jsx(l.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(t.Mail,{})}),/*#__PURE__*/e.jsx("input",{ref:i,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>m(e.target.value),onKeyUp:e=>{"Enter"===e.key&&I()},value:c,autoComplete:"email"}),r.stacked?null:/*#__PURE__*/e.jsx(d.EmbeddedButton,{isSubmitting:h,onClick:I,disabled:M,children:"Submit"})]})]}),r.stacked?/*#__PURE__*/e.jsx(d.PrimaryButton,{loadingText:null,loading:h,disabled:M,onClick:I,style:{width:"100%"},children:"Submit"}):null]})}));let v=c.InputContainerForm,y=c.EmailUpdateForm;const x=({title:r="Update your email",subtitle:t="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/e.jsx(m.ScreenLayout,{title:r,subtitle:t,icon:j.default,watermark:!0,children:/*#__PURE__*/e.jsx(i.BottomPusherContainer,{children:/*#__PURE__*/e.jsx(h,{stacked:!0})})}),g={component:()=>/*#__PURE__*/e.jsx(x,{})};exports.UpdateEmailScreen=g,exports.UpdateEmailScreenView=x,exports.default=g;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-lBXP5nI1.js"),n=require("./internal-context-BJv4f_bO.js"),o=require("./get-is-unified-wallet-C2yi08Zy.js"),u=require("./ScreenLayout-SSjax2iq.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("./context-CuNnvCIL.js"),require("tinycolor2"),require("./useActiveWallet-D5qqs3GS.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-COKs2yxH.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-Bv9SU-di.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("./ModalHeader-CabvEpAG.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Chip-C6r7fZiR.js"),require("./LoadingSkeleton-BoyADunQ.js"),require("ofetch"),require("./Screen-BXzBiTIN.js"),require("./index-ByFhjjzH.js");var s=/*#__PURE__*/a(r);const c=({title:r="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:o,isSubmitting:a=!1})=>{let[c,l]=t.useState(null);/*#__PURE__*/return e.jsx(u.ScreenLayout,{title:r,subtitle:n,icon:s.default,primaryCta:{label:a?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await o(c)},disabled:!c?.isValid||a},watermark:!0,children:/*#__PURE__*/e.jsx(i.ConnectPhoneNumberForm,{onChange:e=>{l(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},l={component:()=>{let{currentScreen:r,data:i,navigate:u,setModalData:a}=o.usePrivyModal(),{user:s}=o.usePrivyContext(),{initUpdatePhone:l}=n.usePrivyInternal(),[d,q]=t.useState(!1);/*#__PURE__*/return e.jsx(c,{onSubmit:async e=>{q(!0);try{if(!s?.phone?.number)throw Error("User is required to have an phone number to update it.");await l(s?.phone?.number,e.qualifiedPhoneNumber),u("AwaitingPasswordlessCodeScreen")}catch(e){a({errorModalData:{error:e,previousScreen:i?.errorModalData?.previousScreen||r||"LinkPhoneScreen"}}),u("ErrorScreen")}finally{q(!1)}},isSubmitting:d})}};exports.UpdatePhoneScreen=l,exports.UpdatePhoneScreenView=c,exports.default=l;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("@heroicons/react/24/outline/PhoneIcon"),t=require("react"),i=require("./ConnectPhoneForm-BmVjUjmG.js"),n=require("./internal-context-BJv4f_bO.js"),o=require("./get-is-unified-wallet-BzEUbDK3.js"),u=require("./ScreenLayout-B07q0ZPf.js");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("styled-components"),require("@privy-io/js-sdk-core"),require("./context-BC-5kj78.js"),require("tinycolor2"),require("./useActiveWallet-CR03NUpG.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-1UzcKhL7.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-Cuyz25d9.js"),require("./events-context-Di6--rDg.js"),require("viem"),require("./getPublicClient-BsmZyCGX.js"),require("./ModalHeader-CtKHzKGg.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Chip-C6r7fZiR.js"),require("./LoadingSkeleton-BoyADunQ.js"),require("ofetch"),require("./Screen-BZt4LJMK.js"),require("./index-ByFhjjzH.js");var s=/*#__PURE__*/a(r);const c=({title:r="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:o,isSubmitting:a=!1})=>{let[c,l]=t.useState(null);/*#__PURE__*/return e.jsx(u.ScreenLayout,{title:r,subtitle:n,icon:s.default,primaryCta:{label:a?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await o(c)},disabled:!c?.isValid||a},watermark:!0,children:/*#__PURE__*/e.jsx(i.ConnectPhoneNumberForm,{onChange:e=>{l(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},l={component:()=>{let{currentScreen:r,data:i,navigate:u,setModalData:a}=o.usePrivyModal(),{user:s}=o.usePrivyContext(),{initUpdatePhone:l}=n.usePrivyInternal(),[d,q]=t.useState(!1);/*#__PURE__*/return e.jsx(c,{onSubmit:async e=>{q(!0);try{if(!s?.phone?.number)throw Error("User is required to have an phone number to update it.");await l(s?.phone?.number,e.qualifiedPhoneNumber),u("AwaitingPasswordlessCodeScreen")}catch(e){a({errorModalData:{error:e,previousScreen:i?.errorModalData?.previousScreen||r||"LinkPhoneScreen"}}),u("ErrorScreen")}finally{q(!1)}},isSubmitting:d})}};exports.UpdatePhoneScreen=l,exports.UpdatePhoneScreenView=c,exports.default=l;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("./get-is-unified-wallet-C2yi08Zy.js"),t=require("./ScreenLayout-SSjax2iq.js");require("viem"),require("react"),require("./context-CuNnvCIL.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("./ModalHeader-CabvEpAG.js"),require("styled-components"),require("./useActiveWallet-D5qqs3GS.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-COKs2yxH.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-Bv9SU-di.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-BXzBiTIN.js"),require("./index-ByFhjjzH.js");const i=({style:r,...t})=>/*#__PURE__*/e.jsx("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...r},...t,children:/*#__PURE__*/e.jsx("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),o=({title:r="Unable to sign in",subtitle:o="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:s})=>/*#__PURE__*/e.jsx(t.ScreenLayout,{title:r,subtitle:o,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:s},showBack:!0,onBack:s,watermark:!0}),s={component:()=>{let{navigate:t}=r.usePrivyModal();/*#__PURE__*/return e.jsx(o,{onGoBack:()=>{t("LandingScreen")}})}};exports.UserLimitReachedScreen=s,exports.UserLimitReachedScreenView=o,exports.default=s;
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("./get-is-unified-wallet-BzEUbDK3.js"),t=require("./ScreenLayout-B07q0ZPf.js");require("viem"),require("react"),require("./context-BC-5kj78.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("./ModalHeader-CtKHzKGg.js"),require("styled-components"),require("./useActiveWallet-CR03NUpG.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-1UzcKhL7.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-Cuyz25d9.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-BZt4LJMK.js"),require("./index-ByFhjjzH.js");const i=({style:r,...t})=>/*#__PURE__*/e.jsx("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...r},...t,children:/*#__PURE__*/e.jsx("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),o=({title:r="Unable to sign in",subtitle:o="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:s})=>/*#__PURE__*/e.jsx(t.ScreenLayout,{title:r,subtitle:o,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:s},showBack:!0,onBack:s,watermark:!0}),s={component:()=>{let{navigate:t}=r.usePrivyModal();/*#__PURE__*/return e.jsx(o,{onGoBack:()=>{t("LandingScreen")}})}};exports.UserLimitReachedScreen=s,exports.UserLimitReachedScreenView=o,exports.default=s;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),s=require("react"),t=require("styled-components"),i=require("./ModalHeader-CabvEpAG.js"),o=require("./ErrorMessage-BfTVyue9.js"),d=require("./LabelXs-C8rLnCfU.js"),l=require("./Address-BAzd87pQ.js"),n=require("./shared-DBm7PUrg.js");let a=t.styled(n.Box)`
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),s=require("react"),t=require("styled-components"),i=require("./ModalHeader-CtKHzKGg.js"),o=require("./ErrorMessage-BfTVyue9.js"),d=require("./LabelXs-C8rLnCfU.js"),l=require("./Address-B-WU8e3D.js"),n=require("./shared-DBm7PUrg.js");let a=t.styled(n.Box)`
2
2
  && {
3
3
  padding: 0.75rem;
4
4
  height: 56px;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./get-is-unified-wallet-C2yi08Zy.js"),i=require("./ScreenLayout-SSjax2iq.js");require("viem"),require("./context-CuNnvCIL.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("./ModalHeader-CabvEpAG.js"),require("styled-components"),require("./useActiveWallet-D5qqs3GS.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-COKs2yxH.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-Bv9SU-di.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-BXzBiTIN.js"),require("./index-ByFhjjzH.js");const o=({title:t,subtitle:r,buttonText:o,buttonHref:l,isLoading:n=!1,helpText:a,onButtonClick:u})=>/*#__PURE__*/e.jsx(i.ScreenLayout,{title:t,subtitle:r,primaryCta:{label:o,onClick:()=>{l&&window.open(l,"_self"),u?.()},disabled:n},helpText:a,watermark:!0}),l={component:()=>{let{ready:i}=r.usePrivyContext(),{data:l}=r.usePrivyModal(),[n,a]=t.useState(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:u,connectOnly:s,chainType:c}=l.installWalletModalData,d=u.getMobileRedirect({useUniversalLink:!n,isSolana:"solana"===c,connectOnly:s}),p=u.name.replace(/ wallet/gi,""),q={title:`Redirecting to ${p} Mobile Wallet`,description:`We'll take you to the ${p} Mobile Wallet app to continue your login experience.`,footnote:""};return i&&(q.description=`For the best experience, we'll automatically log you into the ${p} Mobile Wallet in-app browser.`,q.footnote="You can always return here to login via other methods."),n&&(q.title="Still here?",q.description=`You may need to install the ${u.name} mobile app.`,q.footnote=`Once you're done, you can connect with ${u.name} wallet to complete the login.`),/*#__PURE__*/e.jsx(o,{title:q.title,subtitle:q.description,buttonText:n?"Go to App Store":"Continue",buttonHref:d,isLoading:i&&!d,helpText:q.footnote||void 0,onButtonClick:()=>{setTimeout((()=>a(!0)),1e3)}})}};exports.WalletInterstitialScreen=l,exports.WalletInterstitialScreenView=o,exports.default=l;
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),r=require("./get-is-unified-wallet-BzEUbDK3.js"),i=require("./ScreenLayout-B07q0ZPf.js");require("viem"),require("./context-BC-5kj78.js"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("./internal-context-BJv4f_bO.js"),require("ofetch"),require("./ModalHeader-CtKHzKGg.js"),require("styled-components"),require("./useActiveWallet-CR03NUpG.js"),require("zustand"),require("react-device-detect"),require("./use-export-wallet-1UzcKhL7.js"),require("eventemitter3"),require("viem/utils"),require("./useWallets-Cuyz25d9.js"),require("./events-context-Di6--rDg.js"),require("./getPublicClient-BsmZyCGX.js"),require("@heroicons/react/24/outline/ArrowLeftIcon"),require("@heroicons/react/24/outline/ArrowRightIcon"),require("@heroicons/react/24/outline/QuestionMarkCircleIcon"),require("@heroicons/react/24/outline/XMarkIcon"),require("./Screen-BZt4LJMK.js"),require("./index-ByFhjjzH.js");const o=({title:t,subtitle:r,buttonText:o,buttonHref:l,isLoading:n=!1,helpText:a,onButtonClick:u})=>/*#__PURE__*/e.jsx(i.ScreenLayout,{title:t,subtitle:r,primaryCta:{label:o,onClick:()=>{l&&window.open(l,"_self"),u?.()},disabled:n},helpText:a,watermark:!0}),l={component:()=>{let{ready:i}=r.usePrivyContext(),{data:l}=r.usePrivyModal(),[n,a]=t.useState(!1);if(!l?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:u,connectOnly:s,chainType:c}=l.installWalletModalData,d=u.getMobileRedirect({useUniversalLink:!n,isSolana:"solana"===c,connectOnly:s}),p=u.name.replace(/ wallet/gi,""),q={title:`Redirecting to ${p} Mobile Wallet`,description:`We'll take you to the ${p} Mobile Wallet app to continue your login experience.`,footnote:""};return i&&(q.description=`For the best experience, we'll automatically log you into the ${p} Mobile Wallet in-app browser.`,q.footnote="You can always return here to login via other methods."),n&&(q.title="Still here?",q.description=`You may need to install the ${u.name} mobile app.`,q.footnote=`Once you're done, you can connect with ${u.name} wallet to complete the login.`),/*#__PURE__*/e.jsx(o,{title:q.title,subtitle:q.description,buttonText:n?"Go to App Store":"Continue",buttonHref:d,isLoading:i&&!d,helpText:q.footnote||void 0,onButtonClick:()=>{setTimeout((()=>a(!0)),1e3)}})}};exports.WalletInterstitialScreen=l,exports.WalletInterstitialScreenView=o,exports.default=l;
@@ -1,4 +1,4 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),t=require("viem"),i=require("./ethers-C_dhPYcC.js"),s=require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),n=require("./transaction-DjF5X-by.js"),l=require("./useActiveWallet-D5qqs3GS.js");let a=r.styled.span`
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("styled-components"),t=require("viem"),i=require("./ethers-KrqK37LW.js"),s=require("./getFormattedUsdFromLamports-Mu2fqwL2.js"),n=require("./transaction-DjF5X-by.js"),l=require("./useActiveWallet-CR03NUpG.js");let a=r.styled.span`
2
2
  font-size: 14px;
3
3
  line-height: 140%;
4
4
  display: flex;
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("./useActiveWallet-D5qqs3GS.js");exports.WalletOverflowButton=({onClick:i,text:l})=>/*#__PURE__*/e.jsxs(t.LoginMethodButton,{onClick:i,children:[/*#__PURE__*/e.jsx(t.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(r.Wallet,{})}),/*#__PURE__*/e.jsx(t.Grow,{children:l})]});
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("lucide-react"),t=require("./useActiveWallet-CR03NUpG.js");exports.WalletOverflowButton=({onClick:i,text:l})=>/*#__PURE__*/e.jsxs(t.LoginMethodButton,{onClick:i,children:[/*#__PURE__*/e.jsx(t.LoginMethodIconWrapper,{children:/*#__PURE__*/e.jsx(r.Wallet,{})}),/*#__PURE__*/e.jsx(t.Grow,{children:l})]});
@@ -1 +1 @@
1
- "use strict";var e=require("@abstract-foundation/agw-client"),t=require("@abstract-foundation/agw-client/actions"),a=require("viem"),n=require("viem/accounts"),r=require("viem/chains"),s=require("./get-is-unified-wallet-C2yi08Zy.js"),i=require("./context-CuNnvCIL.js"),o=require("./internal-context-BJv4f_bO.js"),c=require("./useWallets-Bv9SU-di.js"),d=require("./getPublicClient-BsmZyCGX.js"),l=require("./getEmbeddedConnectedWallet-pJd-l936.js"),u=require("./smart-wallets-BypZdOsC.js");require("react/jsx-runtime"),require("react"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("./PrivyPluginContext-DsgaS6n9.js"),require("permissionless"),require("permissionless/accounts"),require("permissionless/clients/pimlico"),require("viem/account-abstraction"),exports.useAbstractSmartWallets=function(){let{user:p}=s.usePrivyContext(),{hideWalletUIs:g,openPrivyModal:y,chains:m,appId:h,rpcConfig:T,client:f}=o.usePrivyInternal(),v=i.useAppConfig(),{wallets:I}=c.useWallets(),{setModalData:q}=s.usePrivyModal(),b=s.getPrivyEthereumWallet(p),S=!!b&&s.getIsUnifiedWallet(b),P=async(t=r.abstractTestnet.id)=>{let s=l.getEmbeddedConnectedWallet(I);if(!s)throw Error("No connected wallet found");let i="string"==typeof t?a.hexToNumber(t):t;if(![r.abstractTestnet.id,2741,r.zksync.id].includes(i))throw Error("Error, only Abstract and ZKSync Era chains are supported");let o=m.find((e=>e.id===i));if(!o)throw Error("Chain not configured");await s.switchChain(o.id);let c=await s.getEthereumProvider(),u=a.createWalletClient({account:s.address,transport:a.custom(c)}),p=n.toAccount({address:s.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e.createAbstractClient({chain:o,transport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),publicTransport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),signer:p})};return{signMessage:async({message:e},t)=>{let a=await P(t);return new Promise((async(t,n)=>{let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);g.current=!0,q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>a.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTypedData:async(e,t)=>{let a=await P(t);return new Promise((async(t,n)=>{g.current=!0;let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>a.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let a=await P(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?a.sendTransactionBatch(e):a.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTransaction:async e=>{let a=await P(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return a.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))}}};
1
+ "use strict";var e=require("@abstract-foundation/agw-client"),t=require("@abstract-foundation/agw-client/actions"),a=require("viem"),n=require("viem/accounts"),r=require("viem/chains"),s=require("./get-is-unified-wallet-BzEUbDK3.js"),i=require("./context-BC-5kj78.js"),o=require("./internal-context-BJv4f_bO.js"),c=require("./useWallets-Cuyz25d9.js"),d=require("./getPublicClient-BsmZyCGX.js"),l=require("./getEmbeddedConnectedWallet-pJd-l936.js"),u=require("./smart-wallets-Brk6mOXb.js");require("react/jsx-runtime"),require("react"),require("@privy-io/js-sdk-core"),require("tinycolor2"),require("ofetch"),require("./PrivyPluginContext-DsgaS6n9.js"),require("permissionless"),require("permissionless/accounts"),require("permissionless/clients/pimlico"),require("viem/account-abstraction"),exports.useAbstractSmartWallets=function(){let{user:p}=s.usePrivyContext(),{hideWalletUIs:g,openPrivyModal:y,chains:m,appId:h,rpcConfig:T,client:f}=o.usePrivyInternal(),v=i.useAppConfig(),{wallets:I}=c.useWallets(),{setModalData:q}=s.usePrivyModal(),b=s.getPrivyEthereumWallet(p),S=!!b&&s.getIsUnifiedWallet(b),P=async(t=r.abstractTestnet.id)=>{let s=l.getEmbeddedConnectedWallet(I);if(!s)throw Error("No connected wallet found");let i="string"==typeof t?a.hexToNumber(t):t;if(![r.abstractTestnet.id,2741,r.zksync.id].includes(i))throw Error("Error, only Abstract and ZKSync Era chains are supported");let o=m.find((e=>e.id===i));if(!o)throw Error("Chain not configured");await s.switchChain(o.id);let c=await s.getEthereumProvider(),u=a.createWalletClient({account:s.address,transport:a.custom(c)}),p=n.toAccount({address:s.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e.createAbstractClient({chain:o,transport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),publicTransport:a.http(d.getJsonRpcEndpointFromChain(o,T,h)),signer:p})};return{signMessage:async({message:e},t)=>{let a=await P(t);return new Promise((async(t,n)=>{let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);g.current=!0,q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>a.signMessage({message:e}),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTypedData:async(e,t)=>{let a=await P(t);return new Promise((async(t,n)=>{g.current=!0;let{entropyId:r,entropyIdVerifier:s}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>a.signTypedData(e),onSuccess:e=>t(e),onFailure:n,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},sendTransaction:async e=>{let a=await P(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?a.sendTransactionBatch(e):a.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))},signTransaction:async e=>{let a=await P(e.chainId),n=[],r="calls"in e&&void 0!==e.calls;return n=r?[...e.calls]:[e],new Promise((async(s,i)=>{g.current=!0;let{entropyId:o,entropyIdVerifier:d}=c.getEntropyDetailsForUser(p);q({connectWallet:{recoveryMethod:b.recoveryMethod,connectingWalletAddress:b.address,isUnifiedWallet:S,entropyId:o,entropyIdVerifier:d,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:u.callsToTransactionRequests({calls:n,chain:a.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:d,transactingWalletAddress:a.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e;return await a.prepareAbstractTransactionRequest(n)},scanTransaction:async()=>{if(!f)throw Error("Privy client not found");let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return await f.scanTransaction({metadata:{domain:v.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let n=r?t.getBatchTransactionObject(a.account.address,e):e,s=await a.prepareAbstractTransactionRequest(n);return a.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),y("EmbeddedWalletConnectingScreen")})).finally((()=>{g.current=!1}))}}};
@@ -1 +1 @@
1
- "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("@privy-io/js-sdk-core");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(require("tinycolor2"));const r={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let l=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),i=e=>l.has(e),s=(e,t,n)=>n.indexOf(e)===t;const c=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(i).filter(s):e?e.filter(i).filter(s):r.appearance.walletList;let d=/paymaster\.biconomy\.io\/api/i,u={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const g=(e,t)=>e&&d.test(e)?u:t&&t.policy_id?{policyId:t.policy_id}:void 0;function _(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return o.default({...e.toHsl(),l:n})}function p(e,t){let n=e.getLuminance(),a=t.getLuminance();return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}function f(e,t){if(!e){let e=t?b:m;return{accent:o.default(e.background.interactive),accentLight:o.default(e.background.interactive),accentHover:o.default(e.background["interactive-hover"]),accentDark:o.default(e.background["interactive-clicked"]),accentDarkest:o.default(e.background["interactive-disabled"])}}let n=o.default(e);return{accent:n,accentLight:_(n,.15),accentHover:_(n,.3),accentDark:_(n,-.06),accentDarkest:_(n,-.6)}}function h({backgroundTheme:e,accentHex:t}){let n,a;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=o.default(e).getLuminance(),a=o.default(e).toHslString());let r=n?"dark":"light",l=n?b:m,{accent:i,accentLight:s,accentHover:c,accentDark:d,accentDarkest:u}=f(t,n),g=function(e){let t=o.default(m.text.default),n=o.default(b.text.default),a=p(e,t),r=p(e,n),l=e.toHsl();return l.h>=220&&l.h<=300&&r>=3?b.text.default:a>r?m.text.default:b.text.default}(i),_=o.default(g),h=p(i,o.default(l.background.default))>=3;return{colorScheme:r,background:a||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:i.toHslString(),accentLight:s.toHslString(),accentHover:c.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:_.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:h?"1":"0",linkNavigationColor:h?i.toHslString():l.text.default,linkNavigationDecoration:h?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const b={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},m={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function v(e,t,a,o,l){let i,s,d,u,_,p,f,b,m,v,C,w,E,k,F,y,A,x,S=a?console.warn:()=>{},O=[];if(t?.loginMethods)for(let e of(i=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),_=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),C=t.loginMethods.includes("spotify"),w=t.loginMethods.includes("instagram"),b=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("line"),v=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),E=t.loginMethods.includes("linkedin"),F=t.loginMethods.includes("apple"),y=t.loginMethods.includes("farcaster"),A=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&O.push(e);else i=e.email_auth,s=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,_=e.google_oauth,p=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,C=e.spotify_oauth,w=e.instagram_oauth,b=e.tiktok_oauth,m=e.line_oauth,v=e.twitch_oauth,E=e.linkedin_oauth,F=e.apple_oauth,y=e.farcaster_auth,A=e.telegram_auth,d=e.passkey_auth,x=e.custom_jwt_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let M=[i,s].filter(Boolean),D=[_,p,f,k,C,w,b,m,v,E,F,y,A].filter(Boolean),I=[u].filter(Boolean),T=t?.loginMethods?.includes("passkey")??!1,B=e.passkeys_for_signup_enabled??!1,L=[d&&(B||T)].filter(Boolean),U=[x].filter(Boolean);if(M.length+D.length+I.length+L.length+U.length+O.length===0)throw Error("You must enable at least one login method");let W=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;W&&0===I.length?(S("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),W=!1):W||D.length+M.length!==0||(S("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),W=!0);let N=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&S("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let H=c({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((H.includes("wallet_connect_qr")||H.includes("wallet_connect"))&&H.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let R=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let a of e.overflow??[])t.includes(a)||n.includes(a)?console.warn(`Duplicated login method: ${a}`):n.push(a);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),P=t?.intl?.defaultCountry??"US",{chains:K,defaultChain:Y}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=n.dedupeSupportedChains(e)}else a=[...n.DEFAULT_SUPPORTED_CHAINS];let o=e?a[0]:n.mainnet,r=t??o;if(!a.find((e=>e.id===r.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),q=!!t?.defaultChain,j=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,G=j?"all-users":e.embedded_wallet_config.ethereum.create_on_login,$=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let z=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,V=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,X=e.smart_wallet_config;return{id:e.id,appClientId:l,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??r.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:h({backgroundTheme:t?.appearance?.theme??r.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:W?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:H,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:i,sms:s,passkey:d,google:_,twitter:p,discord:f,github:k,spotify:C,instagram:w,tiktok:b,line:m,twitch:v,linkedin:E,apple:F,farcaster:y,telegram:A},globalDisablePasskeys:t?.globalDisablePasskeys??!1,customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:O,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:R,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??r.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:K,defaultChain:Y,intl:{defaultCountry:P,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:q,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:N},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!j&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:j?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??G},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??$},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??o??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:j?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:z,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??r._render.standalone},fundingConfig:V,fundingMethodConfig:{...t?.fundingMethodConfig??r.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??r.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??r.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:X?.enabled?{enabled:X.enabled,smartWalletVersion:X.smart_wallet_version,smartWalletType:X.smart_wallet_type,configuredNetworks:X.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:g(e.paymaster_url,e.paymaster_context)})))}:{enabled:X?.enabled??!1}}}const C={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},w=v(C,void 0,!1);let E=/*#__PURE__*/t.createContext({appConfig:w,isServerConfigLoaded:!1});exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:n,client:a,legacyClient:o,clientConfig:r,appClientId:l})=>{let[i,s]=t.useState(null),c=t.useMemo((()=>v(i??C,r,!!i,"undefined"!=typeof window?window.location.origin:void 0,l)),[i,r,l]);return t.useEffect((()=>{if(!i)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:n,defaultChain:a,externalWallets:o,...r}=e;return{...r,...n?{supportedChains:n.map((e=>e.id))}:void 0,...a?{defaultChain:a.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(r),t=function(e,t=0){let n=3735928559^t,a=1103547991^t;for(let t,o=0;o<e.length;o++)n=Math.imul(n^(t=e.charCodeAt(o)),2654435761),a=Math.imul(a^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),4294967296*(2097151&(a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${i.id}:${t}`;localStorage.getItem(n)||(o.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[r,i]),t.useEffect((()=>{i||(async()=>{try{await a.initialize();let e=a.app.getConfig();e.custom_api_url&&o.updateApiUrl(e.custom_api_url),s(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e.jsx(E.Provider,{value:{appConfig:c,isServerConfigLoaded:!!i},children:n})},exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.VERSION="3.13.1",exports.WALLET_PROXY_TIMEOUT=3e4,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.useAppConfig=()=>{let{appConfig:e}=t.useContext(E);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=t.useContext(E);return e};
1
+ "use strict";var e=require("react/jsx-runtime"),t=require("react"),n=require("@privy-io/js-sdk-core");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/a(require("tinycolor2"));const r={appearance:{landingHeader:"Log in or sign up",theme:"light",walletList:["detected_ethereum_wallets","detected_solana_wallets","metamask","coinbase_wallet","rainbow","base_account","wallet_connect","phantom"]},walletConnectCloudProjectId:"34357d3c125c2bcf2ce2bc3309d98715",_render:{standalone:!1},fundingMethodConfig:{moonpay:{useSandbox:!1}}};let l=new Set(["coinbase_wallet","base_account","cryptocom","metamask","okx_wallet","phantom","rainbow","uniswap","zerion","universal_profile","bybit_wallet","ronin_wallet","haha_wallet","wallet_connect","wallet_connect_qr","wallet_connect_qr_solana","detected_solana_wallets","detected_ethereum_wallets","rabby_wallet","safe","solflare","backpack","jupiter","binance","binanceus","bitget_wallet","kraken_wallet"]),i=e=>l.has(e),s=(e,t,n)=>n.indexOf(e)===t;const c=({input:e,overrides:t})=>t?t.primary.concat(t.overflow??[]).filter(i).filter(s):e?e.filter(i).filter(s):r.appearance.walletList;let d=/paymaster\.biconomy\.io\/api/i,u={mode:"SPONSORED",calculateGasLimits:!0,expiryDuration:300,sponsorshipInfo:{webhookData:{},smartAccountInfo:{name:"BICONOMY",version:"2.0.0"}}};const g=(e,t)=>e&&d.test(e)?u:t&&t.policy_id?{policyId:t.policy_id}:void 0;function _(e,t){let n=Math.max(0,Math.min(1,e.toHsl().l+t));return o.default({...e.toHsl(),l:n})}function p(e,t){let n=e.getLuminance(),a=t.getLuminance();return(Math.max(n,a)+.05)/(Math.min(n,a)+.05)}function f(e,t){if(!e){let e=t?b:m;return{accent:o.default(e.background.interactive),accentLight:o.default(e.background.interactive),accentHover:o.default(e.background["interactive-hover"]),accentDark:o.default(e.background["interactive-clicked"]),accentDarkest:o.default(e.background["interactive-disabled"])}}let n=o.default(e);return{accent:n,accentLight:_(n,.15),accentHover:_(n,.3),accentDark:_(n,-.06),accentDarkest:_(n,-.6)}}function h({backgroundTheme:e,accentHex:t}){let n,a;"light"===e?n=!1:"dark"===e?n=!0:(n=.5>=o.default(e).getLuminance(),a=o.default(e).toHslString());let r=n?"dark":"light",l=n?b:m,{accent:i,accentLight:s,accentHover:c,accentDark:d,accentDarkest:u}=f(t,n),g=function(e){let t=o.default(m.text.default),n=o.default(b.text.default),a=p(e,t),r=p(e,n),l=e.toHsl();return l.h>=220&&l.h<=300&&r>=3?b.text.default:a>r?m.text.default:b.text.default}(i),_=o.default(g),h=p(i,o.default(l.background.default))>=3;return{colorScheme:r,background:a||l.background.default,background2:l.background.elevated,background3:l.background.interactive,foreground:l.text.default,foreground2:l.text.muted,foreground3:l.text.placeholder,foreground4:l.border.default,accent:i.toHslString(),accentLight:s.toHslString(),accentHover:c.toHslString(),accentDark:d.toHslString(),accentDarkest:u.toHslString(),foregroundAccent:_.toHslString(),success:l.background.success,successDark:l.text.success,successLight:l.background.success,error:l.text.error,errorLight:l.background.error,warn:l.background.warning,warnLight:l.background.warning,warningDark:l.text.warning,errorDark:l.text.error,successBg:l.background.success,errorBg:l.background.error,errorBgHover:l.background["error-hover"],warnBg:l.background.warning,infoBg:l.background.info,infoBgHover:l.background["info-hover"],borderDefault:l.border.default,borderHover:l.border["default-hover"],borderFocus:l.border.focused,borderError:l.border.error,borderSuccess:l.border.success,borderWarning:l.border.warning,borderInfo:l.border.info,borderInteractive:l.border.interactive,borderInteractiveHover:l.border["interactive-hover"],backgroundHover:l.background["default-hover"],backgroundClicked:l.background["default-clicked"],backgroundDisabled:l.background["default-disabled"],backgroundInteractive:l.background.interactive,backgroundInteractiveHover:l.background["interactive-hover"],backgroundInteractiveClicked:l.background["interactive-clicked"],backgroundInteractiveDisabled:l.background["interactive-disabled"],foregroundHover:l.text.default,foregroundClicked:l.text.default,foregroundDisabled:l.text["default-disabled"],foregroundInteractive:l.text.interactive,foregroundInteractiveHover:l.text["interactive-hover"],accentHasGoodContrast:h?"1":"0",linkNavigationColor:h?i.toHslString():l.text.default,linkNavigationDecoration:h?"none":"underline",iconDefault:l.icon.default,iconMuted:l.icon.muted,iconSubtle:l.icon.subtle,iconInverse:l.icon.inverse,iconSuccess:l.icon.success,iconWarning:l.icon.warning,iconError:l.icon.error,iconInteractive:l.icon.interactive,iconDefaultHover:l.icon["default-hover"],iconMutedHover:l.icon["muted-hover"],iconSubtleHover:l.icon["subtle-hover"],iconDefaultClicked:l.icon["default-clicked"],iconMutedClicked:l.icon["muted-clicked"],iconSubtleClicked:l.icon["subtle-clicked"],iconDefaultDisabled:l.icon["default-disabled"],iconMutedDisabled:l.icon["muted-disabled"],iconSubtleDisabled:l.icon["subtle-disabled"],iconErrorHover:l.icon["error-hover"],iconInteractiveHover:l.icon["interactive-hover"],iconErrorClicked:l.icon["error-clicked"],iconInteractiveClicked:l.icon["interactive-clicked"],iconMutedDisabledAlt:l.icon["muted-disabled"],iconSubtleDisabledAlt:l.icon["subtle-disabled"]}}const b={background:{default:"#020713",elevated:"#1A2230","default-hover":"#101724","default-clicked":"#1A2230","default-disabled":"#020713",success:"#0E3E2D",warning:"#373827",error:"#2E0C18",interactive:"#8B86FF","error-hover":"#441821","interactive-hover":"#7B73E5","interactive-clicked":"#6560CC","interactive-disabled":"#141824",info:"#1F2937","info-hover":"#141824"},icon:{default:"#F8F8F8",muted:"#9BA2AE",subtle:"#7B8491",inverse:"#020713",success:"#88E3B5",warning:"#FDF27B",error:"#EF4444",interactive:"#88B6FF","default-hover":"#F8F8F8","muted-hover":"#AEB3BD","subtle-hover":"#8B939E","default-clicked":"#F8F8F8","muted-clicked":"#9097A5","subtle-clicked":"#78818E","default-disabled":"#404452","muted-disabled":"#404452","subtle-disabled":"#404452","error-hover":"#F05555","interactive-hover":"#7B73E5","error-clicked":"#EF4444","interactive-clicked":"#6560CC"},text:{default:"#F8F8F8",muted:"#9BA2AE",placeholder:"#7B8491",success:"#ACEECB",warning:"#FEF9A0",error:"#FCA5A5",interactive:"#A29EFF","default-disabled":"#404452","interactive-hover":"#8C88E5"},border:{default:"#1F2937",interactive:"#88B0FF",focused:"#F8F8FC",info:"#5B83D3",success:"#317056",warning:"#FBBF24",error:"#F87171","default-hover":"#34304A","interactive-hover":"#88B0FF"}},m={background:{default:"#FFFFFF",elevated:"#F1F2F9","default-hover":"#F8F9FC","default-clicked":"#F1F2F9","default-disabled":"#FFFFFF",success:"#DCFCE7",warning:"#FEF3C7",error:"#FEE2E2",interactive:"#5B4FFF","error-hover":"#FECACA","interactive-hover":"#4F46E5","interactive-clicked":"#4338CA","interactive-disabled":"#F1F2F9",info:"#E0E7FF","info-hover":"#EEF2FF"},icon:{default:"#110F2A",muted:"#64668B",subtle:"#9498B8",inverse:"#FFFFFF",success:"#33B287",warning:"#F59E0B",error:"#EF4444",interactive:"#564FFF","default-hover":"#1D1B35","muted-hover":"#64668B","subtle-hover":"#888AAE","default-clicked":"#060C23","muted-clicked":"#64668B","subtle-clicked":"#788804","default-disabled":"#CBCDE1","muted-disabled":"#CBCDE1","subtle-disabled":"#CBCDE1","error-hover":"#F06060","interactive-hover":"#4F46E5","error-clicked":"#DC3838","interactive-clicked":"#2BA482"},text:{default:"#040217",muted:"#64668B",placeholder:"#9498B8",success:"#135638",warning:"#906218",error:"#991B1B",interactive:"#5B4FFF","default-disabled":"#CBCDE1","interactive-hover":"#5B4FFF"},border:{default:"#E2E3F0",interactive:"#5B4FFF",focused:"#949DF9",info:"#F1F2F9",success:"#87D7B7",warning:"#FACD63",error:"#F69393","default-hover":"#E2E3F0","interactive-hover":"#5B4FFF"}};function v(e,t,a,o,l){let i,s,d,u,_,p,f,b,m,v,C,w,E,k,F,y,A,x,S=a?console.warn:()=>{},O=[];if(t?.loginMethods)for(let e of(i=t.loginMethods.includes("email"),s=t.loginMethods.includes("sms"),u=t.loginMethods.includes("wallet"),_=t.loginMethods.includes("google"),p=t.loginMethods.includes("twitter"),f=t.loginMethods.includes("discord"),C=t.loginMethods.includes("spotify"),w=t.loginMethods.includes("instagram"),b=t.loginMethods.includes("tiktok"),m=t.loginMethods.includes("line"),v=t.loginMethods.includes("twitch"),k=t.loginMethods.includes("github"),E=t.loginMethods.includes("linkedin"),F=t.loginMethods.includes("apple"),y=t.loginMethods.includes("farcaster"),A=t.loginMethods.includes("telegram"),d=t.loginMethods.includes("passkey"),t.loginMethods))"string"==typeof e&&e.startsWith("privy:")&&O.push(e);else i=e.email_auth,s=e.sms_auth,u=e.wallet_auth||e.solana_wallet_auth,_=e.google_oauth,p=e.twitter_oauth,f=e.discord_oauth,k=e.github_oauth,C=e.spotify_oauth,w=e.instagram_oauth,b=e.tiktok_oauth,m=e.line_oauth,v=e.twitch_oauth,E=e.linkedin_oauth,F=e.apple_oauth,y=e.farcaster_auth,A=e.telegram_auth,d=e.passkey_auth,x=e.custom_jwt_auth;e.passkey_auth&&(d=!0),"undefined"!=typeof window&&"function"!=typeof window.PublicKeyCredential&&(d=!1);let M=[i,s].filter(Boolean),D=[_,p,f,k,C,w,b,m,v,E,F,y,A].filter(Boolean),I=[u].filter(Boolean),T=t?.loginMethods?.includes("passkey")??!1,B=e.passkeys_for_signup_enabled??!1,L=[d&&(B||T)].filter(Boolean),U=[x].filter(Boolean);if(M.length+D.length+I.length+L.length+U.length+O.length===0)throw Error("You must enable at least one login method");let W=void 0!==t?.appearance?.showWalletLoginFirst?t?.appearance?.showWalletLoginFirst:e.show_wallet_login_first;W&&0===I.length?(S("You should only enable `showWalletLoginFirst` when `wallet` logins are also enabled. `showWalletLoginFirst` has been set to false"),W=!1):W||D.length+M.length!==0||(S("You should only disable `showWalletLoginFirst` when `email`, `sms`, or social logins are also enabled. `showWalletLoginFirst` has been set to true"),W=!0);let N=t?.externalWallets?.walletConnect?.enabled??!0;t?.loginMethods&&t.loginMethodsAndOrder&&S("You should only configure one of `loginMethods` or `loginMethodsAndOrder`");let H=c({input:t?.appearance?.walletList,overrides:t?.loginMethodsAndOrder});if((H.includes("wallet_connect_qr")||H.includes("wallet_connect"))&&H.includes("wallet_connect_qr_solana"))throw Error("wallet_connect_qr and wallet_connect_qr_solana cannot both be present in walletList due to WalletConnect session conflicts.");let R=(({input:e})=>{if(!e||!e.primary[0])return;let t=[e.primary[0]],n=[];for(let n of(e.primary.length>4&&console.warn("You should not specify greater than 4 login methods in `loginMethodsAndOrder.primary`"),e.primary.slice(1)))t.includes(n)?console.warn(`Duplicated login method: ${n}`):t.push(n);for(let a of e.overflow??[])t.includes(a)||n.includes(a)?console.warn(`Duplicated login method: ${a}`):n.push(a);return{primary:t,overflow:n}})({input:t?.loginMethodsAndOrder}),P=t?.intl?.defaultCountry??"US",{chains:K,defaultChain:Y}=function({supportedChains:e,defaultChainFromConfig:t}){let a;if(e){if(0===e.length)throw Error("`supportedChains` must contain at least one chain");a=n.dedupeSupportedChains(e)}else a=[...n.DEFAULT_SUPPORTED_CHAINS];let o=e?a[0]:n.mainnet,r=t??o;if(!a.find((e=>e.id===r.id)))throw Error("`defaultChain` must be included in `supportedChains`");return{chains:a,defaultChain:r}}({supportedChains:t?.supportedChains,defaultChainFromConfig:t?.defaultChain}),q=!!t?.defaultChain,j=t?.customAuth?.getCustomAccessToken&&!1!==t?.customAuth?.enabled,G=j?"all-users":e.embedded_wallet_config.ethereum.create_on_login,$=e.embedded_wallet_config.solana.create_on_login;e.solana_wallet_auth&&!t?.externalWallets?.solana?.connectors&&console.warn("App configuration has Solana wallet login enabled, but no Solana wallet connectors have been passed to Privy. Make sure to pass Solana connectors to the `config.externalWallets.solana.connectors` field of the `PrivyProvider`");let z=e.telegram_auth_config?{botId:e.telegram_auth_config.bot_id,botName:e.telegram_auth_config.bot_name,linkEnabled:e.telegram_auth_config.link_enabled,seamlessAuthEnabled:e.telegram_auth_config.seamless_auth_enabled}:void 0,V=e.funding_config?{methods:e.funding_config.methods,options:e.funding_config.options,defaultRecommendedAmount:e.funding_config.default_recommended_amount,defaultRecommendedCurrency:e.funding_config.default_recommended_currency,promptFundingOnWalletCreation:e.funding_config.prompt_funding_on_wallet_creation,crossChainBridgingEnabled:e.funding_config.cross_chain_bridging_enabled}:void 0,X=e.smart_wallet_config;return{id:e.id,appClientId:l,name:e.name,allowlistConfig:{errorTitle:e.allowlist_config.error_title,errorDetail:e.allowlist_config.error_detail,errorCtaText:e.allowlist_config.cta_text,errorCtaLink:e.allowlist_config.cta_link},legacyWalletUiConfig:e.legacy_wallet_ui_config,appearance:{logo:t?.appearance?.logo??e.logo_url??void 0,landingHeader:t?.appearance?.landingHeader??r.appearance.landingHeader,loginMessage:"string"==typeof t?.appearance?.loginMessage?t?.appearance?.loginMessage.slice(0,100):t?.appearance?.loginMessage,footerLogo:t?.appearance?.footerLogo,palette:h({backgroundTheme:t?.appearance?.theme??r.appearance.theme,accentHex:t?.appearance?.accentColor??e.accent_color}),loginGroupPriority:W?"web3-first":"web2-first",hideDirectWeb2Inputs:!!t?.appearance?.hideDirectWeb2Inputs,walletList:H,walletChainType:t?.appearance?.walletChainType??(({evmWalletAuth:e,solanaWalletAuth:t})=>e&&t?"ethereum-and-solana":e?"ethereum-only":t?"solana-only":"ethereum-only")({evmWalletAuth:e.wallet_auth??!1,solanaWalletAuth:e.solana_wallet_auth??!1})},loginMethods:{wallet:u,email:i,sms:s,passkey:d,google:_,twitter:p,discord:f,github:k,spotify:C,instagram:w,tiktok:b,line:m,twitch:v,linkedin:E,apple:F,farcaster:y,telegram:A},globalDisablePasskeys:t?.globalDisablePasskeys??!1,customOAuthProviders:(e.custom_oauth_providers??[]).filter((e=>!1!==e.enabled)),crossAppProviders:O,disablePlusEmails:e.disable_plus_emails,loginMethodsAndOrder:R,legal:{termsAndConditionsUrl:t?.legal?.termsAndConditionsUrl??e.terms_and_conditions_url,privacyPolicyUrl:t?.legal?.privacyPolicyUrl??e.privacy_policy_url,requireUsersAcceptTerms:e.require_users_accept_terms??!1},walletConnectCloudProjectId:t?.walletConnectCloudProjectId??e.wallet_connect_cloud_project_id??r.walletConnectCloudProjectId,rpcConfig:{rpcUrls:{},rpcTimeouts:t?.externalWallets?.signatureRequestTimeouts??{}},chains:K,defaultChain:Y,intl:{defaultCountry:P,textLocalization:t?.intl?.textLocalization},shouldEnforceDefaultChainOnConnect:q,captcha:{enabledProvider:e.enabled_captcha_provider??null,siteKey:e.captcha_site_key},externalWallets:{coinbaseWallet:{config:{appName:e.name,appLogoUrl:e.logo_url,preference:{options:"all",...t?.externalWallets?.coinbaseWallet?.config?.preference},...t?.externalWallets?.coinbaseWallet?.config}},baseAccount:{config:{appName:e.name,appLogoUrl:e.logo_url,...t?.externalWallets?.baseAccount?.config,preference:{...t?.externalWallets?.baseAccount?.config?.preference,telemetry:!1}}},walletConnect:{enabled:N},solana:{connectors:t?.externalWallets?.solana?.connectors},disableAllExternalWallets:t?.externalWallets?.disableAllExternalWallets??!1},embeddedWallets:{requireUserOwnedRecoveryOnCreate:!j&&(e.embedded_wallet_config.require_user_owned_recovery_on_create??!1),userOwnedRecoveryOptions:j?["user-passcode"]:e.embedded_wallet_config.user_owned_recovery_options,priceDisplay:t?.embeddedWallets?.priceDisplay??{primary:"fiat-currency",secondary:"native-token"},ethereum:{createOnLogin:t?.embeddedWallets?.ethereum?.createOnLogin??G},solana:{createOnLogin:t?.embeddedWallets?.solana?.createOnLogin??$},disableAutomaticMigration:t?.embeddedWallets?.disableAutomaticMigration??!1,mode:e.embedded_wallet_config.mode,showWalletUIs:t?.embeddedWallets?.showWalletUIs??e.enforce_wallet_uis??!0,extendedCalldataDecoding:t?.embeddedWallets?.extendedCalldataDecoding??!1,transactionScanning:{enabled:t?.embeddedWallets?.transactionScanning?.enabled??!1,domain:t?.embeddedWallets?.transactionScanning?.domain??o??"https://auth.privy.io"}},mfa:{methods:e.mfa_methods??[],noPromptOnMfaRequired:t?.mfa?.noPromptOnMfaRequired??!1},passkeys:{shouldUnlinkOnUnenrollMfa:t?.passkeys?.shouldUnlinkOnUnenrollMfa,shouldUnenrollMfaOnUnlink:t?.passkeys?.shouldUnenrollMfaOnUnlink,registration:t?.passkeys?.registration},customAuth:j?{enabled:!0,...t.customAuth}:void 0,loginConfig:{telegramAuthConfiguration:z,passkeysForSignupEnabled:e.passkeys_for_signup_enabled},headless:!!t?.headless,render:{standalone:t?._render?.standalone??r._render.standalone},fundingConfig:V,fundingMethodConfig:{...t?.fundingMethodConfig??r.fundingMethodConfig,moonpay:{...t?.fundingMethodConfig?.moonpay??r.fundingMethodConfig.moonpay,useSandbox:t?.fundingMethodConfig?.moonpay.useSandbox??r.fundingMethodConfig.moonpay.useSandbox}},whatsAppEnabled:!!e.whatsapp_enabled,customOAuthRedirectUrl:t?.customOAuthRedirectUrl,allowOAuthInEmbeddedBrowsers:t?.allowOAuthInEmbeddedBrowsers??!1,solanaRpcs:{"solana:mainnet":t?.solana?.rpcs?.["solana:mainnet"]??null,"solana:devnet":t?.solana?.rpcs?.["solana:devnet"]??null,"solana:testnet":t?.solana?.rpcs?.["solana:testnet"]??null},smartWallets:X?.enabled?{enabled:X.enabled,smartWalletVersion:X.smart_wallet_version,smartWalletType:X.smart_wallet_type,configuredNetworks:X.configured_networks.map((e=>({chainId:e.chain_id,bundlerUrl:e.bundler_url,paymasterUrl:e.paymaster_url,paymasterContext:g(e.paymaster_url,e.paymaster_context)})))}:{enabled:X?.enabled??!1}}}const C={show_wallet_login_first:!0,allowlist_config:{error_title:null,error_detail:null,cta_text:null,cta_link:null},wallet_auth:!0,email_auth:!0,sms_auth:!1,google_oauth:!1,twitter_oauth:!1,discord_oauth:!1,github_oauth:!1,linkedin_oauth:!1,apple_oauth:!1,disable_plus_emails:!1,terms_and_conditions_url:null,privacy_policy_url:null,embedded_wallet_config:{create_on_login:"off",ethereum:{create_on_login:"off"},solana:{create_on_login:"off"},require_user_owned_recovery_on_create:!1,user_owned_recovery_options:["user-passcode"],mode:"user-controlled-server-wallets-only"},captcha_site_key:"",enforce_wallet_uis:!1,legacy_wallet_ui_config:!1,id:"",name:"",passkeys_for_signup_enabled:!1,whatsapp_enabled:!1},w=v(C,void 0,!1);let E=/*#__PURE__*/t.createContext({appConfig:w,isServerConfigLoaded:!1});exports.CHAIN_ID_MAINNET=1,exports.CLIENT_ANALYTICS_ID_KEY="privy:caid",exports.CODE_VERIFIER_KEY="privy:code_verifier",exports.CONNECTIONS_HISTORY_KEY="privy:connections",exports.CUSTOMER_ACCESS_TOKEN_COOKIE_KEY="privy-token",exports.CUSTOMER_ACCESS_TOKEN_STORAGE_KEY="privy:token",exports.DEFAULT_API_TIMEOUT_MS=2e4,exports.DEFAULT_NETWORK="0x1",exports.DEFAULT_PRIVY_API_URL="https://auth.privy.io",exports.DEFAULT_RPC_TIMEOUT=12e4,exports.DEFAULT_SUCCESS_SCREEN_DURATION_MS=1400,exports.DEFAULT_SUCCESS_SCREEN_EXTRA_LONG_DURATION_MS=4e3,exports.DEFAULT_SUCCESS_SCREEN_LONG_DURATION_MS=2500,exports.DEPRECATED_REFRESH_TOKEN="deprecated",exports.HEADLESS_OAUTH_KEY="privy:headless_oauth",exports.IDENTITY_TOKEN_COOKIE_KEY="privy-id-token",exports.IDENTITY_TOKEN_STORAGE_KEY="privy:id_token",exports.MOONPAY_API_URL="https://api.moonpay.com/v1",exports.MOONPAY_API_URL_SANDBOX="https://api.moonpay.com/v1",exports.MOONPAY_PUBLIC_KEY="pk_live_hirbpu0cVcLHrjktC9l7fbc9ctjv0SL",exports.MOONPAY_PUBLIC_KEY_SANDBOX="pk_test_fqWjXZMSFwloh7orvJsRfjiUHXJqFzI",exports.OAUTH_DISABLE_SIGNUP_KEY="privy:oauth_disable_signup",exports.PRIVY_ACCESS_TOKEN_STORAGE_KEY="privy:pat",exports.PrivyAppConfigProvider=({children:n,client:a,legacyClient:o,clientConfig:r,appClientId:l})=>{let[i,s]=t.useState(null),c=t.useMemo((()=>v(i??C,r,!!i,"undefined"!=typeof window?window.location.origin:void 0,l)),[i,r,l]);return t.useEffect((()=>{if(!i)return;let e=function(e){if(!e)return{};let{appearance:t,supportedChains:n,defaultChain:a,externalWallets:o,...r}=e;return{...r,...n?{supportedChains:n.map((e=>e.id))}:void 0,...a?{defaultChain:a.id}:void 0,...o?{walletConnect:o.walletConnect?{enabled:o.walletConnect.enabled}:void 0,coinbaseWallet:o.coinbaseWallet,solana:{connectors:o.solana?.connectors?.get().map((e=>e.walletClientType))}}:void 0}}(r),t=function(e,t=0){let n=3735928559^t,a=1103547991^t;for(let t,o=0;o<e.length;o++)n=Math.imul(n^(t=e.charCodeAt(o)),2654435761),a=Math.imul(a^t,1597334677);return n=Math.imul(n^n>>>16,2246822507)^Math.imul(a^a>>>13,3266489909),4294967296*(2097151&(a=Math.imul(a^a>>>16,2246822507)^Math.imul(n^n>>>13,3266489909)))+(n>>>0)}(JSON.stringify(e)).toString(),n=`privy:sent:${i.id}:${t}`;localStorage.getItem(n)||(o.createAnalyticsEvent({eventName:"sdk_initialize",payload:e}),localStorage.setItem(n,"t"))}),[r,i]),t.useEffect((()=>{i||(async()=>{try{await a.initialize();let e=a.app.getConfig();e.custom_api_url&&o.updateApiUrl(e.custom_api_url),s(e)}catch(e){console.warn("Error generating app config: ",e)}})()}),[]),/*#__PURE__*/e.jsx(E.Provider,{value:{appConfig:c,isServerConfigLoaded:!!i},children:n})},exports.REFRESH_TOKEN_COOKIE_KEY="privy-refresh-token",exports.REFRESH_TOKEN_STORAGE_KEY="privy:refresh_token",exports.SESSION_COOKIE_KEY="privy-session",exports.STATE_CODE_KEY="privy:state_code",exports.VERSION="3.14.0-snapshot-20260210202919",exports.WALLET_PROXY_TIMEOUT=3e4,exports.getGuestCredentialStorageKey=e=>`privy:guest:${e}`,exports.getPrivyWalletKey=e=>`privy:wallet:${e}`,exports.getProviderAccessTokenStorageKey=e=>`privy:cross-app:${e}`,exports.useAppConfig=()=>{let{appConfig:e}=t.useContext(E);return e},exports.useIsServerConfigLoaded=()=>{let{isServerConfigLoaded:e}=t.useContext(E);return e};
@@ -1 +1 @@
1
- "use strict";var e=require("viem"),r=require("./internal-context-BJv4f_bO.js"),t=require("./useActiveWallet-D5qqs3GS.js");let s=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),o=e=>s.format(e);const a=(r,t=6,s=!1)=>{let o=parseFloat(e.formatEther(r)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return s?o:`${"0"===o?"<0.001":o}`};exports.getBlockExplorerUrlForAddress=(e,s)=>{let{chains:o}=r.usePrivyInternal(),a=`https://etherscan.io/address/${s}`,i=`${t.getBlockExplorer(e,o)}/address/${s}`;if(!i)return a;try{new URL(i)}catch{return a}return i},exports.getDollarsFromStringFloat=(e,r)=>{let t=o(r*parseFloat(e));return"$0.00"!==t?t:"<$0.01"},exports.getDollarsFromWei=(r,t)=>{let s=o(t*parseFloat(e.formatEther(r)));return"$0.00"===s?"<$0.01":s},exports.getNativeCurrencyFromWei=(e,r,t=6,s=!1)=>`${a(e,t,s)} ${r}`,exports.parseNativeCurrencyFromWei=a,exports.sumWeiQuantities=e=>e.reduce(((e,r)=>e+r),0n);
1
+ "use strict";var e=require("viem"),r=require("./internal-context-BJv4f_bO.js"),t=require("./useActiveWallet-CR03NUpG.js");let s=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2}),o=e=>s.format(e);const a=(r,t=6,s=!1)=>{let o=parseFloat(e.formatEther(r)).toFixed(t).replace(/0+$/,"").replace(/\.$/,"");return s?o:`${"0"===o?"<0.001":o}`};exports.getBlockExplorerUrlForAddress=(e,s)=>{let{chains:o}=r.usePrivyInternal(),a=`https://etherscan.io/address/${s}`,i=`${t.getBlockExplorer(e,o)}/address/${s}`;if(!i)return a;try{new URL(i)}catch{return a}return i},exports.getDollarsFromStringFloat=(e,r)=>{let t=o(r*parseFloat(e));return"$0.00"!==t?t:"<$0.01"},exports.getDollarsFromWei=(r,t)=>{let s=o(t*parseFloat(e.formatEther(r)));return"$0.00"===s?"<$0.01":s},exports.getNativeCurrencyFromWei=(e,r,t=6,s=!1)=>`${a(e,t,s)} ${r}`,exports.parseNativeCurrencyFromWei=a,exports.sumWeiQuantities=e=>e.reduce(((e,r)=>e+r),0n);
@@ -1 +1 @@
1
- "use strict";var e=require("react"),r=require("@privy-io/js-sdk-core"),t=require("./internal-context-BJv4f_bO.js"),i=require("./get-is-unified-wallet-C2yi08Zy.js"),a=require("./context-CuNnvCIL.js"),n=require("./use-sign-with-user-signer-Cu_6Bx7m.js");require("ofetch"),require("viem"),require("react/jsx-runtime"),require("tinycolor2");exports.useCreateWallet=()=>{let{refreshSessionAndUser:i,privy:a}=t.usePrivyInternal();return e.useMemo((()=>({async createWallet(e){let t=await r.create(a,{request:{chain_type:e.chainType}}),n=await i();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:t}}})),[i,a])},exports.useExportWallet=function(){let{user:r,getAccessToken:n}=i.usePrivyContext(),{walletProxy:s,openModal:l,client:o}=t.usePrivyInternal(),{setModalData:d}=i.usePrivyModal(),u=a.useAppConfig();return e.useMemo((()=>({exportWallet:e=>new Promise((async(a,c)=>{if(!r)return void c(new t.PrivyClientError("User must be authenticated before exporting their Privy wallet"));let p=i.getPrivyWalletWithAddress(r,e.address);p?i.getIsUnifiedWallet(p)?await n()?s?(d({connectWallet:{recoveryMethod:p.recoveryMethod,connectingWalletAddress:p.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:c,shouldForceMFA:!0},keyExport:{appId:u.id,appClientId:u.appClientId,origin:o.apiUrl,address:p.address,hdWalletIndex:p.walletIndex,chainType:p.chainType,walletId:p.id,isUnifiedWallet:!0,imported:p.imported,onSuccess:a,onFailure:c}}),l("EmbeddedWalletConnectingScreen")):c(new t.PrivyClientError("Wallet not ready for export")):c(new t.PrivyClientError("Must have valid access token.")):c(Error("Export via extended-chains is only supported for unified stack wallets")):c(new t.PrivyClientError("User must have an embedded wallet."))}))})),[r,n,s,l,o,d,u])},exports.useSignRawHash=()=>{let{user:a}=i.usePrivyContext(),{privy:s}=t.usePrivyInternal(),{signWithUserSigner:l}=n.useSignWithUserSigner();return e.useMemo((()=>({async signRawHash({address:e,chainType:t,hash:n}){if(!a)throw Error("User must be authenticated before signing");let o=i.getAllPrivyWalletsForChainType(a,t).filter((e=>i.getIsUnifiedWallet(e))).find((r=>r.address===e));if(!o)throw Error("Wallet not found");let d=await r.rawSign(s,l,{wallet_id:o.id,params:{hash:n}});if(d.data&&"signature"in d.data&&"hex"===d.data.encoding)return{signature:d.data.signature};throw Error("Failed to sign")}})),[s,l,a])};
1
+ "use strict";var e=require("react"),r=require("@privy-io/js-sdk-core"),t=require("./internal-context-BJv4f_bO.js"),i=require("./get-is-unified-wallet-BzEUbDK3.js"),a=require("./context-BC-5kj78.js"),n=require("./use-sign-with-user-signer-Cu_6Bx7m.js");require("ofetch"),require("viem"),require("react/jsx-runtime"),require("tinycolor2");exports.useCreateWallet=()=>{let{refreshSessionAndUser:i,privy:a}=t.usePrivyInternal();return e.useMemo((()=>({async createWallet(e){let t=await r.create(a,{request:{chain_type:e.chainType}}),n=await i();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:t}}})),[i,a])},exports.useExportWallet=function(){let{user:r,getAccessToken:n}=i.usePrivyContext(),{walletProxy:s,openModal:l,client:o}=t.usePrivyInternal(),{setModalData:d}=i.usePrivyModal(),u=a.useAppConfig();return e.useMemo((()=>({exportWallet:e=>new Promise((async(a,c)=>{if(!r)return void c(new t.PrivyClientError("User must be authenticated before exporting their Privy wallet"));let p=i.getPrivyWalletWithAddress(r,e.address);p?i.getIsUnifiedWallet(p)?await n()?s?(d({connectWallet:{recoveryMethod:p.recoveryMethod,connectingWalletAddress:p.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:c,shouldForceMFA:!0},keyExport:{appId:u.id,appClientId:u.appClientId,origin:o.apiUrl,address:p.address,hdWalletIndex:p.walletIndex,chainType:p.chainType,walletId:p.id,isUnifiedWallet:!0,imported:p.imported,onSuccess:a,onFailure:c}}),l("EmbeddedWalletConnectingScreen")):c(new t.PrivyClientError("Wallet not ready for export")):c(new t.PrivyClientError("Must have valid access token.")):c(Error("Export via extended-chains is only supported for unified stack wallets")):c(new t.PrivyClientError("User must have an embedded wallet."))}))})),[r,n,s,l,o,d,u])},exports.useSignRawHash=()=>{let{user:a}=i.usePrivyContext(),{privy:s}=t.usePrivyInternal(),{signWithUserSigner:l}=n.useSignWithUserSigner();return e.useMemo((()=>({async signRawHash({address:e,chainType:t,hash:n}){if(!a)throw Error("User must be authenticated before signing");let o=i.getAllPrivyWalletsForChainType(a,t).filter((e=>i.getIsUnifiedWallet(e))).find((r=>r.address===e));if(!o)throw Error("Wallet not found");let d=await r.rawSign(s,l,{wallet_id:o.id,params:{hash:n}});if(d.data&&"signature"in d.data&&"hex"===d.data.encoding)return{signature:d.data.signature};throw Error("Failed to sign")}})),[s,l,a])};