@privy-io/react-auth 3.7.0 → 3.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (361) hide show
  1. package/dist/cjs/AccountNotFoundScreen-jSbfPu_e.js +1 -0
  2. package/dist/cjs/Address-CZQd_MIA.js +1 -0
  3. package/dist/cjs/AffirmativeConsentScreen-7a4hl59A.js +1 -0
  4. package/dist/cjs/AllowlistRejectionScreen-B6roj0JU.js +1 -0
  5. package/dist/cjs/AuthenticateWithWalletScreen-BcBapHrq.js +1 -0
  6. package/dist/cjs/AwaitingEvmToSolBridgingScreen-D1Xd83Hp.js +2 -0
  7. package/dist/cjs/AwaitingExternalEthereumTransferScreen-COL0WYkT.js +2 -0
  8. package/dist/cjs/AwaitingPasswordlessCodeScreen-Cx5fqGf6.js +1 -0
  9. package/dist/cjs/AwaitingSolToEvmBridgingScreen-DYS3lDs0.js +2 -0
  10. package/dist/cjs/BridgeNetworkSelectionView-uivzU_Y9.js +1 -0
  11. package/dist/cjs/Button-nXApC2Jy.js +2 -0
  12. package/dist/cjs/CaptchaScreen-025syTLo.js +1 -0
  13. package/dist/cjs/Checkbox-DXPQZFlQ.js +1 -0
  14. package/dist/cjs/Chip-ChrHHazc.js +1 -0
  15. package/dist/cjs/CoinbaseOnrampStatusScreen-ORl8wt4H.js +1 -0
  16. package/dist/cjs/Column-C2bAbJE0.js +1 -0
  17. package/dist/cjs/ConnectEmailForm-BEv-7qU9.js +1 -0
  18. package/dist/cjs/ConnectLedgerScreen-DBYExlWR.js +1 -0
  19. package/dist/cjs/ConnectOnlyLandingScreen-bOhkl0xJ.js +1 -0
  20. package/dist/cjs/ConnectOnlyStatusScreen-DvTrLHyY.js +1 -0
  21. package/dist/cjs/ConnectOrCreateScreen-Dh4EFU5N.js +1 -0
  22. package/dist/cjs/ConnectPhoneForm-DK-bg2D5.js +1 -0
  23. package/dist/cjs/ConnectWalletView-4vj7Sq7-.js +1 -0
  24. package/dist/cjs/ConnectionStatusScreen-Ct-KTCXS.js +1 -0
  25. package/dist/cjs/CopyToClipboard-fd8Z3kQX.js +1 -0
  26. package/dist/cjs/CrossAppAuthScreen-B-DtA7IH.js +1 -0
  27. package/dist/cjs/CustomLandingScreenView-tt_NEfU6.js +2 -0
  28. package/dist/cjs/DelegatedActionsConsentScreen-B5WlYn7z.js +1 -0
  29. package/dist/cjs/DelegatedActionsRevokeScreen-2g_ydX-Y.js +1 -0
  30. package/dist/cjs/EmailInputForm-tjrhBacA.js +1 -0
  31. package/dist/cjs/EmbeddedWalletConnectingScreen-9seYvsTF.js +1 -0
  32. package/dist/cjs/EmbeddedWalletCreatedScreen-PycFyIz6.js +1 -0
  33. package/dist/cjs/EmbeddedWalletKeyExportScreen-BDTDQY1f.js +2 -0
  34. package/dist/cjs/EmbeddedWalletOnAccountCreateScreen-B0tXEtG9.js +1 -0
  35. package/dist/cjs/EmbeddedWalletPasswordUpdateScreen-ZfgU86hx.js +1 -0
  36. package/dist/cjs/EmbeddedWalletPasswordUpdateSplashScreen-tP8rSVUL.js +1 -0
  37. package/dist/cjs/EnrollTotp-DZ5fIrXr.js +1 -0
  38. package/dist/cjs/ErrorBanner-CMjaobRI.js +1 -0
  39. package/dist/cjs/ErrorMessage-f0cRWc29.js +1 -0
  40. package/dist/cjs/ErrorScreen-Cob9AO30.js +1 -0
  41. package/dist/cjs/FarcasterConnectStatusScreen-C5FoWA6N.js +2 -0
  42. package/dist/cjs/FarcasterSignerStatusScreen-CDYkqsxz.js +2 -0
  43. package/dist/cjs/FundSolWalletWithExternalSolanaWallet-DC_xoE6W.js +2 -0
  44. package/dist/cjs/FundWalletMethodHeader-zYWhBIiS.js +1 -0
  45. package/dist/cjs/FundingEditAmountScreen-BB7-k00c.js +1 -0
  46. package/dist/cjs/FundingMethodSelectionScreen-BrV94GD2.js +1 -0
  47. package/dist/cjs/InAppBrowserLoginNotPossible-y8g07-kU.js +1 -0
  48. package/dist/cjs/InfoBanner-CTx1eRnV.js +1 -0
  49. package/dist/cjs/InjectedWalletIcon-UY3nMvZo.js +1 -0
  50. package/dist/cjs/InstallWalletScreen-CmGi6mS1.js +1 -0
  51. package/dist/cjs/JsonTree-xaeo0q6z.js +1 -0
  52. package/dist/cjs/LabelXs-CYMv6rOZ.js +1 -0
  53. package/dist/cjs/LandingScreen-B9jb8n_d.js +1 -0
  54. package/dist/cjs/Layouts-dRL0OSpp.js +1 -0
  55. package/dist/cjs/Link-DmzPZ_M7.js +1 -0
  56. package/dist/cjs/LinkConflictScreen-BJXyOu2J.js +1 -0
  57. package/dist/cjs/LinkEmailScreen-zyJFrvy-.js +1 -0
  58. package/dist/cjs/LinkPasskeyScreen-Bw7Xs741.js +1 -0
  59. package/dist/cjs/LinkPhoneScreen-C4JQblY3.js +1 -0
  60. package/dist/cjs/LoadingSkeleton-DoCrfGnl.js +1 -0
  61. package/dist/cjs/LoginFailedScreen-CGT-2B2h.js +1 -0
  62. package/dist/cjs/ManualTransferScreen-DPz98CSt.js +1 -0
  63. package/dist/cjs/MfaAuthEnrollmentFlowScreen-BBKMKDGR.js +1 -0
  64. package/dist/cjs/MfaAuthVerifyFlowScreen-3LKUo_xV.js +1 -0
  65. package/dist/cjs/MfaEnrollmentFlowScreen-B2YgNRCC.js +1 -0
  66. package/dist/cjs/MfaVerifyFlowScreen-BhVqkM2f.js +1 -0
  67. package/dist/cjs/ModalHeader-DbV81e3m.js +3 -0
  68. package/dist/cjs/MoonpayStatusScreen-yghPhz7v.js +1 -0
  69. package/dist/cjs/NetworkIcon-BZ9Mj6vV.js +1 -0
  70. package/dist/cjs/OAuthStatusScreen-q9MFItPT.js +1 -0
  71. package/dist/cjs/OpenLink-BpCUf9iR.js +1 -0
  72. package/dist/cjs/PasskeySelectSignupOrLogin-BKBH0QxK.js +1 -0
  73. package/dist/cjs/PasskeyStatusScreen-DVx4lzwq.js +1 -0
  74. package/dist/cjs/PasswordRecoveryScreen-BmGdXVfh.js +1 -0
  75. package/dist/cjs/PinInput-DSI6rjOn.js +1 -0
  76. package/dist/cjs/QrCode-Ua_0cVUP.js +2 -0
  77. package/dist/cjs/RecoveryOAuthStatusScreen-DUobwBXF.js +1 -0
  78. package/dist/cjs/RecoveryPasswordCreateScreen-vQG4ErlF.js +1 -0
  79. package/dist/cjs/RecoverySelectionScreen-E2l_NO8y.js +1 -0
  80. package/dist/cjs/Row-CxDF-VMy.js +1 -0
  81. package/dist/cjs/Screen-65eQbiHD.js +9 -0
  82. package/dist/cjs/ScreenHeader-CyURV6Ti.js +2 -0
  83. package/dist/cjs/ScreenLayout-B_60rKhZ.js +1 -0
  84. package/dist/cjs/SetAutomaticRecoveryScreen-DQolobOz.js +1 -0
  85. package/dist/cjs/SetWalletPasswordForm-8g-lawop.js +2 -0
  86. package/dist/cjs/SignRequestScreen-BAgmmVVW.js +1 -0
  87. package/dist/cjs/StackedContainer-ByB6Mdu0.js +1 -0
  88. package/dist/cjs/StandardSignAndSendTransactionScreen-BUB57iWU.js +1 -0
  89. package/dist/cjs/Subtitle-Dtmrw8l5.js +1 -0
  90. package/dist/cjs/TelegramAuthScreen-D5uhx6WN.js +1 -0
  91. package/dist/cjs/Title-C-tHJvrb.js +1 -0
  92. package/dist/cjs/TodoList-Cm_a93ef.js +2 -0
  93. package/dist/cjs/TransactionDetails-BefABtVQ.js +3 -0
  94. package/dist/cjs/TransactionErrorView-QKWh4urc.js +2 -0
  95. package/dist/cjs/TransferFromWalletScreen-C_0IpL-A.js +1 -0
  96. package/dist/cjs/TransferOrBridgeLoadingScreen-C6t1_cTP.js +1 -0
  97. package/dist/cjs/UpdateEmailScreen-BUAgWudx.js +1 -0
  98. package/dist/cjs/UpdatePhoneScreen-DefnuTEZ.js +1 -0
  99. package/dist/cjs/UserLimitReachedScreen-B76r_-LC.js +1 -0
  100. package/dist/cjs/Value-C-XtZyFa.js +1 -0
  101. package/dist/cjs/WalletButtonList-bICzXZXM.js +1 -0
  102. package/dist/cjs/WalletCards-BfpeHH5n.js +1 -0
  103. package/dist/cjs/WalletInfoCard-CscdnrUV.js +1 -0
  104. package/dist/cjs/WalletInterstitialScreen-CG1k3EvV.js +1 -0
  105. package/dist/cjs/WalletLink-DF6dDjkz.js +3 -0
  106. package/dist/cjs/WarningBanner-B_Gs_15p.js +1 -0
  107. package/dist/cjs/abstract-smart-wallets.js +1 -1
  108. package/dist/cjs/analytics-C6C_4JmG.js +1 -0
  109. package/dist/cjs/capitalizeFirstLetter-D-K8mqBm.js +1 -0
  110. package/dist/cjs/context-JUEgi5-6.js +1 -0
  111. package/dist/cjs/copy-BiZ7dtqy.js +1 -0
  112. package/dist/cjs/ethers-uj8IknV_.js +1 -0
  113. package/dist/cjs/events-context-Di6--rDg.js +1 -0
  114. package/dist/cjs/extended-chains.js +1 -1
  115. package/dist/cjs/farcaster-CWHXGAib.js +1 -0
  116. package/dist/cjs/farcaster.js +1 -1
  117. package/dist/cjs/formatErc20TokenAmount-DxwoWe7e.js +1 -0
  118. package/dist/cjs/frame-bPqBJ8fS.js +1 -0
  119. package/dist/cjs/get-is-unified-wallet-DmiciSes.js +1 -0
  120. package/dist/cjs/getChainName-C4rO8-3n.js +1 -0
  121. package/dist/cjs/getErc20Balance-BZ5-OGfD.js +1 -0
  122. package/dist/cjs/getErc20TokenInfo-HX7DgcWx.js +1 -0
  123. package/dist/cjs/getFormattedUsdFromLamports-Mu2fqwL2.js +1 -0
  124. package/dist/cjs/getPublicClient-EjAv8R2z.js +1 -0
  125. package/dist/cjs/getUsdcMintAddress-REYZSOb9.js +1 -0
  126. package/dist/cjs/index-BNNk54gK.js +1 -0
  127. package/dist/cjs/index-CRFXS9pP.js +1 -0
  128. package/dist/cjs/index-Cuv6j_Y0.js +1 -0
  129. package/dist/cjs/index-DvDeCr_m.js +5 -0
  130. package/dist/cjs/index.js +1 -6
  131. package/dist/cjs/internal-context-VDPFkIXN.js +1 -0
  132. package/dist/cjs/internal.js +1 -1
  133. package/dist/cjs/paths-DizMb-lU.js +1 -0
  134. package/dist/cjs/prepareFundingModalData-BVlyr8l5.js +1 -0
  135. package/dist/cjs/reservoir-3I-Vkf2B.js +1 -0
  136. package/dist/cjs/shared-BPGwTh8c.js +1 -0
  137. package/dist/cjs/shared-CT5ocsPG.js +1 -0
  138. package/dist/cjs/shouldProceedtoEmbeddedWalletCreationFlow-DcjqezwI.js +1 -0
  139. package/dist/cjs/smart-wallets-B7vHjGAW.js +1 -0
  140. package/dist/cjs/smart-wallets.js +1 -1
  141. package/dist/cjs/solana.js +1 -1
  142. package/dist/cjs/styles-Ca_DS00a.js +1 -0
  143. package/dist/cjs/styles-D4VeJNv1.js +1 -0
  144. package/dist/cjs/telegram-D3O0_F1a.js +1 -0
  145. package/dist/cjs/to-ui-error-a-xwbRKZ.js +1 -0
  146. package/dist/cjs/transaction-DjF5X-by.js +1 -0
  147. package/dist/cjs/transfer-Cit146vy.js +1 -0
  148. package/dist/cjs/twitch-BNvhZb2Y.js +1 -0
  149. package/dist/cjs/twitter-BVVRWkcG.js +1 -0
  150. package/dist/cjs/ui.js +2 -2
  151. package/dist/cjs/use-create-wallet-without-fallback-DSOJS4h0.js +1 -0
  152. package/dist/cjs/use-export-wallet-BRFTskbr.js +1 -0
  153. package/dist/cjs/{use-sign-with-user-signer-BtJVKMQr.js → use-sign-with-user-signer-On9f1Fag.js} +1 -1
  154. package/dist/cjs/useActiveWallet-DcxqWAsq.js +1 -0
  155. package/dist/cjs/useGetSolPrice-eOpcFeNE.js +1 -0
  156. package/dist/cjs/useGetTokenPrice-EcT0H5rf.js +1 -0
  157. package/dist/cjs/useI18n-hYSvbQCq.js +1 -0
  158. package/dist/cjs/usePrivy-CXPeoT5g.js +1 -0
  159. package/dist/cjs/useSolanaRpcClient-mfV88iJm.js +1 -0
  160. package/dist/cjs/useWalletBalance-CQAgfkRc.js +1 -0
  161. package/dist/cjs/useWallets-TxPVNWGS.js +1 -0
  162. package/dist/cjs/useWallets-h2xCj02C.js +1 -0
  163. package/dist/dts/{events-context-CCElA92Y.d.mts → events-context-CkFXl3uc.d.mts} +1 -1
  164. package/dist/dts/{events-context-CCElA92Y.d.ts → events-context-CkFXl3uc.d.ts} +1 -1
  165. package/dist/dts/extended-chains.d.mts +1 -1
  166. package/dist/dts/extended-chains.d.ts +1 -1
  167. package/dist/dts/farcaster.d.mts +1 -1
  168. package/dist/dts/farcaster.d.ts +1 -1
  169. package/dist/dts/index.d.mts +11 -9
  170. package/dist/dts/index.d.ts +11 -9
  171. package/dist/dts/internal.d.mts +1 -1
  172. package/dist/dts/internal.d.ts +1 -1
  173. package/dist/dts/smart-wallets.d.mts +1 -1
  174. package/dist/dts/smart-wallets.d.ts +1 -1
  175. package/dist/dts/solana.d.mts +3 -3
  176. package/dist/dts/solana.d.ts +3 -3
  177. package/dist/dts/ui.d.mts +1 -1
  178. package/dist/dts/ui.d.ts +1 -1
  179. package/dist/esm/AccountNotFoundScreen-CmhSsknC.mjs +1 -0
  180. package/dist/esm/Address-DtXA0OPS.mjs +1 -0
  181. package/dist/esm/AffirmativeConsentScreen-C6AcYU94.mjs +1 -0
  182. package/dist/esm/AllowlistRejectionScreen-BuH5iBJ3.mjs +1 -0
  183. package/dist/esm/AuthenticateWithWalletScreen-CKJqrLEm.mjs +1 -0
  184. package/dist/esm/AwaitingEvmToSolBridgingScreen-DuO5iRV2.mjs +2 -0
  185. package/dist/esm/AwaitingExternalEthereumTransferScreen-C50_Dj-N.mjs +2 -0
  186. package/dist/esm/AwaitingPasswordlessCodeScreen-Bb0UxW46.mjs +1 -0
  187. package/dist/esm/AwaitingSolToEvmBridgingScreen-YsM6M4T9.mjs +2 -0
  188. package/dist/esm/BridgeNetworkSelectionView-Bu0vi9_a.mjs +1 -0
  189. package/dist/esm/Button-DJ-mtuuD.mjs +2 -0
  190. package/dist/esm/CaptchaScreen-CWQAXaCK.mjs +1 -0
  191. package/dist/esm/Checkbox-NmGCZeKL.mjs +1 -0
  192. package/dist/esm/Chip-Bsgj4Yc-.mjs +1 -0
  193. package/dist/esm/CoinbaseOnrampStatusScreen-NdySyA5D.mjs +1 -0
  194. package/dist/esm/Column-DQ5Vw9t1.mjs +1 -0
  195. package/dist/esm/ConnectEmailForm-DUgOCS2V.mjs +1 -0
  196. package/dist/esm/ConnectLedgerScreen-3wp1wuP2.mjs +1 -0
  197. package/dist/esm/ConnectOnlyLandingScreen-BVkcUaO6.mjs +1 -0
  198. package/dist/esm/ConnectOnlyStatusScreen-CyT_IEgy.mjs +1 -0
  199. package/dist/esm/ConnectOrCreateScreen-BlIxCxVJ.mjs +1 -0
  200. package/dist/esm/ConnectPhoneForm-CbuSfwAI.mjs +1 -0
  201. package/dist/esm/ConnectWalletView-DVDOSzi0.mjs +1 -0
  202. package/dist/esm/ConnectionStatusScreen-DNdZyKcL.mjs +1 -0
  203. package/dist/esm/CopyToClipboard-DatKc59_.mjs +1 -0
  204. package/dist/esm/CrossAppAuthScreen-DEF_slEx.mjs +1 -0
  205. package/dist/esm/CustomLandingScreenView-DWt9lv8W.mjs +2 -0
  206. package/dist/esm/DelegatedActionsConsentScreen-DqeBCJkz.mjs +1 -0
  207. package/dist/esm/DelegatedActionsRevokeScreen-B-xLCB1j.mjs +1 -0
  208. package/dist/esm/EmailInputForm-B4hjCxRU.mjs +1 -0
  209. package/dist/esm/EmbeddedWalletConnectingScreen-BCg7qeI6.mjs +1 -0
  210. package/dist/esm/EmbeddedWalletCreatedScreen-jGepSDyo.mjs +1 -0
  211. package/dist/esm/EmbeddedWalletKeyExportScreen-DX22sVNh.mjs +2 -0
  212. package/dist/esm/EmbeddedWalletOnAccountCreateScreen-hkifQ988.mjs +1 -0
  213. package/dist/esm/EmbeddedWalletPasswordUpdateScreen-CezgHp88.mjs +1 -0
  214. package/dist/esm/EmbeddedWalletPasswordUpdateSplashScreen-BFamfPb_.mjs +1 -0
  215. package/dist/esm/EnrollTotp-BzAm1Ya4.mjs +1 -0
  216. package/dist/esm/ErrorBanner-BdiArMwu.mjs +1 -0
  217. package/dist/esm/ErrorMessage-Cx8GKGhL.mjs +1 -0
  218. package/dist/esm/ErrorScreen-DFAo4S7A.mjs +1 -0
  219. package/dist/esm/FarcasterConnectStatusScreen-Ys1uAk-s.mjs +1 -0
  220. package/dist/esm/FarcasterSignerStatusScreen-DIfmv7Ft.mjs +1 -0
  221. package/dist/esm/FundSolWalletWithExternalSolanaWallet-CkEgl8wO.mjs +1 -0
  222. package/dist/esm/FundWalletMethodHeader-CbTaIDLQ.mjs +1 -0
  223. package/dist/esm/FundingEditAmountScreen-Cz4tmsMX.mjs +1 -0
  224. package/dist/esm/FundingMethodSelectionScreen-fBauGI0K.mjs +1 -0
  225. package/dist/esm/InAppBrowserLoginNotPossible-DBhsoAkw.mjs +1 -0
  226. package/dist/esm/InfoBanner-D6C6Bt8L.mjs +1 -0
  227. package/dist/esm/InjectedWalletIcon-DLcYOGDj.mjs +1 -0
  228. package/dist/esm/InstallWalletScreen-CEcl2LHj.mjs +1 -0
  229. package/dist/esm/JsonTree-Bvd2C29R.mjs +1 -0
  230. package/dist/esm/LabelXs-BOisBtqT.mjs +1 -0
  231. package/dist/esm/LandingScreen-BvRIrtFN.mjs +1 -0
  232. package/dist/esm/Layouts-Bmf8DxNP.mjs +1 -0
  233. package/dist/esm/Link-DwjLfHwW.mjs +1 -0
  234. package/dist/esm/LinkConflictScreen-Bg9QTrJX.mjs +1 -0
  235. package/dist/esm/LinkEmailScreen-SlCMvM43.mjs +1 -0
  236. package/dist/esm/LinkPasskeyScreen-CNFL2N09.mjs +1 -0
  237. package/dist/esm/LinkPhoneScreen-DnPAvact.mjs +1 -0
  238. package/dist/esm/LoadingSkeleton-CHdaq3pb.mjs +1 -0
  239. package/dist/esm/LoginFailedScreen-CkxfR75o.mjs +1 -0
  240. package/dist/esm/ManualTransferScreen-px_MUbVh.mjs +1 -0
  241. package/dist/esm/MfaAuthEnrollmentFlowScreen-RbHifi_a.mjs +1 -0
  242. package/dist/esm/MfaAuthVerifyFlowScreen-B3SIiFnH.mjs +1 -0
  243. package/dist/esm/MfaEnrollmentFlowScreen-LgmZFVEZ.mjs +1 -0
  244. package/dist/esm/MfaVerifyFlowScreen-DZkVptvz.mjs +1 -0
  245. package/dist/esm/ModalHeader-D7WajfD8.mjs +3 -0
  246. package/dist/esm/MoonpayStatusScreen-CBc4DLDR.mjs +1 -0
  247. package/dist/esm/NetworkIcon-B48ilzF8.mjs +1 -0
  248. package/dist/esm/OAuthStatusScreen-DvD84FHd.mjs +1 -0
  249. package/dist/esm/OpenLink-BpeNYBKs.mjs +1 -0
  250. package/dist/esm/PasskeySelectSignupOrLogin-DZP4Hj5r.mjs +1 -0
  251. package/dist/esm/PasskeyStatusScreen-bP3yfXNt.mjs +1 -0
  252. package/dist/esm/PasswordRecoveryScreen-Bt_Cf8-l.mjs +1 -0
  253. package/dist/esm/PinInput-C3_MNxMt.mjs +1 -0
  254. package/dist/esm/QrCode-zzqjquVm.mjs +2 -0
  255. package/dist/esm/RecoveryOAuthStatusScreen-y6_gmb9s.mjs +1 -0
  256. package/dist/esm/RecoveryPasswordCreateScreen-CloUjFKm.mjs +1 -0
  257. package/dist/esm/RecoverySelectionScreen-FxCwz-PR.mjs +1 -0
  258. package/dist/esm/Row-CG0lSY5Z.mjs +1 -0
  259. package/dist/esm/Screen-dwi2CitY.mjs +8 -0
  260. package/dist/esm/ScreenHeader-Biz1wq02.mjs +2 -0
  261. package/dist/esm/ScreenLayout-Dmrhdwtt.mjs +1 -0
  262. package/dist/esm/SetAutomaticRecoveryScreen-Db5Xg_sQ.mjs +1 -0
  263. package/dist/esm/SetWalletPasswordForm-ZtRqoZYj.mjs +2 -0
  264. package/dist/esm/SignRequestScreen-DdAK4SlJ.mjs +1 -0
  265. package/dist/esm/StackedContainer-BrIQsdas.mjs +1 -0
  266. package/dist/esm/StandardSignAndSendTransactionScreen-C0IrbkCx.mjs +1 -0
  267. package/dist/esm/Subtitle-DkvfP2Ev.mjs +1 -0
  268. package/dist/esm/TelegramAuthScreen-vp2lrJFZ.mjs +1 -0
  269. package/dist/esm/Title-D0pfZff-.mjs +1 -0
  270. package/dist/esm/TodoList-Dn0Qu-vv.mjs +2 -0
  271. package/dist/esm/TransactionDetails-fgHkAnf9.mjs +3 -0
  272. package/dist/esm/TransactionErrorView-Dgp1KSy5.mjs +2 -0
  273. package/dist/esm/TransferFromWalletScreen-CTAGaF9C.mjs +1 -0
  274. package/dist/esm/TransferOrBridgeLoadingScreen-D3vBwM_o.mjs +1 -0
  275. package/dist/esm/UpdateEmailScreen-BBtChP9Q.mjs +1 -0
  276. package/dist/esm/UpdatePhoneScreen-Byn7UW7u.mjs +1 -0
  277. package/dist/esm/UserLimitReachedScreen-DXDqdBpt.mjs +1 -0
  278. package/dist/esm/Value-B4M62ove.mjs +1 -0
  279. package/dist/esm/WalletButtonList-CGloXTN0.mjs +1 -0
  280. package/dist/esm/WalletCards-DH1rqayz.mjs +1 -0
  281. package/dist/esm/WalletInfoCard-DAv0WFcc.mjs +1 -0
  282. package/dist/esm/WalletInterstitialScreen-CKiSWjpa.mjs +1 -0
  283. package/dist/esm/WalletLink-CjuEskpb.mjs +3 -0
  284. package/dist/esm/WarningBanner-BDp-QC9i.mjs +1 -0
  285. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  286. package/dist/esm/analytics-mkkvFRju.mjs +1 -0
  287. package/dist/esm/capitalizeFirstLetter-DmLYqXsO.mjs +1 -0
  288. package/dist/esm/{events-context-ClaboIDc.mjs → context-Cb5MFcME.mjs} +1 -1
  289. package/dist/esm/copy-Bx2Jwc5_.mjs +1 -0
  290. package/dist/esm/ethers-CpMSCMOg.mjs +1 -0
  291. package/dist/esm/events-context-CI0iqAXA.mjs +1 -0
  292. package/dist/esm/extended-chains.mjs +1 -1
  293. package/dist/esm/farcaster-DPlSjvF5.mjs +1 -0
  294. package/dist/esm/farcaster.mjs +1 -1
  295. package/dist/esm/formatErc20TokenAmount-BuPk9xcy.mjs +1 -0
  296. package/dist/esm/frame-BMa3kyjk.mjs +1 -0
  297. package/dist/esm/get-is-unified-wallet-DymQMSJy.mjs +1 -0
  298. package/dist/esm/getChainName-DjpPdUSc.mjs +1 -0
  299. package/dist/esm/getErc20Balance-Dtau1386.mjs +1 -0
  300. package/dist/esm/getErc20TokenInfo-CKA_MDcy.mjs +1 -0
  301. package/dist/esm/getFormattedUsdFromLamports-B6EqSEho.mjs +1 -0
  302. package/dist/esm/getPublicClient-IxRndou_.mjs +1 -0
  303. package/dist/esm/getUsdcMintAddress-DFI1hv05.mjs +1 -0
  304. package/dist/esm/index-B_e8abKi.mjs +1 -0
  305. package/dist/esm/index-CI666IP9.mjs +5 -0
  306. package/dist/esm/index-CJMgUOnw.mjs +1 -0
  307. package/dist/esm/index-DdlRJsoj.mjs +1 -0
  308. package/dist/esm/index.mjs +1 -5
  309. package/dist/esm/internal-context-Cvo1WmWN.mjs +1 -0
  310. package/dist/esm/internal.mjs +1 -1
  311. package/dist/esm/paths-3HW55qZg.mjs +1 -0
  312. package/dist/esm/prepareFundingModalData-BUyu5Vhr.mjs +1 -0
  313. package/dist/esm/reservoir-B0V48m2I.mjs +1 -0
  314. package/dist/esm/shared-CtYf3O54.mjs +1 -0
  315. package/dist/esm/shared-DsP7M4P5.mjs +1 -0
  316. package/dist/esm/shouldProceedtoEmbeddedWalletCreationFlow-CxerhsH3.mjs +1 -0
  317. package/dist/esm/smart-wallets-Cbhn7qlU.mjs +1 -0
  318. package/dist/esm/smart-wallets.mjs +1 -1
  319. package/dist/esm/solana.mjs +1 -1
  320. package/dist/esm/styles-BxA7nKxI.mjs +1 -0
  321. package/dist/esm/styles-DY17fuAX.mjs +1 -0
  322. package/dist/esm/telegram-B-JqnkqZ.mjs +1 -0
  323. package/dist/esm/to-ui-error-B3m2hl6e.mjs +1 -0
  324. package/dist/esm/transaction-CnfuREWo.mjs +1 -0
  325. package/dist/esm/transfer-CMPmjPsM.mjs +1 -0
  326. package/dist/esm/twitch-5IOe4sIQ.mjs +1 -0
  327. package/dist/esm/twitter-6jomarO4.mjs +1 -0
  328. package/dist/esm/ui.mjs +2 -2
  329. package/dist/esm/use-create-wallet-without-fallback-DodUf3VP.mjs +1 -0
  330. package/dist/esm/use-export-wallet-CWslDKqf.mjs +1 -0
  331. package/dist/esm/use-sign-with-user-signer-LJ6ROduD.mjs +1 -0
  332. package/dist/esm/useActiveWallet-hrZcON-K.mjs +1 -0
  333. package/dist/esm/useGetSolPrice-Bi0pPiUW.mjs +1 -0
  334. package/dist/esm/useGetTokenPrice-B4XVfxeD.mjs +1 -0
  335. package/dist/esm/useI18n-ByKvnaXP.mjs +1 -0
  336. package/dist/esm/usePrivy-D3OPY7tm.mjs +1 -0
  337. package/dist/esm/useSolanaRpcClient-DjD2ma5c.mjs +1 -0
  338. package/dist/esm/useWalletBalance-Xca4-c_r.mjs +1 -0
  339. package/dist/esm/useWallets-BplPx0Pz.mjs +1 -0
  340. package/dist/esm/useWallets-CQMJYOF9.mjs +1 -0
  341. package/package.json +15 -9
  342. package/dist/cjs/EmbeddedWalletConnectingScreen-JRafXI8d.js +0 -27
  343. package/dist/cjs/SignRequestScreen-Dy02euV9.js +0 -1
  344. package/dist/cjs/events-context-7-Gs8c_9.js +0 -1
  345. package/dist/cjs/frame-B2orQ_lK.js +0 -1
  346. package/dist/cjs/internal-context-CeWKmK5u.js +0 -1
  347. package/dist/cjs/smart-wallets-DaqaXBrW.js +0 -1
  348. package/dist/cjs/use-export-wallet-Cz8MVlvJ.js +0 -2
  349. package/dist/cjs/useActiveWallet-C5D3a-je.js +0 -1
  350. package/dist/cjs/usePrivy-BdYU4BZI.js +0 -1
  351. package/dist/esm/EmbeddedWalletConnectingScreen-D50stmJi.mjs +0 -25
  352. package/dist/esm/SignRequestScreen-D9o7VhNz.mjs +0 -1
  353. package/dist/esm/frame-Dj70FEYB.mjs +0 -1
  354. package/dist/esm/internal-context-eGSwROSk.mjs +0 -1
  355. package/dist/esm/smart-wallets-BXT3GZwg.mjs +0 -1
  356. package/dist/esm/use-export-wallet-DTiEdSYz.mjs +0 -1
  357. package/dist/esm/use-sign-with-user-signer-DaTvrd5T.mjs +0 -1
  358. package/dist/esm/useActiveWallet-B8DSbnuu.mjs +0 -1
  359. package/dist/esm/usePrivy-BCcRF869.mjs +0 -1
  360. package/dist/dts/{types-B6UNnZ2P.d.mts → types-BkkvIRg5.d.mts} +134 -134
  361. package/dist/dts/{types-B6UNnZ2P.d.ts → types-BkkvIRg5.d.ts} +134 -134
@@ -1 +1 @@
1
- import{useMemo as e}from"react";import{create as o,rawSign as r}from"@privy-io/js-sdk-core";import{aa as t,P as i}from"./internal-context-eGSwROSk.mjs";import{ab as n,ac as c,bd as a,q as s,bv as l,bw as p,cP as m}from"./EmbeddedWalletConnectingScreen-D50stmJi.mjs";import{k as u}from"./events-context-ClaboIDc.mjs";import{u as d}from"./use-sign-with-user-signer-DaTvrd5T.mjs";import"ofetch";import"react/jsx-runtime";import"lucide-react";import"viem";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/UserCircleIcon";import"styled-components";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/20/solid/CheckIcon";import"@heroicons/react/24/outline/EnvelopeIcon";import"@heroicons/react/24/outline/PhoneIcon";import"react-device-detect";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/WalletIcon";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"@heroicons/react/24/outline/Square2StackIcon";import"zustand";import"@heroicons/react/24/outline";import"@tanstack/react-virtual";import"@heroicons/react/24/outline/CheckIcon";import"qrcode";import"viem/utils";import"eventemitter3";import"@scure/base";import"@walletconnect/ethereum-provider";import"@heroicons/react/24/outline/CreditCardIcon";import"@heroicons/react/24/outline/QrCodeIcon";import"@heroicons/react/24/solid/ArrowsRightLeftIcon";import"@heroicons/react/24/outline/InformationCircleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"@heroicons/react/24/outline/ChevronDownIcon";import"@privy-io/ethereum";import"@heroicons/react/24/outline/CheckCircleIcon";import"@heroicons/react/24/outline/GlobeAltIcon";import"@headlessui/react";import"@privy-io/popup";import"@heroicons/react/24/solid/CheckCircleIcon";import"@heroicons/react/24/outline/FingerPrintIcon";import"@heroicons/react/24/outline/LockClosedIcon";import"@heroicons/react/24/outline/PencilSquareIcon";import"jose";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"@heroicons/react/24/outline/ShieldCheckIcon";import"@privy-io/urls";import"tinycolor2";const h=()=>{let{refreshSessionAndUser:r,privy:i}=t();return e((()=>({async createWallet(e){let t=await o(i,{request:{chain_type:e.chainType}}),n=await r();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:t}}})),[r,i])};function I(){let{user:o,getAccessToken:r}=n(),{walletProxy:m,openModal:d,client:h}=t(),{setModalData:I}=c(),w=u();return e((()=>({exportWallet:e=>new Promise((async(t,n)=>{if(!o)return void n(new i("User must be authenticated before exporting their Privy wallet"));let c=a(o,e.address);c?"spark"===c.chainType&&s(c)?await r()?m?(I({connectWallet:{recoveryMethod:c.recoveryMethod,connectingWalletAddress:c.address,isUnifiedWallet:!0,onCompleteNavigateTo:l,onFailure:n,shouldForceMFA:!0},keyExport:{appId:w.id,appClientId:w.appClientId,origin:h.apiUrl,address:c.address,hdWalletIndex:c.walletIndex,chainType:c.chainType,walletId:c.id,isUnifiedWallet:!0,imported:c.imported,onSuccess:t,onFailure:n}}),d(p)):n(new i("Wallet not ready for export")):n(new i("Must have valid access token.")):n(Error("Export via extended-chains is only supported for unified stack wallets")):n(new i("User must have an embedded wallet."))}))})),[o,r,m,d,h,I,w])}const w=()=>{let{user:o}=n(),{privy:i}=t(),{signWithUserSigner:c}=d();return e((()=>({async signRawHash({address:e,chainType:t,hash:n}){if(!o)throw Error("User must be authenticated before signing");let a=m(o,t).filter((e=>s(e))).find((o=>o.address===e));if(!a)throw Error("Wallet not found");let l=await r(i,c,{wallet_id:a.id,params:{hash:n}});if(l.data&&"signature"in l.data&&"hex"===l.data.encoding)return{signature:l.data.signature};throw Error("Failed to sign")}})),[i,c,o])};export{h as useCreateWallet,I as useExportWallet,w as useSignRawHash};
1
+ import{useMemo as e}from"react";import{create as t,rawSign as r}from"@privy-io/js-sdk-core";import{u as a,a as i}from"./internal-context-Cvo1WmWN.mjs";import{u as n,a as s,h as o,d,n as l}from"./get-is-unified-wallet-DymQMSJy.mjs";import{u as c}from"./context-Cb5MFcME.mjs";import{u as p}from"./use-sign-with-user-signer-LJ6ROduD.mjs";import"ofetch";import"viem";import"react/jsx-runtime";import"tinycolor2";const u=()=>{let{refreshSessionAndUser:r,privy:i}=a();return e((()=>({async createWallet(e){let a=await t(i,{request:{chain_type:e.chainType}}),n=await r();if(!n)throw Error("User must be authenticated before creating a Privy wallet");return{user:n,wallet:a}}})),[r,i])};function m(){let{user:t,getAccessToken:r}=n(),{walletProxy:l,openModal:p,client:u}=a(),{setModalData:m}=s(),h=c();return e((()=>({exportWallet:e=>new Promise((async(a,n)=>{if(!t)return void n(new i("User must be authenticated before exporting their Privy wallet"));let s=o(t,e.address);s?"spark"===s.chainType&&d(s)?await r()?l?(m({connectWallet:{recoveryMethod:s.recoveryMethod,connectingWalletAddress:s.address,isUnifiedWallet:!0,onCompleteNavigateTo:"EmbeddedWalletKeyExportScreen",onFailure:n,shouldForceMFA:!0},keyExport:{appId:h.id,appClientId:h.appClientId,origin:u.apiUrl,address:s.address,hdWalletIndex:s.walletIndex,chainType:s.chainType,walletId:s.id,isUnifiedWallet:!0,imported:s.imported,onSuccess:a,onFailure:n}}),p("EmbeddedWalletConnectingScreen")):n(new i("Wallet not ready for export")):n(new i("Must have valid access token.")):n(Error("Export via extended-chains is only supported for unified stack wallets")):n(new i("User must have an embedded wallet."))}))})),[t,r,l,p,u,m,h])}const h=()=>{let{user:t}=n(),{privy:i}=a(),{signWithUserSigner:s}=p();return e((()=>({async signRawHash({address:e,chainType:a,hash:n}){if(!t)throw Error("User must be authenticated before signing");let o=l(t,a).filter((e=>d(e))).find((t=>t.address===e));if(!o)throw Error("Wallet not found");let c=await r(i,s,{wallet_id:o.id,params:{hash:n}});if(c.data&&"signature"in c.data&&"hex"===c.data.encoding)return{signature:c.data.signature};throw Error("Failed to sign")}})),[i,s,t])};export{u as useCreateWallet,m as useExportWallet,h as useSignRawHash};
@@ -0,0 +1 @@
1
+ import{jsxs as i,jsx as t}from"react/jsx-runtime";const l=l=>/*#__PURE__*/i("svg",{width:"33",height:"32",viewBox:"0 0 33 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...l,children:[/*#__PURE__*/t("rect",{x:"0.5",width:"32",height:"32",rx:"4",fill:"#855DCD"}),/*#__PURE__*/i("g",{"clip-path":"url(#clip0_1715_1960)",children:[/*#__PURE__*/t("path",{d:"M4.5 4H28.5V28H4.5V4Z",fill:"#855DCD"}),/*#__PURE__*/t("path",{d:"M11.1072 8.42105H21.6983V23.5789H20.1437V16.6357H20.1284C19.9566 14.7167 18.3542 13.2129 16.4028 13.2129C14.4514 13.2129 12.849 14.7167 12.6771 16.6357H12.6619V23.5789H11.1072V8.42105Z",fill:"white"}),/*#__PURE__*/t("path",{d:"M8.28943 10.5725L8.92101 12.7239H9.45542V21.4275C9.1871 21.4275 8.96959 21.6464 8.96959 21.9165V22.5032H8.87242C8.60411 22.5032 8.38659 22.7221 8.38659 22.9922V23.5789H13.8279V22.9922C13.8279 22.7221 13.6104 22.5032 13.3421 22.5032H13.2449V21.9165C13.2449 21.6464 13.0274 21.4275 12.7591 21.4275H12.1761V10.5725H8.28943Z",fill:"white"}),/*#__PURE__*/t("path",{d:"M20.2408 21.4275C19.9725 21.4275 19.755 21.6464 19.755 21.9165V22.5032H19.6579C19.3895 22.5032 19.172 22.7221 19.172 22.9922V23.5789H24.6133V22.9922C24.6133 22.7221 24.3958 22.5032 24.1275 22.5032H24.0303V21.9165C24.0303 21.6464 23.8128 21.4275 23.5445 21.4275V12.7239H24.0789L24.7105 10.5725H20.8238V21.4275H20.2408Z",fill:"white"})]}),/*#__PURE__*/t("defs",{children:/*#__PURE__*/t("clipPath",{id:"clip0_1715_1960",children:/*#__PURE__*/t("rect",{width:"24",height:"24",fill:"white",transform:"translate(4.5 4)"})})})]});export{l as F};
@@ -1 +1 @@
1
- import{useCallback as t}from"react";import{F as i}from"./frame-Dj70FEYB.mjs";import{aa as e,P as a}from"./internal-context-eGSwROSk.mjs";import"ofetch";const r=()=>{let{client:r,setAuthenticated:n,setUser:s}=e();return{initLoginToMiniApp:t((async()=>{let t=new i;if(!r)throw new a("Must initialize Privy client first.");return r.startAuthFlow(t),await t.init()}),[r]),loginToMiniApp:t((async({message:t,signature:e})=>{if(!r)throw new a("Must initialize Privy client first.");if(!(r.authFlow instanceof i))throw new a("Must initialize Farcaster Mini App flow first.");let o=(t=>{let i=t.match(/farcaster:\/\/fid\/(\d+)/);return i&&i[1]?parseInt(i[1],10):null})(t);if(!o)throw new a("Invalid message format; could not parse Farcaster ID.");r.authFlow.setAuthData({message:t,signature:e,fid:o});let{user:l}=await r.authenticate();return l&&(s(l),n(!0)),l}),[r,s,n])}};export{r as useLoginToMiniApp};
1
+ import{useCallback as t}from"react";import{F as i}from"./frame-BMa3kyjk.mjs";import{u as e,a as r}from"./internal-context-Cvo1WmWN.mjs";import"./paths-3HW55qZg.mjs";import"ofetch";const a=()=>{let{client:a,setAuthenticated:n,setUser:s}=e();return{initLoginToMiniApp:t((async()=>{let t=new i;if(!a)throw new r("Must initialize Privy client first.");return a.startAuthFlow(t),await t.init()}),[a]),loginToMiniApp:t((async({message:t,signature:e})=>{if(!a)throw new r("Must initialize Privy client first.");if(!(a.authFlow instanceof i))throw new r("Must initialize Farcaster Mini App flow first.");let o=(t=>{let i=t.match(/farcaster:\/\/fid\/(\d+)/);return i&&i[1]?parseInt(i[1],10):null})(t);if(!o)throw new r("Invalid message format; could not parse Farcaster ID.");a.authFlow.setAuthData({message:t,signature:e,fid:o});let{user:l}=await a.authenticate();return l&&(s(l),n(!0)),l}),[a,s,n])}};export{a as useLoginToMiniApp};
@@ -0,0 +1 @@
1
+ let m=2n**256n-1n;const t=({amount:t,decimals:a})=>t===m?"Maximum":Intl.NumberFormat(void 0,{maximumFractionDigits:a}).format(Number(t)/10**a);export{t as f};
@@ -0,0 +1 @@
1
+ import{a as t,f as s}from"./internal-context-Cvo1WmWN.mjs";import{a5 as i,a6 as a}from"./paths-3HW55qZg.mjs";class e{async init(){if(!this.api)throw new t("Auth flow has no API instance");let{nonce:s,expires_at:a}=await this.api.post(i,{});return{nonce:s,expiresAt:a}}async authenticate(){if(!this.message||!this.signature||!this.fid)throw new t("Auth flow has no message, signature, or fid");if(!this.api)throw new t("Auth flow has no API instance");try{let s=await this.api.post(a,{message:this.message,signature:this.signature,fid:this.fid});if(!s)throw new t("No response from authentication");return s}catch(t){throw s(t)}}async link(){throw Error("Not implemented")}setAuthData({message:t,signature:s,fid:i}){this.message=t,this.signature=s,this.fid=i}constructor(){this.meta={}}}export{e as F};
@@ -0,0 +1 @@
1
+ import{getAddress as e}from"viem";import{jsx as t,jsxs as i}from"react/jsx-runtime";import{useContext as a,createContext as r,useState as s,useRef as l,useEffect as n}from"react";import{u}from"./context-Cb5MFcME.mjs";import{n as d}from"./internal-context-Cvo1WmWN.mjs";function o(e){return"string"==typeof e&&/^custom:[a-zA-Z0-9_-]+$/i.test(e)}function c(e){return e?new Date(1e3*e):null}function p(e,t){return e.slice().sort(((e,t)=>(e.firstVerifiedAt?.getTime()??0)-(t.firstVerifiedAt?.getTime()??0))).find((e=>e.type===t))}const m=e=>e?f(e).find((e=>0===e.walletIndex))??null:null,f=e=>e?_(e,"ethereum"):[],_=(e,t)=>e.linkedAccounts.filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&!e.imported&&e.chainType===t)),y=e=>e?_(e,"solana"):[],h=e=>e?y(e).find((e=>0===e.walletIndex))??null:null,b=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&"privy"===e.walletClientType&&e.imported&&"ethereum"===e.chainType)),k=e=>(e?.linkedAccounts??[]).filter((e=>"wallet"===e.type&&e.imported&&"privy"===e.walletClientType&&"solana"===e.chainType)),g=(t,i)=>t===i||!(!t.startsWith("0x")||!i.startsWith("0x"))&&e(t)===e(i),v=(e,t)=>e?.linkedAccounts.find((e=>"wallet"===e.type&&"privy"===e.walletClientType&&g(e.address,t)))||null,A=(e,t)=>e.find((e=>g(e.address,t)))||null,j=e=>m(e)??h(e);function w(e){if(!e)return null;let t=function(e){let t=[];for(let i of e){let e=i.type;switch(i.type){case"wallet":let a={id:i.id,address:i.address,type:i.type,imported:i.imported,delegated:i.delegated,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),chainType:i.chain_type,walletClientType:i.wallet_client_type,connectorType:i.connector_type,recoveryMethod:i.recovery_method,walletIndex:i.wallet_index,publicKey:i.public_key};t.push(a);break;case"smart_wallet":let r={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),smartWalletType:i.smart_wallet_type,smartWalletVersion:i.smart_wallet_version};t.push(r);break;case"cross_app":let s={type:i.type,subject:i.subject,embeddedWallets:i.embedded_wallets,smartWallets:i.smart_wallets,providerApp:{id:i.provider_app_id},firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(s);break;case"email":let l={address:i.address,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(l);break;case"phone":let n={number:i.phoneNumber,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(n);break;case"google_oauth":let u={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(u);break;case"spotify_oauth":let d={subject:i.subject,email:i.email,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(d);break;case"instagram_oauth":let p={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(p);break;case"twitter_oauth":let m={subject:i.subject,username:i.username,name:i.name,type:i.type,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(m);break;case"discord_oauth":let f={subject:i.subject,username:i.username,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(f);break;case"github_oauth":let _={subject:i.subject,username:i.username,name:i.name,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(_);break;case"tiktok_oauth":let y={subject:i.subject,username:i.username,name:i.name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(y);break;case"line_oauth":let h={subject:i.subject,name:i.name,email:i.email,profilePictureUrl:i.profile_picture_url,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(h);break;case"twitch_oauth":let b={subject:i.subject,username:i.username,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(b);break;case"linkedin_oauth":let k={subject:i.subject,name:i.name,email:i.email,vanityName:i.vanity_name,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(k);break;case"apple_oauth":let g={subject:i.subject,email:i.email,type:i.type,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(g);break;case"custom_auth":t.push({type:i.type,customUserId:i.custom_user_id,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)});break;case"farcaster":let v={type:i.type,fid:i.fid,ownerAddress:i.owner_address,displayName:i.display_name,username:i.username,bio:i.bio,pfp:i.profile_picture_url,url:i.homepage_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at),signerPublicKey:i.signer_public_key};t.push(v);break;case"passkey":let A={type:i.type,enrolledInMfa:i.enrolled_in_mfa,credentialId:i.credential_id,publicKey:i.public_key,authenticatorName:i.authenticator_name,createdWithDevice:i.created_with_device,createdWithOs:i.created_with_os,createdWithBrowser:i.created_with_browser,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(A);break;case"telegram":let j={type:i.type,telegramUserId:i.telegram_user_id,firstName:i.first_name,lastName:i.last_name,username:i.username,photoUrl:i.photo_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(j);break;default:if(o(i.type)){let e={type:i.type,subject:i.subject,name:i.name,username:i.username,email:i.email,profilePictureUrl:i.profile_picture_url,firstVerifiedAt:c(i.first_verified_at),latestVerifiedAt:c(i.latest_verified_at)};t.push(e);break}console.warn(`Unrecognized account type: ${e}. Please consider upgrading the Privy SDK.`)}}return t}(e.linked_accounts),i=p(t,"wallet"),a=p(t,"smart_wallet"),r=p(t,"email"),s=p(t,"phone"),l=p(t,"google_oauth"),n=p(t,"twitter_oauth"),u=p(t,"discord_oauth"),d=p(t,"github_oauth"),m=p(t,"spotify_oauth"),f=p(t,"instagram_oauth"),_=p(t,"tiktok_oauth"),y=p(t,"line_oauth"),h=p(t,"twitch_oauth"),b=p(t,"linkedin_oauth"),k=p(t,"apple_oauth"),g=p(t,"farcaster"),v=p(t,"telegram"),A=e.mfa_methods.map((({type:e,verified_at:t})=>({type:e,verifiedAt:c(t)})));return{id:e.id,createdAt:c(e.created_at),linkedAccounts:t,email:r&&{address:r?.address},phone:s&&{number:s?.number},wallet:i&&{id:i.id,address:i.address,chainType:i.chainType,walletClientType:i.walletClientType,connectorType:i.connectorType,recoveryMethod:i.recoveryMethod,imported:i.imported,delegated:i.delegated,walletIndex:i.walletIndex,publicKey:i.publicKey},smartWallet:a&&{address:a.address,smartWalletType:a.smartWalletType,smartWalletVersion:a.smartWalletVersion},google:l&&{subject:l.subject,email:l.email,name:l.name},twitter:n&&{subject:n.subject,username:n.username,name:n.name,profilePictureUrl:n.profilePictureUrl},discord:u&&{subject:u.subject,username:u.username,email:u.email},github:d&&{subject:d.subject,username:d.username,name:d.name,email:d.email},spotify:m&&{subject:m.subject,email:m.email,name:m.name},instagram:f&&{subject:f.subject,username:f.username},tiktok:_&&{subject:_.subject,username:_.username,name:_.name},line:y&&{subject:y.subject,name:y.name,email:y.email,profilePictureUrl:y.profilePictureUrl},twitch:h&&{subject:h.subject,username:h.username},linkedin:b&&{subject:b.subject,name:b.name,email:b.email,vanityName:b.vanityName},apple:k&&{subject:k.subject,email:k.email},farcaster:g&&{fid:g.fid,ownerAddress:g.ownerAddress,displayName:g.displayName,username:g.username,bio:g.bio,pfp:g.pfp,url:g.url,signerPublicKey:g.signerPublicKey},telegram:v&&{telegramUserId:v.telegramUserId,firstName:v.firstName,lastName:v.lastName,username:v.username,photoUrl:v.photoUrl},delegatedWallets:[],mfaMethods:A.map((e=>e.type)),hasAcceptedTerms:e.has_accepted_terms??!1,isGuest:e.is_guest,customMetadata:e.custom_metadata}}function V({src:e,...i}){/*#__PURE__*/return t("img",{src:e,...i,style:{display:"none"}})}const T=/*#__PURE__*/r({currentScreen:null,lastScreen:null,navigate:d,navigateBack:d,resetNavigation:d,setModalData:d,onUserCloseViaDialogOrKeybindRef:void 0}),W=e=>{let a=u(),[r,d]=s(e.initialScreen),o=l(null);n((()=>{e.open||(o.current=null)}),[e.open]),n((()=>{o.current=null}),[e.initialScreen]);let c={data:e.data,setModalData:e.setModalData,currentScreen:e.initialScreen,lastScreen:r,navigate:(t,i=!0)=>{e.setInitialScreen(t),i&&d(e.initialScreen)},navigateBack:()=>{e.setInitialScreen(r)},resetNavigation:()=>{e.setInitialScreen(null),d(null)},onUserCloseViaDialogOrKeybindRef:o};/*#__PURE__*/return i(T.Provider,{value:c,children:[("string"==typeof a.appearance.logo||"img"===a.appearance.logo?.type)&&/*#__PURE__*/t(V,{src:"string"==typeof a.appearance.logo?a.appearance.logo:a.appearance.logo.props.src}),e.children]})},P=()=>a(T),I=/*#__PURE__*/r({ready:!1,authenticated:!1,user:null,walletConnectors:null,connectWallet:d,login:d,connectOrCreateWallet:d,linkEmail:d,linkPhone:d,linkFarcaster:d,linkWallet:d,startCrossAppAuthFlow:d,linkGoogle:d,linkTwitter:d,linkTwitch:d,linkDiscord:d,linkGithub:d,linkSpotify:d,linkInstagram:d,linkTelegram:d,linkTiktok:d,linkLine:d,linkLinkedIn:d,linkApple:d,linkPasskey:d,updateEmail:d,updatePhone:d,logout:d,getAccessToken:d,unlinkEmail:d,unlinkPhone:d,unlinkWallet:d,unlinkGoogle:d,unlinkTwitter:d,unlinkTwitch:d,unlinkDiscord:d,unlinkGithub:d,unlinkSpotify:d,unlinkInstagram:d,unlinkTiktok:d,unlinkLine:d,unlinkLinkedIn:d,unlinkApple:d,unlinkCrossAppAccount:d,unlinkFarcaster:d,unlinkTelegram:d,unlinkPasskey:d,signMessage:d,signTypedData:d,enrollInMfa:d,initEnrollmentWithSms:d,initEnrollmentWithTotp:d,initEnrollmentWithPasskey:d,promptMfa:d,init:d,submitEnrollmentWithSms:d,submitEnrollmentWithTotp:d,submitEnrollmentWithPasskey:d,unenroll:d,submit:d,cancel:d,sendTransaction:d,signTransaction:d,exportWallet:d,setWalletPassword:d,setWalletRecovery:d,requestFarcasterSignerFromWarpcast:d,getFarcasterSignerPublicKey:d,signFarcasterMessage:d,signMessageWithCrossAppWallet:d,signTypedDataWithCrossAppWallet:d,sendTransactionWithCrossAppWallet:d,signTransactionWithCrossAppWallet:d,isModalOpen:!1,mfaMethods:[]}),M=()=>a(I),S=e=>!!e.id&&"privy-v2"===e.recoveryMethod;export{W as M,I as P,P as a,m as b,h as c,S as d,f as e,b as f,j as g,v as h,o as i,k as j,A as k,w as l,g as m,_ as n,y as o,M as u};
@@ -0,0 +1 @@
1
+ function e(e){switch(e){case"solana:mainnet":return"Solana";case"solana:devnet":return"Devnet";case"solana:testnet":return"Testnet"}}export{e as g};
@@ -0,0 +1 @@
1
+ import{createPublicClient as a,http as t}from"viem";import{a as e}from"./getPublicClient-IxRndou_.mjs";const n=async({chain:n,address:s,appId:c,rpcConfig:i,erc20Address:o})=>{let p=a({chain:n,transport:t(e(n,i,c))});return{balance:await p.readContract({address:o,abi:r,functionName:"balanceOf",args:[s]}).catch((()=>0n)),chain:n}};let r=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}];export{n as g};
@@ -0,0 +1 @@
1
+ import{createPublicClient as t,http as e}from"viem";import{a}from"./getPublicClient-IxRndou_.mjs";const n=async({address:n,chain:s,rpcConfig:r,privyAppId:o})=>{try{let l=t({chain:s,transport:e(a(s,r,o))}),[m,c]=await Promise.all([l.readContract({abi:i,address:n,functionName:"symbol"}),l.readContract({abi:i,address:n,functionName:"decimals"})]);return{decimals:c,symbol:m}}catch(t){return console.log(t),null}};let i=[{inputs:[],name:"decimals",outputs:[{internalType:"uint8",name:"",type:"uint8"}],stateMutability:"view",type:"function"},{inputs:[],name:"symbol",outputs:[{internalType:"string",name:"",type:"string"}],stateMutability:"view",type:"function"}];export{n as g};
@@ -0,0 +1 @@
1
+ const s=1e9,a="11111111111111111111111111111111",e="TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",n="TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb",o="ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",d=["CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C","CPMDWBwJDtYax9qW7AyRuVC19Cc4L4Vcy4n2BHAbHkCW"],r=["JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"],t={"solana:mainnet":{EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:{symbol:"USDC",decimals:6,address:"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"},Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB:{symbol:"USDT",decimals:6,address:"Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"},So11111111111111111111111111111111111111112:{symbol:"SOL",decimals:9,address:"So11111111111111111111111111111111111111112"}},"solana:devnet":{"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU":{symbol:"USDC",decimals:6,address:"4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU"},EJwZgeZrdC8TXTQbQBoL6bfuAnFUUy1PVCMB4DYPzVaS:{symbol:"USDT",decimals:6,address:"EJwZgeZrdC8TXTQbQBoL6bfuAnFUUy1PVCMB4DYPzVaS"},So11111111111111111111111111111111111111112:{symbol:"SOL",decimals:9,address:"So11111111111111111111111111111111111111112"}},"solana:testnet":{}};function C(a,e){let n=parseFloat(a.toString())/s,o=b.format(e*n);return"$0.00"===o?"<$0.01":o}let b=new Intl.NumberFormat(void 0,{style:"currency",currency:"USD",maximumFractionDigits:2});export{o as A,t as D,r as J,s as L,d as R,a as S,e as T,n as a,C as g};
@@ -0,0 +1 @@
1
+ import{createPublicClient as r,http as p}from"viem";import{P as t}from"./internal-context-Cvo1WmWN.mjs";const e=(e,i,s,c)=>{let a=Number(e),n=i.find((r=>r.id===a));if(!n)throw new t(`Unsupported chainId ${e}`,4901);return r({transport:p(l(n,s,c.appId)),chain:n})},l=(r,p,e)=>{let l,i=r.id,s=Number(r.id);if(r.rpcUrls.privyWalletOverride&&r.rpcUrls.privyWalletOverride.http[0])l=r.rpcUrls.privyWalletOverride.http[0];else if(p.rpcUrls&&p.rpcUrls[s])l=p.rpcUrls[s];else if(r.rpcUrls.privy?.http[0]){let p=new URL(r.rpcUrls.privy.http[0]);p.searchParams.append("privyAppId",e),l=p.toString()}else l=r.rpcUrls.public?.http[0]?r.rpcUrls.public.http[0]:r.rpcUrls.default?.http[0];if(!l)throw new t(`No RPC url found for ${i}`);return l};export{l as a,e as g};
@@ -0,0 +1 @@
1
+ import{D as t}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";function r(r){let[e]=Object.entries(t[r]).find((([t,r])=>"USDC"===r.symbol))??[];return e}export{r as g};
@@ -0,0 +1 @@
1
+ import{jsxs as t,jsx as e,Fragment as n}from"react/jsx-runtime";import{useState as a,useMemo as s,useCallback as i,useEffect as o}from"react";import{createPublicClient as r,http as p,toHex as l,decodeFunctionData as u,decodeAbiParameters as m,formatEther as c}from"viem";import{getJsonRpcEndpointFromChain as d,formatTokenAmount as y,ProviderErrors as f}from"@privy-io/js-sdk-core";import{A as b}from"./Address-DtXA0OPS.mjs";import{u as T,q as h}from"./context-Cb5MFcME.mjs";import{P as g,j as I}from"./prepareFundingModalData-BUyu5Vhr.mjs";import{u as v}from"./internal-context-Cvo1WmWN.mjs";import{a as k,u as j}from"./get-is-unified-wallet-DymQMSJy.mjs";import{u as E}from"./useGetTokenPrice-B4XVfxeD.mjs";import{u as C}from"./useWalletBalance-Xca4-c_r.mjs";import{g as M}from"./getErc20TokenInfo-CKA_MDcy.mjs";import{f as _}from"./formatErc20TokenAmount-BuPk9xcy.mjs";import{g as w,a as F,p as x}from"./ethers-CpMSCMOg.mjs";import{Y as N,D as S}from"./useActiveWallet-hrZcON-K.mjs";import{g as A}from"./getPublicClient-IxRndou_.mjs";import{ErrorScreenView as O}from"./ErrorScreen-DFAo4S7A.mjs";import{styled as R}from"styled-components";import{M as D,B}from"./ModalHeader-D7WajfD8.mjs";import{D as $}from"./JsonTree-Bvd2C29R.mjs";import{T as P,S as q}from"./TransactionErrorView-Dgp1KSy5.mjs";import{P as L}from"./Button-DJ-mtuuD.mjs";import{R as U}from"./Layouts-Bmf8DxNP.mjs";import{S as W}from"./ScreenHeader-Biz1wq02.mjs";import{T as H}from"./TransactionDetails-fgHkAnf9.mjs";import{E as V}from"./transfer-CMPmjPsM.mjs";import{p as G}from"./index-CI666IP9.mjs";import"lucide-react";import"tinycolor2";import"eventemitter3";import"ofetch";import"./useGetSolPrice-Bi0pPiUW.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem/utils";import"./useWallets-BplPx0Pz.mjs";import"./reservoir-B0V48m2I.mjs";import"./ScreenLayout-Dmrhdwtt.mjs";import"./Screen-dwi2CitY.mjs";import"./index-CJMgUOnw.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline";import"./Value-B4M62ove.mjs";import"./LoadingSkeleton-CHdaq3pb.mjs";import"./Row-CG0lSY5Z.mjs";import"./ErrorMessage-Cx8GKGhL.mjs";import"./LabelXs-BOisBtqT.mjs";import"./Subtitle-DkvfP2Ev.mjs";import"./Title-D0pfZff-.mjs";import"./WalletInfoCard-DAv0WFcc.mjs";import"./shared-CtYf3O54.mjs";import"./Checkbox-NmGCZeKL.mjs";import"./ErrorBanner-BdiArMwu.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-BDp-QC9i.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";import"./WalletLink-CjuEskpb.mjs";import"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"./transaction-CnfuREWo.mjs";import"@heroicons/react/24/outline/ChevronDownIcon";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"@scure/base";import"./usePrivy-D3OPY7tm.mjs";import"@marsidev/react-turnstile";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"js-cookie";import"./frame-BMa3kyjk.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-LJ6ROduD.mjs";import"./getEmbeddedConnectedWallet-CM6cDQCS.mjs";let z=[{constant:!0,inputs:[{name:"_owner",type:"address"}],name:"balanceOf",outputs:[{name:"balance",type:"uint256"}],payable:!1,stateMutability:"view",type:"function"}],Q=/*#__PURE__*/R.div.withConfig({displayName:"Container",componentId:"sc-31acb2bc-0"})(["display:flex;flex-direction:column;min-height:72px;"]);var J=({onBack:n,details:a})=>/*#__PURE__*/t(Q,{children:[/*#__PURE__*/e(D,{backFn:n}),/*#__PURE__*/e($,{data:a}),/*#__PURE__*/e(B,{})]});let K=({gasUsed:t,effectiveGasPrice:e})=>{if(t&&e)try{return l(t*e)}catch(t){return}};const X=({txn:a,receipt:s,transactionInfo:i,onClose:o,tokenPrice:r,tokenSymbol:p,receiptHeader:l,receiptDescription:u})=>/*#__PURE__*/t(n,{children:[/*#__PURE__*/e(D,{onClose:o}),/*#__PURE__*/e(W,{title:l??"Transaction complete!",description:u??"You're all set."}),/*#__PURE__*/e(H,{tokenPrice:r,from:s.from,to:s.to,gas:K(s),txn:a,transactionInfo:i,tokenSymbol:p}),/*#__PURE__*/e(N,{}),/*#__PURE__*/e(Y,{loading:!1,onClick:o,children:"All Done"}),/*#__PURE__*/e(U,{}),/*#__PURE__*/e(B,{})]});let Y=/*#__PURE__*/R(L).withConfig({displayName:"SubmitButton",componentId:"sc-f70d0f7a-0"})(["&&{margin-top:24px;}transition:color 350ms ease,background-color 350ms ease;"]);const Z=[{constant:!1,inputs:[{name:"_salt",type:"bytes32"},{name:"_initializer",type:"bytes"}],name:"deployAccount",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],tt=[{name:"from",type:"address"},{name:"param2",type:"address"},{name:"param3",type:"bytes"},{name:"param4",type:"tuple",components:[]},{type:"tuple",components:[{name:"param5",type:"address"},{name:"param6",type:"uint256"},{name:"param7",type:"uint256"},{name:"encodedInitData",type:"bytes"}]}],et=[{constant:!1,inputs:[{name:"spender",type:"address"},{name:"value",type:"uint256"}],name:"approve",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],nt=[{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"mint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"uint256",name:"quantity",type:"uint256"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256[]",name:"tokenIds",type:"uint256[]"},{internalType:"uint256[]",name:"quantities",type:"uint256[]"},{internalType:"bytes",name:"data",type:"bytes"}],name:"mintBatch",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"uint256",name:"quantity",type:"uint256"}],name:"mint",outputs:[{internalType:"bool",name:"",type:"bool"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"tokenId",type:"uint256"},{internalType:"string",name:"uri",type:"string"}],name:"safeMint",outputs:[],stateMutability:"payable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"nonpayable",type:"function"},{inputs:[{internalType:"address",name:"to",type:"address"},{internalType:"uint256",name:"amount",type:"uint256"}],name:"batchMint",outputs:[],stateMutability:"payable",type:"function"}],at=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],st=[{constant:!1,inputs:[{name:"_operator",type:"address"},{name:"_approved",type:"bool"}],name:"setApprovalForAll",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],it=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"}],name:"transferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],ot=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenIds",type:"uint256[]"},{name:"_amounts",type:"uint256[]"},{name:"_data",type:"bytes"}],name:"safeBatchTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],rt=[{constant:!1,inputs:[{name:"_from",type:"address"},{name:"_to",type:"address"},{name:"_tokenId",type:"uint256"},{name:"_amount",type:"uint256"},{name:"_data",type:"bytes"}],name:"safeTransferFrom",outputs:[{name:"",type:"bool"}],payable:!1,stateMutability:"nonpayable",type:"function"}],pt=(t,e)=>{let n=lt(et,t);if(n)return{action:"approve",functionName:"approve",isErc20Ish:!0,isNFTIsh:!1,spender:n.args[0],amount:n.args[1]};let a=lt(V,t);if(a)return{action:"transfer",functionName:"transfer",isErc20Ish:!0,isNFTIsh:!1,transferTo:a.args[0],amount:a.args[1]};if(!e)return{action:"transaction",functionName:"",isErc20Ish:!1,isNFTIsh:!1};let s=lt(Z,t);if(s&&"string"==typeof s.args[1]){let t=ut(s.args[1]);if(t&&t[4].encodedInitData)return pt(t[4].encodedInitData,e)}let i=lt(st,t);if(i)return{action:"approve",functionName:"setApprovalForAll",isNFTIsh:!0,isErc20Ish:!1,operator:i.args[0],approved:i.args[1]};let o=lt(it,t);if(o)return{action:"transfer",functionName:"transferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:o.args[0],transferTo:o.args[1],tokenId:o.args[2]};let r=lt(at,t);if(r)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:r.args[0],transferTo:r.args[1],tokenId:r.args[2]};let p=lt(rt,t);if(p)return{action:"transfer",functionName:"safeTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:p.args[0],transferTo:p.args[1],tokenId:p.args[2],amount:p.args[3]};let l=lt(ot,t);if(l)return{action:"batch transfer",functionName:"safeBatchTransferFrom",isNFTIsh:!0,isErc20Ish:!1,transferFrom:l.args[0],transferTo:l.args[1],tokenIds:l.args[2],amounts:l.args[3]};let u=lt(nt,t);return u?{action:"mint",functionName:u.functionName,isNFTIsh:!0,isErc20Ish:!1,args:u.args}:{action:"transaction",isErc20Ish:!1,isNFTIsh:!1}};let lt=(t,e)=>{try{let n=u({abi:t,data:e});return{functionName:n.functionName,args:n.args||[]}}catch(t){return null}},ut=t=>{try{if("string"==typeof t)return m(tt,`0x${t.slice(10)}`)}catch(t){return null}},mt=t=>`${parseFloat(t).toFixed(2)}`;function ct(t,e){let n=[],a=new Map;if(t)for(let e of t)if(e.in[0]){let t;t="ERC721"===e.asset.type||"approve_for_all"===e.in[0].value?{id:`nft:${e.asset.name}`,nftName:e.asset.name,nftCount:e.in.length}:{id:`token:${e.asset.type}:${e.asset.symbol}:${e.asset.name}`,iconUrl:e.asset.logo_url,value:e.in[0].value,symbol:e.asset.symbol,usdValue:e.in[0].usd_price?mt(e.in[0].usd_price):void 0,decimals:e.asset.decimals},n.push(t)}else if(e.out[0]?.value){let t;t="ERC721"===e.asset.type||"approve_for_all"===e.out[0].value?{id:`nft:${e.asset.name}`,nftName:e.asset.name}:{id:`token:${e.asset.type}:${e.asset.symbol}:${e.asset.name}`,iconUrl:e.asset.logo_url,value:e.out[0].value,symbol:e.asset.symbol,usdValue:e.out[0].usd_price?mt(e.out[0].usd_price):void 0,decimals:e.asset.decimals},a.has(t.id)||a.set(t.id,t)}for(let t of e)for(let e of Object.keys(t.spenders)){let n;n="ERC721"===t.asset.type||"approve_for_all"===t.spenders[e]?.value?{id:`nft:${t.asset.name}`,nftName:t.asset.name}:{id:`token:${t.asset.type}:${t.asset.symbol}:${t.asset.name}`,iconUrl:t.asset.logo_url,value:t.spenders[e]?.value,symbol:t.asset.symbol,usdValue:t.spenders[e]?.usd_price?mt(t.spenders[e]?.usd_price):void 0,decimals:t.asset.decimals},a.has(n.id)||a.set(n.id,n)}return{assetsIn:n,assetsOut:Array.from(a.values())}}const dt=(t,e,n,s)=>{let[i,r]=a(null),{walletProxy:p}=v();return o((()=>{i&&r(null),(async()=>{if(!p||!e)return null;let a=[],i=!0,o=await G(t,n,e,s).catch((e=>(e.message&&e.message.includes("Insufficient balance for transaction")||e.message&&e.message.includes("Insufficient funds for gas * price + value")||e.details&&e.details.includes("insufficient funds")?i=!1:a.push(e),t)));return{tx:o,totalGasEstimate:o.gas,hasFunds:i,errors:a}})().then(r)}),[t]),i};let yt=new g(new I("There was an issue preparing your transaction",f.E32603_DEFAULT_INTERNAL_ERROR.eipCode)),ft=(t,e)=>t?.sendTransaction?"transactionRequest"in t.sendTransaction?t.sendTransaction.transactionRequest:t.sendTransaction.transactionRequests[e]:void 0;const bt={component:()=>{let{data:l,onUserCloseViaDialogOrKeybindRef:u,setModalData:m,navigate:N}=k(),{client:R,rpcConfig:D,chains:B,closePrivyModal:$,walletProxy:L,showFiatPrices:U}=v(),{user:W}=j(),H=T(),[V,G]=a(0),[Q,K]=a(0),[Y,Z]=a(ft(l,V)),[tt,et]=a(null),[nt,at]=a(),[st,it]=a(!1),[ot,rt]=a(null),[lt,ut]=a(null),[mt,bt]=a(null),[Tt,ht]=a(void 0),[gt,It]=a(void 0),[vt,kt]=a(!1),[jt,Et]=a(!1),[Ct,Mt]=a([]),[_t,wt]=a([]),[Ft,xt]=a("uninitiated"),[Nt,St]=a(void 0);if(!Y||!l?.sendTransaction||!l?.sendTransaction)/*#__PURE__*/return e(O,{error:Error("Invalid transaction request"),allowlistConfig:H.allowlistConfig,onRetry:()=>{l?.sendTransaction?.onFailure(yt),$({shouldCallAuthOnSuccess:!1})}});let{transactingWalletAddress:At}=l.sendTransaction,Ot=s((()=>B.find((t=>Number(t.id)===Number(Y.chainId)))),[Y.chainId]),Rt=Ot?.nativeCurrency.symbol??"ETH",Dt=s((()=>pt(Y.data,!!H.embeddedWallets.extendedCalldataDecoding)),[Y.data]),{action:Bt,isErc20Ish:$t,isNFTIsh:Pt,functionName:qt}=Dt,{toAddress:Lt,tokenAddress:Ut}=s((()=>({toAddress:Dt.isErc20Ish?Dt.transferTo:Y.to??void 0,tokenAddress:Dt.isErc20Ish?Y.to:void 0})),[Dt]);o((()=>{Y.to&&Ot&&$t&&M({address:Y.to,chain:Ot,rpcConfig:H.rpcConfig,privyAppId:H.id}).then(et).catch(console.error)}),[Y.to,Ot]);let{tokenPrice:Wt,isTokenPriceLoading:Ht}=E(Y.chainId),{balance:Vt}=C({rpcConfig:H.rpcConfig,appId:H.id,address:At,chain:Ot}),Gt=function({rpcConfig:t,appId:e,address:n,chain:l,tokenInfo:u}){let{chains:m}=v(),[c,f]=a(null),[b,T]=a(!1),h=s((()=>{let n=l||m[0];if(n)return r({chain:l,transport:p(d(n,t,e))})}),[l,t,e]),g=i((async()=>{if(n&&h&&u.address)try{return T(!0),await h.readContract({address:u.address,abi:z,functionName:"balanceOf",args:[n]})}catch(t){console.error(t)}finally{T(!1)}}),[h,n,u?.address,l]);return o((()=>{g().then((t=>null!=t&&f(t)))}),[g]),{balance:c,isLoading:b&&null==c,formattedBalance:y({amount:c??BigInt(0),decimals:u.decimals})}}({rpcConfig:H.rpcConfig,appId:H.id,address:At,tokenInfo:{address:Ut||"",decimals:tt?.decimals??18},chain:Ot}),zt=s((()=>A(Number(Y.chainId),B,D,{appId:H.id})),[Y.chainId,D]),Qt=dt(Y,At,zt,l?.sendTransaction?.prepareTransactionRequest);o((()=>{Z(ft(l,V))}),[V]),o((()=>{l.sendTransaction?.getIsSponsored?l.sendTransaction.getIsSponsored().then(at).catch(console.error):at(!1)}),[l.sendTransaction.getIsSponsored]);let Jt=()=>{if(!st)return ot?l?.sendTransaction?.onSuccess({hash:ot}):mt||Qt?.errors[0]?l?.sendTransaction?.onFailure(mt??Qt?.errors[0]??yt):l?.sendTransaction?.onFailure(new g(new I("The user rejected the request",f.E4001_USER_REJECTED_REQUEST.eipCode))),$({shouldCallAuthOnSuccess:!1})};u.current=Jt;let Kt=!!(l.funding&&l.funding.supportedOptions.length>0),Xt=w(BigInt(Qt?.totalGasEstimate??0n),Rt),Yt=U&&Wt?F(BigInt(Qt?.totalGasEstimate??0n),Wt):void 0,Zt=w(Vt??0n,Rt,void 0,!0),te=U&&Wt?F(Vt??0n,Wt):void 0,ee=tt&&!Gt.isLoading&&$t&&"approve"!==Bt?`${Gt.formattedBalance} ${tt.symbol}`:void 0,ne=l.sendTransaction?.uiOptions?.transactionInfo?.title;ne||(ne="approve"===Bt?$t?"Confirm address":"Confirm action":`Approve ${Bt}`);let ae=s((()=>{if(l.sendTransaction?.uiOptions?.description)return l.sendTransaction?.uiOptions?.description;if("approve"===Bt&&"setApprovalForAll"===qt&&Dt.approved){let a=/*#__PURE__*/e(b,{address:Dt.operator||"",url:Ot?.blockExplorers?.default?.url});/*#__PURE__*/return t(n,{children:[H.name," would like your permission for ",a," to transfer tokens on your behalf."]})}if("approve"===Bt&&"setApprovalForAll"===qt&&!Dt.approved){let a=/*#__PURE__*/e(b,{address:Dt.operator||"",url:Ot?.blockExplorers?.default?.url});/*#__PURE__*/return t(n,{children:[H.name," would like your permission to revoke permissions of ",a," from transferring tokens on your behalf."]})}return $t&&"approve"===Bt||$t&&"approve"===Bt?`${H.name} would like your permission for ${S(Dt.spender)} to spend tokens on your behalf.`:`${H.name} wants your permission to approve the following transaction.`}),[H.name,$t,Dt,l.sendTransaction?.uiOptions.description,qt]),se=l.sendTransaction?.uiOptions?.transactionInfo?.contractInfo?.imgUrl?/*#__PURE__*/e("img",{src:l.sendTransaction.uiOptions.transactionInfo.contractInfo.imgUrl,alt:l.sendTransaction.uiOptions.transactionInfo.contractInfo.imgAltText}):null,ie=!(!Qt||Qt.errors[0]||Qt.hasFunds||!1!==nt),oe=ie&&Kt,re=oe?"Add funds":l.sendTransaction?.uiOptions?.buttonText||(V<Q?"Continue":"Approve"),pe=t=>{if(!t)throw Error("Transaction scan failed");if("Success"===t.validation.status&&("Benign"===t.validation.result_type?It("safe"):"Warning"===t.validation.result_type?It("warn"):"Malicious"===t.validation.result_type&&(It("error"),Et(!0))),"Success"!==t.simulation.status)throw Error("Simulation failed");{ht(t.simulation.params);let{assetsIn:e,assetsOut:n}=ct(t.simulation.assets_diffs,t.simulation.exposures);if(0===n.length&&0===e.length)throw Error("No tokens found");Mt(n),wt(e)}};if(o((()=>{l.sendTransaction?.scanTransaction&&H.embeddedWallets.transactionScanning.enabled&&"uninitiated"===Ft&&(xt("in progress"),l.sendTransaction.scanTransaction().then((t=>{pe(t),xt("completed")})).catch((()=>xt("failed"))))}),[!!l.sendTransaction?.scanTransaction]),o((()=>{l.sendTransaction?.scanTransaction&&"failed"!==Ft||((t,e,n)=>{if(K((t=>t?.sendTransaction?"transactionRequest"in t.sendTransaction?0:t.sendTransaction.transactionRequests.length-1:0)(l)),e.isErc20Ish&&e.amount&&n){let t=_({amount:e.amount,decimals:n.decimals});St(t),Mt([{value:t,symbol:n?.symbol,decimals:n?.decimals}])}else if(t.value){let e=BigInt(t.value),n=Wt?F(e,Wt):void 0;Mt(U&&n?[{value:n}]:[{value:x(e),symbol:Rt,decimals:18,usdValue:n}])}else Mt(U?[{value:"$0"}]:[{value:"0",symbol:Rt,decimals:18}])})(Qt?.tx??Y,Dt,tt)}),[Y,Qt?.tx,Dt,tt,Ft]),lt/*#__PURE__*/)return e(X,{txn:Qt?.tx??Y,onClose:Jt,receipt:lt,transactionInfo:l.sendTransaction?.uiOptions.transactionInfo,tokenPrice:Wt,tokenSymbol:Rt,receiptHeader:l.sendTransaction?.uiOptions.successHeader,receiptDescription:l.sendTransaction?.uiOptions.successDescription});if(mt)/*#__PURE__*/return e(P,{transactionError:mt,transactionHash:ot??void 0,chainType:"ethereum",chainId:Qt?.tx.chainId??Y.chainId,onClose:Jt,onRetry:({resetNonce:t})=>{bt(null);let e={...Qt?.tx??Y};t&&(e.nonce=void 0),Z(e)}});let le=0!==Q&&"number"==typeof V&&0!==V?()=>{G(V-1)}:void 0;return vt&&Tt?/*#__PURE__*/e(J,{details:Tt,onBack:()=>kt(!1)}):/*#__PURE__*/e(q,{transactionIndex:V,onBack:le,maxIndex:Q,disabled:ie&&!Kt||jt,isSubmitting:st,submitError:mt,isPreparing:!Qt,isTokenPriceLoading:Ht,isTokenContractInfoLoading:!Pt&&!tt,prepareError:Qt?.errors[0],symbol:tt?.symbol,chain:Ot,img:se,title:ne,subtitle:ae,txValue:Y.value,fee:Yt??Xt,isSponsored:nt,from:At??"",to:Lt,tokenAddress:Ut??void 0,network:H.chains.find((t=>t.id===Y.chainId))?.name??"",transactionDetails:{...Dt,formattedAmount:Nt},cta:re,missingFunds:ie,action:Bt,balance:ee??te??Zt,onClose:Jt,onClick:oe?async()=>{if(!At)return;if(!Kt)throw Error("Funding wallet is not enabled");let t="FundingMethodSelectionScreen";m({...l,funding:{...l.funding,methodScreen:t,chainType:"ethereum",amount:c(BigInt(Qt?.tx.value??0)+BigInt(Qt?.totalGasEstimate?.toString()??0)),chain:Ot},solanaFundingData:l?.solanaFundingData}),N(t)}:async()=>{if(V<Q)G(V+1);else{it(!0);try{let t=await R.getAccessToken();if(st||!t||!L||!W)return;let e=await l.sendTransaction.onConfirm({transactionRequest:Qt?.tx??Y});if(rt(e),l.sendTransaction?.signOnly)return await new Promise((t=>setTimeout(t,h))),l?.sendTransaction?.onSuccess({hash:e}),$({shouldCallAuthOnSuccess:!1});let n=await zt.waitForTransactionReceipt({hash:e});if("reverted"===n.status)throw Error("Transaction failed");ut(n)}catch(t){console.warn({transaction:Qt?.tx??Y,error:t}),bt(t)}finally{it(!1)}}},validation:gt,hasScanDetails:!!Tt,setIsScanDetailsOpen:kt,preventMaliciousTransaction:jt,setPreventMaliciousTransaction:Et,tokensSent:Ct,tokensReceived:_t,isScanning:"in progress"===Ft,isCancellable:l.sendTransaction?.uiOptions?.isCancellable??!1,functionName:qt})}};export{bt as SendTransactionScreen,bt as default};