@privy-io/react-auth 3.14.0 → 3.14.1

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 (239) hide show
  1. package/dist/cjs/{AccountNotFoundScreen-B2BwM9IL.js → AccountNotFoundScreen-C25iBRLm.js} +1 -1
  2. package/dist/cjs/{Address-CMUXgM3h.js → Address-CHKhHgKJ.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-B7nTfKFs.js → AffirmativeConsentScreen-DT0ojGpw.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-C0ubkz2f.js → AllowlistRejectionScreen-D0I4vTcK.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-DHRXcjT5.js → AuthenticateWithWalletScreen-dcVrFqXU.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-D6MB0SW8.js → AwaitingEvmToSolBridgingScreen-20Lokl_2.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-BcnofXQv.js → AwaitingExternalEthereumTransferScreen-B2BOyvEP.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-CMMIM_Pj.js → AwaitingPasswordlessCodeScreen-CjeHuBk7.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-C2Op_A4L.js → AwaitingSolToEvmBridgingScreen-NSyS8djM.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-BU5hxQ4Z.js → BridgeNetworkSelectionView-Cy4dUUah.js} +1 -1
  11. package/dist/cjs/{CaptchaScreen-TVUbEsJK.js → CaptchaScreen-CchfnELg.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-_mCdKOIM.js → CoinbaseOnrampStatusScreen-RmmivwEu.js} +1 -1
  13. package/dist/cjs/{ConnectEmailForm-BgS2Yn3u.js → ConnectEmailForm-BibKRhlR.js} +1 -1
  14. package/dist/cjs/{ConnectLedgerScreen-DjDvgzxV.js → ConnectLedgerScreen-CB1oTLjq.js} +1 -1
  15. package/dist/cjs/{ConnectOnlyLandingScreen-CbUMwYrO.js → ConnectOnlyLandingScreen-BI0zDj3o.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyStatusScreen-DyoV_8V9.js → ConnectOnlyStatusScreen-BAUS-OpP.js} +1 -1
  17. package/dist/cjs/{ConnectOrCreateScreen-DpR4OmSO.js → ConnectOrCreateScreen-CdoSL34u.js} +1 -1
  18. package/dist/cjs/{ConnectPhoneForm-CdRNa4Lg.js → ConnectPhoneForm-BPgbe0j3.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-Bb4271wb.js → ConnectWalletView-BB2DjcE-.js} +1 -1
  20. package/dist/cjs/{ConnectionStatusScreen-B8TxWdVC.js → ConnectionStatusScreen-D2pFs10v.js} +1 -1
  21. package/dist/cjs/{CrossAppAuthScreen-By4i5UqT.js → CrossAppAuthScreen-Dzqgp4fv.js} +1 -1
  22. package/dist/cjs/{CustomLandingScreenView-C0Vky31_.js → CustomLandingScreenView-Pamy7vPb.js} +1 -1
  23. package/dist/cjs/{DelegatedActionsConsentScreen-CjUYU339.js → DelegatedActionsConsentScreen-B1RznIyD.js} +1 -1
  24. package/dist/cjs/{DelegatedActionsRevokeScreen-BGATOJGL.js → DelegatedActionsRevokeScreen-BfYkymoM.js} +1 -1
  25. package/dist/cjs/{EmbeddedWalletConnectingScreen-GZ8nOvWq.js → EmbeddedWalletConnectingScreen-DaOL3Ico.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletCreatedScreen-Be8AYwZh.js → EmbeddedWalletCreatedScreen-B5K1ek4V.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-DXa54jFw.js → EmbeddedWalletKeyExportScreen-BJTyn-Lk.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-C8-LkEhs.js → EmbeddedWalletOnAccountCreateScreen-BbZKkeLp.js} +1 -1
  29. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-B7N8Noqf.js → EmbeddedWalletPasswordUpdateScreen-DMx4Tn8E.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-kiTrvJ2h.js → EmbeddedWalletPasswordUpdateSplashScreen-wUfHEYpF.js} +1 -1
  31. package/dist/cjs/{EnrollTotp-Bxzun51r.js → EnrollTotp-B1qE1mCx.js} +1 -1
  32. package/dist/cjs/{ErrorScreen-BsvL8i4R.js → ErrorScreen-BPXQabSS.js} +1 -1
  33. package/dist/cjs/{FarcasterConnectStatusScreen-DMnzjTAV.js → FarcasterConnectStatusScreen-C_NK2UCS.js} +1 -1
  34. package/dist/cjs/{FarcasterSignerStatusScreen-Xb4KBH8f.js → FarcasterSignerStatusScreen-D3DUvPPw.js} +1 -1
  35. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-BT4nT21N.js → FundSolWalletWithExternalSolanaWallet-BoOhBVX9.js} +1 -1
  36. package/dist/cjs/{FundWalletMethodHeader-D_l3529h.js → FundWalletMethodHeader-BUHyY_8M.js} +1 -1
  37. package/dist/cjs/FundWithBankDepositScreen-D_qA2wCk.js +176 -0
  38. package/dist/cjs/{FundingEditAmountScreen-CBp--May.js → FundingEditAmountScreen-DLWLIjEZ.js} +1 -1
  39. package/dist/cjs/FundingMethodSelectionScreen-BRz8TLz5.js +1 -0
  40. package/dist/cjs/{InAppBrowserLoginNotPossible-fTc3VwS8.js → InAppBrowserLoginNotPossible-iLA0OVLk.js} +1 -1
  41. package/dist/cjs/{InstallWalletScreen-Bm_jzHEL.js → InstallWalletScreen-BS2Bwxvi.js} +1 -1
  42. package/dist/cjs/{LandingScreen-D6094d73.js → LandingScreen-C4KpTL08.js} +1 -1
  43. package/dist/cjs/{LinkConflictScreen-Bic4pZUv.js → LinkConflictScreen-CNQSun1F.js} +1 -1
  44. package/dist/cjs/{LinkEmailScreen-BuuqcFAa.js → LinkEmailScreen-oNzcpVes.js} +1 -1
  45. package/dist/cjs/{LinkPasskeyScreen-CbuNym_z.js → LinkPasskeyScreen-CjdxFDoA.js} +1 -1
  46. package/dist/cjs/{LinkPhoneScreen-ZIe5uzPN.js → LinkPhoneScreen-B6OzKZnd.js} +1 -1
  47. package/dist/cjs/{LoginFailedScreen-JnBtBxi1.js → LoginFailedScreen-Cj3ATfwH.js} +1 -1
  48. package/dist/cjs/{ManualTransferScreen-B4TkbelL.js → ManualTransferScreen-M26HCQmU.js} +1 -1
  49. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-CmLIp9Ll.js → MfaAuthEnrollmentFlowScreen-D1zKxqD8.js} +1 -1
  50. package/dist/cjs/{MfaAuthVerifyFlowScreen-B3ATEO7f.js → MfaAuthVerifyFlowScreen-D3eQj9zt.js} +1 -1
  51. package/dist/cjs/{MfaEnrollmentFlowScreen-COciRqP3.js → MfaEnrollmentFlowScreen-B2gvvMfX.js} +1 -1
  52. package/dist/cjs/{MfaVerifyFlowScreen-BuljrcdS.js → MfaVerifyFlowScreen-AyHxACnF.js} +1 -1
  53. package/dist/cjs/{ModalHeader-C45fdSY0.js → ModalHeader-BCPQgekO.js} +1 -1
  54. package/dist/cjs/{MoonpayStatusScreen-zWJq589Z.js → MoonpayStatusScreen-BQaJBdWu.js} +1 -1
  55. package/dist/cjs/{OAuthStatusScreen-ecJqpiHx.js → OAuthStatusScreen-JHIOff6A.js} +1 -1
  56. package/dist/cjs/{PasskeySelectSignupOrLogin-B-0EIFsW.js → PasskeySelectSignupOrLogin-B9J49RMF.js} +1 -1
  57. package/dist/cjs/{PasskeyStatusScreen-DzuiIFq2.js → PasskeyStatusScreen-ms-tH4cc.js} +1 -1
  58. package/dist/cjs/{PasswordRecoveryScreen-DQEy0Nqy.js → PasswordRecoveryScreen-CDHZosNL.js} +1 -1
  59. package/dist/cjs/{QrCode-BKnLFoFt.js → QrCode-CE12LRBB.js} +1 -1
  60. package/dist/cjs/{RecoveryOAuthStatusScreen-06xKXwi8.js → RecoveryOAuthStatusScreen-BUxNTtqd.js} +1 -1
  61. package/dist/cjs/{RecoveryPasswordCreateScreen-yfl_af11.js → RecoveryPasswordCreateScreen-BkFOrb6m.js} +1 -1
  62. package/dist/cjs/{RecoverySelectionScreen-BdHkBTuB.js → RecoverySelectionScreen-HBLOm2va.js} +1 -1
  63. package/dist/cjs/{Screen-ChnafgL7.js → Screen-BfKedqka.js} +1 -1
  64. package/dist/cjs/{ScreenLayout-CpclvUVQ.js → ScreenLayout-CMb-Fua0.js} +1 -1
  65. package/dist/cjs/{SetAutomaticRecoveryScreen-JwwwXok0.js → SetAutomaticRecoveryScreen-DPjXBMos.js} +1 -1
  66. package/dist/cjs/{SetWalletPasswordForm-ByGHfNqH.js → SetWalletPasswordForm-BslxSGLC.js} +1 -1
  67. package/dist/cjs/{SignRequestScreen-Bcr25XmN.js → SignRequestScreen-Cjn1PsqC.js} +1 -1
  68. package/dist/cjs/{StandardSignAndSendTransactionScreen-D-63yMIJ.js → StandardSignAndSendTransactionScreen-BIh1TSV6.js} +1 -1
  69. package/dist/cjs/{TelegramAuthScreen-DxZS64fR.js → TelegramAuthScreen-BZpPqkC8.js} +1 -1
  70. package/dist/cjs/{TransactionDetails-DBFsWnn1.js → TransactionDetails-BY2Ynu2J.js} +1 -1
  71. package/dist/cjs/{TransactionErrorView-nUOKizXV.js → TransactionErrorView-CueeggTz.js} +1 -1
  72. package/dist/cjs/{TransferFromWalletScreen-CYPZmSPV.js → TransferFromWalletScreen-BfWPkgYH.js} +1 -1
  73. package/dist/cjs/{TransferOrBridgeLoadingScreen-DiPwnn60.js → TransferOrBridgeLoadingScreen-CI2oh7CB.js} +1 -1
  74. package/dist/cjs/{UpdateEmailScreen-Bwxxqz1k.js → UpdateEmailScreen-BHgHi-KQ.js} +1 -1
  75. package/dist/cjs/{UpdatePhoneScreen-DU7RGenX.js → UpdatePhoneScreen-J83rbDYY.js} +1 -1
  76. package/dist/cjs/{UserLimitReachedScreen-fuIfecOX.js → UserLimitReachedScreen-CYNd-wAp.js} +1 -1
  77. package/dist/cjs/{WalletInfoCard-DmD26XB9.js → WalletInfoCard-CHdyZdLe.js} +1 -1
  78. package/dist/cjs/{WalletInterstitialScreen-Bn8l3kCq.js → WalletInterstitialScreen-CmqF-Oas.js} +1 -1
  79. package/dist/cjs/{WalletLink-D7Q4z7WW.js → WalletLink-Bs_1C81F.js} +1 -1
  80. package/dist/cjs/{WalletOverflowButton-fU7XMRV1.js → WalletOverflowButton-BqeWaSEy.js} +1 -1
  81. package/dist/cjs/abstract-smart-wallets.js +1 -1
  82. package/dist/cjs/{context-DK3qW12H.js → context-D-ZJYjUg.js} +1 -1
  83. package/dist/cjs/{ethers-DpiO5t5F.js → ethers-SCb3aakT.js} +1 -1
  84. package/dist/cjs/extended-chains.js +1 -1
  85. package/dist/cjs/{get-is-unified-wallet-CMHZpDfE.js → get-is-unified-wallet-UpdjHxOV.js} +1 -1
  86. package/dist/cjs/{index-DhmrMcn2.js → index-BcyDbfqY.js} +1 -1
  87. package/dist/cjs/{index-CgsQCH2r.js → index-C8lpxYDX.js} +3 -3
  88. package/dist/cjs/{index-VgEQ4kaA.js → index-gohEbwKU.js} +1 -1
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/internal.js +1 -1
  91. package/dist/cjs/{shared-BTeM_5HJ.js → shared-e1wjsjhc.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-eB6IctoD.js → shouldProceedtoEmbeddedWalletCreationFlow-DADJI9f0.js} +1 -1
  93. package/dist/cjs/{smart-wallets-DPXIV14D.js → smart-wallets-D-oPjsFS.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-BfCR4pAO.js → styles-DUvzIwf1.js} +1 -1
  97. package/dist/cjs/{to-ui-error-CQ9FNFg-.js → to-ui-error-BJRhg6yc.js} +1 -1
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/use-export-wallet-B5ujV5Nk.js +1 -0
  100. package/dist/cjs/{use-export-wallet-Ddpx0kgg.js → use-export-wallet-Dt1qheK5.js} +1 -1
  101. package/dist/cjs/{useActiveWallet-BgdIZtS6.js → useActiveWallet-Cn6zOXx5.js} +1 -1
  102. package/dist/cjs/{useGetTokenPrice-CouzWOSt.js → useGetTokenPrice-761HAiva.js} +1 -1
  103. package/dist/cjs/{useI18n-DDbtkfuB.js → useI18n-DFGBJl_S.js} +1 -1
  104. package/dist/cjs/{usePrivy-DUT7RIf5.js → usePrivy-cfS6o4tX.js} +1 -1
  105. package/dist/cjs/{useSolanaRpcClient-CefJOh8Z.js → useSolanaRpcClient-PnNtmWdo.js} +1 -1
  106. package/dist/cjs/{useWallets-XTVLGZyz.js → useWallets-CKAypPZB.js} +1 -1
  107. package/dist/cjs/{useWallets-DXWvKTyb.js → useWallets-DeTGSqF_.js} +1 -1
  108. package/dist/dts/{events-context-Fks6josE.d.ts → events-context-Bz1yk0zU.d.mts} +1 -1
  109. package/dist/dts/{events-context-Fks6josE.d.mts → events-context-Bz1yk0zU.d.ts} +1 -1
  110. package/dist/dts/extended-chains.d.mts +1 -1
  111. package/dist/dts/extended-chains.d.ts +1 -1
  112. package/dist/dts/farcaster.d.mts +1 -1
  113. package/dist/dts/farcaster.d.ts +1 -1
  114. package/dist/dts/index.d.mts +4 -4
  115. package/dist/dts/index.d.ts +4 -4
  116. package/dist/dts/internal.d.mts +1 -1
  117. package/dist/dts/internal.d.ts +1 -1
  118. package/dist/dts/smart-wallets.d.mts +1 -1
  119. package/dist/dts/smart-wallets.d.ts +1 -1
  120. package/dist/dts/solana.d.mts +3 -3
  121. package/dist/dts/solana.d.ts +3 -3
  122. package/dist/dts/{types-CjDYScKX.d.mts → types-CIvz-X6P.d.mts} +21 -5
  123. package/dist/dts/{types-CjDYScKX.d.ts → types-CIvz-X6P.d.ts} +21 -5
  124. package/dist/dts/ui.d.mts +1 -1
  125. package/dist/dts/ui.d.ts +1 -1
  126. package/dist/esm/{AccountNotFoundScreen-DzQ8Ded6.mjs → AccountNotFoundScreen-C055cesr.mjs} +1 -1
  127. package/dist/esm/{Address-ClnXOtX_.mjs → Address-BjZb-TIL.mjs} +1 -1
  128. package/dist/esm/{AffirmativeConsentScreen-CGLpvQm4.mjs → AffirmativeConsentScreen-DXy2kEcy.mjs} +1 -1
  129. package/dist/esm/{AllowlistRejectionScreen-0T0W1npW.mjs → AllowlistRejectionScreen-BIzWPeoe.mjs} +1 -1
  130. package/dist/esm/{AuthenticateWithWalletScreen-aIIbB44q.mjs → AuthenticateWithWalletScreen-q3jQKiH6.mjs} +1 -1
  131. package/dist/esm/{AwaitingEvmToSolBridgingScreen-Bcx6oRJE.mjs → AwaitingEvmToSolBridgingScreen-B4R4PEVm.mjs} +1 -1
  132. package/dist/esm/{AwaitingExternalEthereumTransferScreen-BlmM5W1W.mjs → AwaitingExternalEthereumTransferScreen-Dwy69FD1.mjs} +1 -1
  133. package/dist/esm/{AwaitingPasswordlessCodeScreen-DxV44L8v.mjs → AwaitingPasswordlessCodeScreen-Ch_YXDTX.mjs} +1 -1
  134. package/dist/esm/{AwaitingSolToEvmBridgingScreen-C_VwI_Sw.mjs → AwaitingSolToEvmBridgingScreen-spElnpUE.mjs} +1 -1
  135. package/dist/esm/{BridgeNetworkSelectionView-F7koQMl8.mjs → BridgeNetworkSelectionView-CaDh-Zck.mjs} +1 -1
  136. package/dist/esm/{CaptchaScreen-BeoBh2yB.mjs → CaptchaScreen-BZy78GrD.mjs} +1 -1
  137. package/dist/esm/{CoinbaseOnrampStatusScreen-h359lw0u.mjs → CoinbaseOnrampStatusScreen-CTWZaE1o.mjs} +1 -1
  138. package/dist/esm/{ConnectEmailForm-D96RP15S.mjs → ConnectEmailForm-0GOHNayM.mjs} +1 -1
  139. package/dist/esm/{ConnectLedgerScreen-DlzVqbV7.mjs → ConnectLedgerScreen-CIPOaq8e.mjs} +1 -1
  140. package/dist/esm/{ConnectOnlyLandingScreen-wbu-70B6.mjs → ConnectOnlyLandingScreen-CbLV-cj4.mjs} +1 -1
  141. package/dist/esm/{ConnectOnlyStatusScreen-CbWmfcm8.mjs → ConnectOnlyStatusScreen-bmx1wwk1.mjs} +1 -1
  142. package/dist/esm/{ConnectOrCreateScreen-CSKKpNhC.mjs → ConnectOrCreateScreen-DXw5Y8gN.mjs} +1 -1
  143. package/dist/esm/{ConnectPhoneForm-Cfdo1Hxx.mjs → ConnectPhoneForm-_lOAQG_X.mjs} +1 -1
  144. package/dist/esm/{ConnectWalletView-D9FJQoQd.mjs → ConnectWalletView-CDqboUej.mjs} +1 -1
  145. package/dist/esm/{ConnectionStatusScreen-BCZOSVuo.mjs → ConnectionStatusScreen-D-9fLZfA.mjs} +1 -1
  146. package/dist/esm/{CrossAppAuthScreen-C9Y8UmMT.mjs → CrossAppAuthScreen-Co723kT3.mjs} +1 -1
  147. package/dist/esm/{CustomLandingScreenView-C9zIdEBy.mjs → CustomLandingScreenView-9mrgsDhT.mjs} +1 -1
  148. package/dist/esm/{DelegatedActionsConsentScreen-CRlv1sFS.mjs → DelegatedActionsConsentScreen-CyQTJHgT.mjs} +1 -1
  149. package/dist/esm/{DelegatedActionsRevokeScreen-CfOOZLtD.mjs → DelegatedActionsRevokeScreen-CFm4F3CM.mjs} +1 -1
  150. package/dist/esm/{EmbeddedWalletConnectingScreen-DuSxBQbx.mjs → EmbeddedWalletConnectingScreen-DmTtzGwq.mjs} +1 -1
  151. package/dist/esm/{EmbeddedWalletCreatedScreen--ZpH1G0k.mjs → EmbeddedWalletCreatedScreen-Cj1c5KyP.mjs} +1 -1
  152. package/dist/esm/{EmbeddedWalletKeyExportScreen-CSJq1Sik.mjs → EmbeddedWalletKeyExportScreen-CsWRTEgd.mjs} +1 -1
  153. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-DOSya90v.mjs → EmbeddedWalletOnAccountCreateScreen-DBAmWm90.mjs} +1 -1
  154. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-C_es2EpS.mjs → EmbeddedWalletPasswordUpdateScreen-B5w6wtgf.mjs} +1 -1
  155. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-DhwnqiCK.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BvsscceO.mjs} +1 -1
  156. package/dist/esm/{EnrollTotp-YxZ_oitd.mjs → EnrollTotp-uSQt9d2Q.mjs} +1 -1
  157. package/dist/esm/{ErrorScreen-DZ153hPv.mjs → ErrorScreen-DtGc3Chy.mjs} +1 -1
  158. package/dist/esm/{FarcasterConnectStatusScreen-CwQhh_aC.mjs → FarcasterConnectStatusScreen-DGeCyr6b.mjs} +1 -1
  159. package/dist/esm/{FarcasterSignerStatusScreen-D1SKEl4x.mjs → FarcasterSignerStatusScreen-DASa1xq2.mjs} +1 -1
  160. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-CH85fmbL.mjs → FundSolWalletWithExternalSolanaWallet-0jNi_hvn.mjs} +1 -1
  161. package/dist/esm/{FundWalletMethodHeader-D0DhWPu0.mjs → FundWalletMethodHeader-Cfci4-83.mjs} +1 -1
  162. package/dist/esm/FundWithBankDepositScreen-D_uu3GEF.mjs +176 -0
  163. package/dist/esm/{FundingEditAmountScreen-C_YGQD1r.mjs → FundingEditAmountScreen-vQUS-a80.mjs} +1 -1
  164. package/dist/esm/FundingMethodSelectionScreen-G8gkM1Mk.mjs +1 -0
  165. package/dist/esm/{InAppBrowserLoginNotPossible-BiwxWFju.mjs → InAppBrowserLoginNotPossible-C8mlSbYe.mjs} +1 -1
  166. package/dist/esm/{InstallWalletScreen-DHPONpNA.mjs → InstallWalletScreen-D0kdHc5W.mjs} +1 -1
  167. package/dist/esm/{LandingScreen-DBZbonr_.mjs → LandingScreen-0MlIkV3C.mjs} +1 -1
  168. package/dist/esm/{LinkConflictScreen-D0TlabXV.mjs → LinkConflictScreen-DW31R5fr.mjs} +1 -1
  169. package/dist/esm/{LinkEmailScreen-D9zKrb4E.mjs → LinkEmailScreen-B10iXGH8.mjs} +1 -1
  170. package/dist/esm/{LinkPasskeyScreen-3_thbT6t.mjs → LinkPasskeyScreen-OxaghvUl.mjs} +1 -1
  171. package/dist/esm/{LinkPhoneScreen-BwBdaLqt.mjs → LinkPhoneScreen-Cdg3eg7w.mjs} +1 -1
  172. package/dist/esm/{LoginFailedScreen-Dxi-7tx8.mjs → LoginFailedScreen-BVOo2ycm.mjs} +1 -1
  173. package/dist/esm/{ManualTransferScreen-e347H8JC.mjs → ManualTransferScreen-_04Sq7zU.mjs} +1 -1
  174. package/dist/esm/{MfaAuthEnrollmentFlowScreen-BUF154dJ.mjs → MfaAuthEnrollmentFlowScreen-DApO6DPY.mjs} +1 -1
  175. package/dist/esm/{MfaAuthVerifyFlowScreen-BJ4ZNRWe.mjs → MfaAuthVerifyFlowScreen-mdmdgWdO.mjs} +1 -1
  176. package/dist/esm/{MfaEnrollmentFlowScreen-B5DfdOkM.mjs → MfaEnrollmentFlowScreen-DRZTnt-I.mjs} +1 -1
  177. package/dist/esm/{MfaVerifyFlowScreen-fjVmi3M8.mjs → MfaVerifyFlowScreen-mrf95cEs.mjs} +1 -1
  178. package/dist/esm/{ModalHeader-DBfMXKy4.mjs → ModalHeader-D8-mhjp4.mjs} +1 -1
  179. package/dist/esm/{MoonpayStatusScreen-BeZtoeAo.mjs → MoonpayStatusScreen-DDSK5dda.mjs} +1 -1
  180. package/dist/esm/{OAuthStatusScreen-BVLexXQC.mjs → OAuthStatusScreen-DSAUQ_YN.mjs} +1 -1
  181. package/dist/esm/{PasskeySelectSignupOrLogin-CejGrqSb.mjs → PasskeySelectSignupOrLogin-G19VpAdI.mjs} +1 -1
  182. package/dist/esm/{PasskeyStatusScreen-BrDLZfaA.mjs → PasskeyStatusScreen-TD2nYAnk.mjs} +1 -1
  183. package/dist/esm/{PasswordRecoveryScreen-Bks4ITku.mjs → PasswordRecoveryScreen-C0oVVZYe.mjs} +1 -1
  184. package/dist/esm/{QrCode-CKNL79V_.mjs → QrCode-C1tgJtOy.mjs} +1 -1
  185. package/dist/esm/{RecoveryOAuthStatusScreen-TsrFc2KU.mjs → RecoveryOAuthStatusScreen-Ca9VYOrA.mjs} +1 -1
  186. package/dist/esm/{RecoveryPasswordCreateScreen--aWRhenB.mjs → RecoveryPasswordCreateScreen-Q1zuy9fu.mjs} +1 -1
  187. package/dist/esm/{RecoverySelectionScreen-DJ33E1hd.mjs → RecoverySelectionScreen-scmqFA8Y.mjs} +1 -1
  188. package/dist/esm/{Screen-omroCwTV.mjs → Screen-Bp-TN9gb.mjs} +1 -1
  189. package/dist/esm/{ScreenLayout-z1I4hafk.mjs → ScreenLayout-DTmQLGPf.mjs} +1 -1
  190. package/dist/esm/{SetAutomaticRecoveryScreen-DelsQl1S.mjs → SetAutomaticRecoveryScreen-D-__1Pf7.mjs} +1 -1
  191. package/dist/esm/{SetWalletPasswordForm-DyVubYdV.mjs → SetWalletPasswordForm-0nuoz3XZ.mjs} +1 -1
  192. package/dist/esm/{SignRequestScreen-C6XvfvXV.mjs → SignRequestScreen-D6HSUOxx.mjs} +1 -1
  193. package/dist/esm/{StandardSignAndSendTransactionScreen-FQcyAQoq.mjs → StandardSignAndSendTransactionScreen-YlstFfkB.mjs} +1 -1
  194. package/dist/esm/{TelegramAuthScreen-LB2IdLqW.mjs → TelegramAuthScreen-DHCcieoC.mjs} +1 -1
  195. package/dist/esm/{TransactionDetails-CLHEcWFe.mjs → TransactionDetails-BurRo8R0.mjs} +1 -1
  196. package/dist/esm/{TransactionErrorView-D7uZmR_V.mjs → TransactionErrorView-CPFrt0L4.mjs} +1 -1
  197. package/dist/esm/{TransferFromWalletScreen-BLLYNl1T.mjs → TransferFromWalletScreen-BG5Mj5tz.mjs} +1 -1
  198. package/dist/esm/{TransferOrBridgeLoadingScreen-DgS9Jr0v.mjs → TransferOrBridgeLoadingScreen-DcCdHB-g.mjs} +1 -1
  199. package/dist/esm/{UpdateEmailScreen-DGAco54E.mjs → UpdateEmailScreen-ndRi1gY6.mjs} +1 -1
  200. package/dist/esm/{UpdatePhoneScreen-CLCixHYj.mjs → UpdatePhoneScreen-DoH__glA.mjs} +1 -1
  201. package/dist/esm/{UserLimitReachedScreen-ClahBH0m.mjs → UserLimitReachedScreen-BLzaOW7F.mjs} +1 -1
  202. package/dist/esm/{WalletInfoCard-BURM3rIP.mjs → WalletInfoCard-DFt8ndGE.mjs} +1 -1
  203. package/dist/esm/{WalletInterstitialScreen-CBzg1He2.mjs → WalletInterstitialScreen-BQ-ku50j.mjs} +1 -1
  204. package/dist/esm/{WalletLink-BXlPbPVx.mjs → WalletLink--05Hzo2b.mjs} +1 -1
  205. package/dist/esm/{WalletOverflowButton-CWeBF-Wv.mjs → WalletOverflowButton-BlijhJnI.mjs} +1 -1
  206. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  207. package/dist/esm/{context-CCRnMB8L.mjs → context-WTldtXS8.mjs} +1 -1
  208. package/dist/esm/{ethers-B0Y3_-Pp.mjs → ethers-D1WT71Ay.mjs} +1 -1
  209. package/dist/esm/extended-chains.mjs +1 -1
  210. package/dist/esm/{get-is-unified-wallet-j2fzd2YE.mjs → get-is-unified-wallet-Boa8DYrQ.mjs} +1 -1
  211. package/dist/esm/{index-BgGYO9kN.mjs → index-BBRkihRn.mjs} +3 -3
  212. package/dist/esm/{index-CIjObncO.mjs → index-BH9-XZRZ.mjs} +1 -1
  213. package/dist/esm/{index-Dk-s5iXx.mjs → index-C9k7EfLZ.mjs} +1 -1
  214. package/dist/esm/index.mjs +1 -1
  215. package/dist/esm/internal.mjs +1 -1
  216. package/dist/esm/{shared-B_TYFBiH.mjs → shared-CwuyxHmv.mjs} +1 -1
  217. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-DjxNSuIS.mjs → shouldProceedtoEmbeddedWalletCreationFlow-BMF_3TVv.mjs} +1 -1
  218. package/dist/esm/{smart-wallets-DL1EjW8i.mjs → smart-wallets-DOAgnxKI.mjs} +1 -1
  219. package/dist/esm/smart-wallets.mjs +1 -1
  220. package/dist/esm/solana.mjs +1 -1
  221. package/dist/esm/{styles-BeQ5nIO3.mjs → styles-BmZHuqSX.mjs} +1 -1
  222. package/dist/esm/{to-ui-error-DR840l8Y.mjs → to-ui-error-REESv0kM.mjs} +1 -1
  223. package/dist/esm/ui.mjs +1 -1
  224. package/dist/esm/use-export-wallet-CV4p7L0b.mjs +1 -0
  225. package/dist/esm/{use-export-wallet-AwUSjJIc.mjs → use-export-wallet-DQde4t0V.mjs} +1 -1
  226. package/dist/esm/{useActiveWallet-Dqi9nNxj.mjs → useActiveWallet-3RHPIBxJ.mjs} +1 -1
  227. package/dist/esm/{useGetTokenPrice-Djb6UHOW.mjs → useGetTokenPrice-BPBpM07F.mjs} +1 -1
  228. package/dist/esm/{useI18n-BK0a87xw.mjs → useI18n-BuIe8nUA.mjs} +1 -1
  229. package/dist/esm/{usePrivy-D9f62ILp.mjs → usePrivy-6nkpbErN.mjs} +1 -1
  230. package/dist/esm/{useSolanaRpcClient-DizarIU5.mjs → useSolanaRpcClient-BUWOblv_.mjs} +1 -1
  231. package/dist/esm/{useWallets-BKPOCKnv.mjs → useWallets-CR0z5IIt.mjs} +1 -1
  232. package/dist/esm/{useWallets-DQOA0__U.mjs → useWallets-C_dCo2_Q.mjs} +1 -1
  233. package/package.json +6 -6
  234. package/dist/cjs/FundWithBankDepositScreen-C1BRYtc8.js +0 -175
  235. package/dist/cjs/FundingMethodSelectionScreen-CL9xLuBR.js +0 -1
  236. package/dist/cjs/use-export-wallet-BEW54Ynq.js +0 -1
  237. package/dist/esm/FundWithBankDepositScreen-BJk-wxSq.mjs +0 -175
  238. package/dist/esm/FundingMethodSelectionScreen-gGZKP4LD.mjs +0 -1
  239. package/dist/esm/use-export-wallet-Voe8hSb9.mjs +0 -1
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-BgGYO9kN.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{u as l,a as c}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{S as m}from"./ScreenLayout-z1I4hafk.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"./context-CCRnMB8L.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-Voe8hSb9.mjs";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D9f62ILp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-DBfMXKy4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:P,recoveryMethod:S,connectingWalletAddress:F,isUnifiedWallet:T=!1}=f?.connectWallet,W=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return W("User must be authenticated and have a Privy wallet before it can be connected");try{if(!T){if(!x||!P)return W("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:P})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===S){let e=await d.getAccessToken();if(!e)return W("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:F}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:P}));t?.entropyId||W(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:F}}),h(A)}catch(e){W("An error has occurred, please try again.")}}else a(e)&&"privy"!==S&&"privy-v2"!==S?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:P,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:S,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(S))):W(e)}})(),()=>clearTimeout(e)):void 0:W("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{W("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useMemo as r,useState as o,useEffect as i}from"react";import{e as a,c as n}from"./index-BBRkihRn.mjs";import{u as s}from"./internal-context-Z-fyxadS.mjs";import{u as l,a as c}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as m}from"./ScreenLayout-DTmQLGPf.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"./context-WTldtXS8.mjs";import"tinycolor2";import"styled-components";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-6nkpbErN.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-D8-mhjp4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const p=({connectionFailed:r,onClose:o})=>/*#__PURE__*/e(m,r?{title:"Something went wrong",subtitle:"We're on it. Please try again later.",icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Connecting to your wallet",subtitle:"Please wait...",iconVariant:"loading",showClose:!0,onClose:o,watermark:!1}),d={component:()=>{let{authenticated:t,user:m}=l(),{client:d,closePrivyModal:u,createAnalyticsEvent:y,walletProxy:v}=s(),{navigate:h,data:f,setModalData:w,onUserCloseViaDialogOrKeybindRef:b}=c(),j=r((()=>Date.now()),[]),[g,C]=o(!1),{onCompleteNavigateTo:A,onFailure:I,shouldForceMFA:k,entropyId:x,entropyIdVerifier:P,recoveryMethod:S,connectingWalletAddress:F,isUnifiedWallet:T=!1}=f?.connectWallet,W=e=>{g||(C(!0),I("string"==typeof e?Error(e):e))};return i((()=>{let e;return t?v?((async()=>{let t=await d.getAccessToken();if(!t)return W("User must be authenticated and have a Privy wallet before it can be connected");try{if(!T){if(!x||!P)return W("For on-device first-class chain wallets, entropyId and entropyIdVerifier are required");await v.connect({accessToken:t,entropyId:x,entropyIdVerifier:P})}k&&await v.verifyMfa({accessToken:t});let r=(Date.now()-j)/1e3;"EmbeddedWalletKeyExportScreen"===A&&r<1?e=setTimeout((()=>{h(A,!1)}),1e3*(1-r)):h(A,!1)}catch(e){if(a(e)&&"privy"===S){let e=await d.getAccessToken();if(!e)return W("User must be authenticated and have a Privy wallet before it can be recovered");try{y({eventName:"embedded_wallet_pinless_recovery_started",payload:{walletAddress:F}});let t=await(v?.recover({accessToken:e,entropyId:x,entropyIdVerifier:P}));t?.entropyId||W(Error("Unable to recover wallet")),A?h(A):u({shouldCallAuthOnSuccess:!1}),y({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:F}}),h(A)}catch(e){W("An error has occurred, please try again.")}}else a(e)&&"privy"!==S&&"privy-v2"!==S?(w({...f,recoverWallet:{entropyId:x,entropyIdVerifier:P,onCompleteNavigateTo:A,onFailure:I},recoveryOAuthStatus:{provider:S,action:"recover",isInAccountCreateFlow:!1,shouldCreateEth:!1,shouldCreateSol:!1}}),h(n(S))):W(e)}})(),()=>clearTimeout(e)):void 0:W("User must be authenticated and have a Privy wallet before it can be connected")}),[t,m,v]),b.current=()=>{W("User exited before wallet could be connected"),u({shouldCallAuthOnSuccess:!1})},/*#__PURE__*/e(p,{connectionFailed:g,onClose:()=>u({shouldCallAuthOnSuccess:!1})})}};export{d as EmbeddedWalletConnectingScreen,p as EmbeddedWalletConnectingView,d as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,c as s,d as c}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{u as a,r as m}from"./context-CCRnMB8L.mjs";import{u as n}from"./internal-context-Z-fyxadS.mjs";import{S as l}from"./ScreenLayout-z1I4hafk.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-DBfMXKy4.mjs";import"styled-components";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Voe8hSb9.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=n(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:y,callAuthOnSuccessOnClose:w}=j.createWallet,x=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):y(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:w})};return o((()=>{let e=setTimeout(x,m);return()=>clearTimeout(e)}),[]),f.current=x,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:x})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{CheckCircle as t}from"lucide-react";import{useEffect as o}from"react";import{u as r,a as i,c as s,d as c}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{u as a,r as m}from"./context-WTldtXS8.mjs";import{u as n}from"./internal-context-Z-fyxadS.mjs";import{S as l}from"./ScreenLayout-DTmQLGPf.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./ModalHeader-D8-mhjp4.mjs";import"styled-components";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const u=({title:o,description:r,onClose:i})=>/*#__PURE__*/e(l,{title:o,subtitle:r,icon:t,iconVariant:"success",watermark:!0,onBack:i}),p={component:()=>{let{user:t}=r(),{closePrivyModal:l,isNewUserThisSession:p,updateWallets:d}=n(),{data:j,onUserCloseViaDialogOrKeybindRef:f}=i(),h=a(),{onSuccess:v,onFailure:y,callAuthOnSuccessOnClose:w}=j.createWallet,x=()=>{let e=s(t)??c(t);t&&e?(d(),v({user:t,account:e})):y(Error("Failed to create wallet")),l({shouldCallAuthOnSuccess:w})};return o((()=>{let e=setTimeout(x,m);return()=>clearTimeout(e)}),[]),f.current=x,/*#__PURE__*/e(u,{title:p?"Welcome"+(h?.name?` to ${h?.name}`:""):"All set!",description:p?"You've successfully created an account.":"Your account is secured.",onClose:x})}};export{p as EmbeddedWalletCreatedScreen,u as EmbeddedWalletCreatedScreenView,p as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-BURM3rIP.mjs";import{u as s}from"./context-CCRnMB8L.mjs";import{u as p}from"./internal-context-Z-fyxadS.mjs";import{u as m,a as u}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{S as h}from"./ScreenLayout-z1I4hafk.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-DBfMXKy4.mjs";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Voe8hSb9.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-ClnXOtX_.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s,onBack:p})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/r(t,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,onBack:p,showBack:!!p,watermark:!0,children:/*#__PURE__*/r(g,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(f,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let g=a.div`
1
+ import{jsx as e,jsxs as r,Fragment as t}from"react/jsx-runtime";import{useState as o,useEffect as i,useRef as n}from"react";import{styled as a}from"styled-components";import{constructURL as l}from"@privy-io/urls";import{W as d}from"./WarningBanner-c8L53pJ2.mjs";import{W as c}from"./WalletInfoCard-DFt8ndGE.mjs";import{u as s}from"./context-WTldtXS8.mjs";import{u as p}from"./internal-context-Z-fyxadS.mjs";import{u as m,a as u}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as h}from"./ScreenLayout-DTmQLGPf.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"lucide-react";import"./ModalHeader-D8-mhjp4.mjs";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Address-BjZb-TIL.mjs";import"./shared-FM0rljBt.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const y=({address:o,accessToken:i,appConfigTheme:n,onClose:a,isLoading:l=!1,exportButtonProps:s,onBack:p})=>/*#__PURE__*/e(h,{title:"Export wallet",subtitle:/*#__PURE__*/r(t,{children:["Copy either your private key or seed phrase to export your wallet."," ",/*#__PURE__*/e("a",{href:"https://privy-io.notion.site/Transferring-your-account-9dab9e16c6034a7ab1ff7fa479b02828",target:"blank",rel:"noopener noreferrer",children:"Learn more"})]}),onClose:a,onBack:p,showBack:!!p,watermark:!0,children:/*#__PURE__*/r(g,{children:[/*#__PURE__*/e(d,{theme:n,children:"Never share your private key or seed phrase with anyone."}),/*#__PURE__*/e(c,{title:"Your wallet",address:o,showCopyButton:!0}),/*#__PURE__*/e("div",{style:{width:"100%"},children:l?/*#__PURE__*/e(f,{}):i&&s&&/*#__PURE__*/e(w,{accessToken:i,dimensions:{height:"44px"},...s})})]})});let g=a.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.25rem;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-CCRnMB8L.mjs";import{v as s,s as l,k as n,F as m,R as c}from"./index-BgGYO9kN.mjs";import{u as d,m as p}from"./internal-context-Z-fyxadS.mjs";import{a as u,u as h}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{S as y}from"./ScreenLayout-z1I4hafk.mjs";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-Voe8hSb9.mjs";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D9f62ILp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-DBfMXKy4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(y,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),v={component:()=>{let{setModalData:t,navigate:y,data:v,onUserCloseViaDialogOrKeybindRef:g}=u(),j=a(),[C,f]=r(""),{embeddedWallets:b}=a(),{authenticated:S,user:x}=h(),{closePrivyModal:W,walletProxy:O,client:A}=d(),{onSuccess:k,onFailure:P,callAuthOnSuccessOnClose:I,shouldCreateEth:M,shouldCreateSol:R}=v.createWallet,U="legacy-embedded-wallets-only"===j.embeddedWallets.mode&&!0===j?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[E,L]=r(null),{create:F}=s(),K=M??(!!x&&l(x,j.embeddedWallets.ethereum.createOnLogin)),T=R??(!!x&&n(x,j.embeddedWallets.solana.createOnLogin)),V=new c((async()=>{let e=await A.getAccessToken();if(x&&e&&O)try{let e,t=await i(x.id,"ethereum"),r=await i(x.id,"solana");if(K&&T)e=await F({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t}),e=await F({chainType:"solana",walletIndex:0,latestUser:e.user,idempotencyKey:r});else if(T)e=await F({chainType:"solana",walletIndex:0,latestUser:x,idempotencyKey:r});else{if(!K)return void W({shouldCallAuthOnSuccess:I});e=await F({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t})}L(e),y("EmbeddedWalletCreatedScreen")}catch(e){f(e.message)}}));return o((()=>S&&x?U?(t({...v,createWallet:{...v.createWallet,shouldCreateEth:K,shouldCreateSol:T},recoverySelection:{...v?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:K,shouldCreateSol:T}}),y(m({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:b.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void V.execute():(y("LandingScreen"),void P(Error("User must be authenticated before creating a Privy wallet")))),[U,S]),g.current=()=>null/*#__PURE__*/,e(w,{errorMessage:C||void 0,onClose:()=>{E?(k(E),W({shouldCallAuthOnSuccess:I})):(P(new p("User wallet creation failed")),W({shouldCallAuthOnSuccess:!1}))}})}};export{v as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,v as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{XCircle as t}from"lucide-react";import{useState as r,useEffect as o}from"react";import{generateWalletIdempotencyKey as i}from"@privy-io/js-sdk-core";import{u as a}from"./context-WTldtXS8.mjs";import{v as s,s as l,k as n,F as m,R as c}from"./index-BBRkihRn.mjs";import{u as d,m as p}from"./internal-context-Z-fyxadS.mjs";import{a as u,u as h}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as y}from"./ScreenLayout-DTmQLGPf.mjs";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-6nkpbErN.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-D8-mhjp4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const w=({errorMessage:r,onClose:o})=>/*#__PURE__*/e(y,r?{title:"Something went wrong",subtitle:r,icon:t,iconVariant:"error",primaryCta:{label:"Close",onClick:o},watermark:!0}:{title:"Creating your wallet",subtitle:"Please wait...",iconVariant:"loading",watermark:!1}),v={component:()=>{let{setModalData:t,navigate:y,data:v,onUserCloseViaDialogOrKeybindRef:g}=u(),j=a(),[C,f]=r(""),{embeddedWallets:b}=a(),{authenticated:S,user:x}=h(),{closePrivyModal:W,walletProxy:O,client:A}=d(),{onSuccess:k,onFailure:P,callAuthOnSuccessOnClose:I,shouldCreateEth:M,shouldCreateSol:R}=v.createWallet,U="legacy-embedded-wallets-only"===j.embeddedWallets.mode&&!0===j?.embeddedWallets.requireUserOwnedRecoveryOnCreate,[E,L]=r(null),{create:F}=s(),K=M??(!!x&&l(x,j.embeddedWallets.ethereum.createOnLogin)),T=R??(!!x&&n(x,j.embeddedWallets.solana.createOnLogin)),V=new c((async()=>{let e=await A.getAccessToken();if(x&&e&&O)try{let e,t=await i(x.id,"ethereum"),r=await i(x.id,"solana");if(K&&T)e=await F({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t}),e=await F({chainType:"solana",walletIndex:0,latestUser:e.user,idempotencyKey:r});else if(T)e=await F({chainType:"solana",walletIndex:0,latestUser:x,idempotencyKey:r});else{if(!K)return void W({shouldCallAuthOnSuccess:I});e=await F({chainType:"ethereum",walletIndex:0,latestUser:x,idempotencyKey:t})}L(e),y("EmbeddedWalletCreatedScreen")}catch(e){f(e.message)}}));return o((()=>S&&x?U?(t({...v,createWallet:{...v.createWallet,shouldCreateEth:K,shouldCreateSol:T},recoverySelection:{...v?.recoverySelection,isInAccountCreateFlow:!0,shouldCreateEth:K,shouldCreateSol:T}}),y(m({walletAction:"create",showAutomaticRecovery:!1,availableRecoveryMethods:b.userOwnedRecoveryOptions,legacySetWalletPasswordFlow:!1,isResettingPassword:!1}))):void V.execute():(y("LandingScreen"),void P(Error("User must be authenticated before creating a Privy wallet")))),[U,S]),g.current=()=>null/*#__PURE__*/,e(w,{errorMessage:C||void 0,onClose:()=>{E?(k(E),W({shouldCallAuthOnSuccess:I})):(P(new p("User wallet creation failed")),W({shouldCallAuthOnSuccess:!1}))}})}};export{v as EmbeddedWalletOnAccountCreateScreen,w as EmbeddedWalletOnAccountCreateView,v as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{u as i}from"./context-CCRnMB8L.mjs";import{u as n,o as d,m as c}from"./internal-context-Z-fyxadS.mjs";import{g as l}from"./useWallets-BKPOCKnv.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-DyVubYdV.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"styled-components";import"./ModalHeader-DBfMXKy4.mjs";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Voe8hSb9.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./shared-B_TYFBiH.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,_]=o(""),{authenticated:A,user:I}=t(),{client:M,walletProxy:j,refreshSessionAndUser:C,closePrivyModal:R,createAnalyticsEvent:b}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:N}=x.setWalletPassword,D=a(I),O="user-passcode"===u?.recoveryMethod,L="user-passcode"===D?.recoveryMethod;r((()=>{A||(P("LandingScreen"),N(new d("User must be authenticated before setting a password on a Privy wallet")))}),[A]);let T=()=>v?(N(v),void R({shouldCallAuthOnSuccess:!1})):O?(k(u),void R({shouldCallAuthOnSuccess:!1})):(N(new c("Exited before password was added to wallet")),void R({shouldCallAuthOnSuccess:!1}));S.current=T;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:T},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:L,onPasswordGenerate:()=>_(p()),onPasswordChange:_,onSubmit:async()=>{O?(k(u),R({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await M.getAccessToken();if(e&&I&&D?.address&&f&&j)try{b({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}});let{entropyId:o,entropyIdVerifier:r}=l(I);if(!(await j.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"error setting password"}});let t=await C(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"wallet disconnected"}});w(s),b({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),b({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:D.address,reason:e}})}})(),h(!1))},onClose:T})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as r}from"react";import{u as t,a as s,g as a}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{u as i}from"./context-WTldtXS8.mjs";import{u as n,o as d,m as c}from"./internal-context-Z-fyxadS.mjs";import{g as l}from"./useWallets-CR0z5IIt.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-0nuoz3XZ.mjs";import"@privy-io/are-addresses-equal";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"styled-components";import"./ModalHeader-D8-mhjp4.mjs";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./shared-CwuyxHmv.mjs";import"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"./Checkbox-BhNoOKjX.mjs";import"@heroicons/react/24/outline/KeyIcon";import"@heroicons/react/24/solid/CheckCircleIcon";import"fast-password-entropy";import"secure-password-utilities";import"secure-password-utilities/wordlists";import"@heroicons/react/24/outline/ArrowDownTrayIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/DocumentDuplicateIcon";import"@heroicons/react/24/solid/XCircleIcon";import"./ScreenHeader-CHmc4-Lu.mjs";const u={component:()=>{let[u,w]=o(null),[y,h]=o(!1),[v,g]=o(null),[f,_]=o(""),{authenticated:A,user:I}=t(),{client:M,walletProxy:j,refreshSessionAndUser:C,closePrivyModal:R,createAnalyticsEvent:b}=n(),{navigate:P,data:x,onUserCloseViaDialogOrKeybindRef:S}=s(),E=i(),{onSuccess:k,onFailure:N}=x.setWalletPassword,D=a(I),O="user-passcode"===u?.recoveryMethod,L="user-passcode"===D?.recoveryMethod;r((()=>{A||(P("LandingScreen"),N(new d("User must be authenticated before setting a password on a Privy wallet")))}),[A]);let T=()=>v?(N(v),void R({shouldCallAuthOnSuccess:!1})):O?(k(u),void R({shouldCallAuthOnSuccess:!1})):(N(new c("Exited before password was added to wallet")),void R({shouldCallAuthOnSuccess:!1}));S.current=T;/*#__PURE__*/return e(m,{appName:E?.name||"privy",config:{initiatedBy:"user",onCancel:T},error:v?"An error has occurred, please try again.":void 0,buttonLoading:y,buttonHideAnimations:!1,password:f,isResettingPassword:L,onPasswordGenerate:()=>_(p()),onPasswordChange:_,onSubmit:async()=>{O?(k(u),R({shouldCallAuthOnSuccess:!1})):(h(!0),g(null),await(async()=>{let e=await M.getAccessToken();if(e&&I&&D?.address&&f&&j)try{b({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}});let{entropyId:o,entropyIdVerifier:r}=l(I);if(!(await j.setRecovery({accessToken:e,entropyId:o,entropyIdVerifier:r,recoveryPassword:f,recoveryMethod:"user-passcode"})).entropyId)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"error setting password"}});let t=await C(),s=a(t);if(!s)return g(new c("Error setting password on privy wallet")),void b({eventName:"embedded_wallet_set_recovery_failed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L,reason:"wallet disconnected"}});w(s),b({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:D.address,existingRecoveryMethod:D.recoveryMethod,targetRecoveryMethod:"user-passcode",isResettingPassword:L}})}catch(e){console.warn(e),g(e instanceof Error?e:Error("Error setting password on privy wallet")),b({eventName:"embedded_wallet_set_password_failed",payload:{walletAddress:D.address,reason:e}})}})(),h(!1))},onClose:T})}};export{u as EmbeddedWalletPasswordUpdateScreen,u as default};
@@ -1 +1 @@
1
- import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-Z-fyxadS.mjs";import{a}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{S as m}from"./ScreenLayout-z1I4hafk.mjs";import"ofetch";import"react";import"@privy-io/are-addresses-equal";import"./context-CCRnMB8L.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-DBfMXKy4.mjs";import"styled-components";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Voe8hSb9.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";const c=({onClose:i,onProceed:s})=>/*#__PURE__*/e(m,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),n={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:m}=a(),{onFailure:n}=t.setWalletPassword,l=()=>{n(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return m.current=l,/*#__PURE__*/e(c,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{n as EmbeddedWalletPasswordUpdateSplashScreen,c as EmbeddedWalletPasswordUpdateSplashView,n as default};
1
+ import{jsx as e,jsxs as o,Fragment as t}from"react/jsx-runtime";import{Lock as r}from"lucide-react";import{u as i,m as s}from"./internal-context-Z-fyxadS.mjs";import{a}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as m}from"./ScreenLayout-DTmQLGPf.mjs";import"ofetch";import"react";import"@privy-io/are-addresses-equal";import"./context-WTldtXS8.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./ModalHeader-D8-mhjp4.mjs";import"styled-components";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const c=({onClose:i,onProceed:s})=>/*#__PURE__*/e(m,{title:"Secure Your Account",subtitle:/*#__PURE__*/o(t,{children:["Please set a password to secure your account.",/*#__PURE__*/e("br",{}),"Losing access to this password and this device will make your account inaccessible."]}),icon:r,primaryCta:{label:"Add password",onClick:s},onClose:i,watermark:!0}),n={component:()=>{let{closePrivyModal:o}=i(),{data:t,navigate:r,onUserCloseViaDialogOrKeybindRef:m}=a(),{onFailure:n}=t.setWalletPassword,l=()=>{n(new s("Exited before password was added to wallet")),o({shouldCallAuthOnSuccess:!1})};return m.current=l,/*#__PURE__*/e(c,{onClose:l,onProceed:()=>{r("EmbeddedWalletPasswordUpdateScreen")}})}};export{n as EmbeddedWalletPasswordUpdateSplashScreen,c as EmbeddedWalletPasswordUpdateSplashView,n as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-Dqi9nNxj.mjs";import{M as h,b as m,P as p}from"./ModalHeader-DBfMXKy4.mjs";import{C as u}from"./Chip-D2-wZOHJ.mjs";import{I as y,T as f,S as g,E as k,M as w,d as v,e as b,f as M,g as x,R as Z,a as j,A as L,F as E,L as I,b as S,c as P,C as T,N as A}from"./PinInput-3SLvbnQa.mjs";import R from"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import W from"@heroicons/react/24/outline/ClockIcon";import{useState as F,useMemo as B}from"react";import{u as U}from"./context-CCRnMB8L.mjs";import{u as z}from"./internal-context-Z-fyxadS.mjs";import{u as $}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{ErrorScreenView as N}from"./ErrorScreen-DZ153hPv.mjs";import{DoubleIconWrapper as O}from"./LinkPasskeyScreen-3_thbT6t.mjs";import{C as D}from"./CopyToClipboard-DSTf_eKU.mjs";import{C as V}from"./Layouts-BlFm53ED.mjs";import{C as _}from"./Column-C2X2MHYX.mjs";import{L as q}from"./LabelXs-oqZNqbm_.mjs";import{S as H}from"./Subtitle-CV-2yKE4.mjs";import{T as Q}from"./Title-BnzYV3Is.mjs";import{B as Y}from"./shared-FM0rljBt.mjs";import{f as X,g as G,h as J,i as K}from"./index-BgGYO9kN.mjs";import ee from"@heroicons/react/24/solid/ShieldCheckIcon";import{Q as re}from"./QrCode-CKNL79V_.mjs";const te=t=>/*#__PURE__*/e(oe,{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"88",height:"89",viewBox:"0 0 88 89",...t,children:[/*#__PURE__*/r("rect",{y:"0.666016",width:"88",height:"88",rx:"44"}),/*#__PURE__*/r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.2463 20.9106C44.5473 20.2486 43.4527 20.2486 42.7537 20.9106C37.8798 25.5263 31.3034 28.3546 24.0625 28.3546C23.9473 28.3546 23.8323 28.3539 23.7174 28.3525C22.9263 28.3427 22.2202 28.8471 21.9731 29.5987C20.9761 32.6311 20.4375 35.8693 20.4375 39.2297C20.4375 53.5896 30.259 65.651 43.5482 69.0714C43.8446 69.1477 44.1554 69.1477 44.4518 69.0714C57.741 65.651 67.5625 53.5896 67.5625 39.2297C67.5625 35.8693 67.0239 32.6311 66.0269 29.5987C65.7798 28.8471 65.0737 28.3427 64.2826 28.3525C64.1677 28.3539 64.0527 28.3546 63.9375 28.3546C56.6966 28.3546 50.1202 25.5263 45.2463 20.9106ZM52.7249 40.2829C53.3067 39.4683 53.1181 38.3363 52.3035 37.7545C51.4889 37.1726 50.3569 37.3613 49.7751 38.1759L41.9562 49.1223L38.0316 45.1977C37.3238 44.4899 36.1762 44.4899 35.4684 45.1977C34.7605 45.9056 34.7605 47.0532 35.4684 47.761L40.9059 53.1985C41.2826 53.5752 41.806 53.7671 42.337 53.7232C42.868 53.6792 43.3527 53.4039 43.6624 52.9704L52.7249 40.2829Z"})]});let oe=o.svg`
1
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{styled as o}from"styled-components";import i from"@heroicons/react/24/outline/ChevronRightIcon";import n from"@heroicons/react/24/outline/DevicePhoneMobileIcon";import s from"@heroicons/react/24/outline/FingerPrintIcon";import a from"@heroicons/react/24/outline/MinusCircleIcon";import l from"@heroicons/react/24/outline/PhoneIcon";import C from"@heroicons/react/24/outline/ShieldCheckIcon";import{U as c,L as d}from"./useActiveWallet-3RHPIBxJ.mjs";import{M as h,b as m,P as p}from"./ModalHeader-D8-mhjp4.mjs";import{C as u}from"./Chip-D2-wZOHJ.mjs";import{I as y,T as f,S as g,E as k,M as w,d as v,e as b,f as M,g as x,R as Z,a as j,A as L,F as E,L as I,b as S,c as P,C as T,N as A}from"./PinInput-3SLvbnQa.mjs";import R from"@heroicons/react/24/outline/ArrowRightEndOnRectangleIcon";import W from"@heroicons/react/24/outline/ClockIcon";import{useState as F,useMemo as B}from"react";import{u as U}from"./context-WTldtXS8.mjs";import{u as z}from"./internal-context-Z-fyxadS.mjs";import{u as $}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{ErrorScreenView as N}from"./ErrorScreen-DtGc3Chy.mjs";import{DoubleIconWrapper as O}from"./LinkPasskeyScreen-OxaghvUl.mjs";import{C as D}from"./CopyToClipboard-DSTf_eKU.mjs";import{C as V}from"./Layouts-BlFm53ED.mjs";import{C as _}from"./Column-C2X2MHYX.mjs";import{L as q}from"./LabelXs-oqZNqbm_.mjs";import{S as H}from"./Subtitle-CV-2yKE4.mjs";import{T as Q}from"./Title-BnzYV3Is.mjs";import{B as Y}from"./shared-FM0rljBt.mjs";import{f as X,g as G,h as J,i as K}from"./index-BBRkihRn.mjs";import ee from"@heroicons/react/24/solid/ShieldCheckIcon";import{Q as re}from"./QrCode-C1tgJtOy.mjs";const te=t=>/*#__PURE__*/e(oe,{xmlns:"http://www.w3.org/2000/svg",fill:"none",width:"88",height:"89",viewBox:"0 0 88 89",...t,children:[/*#__PURE__*/r("rect",{y:"0.666016",width:"88",height:"88",rx:"44"}),/*#__PURE__*/r("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M45.2463 20.9106C44.5473 20.2486 43.4527 20.2486 42.7537 20.9106C37.8798 25.5263 31.3034 28.3546 24.0625 28.3546C23.9473 28.3546 23.8323 28.3539 23.7174 28.3525C22.9263 28.3427 22.2202 28.8471 21.9731 29.5987C20.9761 32.6311 20.4375 35.8693 20.4375 39.2297C20.4375 53.5896 30.259 65.651 43.5482 69.0714C43.8446 69.1477 44.1554 69.1477 44.4518 69.0714C57.741 65.651 67.5625 53.5896 67.5625 39.2297C67.5625 35.8693 67.0239 32.6311 66.0269 29.5987C65.7798 28.8471 65.0737 28.3427 64.2826 28.3525C64.1677 28.3539 64.0527 28.3546 63.9375 28.3546C56.6966 28.3546 50.1202 25.5263 45.2463 20.9106ZM52.7249 40.2829C53.3067 39.4683 53.1181 38.3363 52.3035 37.7545C51.4889 37.1726 50.3569 37.3613 49.7751 38.1759L41.9562 49.1223L38.0316 45.1977C37.3238 44.4899 36.1762 44.4899 35.4684 45.1977C34.7605 45.9056 34.7605 47.0532 35.4684 47.761L40.9059 53.1985C41.2826 53.5752 41.806 53.7671 42.337 53.7232C42.868 53.6792 43.3527 53.4039 43.6624 52.9704L52.7249 40.2829Z"})]});let oe=o.svg`
2
2
  height: 90px;
3
3
  width: 90px;
4
4
 
@@ -1,4 +1,4 @@
1
- import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-CCRnMB8L.mjs";import{a as c,P as l}from"./index-BgGYO9kN.mjs";import{c as m,b as p,a as d,e as u}from"./internal-context-Z-fyxadS.mjs";import{a as T}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{R as g}from"./reservoir-0wfhnc0j.mjs";import{S as y}from"./ScreenLayout-z1I4hafk.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-Voe8hSb9.mjs";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D9f62ILp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-DBfMXKy4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";const h=({error:n,allowlistConfig:s,onRetry:c,onCaptchaReset:T,onBack:h})=>{let f=((n,s)=>{if(n instanceof g)return{title:"Transaction failed",detail:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:n.message}),/*#__PURE__*/e("span",{children:[" ","Check the"," ",/*#__PURE__*/t(w,{href:n.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(n instanceof d)switch(n.privyErrorCode){case p.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:n.message,ctaText:"Try again",icon:i};case p.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:n.message,ctaText:"Try again",icon:i};case p.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:n.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(n instanceof l&&"twilio_verification_failed"===n.type)return{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:a};if(!(n instanceof m))return n instanceof u&&n.status&&[400,422].includes(n.status)?{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(n.privyErrorCode){case p.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case p.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:n.message,ctaText:"Try another method",icon:i};case p.ALLOWLIST_REJECTED:return{title:s.errorTitle||"You don't have access to this app",detail:s.errorDetail||"Have you been invited?",ctaText:s.errorCtaText||"Try another account",icon:o};case p.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case p.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case p.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(n,s);/*#__PURE__*/return t(y,{title:f.title,subtitle:f.detail,icon:f.icon,onBack:h,iconVariant:"error",primaryCta:{label:f.ctaText,onClick:()=>{n instanceof m&&(n.privyErrorCode===p.INVALID_CAPTCHA&&T?.(),n.privyErrorCode===p.ALLOWLIST_REJECTED&&s.errorCtaLink)?window.location.href=s.errorCtaLink:c?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:i,currentScreen:a}=T(),o=s(),{reset:n}=c(),l=r?.errorModalData?.previousScreen||(i===a?void 0:i);/*#__PURE__*/return t(h,{error:r?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(l||"LandingScreen",!1)},onCaptchaReset:n})}};let w=n.a`
1
+ import{jsx as t,jsxs as e,Fragment as r}from"react/jsx-runtime";import{AlertTriangle as i,Phone as a,Lock as o}from"lucide-react";import{styled as n}from"styled-components";import{u as s}from"./context-WTldtXS8.mjs";import{a as c,P as l}from"./index-BBRkihRn.mjs";import{c as m,b as p,a as d,e as u}from"./internal-context-Z-fyxadS.mjs";import{a as T}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{R as g}from"./reservoir-0wfhnc0j.mjs";import{S as y}from"./ScreenLayout-DTmQLGPf.mjs";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-CV4p7L0b.mjs";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-6nkpbErN.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-D8-mhjp4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const h=({error:n,allowlistConfig:s,onRetry:c,onCaptchaReset:T,onBack:h})=>{let f=((n,s)=>{if(n instanceof g)return{title:"Transaction failed",detail:/*#__PURE__*/e(r,{children:[/*#__PURE__*/t("span",{children:n.message}),/*#__PURE__*/e("span",{children:[" ","Check the"," ",/*#__PURE__*/t(w,{href:n.relayLink,target:"_blank",children:"refund status"}),"."]})]}),ctaText:"Try again",icon:i};if(n instanceof d)switch(n.privyErrorCode){case p.CLIENT_REQUEST_TIMEOUT:return{title:"Timed out",detail:n.message,ctaText:"Try again",icon:i};case p.INSUFFICIENT_BALANCE:return{title:"Insufficient balance",detail:n.message,ctaText:"Try again",icon:i};case p.TRANSACTION_FAILURE:return{title:"Transaction failure",detail:n.message,ctaText:"Try again",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}else{if(n instanceof l&&"twilio_verification_failed"===n.type)return{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:a};if(!(n instanceof m))return n instanceof u&&n.status&&[400,422].includes(n.status)?{title:"Something went wrong",detail:n.message,ctaText:"Try again",icon:i}:{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i};switch(n.privyErrorCode){case p.INVALID_CAPTCHA:return{title:"Something went wrong",detail:"Please try again.",ctaText:"Try again",icon:i};case p.DISALLOWED_LOGIN_METHOD:return{title:"Not allowed",detail:n.message,ctaText:"Try another method",icon:i};case p.ALLOWLIST_REJECTED:return{title:s.errorTitle||"You don't have access to this app",detail:s.errorDetail||"Have you been invited?",ctaText:s.errorCtaText||"Try another account",icon:o};case p.CAPTCHA_FAILURE:return{title:"Something went wrong",detail:"You did not pass CAPTCHA. Please try again.",ctaText:"Try again",icon:null};case p.CAPTCHA_TIMEOUT:return{title:"Something went wrong",detail:"Something went wrong! Please try again later.",ctaText:"Try again",icon:null};case p.LINKED_TO_ANOTHER_USER:return{title:"Authentication failed",detail:"This account has already been linked to another user.",ctaText:"Try again",icon:i};case p.NOT_SUPPORTED:return{title:"This region is not supported",detail:"SMS authentication from this region is not available",ctaText:"Try another method",icon:i};case p.TOO_MANY_REQUESTS:return{title:"Request failed",detail:"Too many attempts.",ctaText:"Try again later",icon:i};default:return{title:"Something went wrong",detail:"Try again later",ctaText:"Try again",icon:i}}}})(n,s);/*#__PURE__*/return t(y,{title:f.title,subtitle:f.detail,icon:f.icon,onBack:h,iconVariant:"error",primaryCta:{label:f.ctaText,onClick:()=>{n instanceof m&&(n.privyErrorCode===p.INVALID_CAPTCHA&&T?.(),n.privyErrorCode===p.ALLOWLIST_REJECTED&&s.errorCtaLink)?window.location.href=s.errorCtaLink:c?.()},variant:"error"},watermark:!0})},f={component:()=>{let{navigate:e,data:r,lastScreen:i,currentScreen:a}=T(),o=s(),{reset:n}=c(),l=r?.errorModalData?.previousScreen||(i===a?void 0:i);/*#__PURE__*/return t(h,{error:r?.errorModalData?.error||Error(),allowlistConfig:o.allowlistConfig,onRetry:()=>{e(l||"LandingScreen",!1)},onCaptchaReset:n})}};let w=n.a`
2
2
  color: var(--privy-color-accent) !important;
3
3
  font-weight: 600;
4
4
  `;export{f as ErrorScreen,h as ErrorScreenView,f as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-Dqi9nNxj.mjs";import{O as d}from"./OpenLink-DZHy38vr.mjs";import{Q as m}from"./QrCode-CKNL79V_.mjs";import{Check as p,Copy as u}from"lucide-react";import{S as h}from"./ModalHeader-DBfMXKy4.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{u as f,q as g}from"./context-CCRnMB8L.mjs";import{u as y,b,k as w}from"./internal-context-Z-fyxadS.mjs";import{u as x,a as C}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{s as S}from"./shouldProceedtoEmbeddedWalletCreationFlow-DjxNSuIS.mjs";import{S as k}from"./ScreenLayout-z1I4hafk.mjs";import{F as E}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./use-export-wallet-Voe8hSb9.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-BgGYO9kN.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D9f62ILp.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";let j=l.div`
1
+ import{jsxs as e,jsx as r,Fragment as t}from"react/jsx-runtime";import{useState as i,useEffect as o,useRef as a}from"react";import{isMobile as n,isIOS as s}from"react-device-detect";import{styled as l}from"styled-components";import{L as c}from"./useActiveWallet-3RHPIBxJ.mjs";import{O as d}from"./OpenLink-DZHy38vr.mjs";import{Q as m}from"./QrCode-C1tgJtOy.mjs";import{Check as p,Copy as u}from"lucide-react";import{S as h}from"./ModalHeader-D8-mhjp4.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{u as f,q as g}from"./context-WTldtXS8.mjs";import{u as y,b,k as w}from"./internal-context-Z-fyxadS.mjs";import{u as x,a as C}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{s as S}from"./shouldProceedtoEmbeddedWalletCreationFlow-BMF_3TVv.mjs";import{S as k}from"./ScreenLayout-DTmQLGPf.mjs";import{F as E}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./use-export-wallet-CV4p7L0b.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-BBRkihRn.mjs";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-6nkpbErN.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";let j=l.div`
2
2
  width: 100%;
3
3
  `,T=l.div`
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-DSTf_eKU.mjs";import{L as c}from"./useActiveWallet-Dqi9nNxj.mjs";import{O as m}from"./OpenLink-DZHy38vr.mjs";import{Q as p}from"./QrCode-CKNL79V_.mjs";import{u as d,q as u}from"./context-CCRnMB8L.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as f}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{S as h}from"./ScreenLayout-z1I4hafk.mjs";import{F as v}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./use-export-wallet-Voe8hSb9.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-BKPOCKnv.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-DBfMXKy4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-omroCwTV.mjs";import"./index-Dq_xe9dz.mjs";let y="#8a63d2";const k=({appName:r,loading:o,success:a,errorMessage:n,connectUri:d,onBack:u,onClose:g,onOpenFarcaster:f})=>/*#__PURE__*/e(h,i||o?s?{title:n?n.message:"Add a signer to Farcaster",subtitle:n?n.detail:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},primaryCta:d&&f?{label:"Open Farcaster app",onClick:f}:void 0,onBack:u,onClose:g,watermark:!0}:{title:n?n.message:"Requesting signer from Farcaster",subtitle:n?n.detail:"This should only take a moment",icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},onBack:u,onClose:g,watermark:!0,children:d&&i&&/*#__PURE__*/e(w,{children:/*#__PURE__*/e(m,{text:"Take me to Farcaster",url:d,color:y})})}:{title:"Add a signer to Farcaster",subtitle:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,onBack:u,onClose:g,watermark:!0,children:/*#__PURE__*/t(j,{children:[/*#__PURE__*/e(x,{children:d?/*#__PURE__*/e(p,{url:d,size:275,squareLogoElement:v}):/*#__PURE__*/e(S,{children:/*#__PURE__*/e(c,{})})}),/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(b,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),d&&/*#__PURE__*/e(l,{text:d,itemName:"link",color:y})]})]})});let w=n.div`
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{useState as r,useRef as o,useEffect as a}from"react";import{isMobile as i,isIOS as s}from"react-device-detect";import{styled as n}from"styled-components";import{C as l}from"./CopyToClipboard-DSTf_eKU.mjs";import{L as c}from"./useActiveWallet-3RHPIBxJ.mjs";import{O as m}from"./OpenLink-DZHy38vr.mjs";import{Q as p}from"./QrCode-C1tgJtOy.mjs";import{u as d,q as u}from"./context-WTldtXS8.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as f}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as h}from"./ScreenLayout-DTmQLGPf.mjs";import{F as v}from"./farcaster-DPlSjvF5.mjs";import"zustand";import"./use-export-wallet-CV4p7L0b.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"qrcode";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-D8-mhjp4.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";let y="#8a63d2";const k=({appName:r,loading:o,success:a,errorMessage:n,connectUri:d,onBack:u,onClose:g,onOpenFarcaster:f})=>/*#__PURE__*/e(h,i||o?s?{title:n?n.message:"Add a signer to Farcaster",subtitle:n?n.detail:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},primaryCta:d&&f?{label:"Open Farcaster app",onClick:f}:void 0,onBack:u,onClose:g,watermark:!0}:{title:n?n.message:"Requesting signer from Farcaster",subtitle:n?n.detail:"This should only take a moment",icon:v,iconVariant:"loading",iconLoadingStatus:{success:a,fail:!!n},onBack:u,onClose:g,watermark:!0,children:d&&i&&/*#__PURE__*/e(w,{children:/*#__PURE__*/e(m,{text:"Take me to Farcaster",url:d,color:y})})}:{title:"Add a signer to Farcaster",subtitle:`This will allow ${r} to add casts, likes, follows, and more on your behalf.`,onBack:u,onClose:g,watermark:!0,children:/*#__PURE__*/t(j,{children:[/*#__PURE__*/e(x,{children:d?/*#__PURE__*/e(p,{url:d,size:275,squareLogoElement:v}):/*#__PURE__*/e(S,{children:/*#__PURE__*/e(c,{})})}),/*#__PURE__*/t(C,{children:[/*#__PURE__*/e(b,{children:"Or copy this link and paste it into a phone browser to open the Farcaster app."}),d&&/*#__PURE__*/e(l,{text:d,itemName:"link",color:y})]})]})});let w=n.div`
2
2
  margin-top: 24px;
3
3
  `,j=n.div`
4
4
  display: flex;
@@ -1 +1 @@
1
- import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-DBfMXKy4.mjs";import{b as m,c,R as d,e as u}from"./Layouts-BlFm53ED.mjs";import{C as p}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as f}from"./FundWalletMethodHeader-D0DhWPu0.mjs";import{I as g}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as h}from"./index-Dq_xe9dz.mjs";import{L as I,V as w}from"./Value-tcJV9e0L.mjs";import{a as v,R as S}from"./Row-C9vrS4Zi.mjs";import{u as j,t as C}from"./context-CCRnMB8L.mjs";import{u as y,a as L,b as x}from"./internal-context-Z-fyxadS.mjs";import{a as k}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{u as F,g as U}from"./useWallets-DQOA0__U.mjs";import{u as T}from"./useGetTokenPrice-Djb6UHOW.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{getTransferSolInstruction as W}from"@solana-program/system";import{pipe as b,createTransactionMessage as P,setTransactionMessageFeePayerSigner as D,setTransactionMessageLifetimeUsingBlockhash as N,appendTransactionMessageInstruction as O,compileTransaction as E,getTransactionEncoder as M}from"@solana/kit";import{findAssociatedTokenPda as B,getCreateAssociatedTokenIdempotentInstruction as $,getTransferInstruction as R}from"@solana-program/token";import{T as H,L as G,g as V}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as q}from"./getUsdcMintAddress-DFI1hv05.mjs";import{u as _,f as z,s as Q,w as X}from"./useSolanaRpcClient-DizarIU5.mjs";import{g as Y}from"./getChainName-DjpPdUSc.mjs";import{t as J}from"./use-export-wallet-Voe8hSb9.mjs";import"styled-components";import"./useActiveWallet-Dqi9nNxj.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-BKPOCKnv.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/WalletIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./usePrivy-D9f62ILp.mjs";import"eventemitter3";import"@scure/base";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";function K({rows:a}){/*#__PURE__*/return e(v,{children:a.filter((e=>!!e)).map(((a,n)=>null!=a.value||a.isLoading?/*#__PURE__*/t(S,{children:[/*#__PURE__*/e(I,{children:a.label}),/*#__PURE__*/e(w,{$isLoading:a.isLoading,children:a.value})]},n):null))})}function Z(e){return BigInt(Math.floor(1e9*parseFloat(e)))}function ee(e){return+te.format(parseFloat(e.toString())/1e9)}let te=Intl.NumberFormat(void 0,{maximumFractionDigits:8});async function ae({tx:e,solanaClient:t,amount:a,asset:n,tokenPrice:o}){if(!e)return null;if("SOL"===n&&o){let n=Z(a),r=V(n,o),s=await z({solanaClient:t,tx:e});return{amountInUsd:r,feeInUsd:o?V(s,o):void 0,totalInUsd:V(n+s,o)}}if("USDC"===n&&o){let n="$"+a,r=await z({solanaClient:t,tx:e}),s=function(e,t){let a=parseFloat(e.toString())/G*t;return a<.01?0:a}(r,o);return{amountInUsd:n,feeInUsd:V(r,o),totalInUsd:"$"+(parseFloat(a)+s).toFixed(2)}}if("SOL"===n){let n=Z(a),o=await z({solanaClient:t,tx:e});return{amountInSol:a+" SOL",feeInSol:ee(o)+" SOL",totalInSol:ee(n+o)+" SOL"}}return{amountInUsdc:a+" USDC",feeInSol:ee(await z({solanaClient:t,tx:e}))+" SOL"}}const ne={component:function(){let I=j(),{closePrivyModal:w,createAnalyticsEvent:v}=y(),{data:S,setModalData:G,navigate:z}=k(),{wallets:ee}=F(),[te,ne]=o("preparing"),[oe,re]=o(),[se,ie]=o(),[le,me]=o();if(!S?.solanaFundingData)throw Error("Funding config is missing");if(!S.solanaFundingData.sourceWalletData)throw Error("Funding config is missing source wallet data");let{amount:ce,asset:de,chain:ue,sourceWalletData:pe,destinationAddress:fe,afterSuccessScreen:ge}=S.solanaFundingData,he=ee.find((e=>e.address===pe.address&&J(pe.walletClientType)===J(e.standardWallet.name))),Ie=_()(ue),{tokenPrice:we,isTokenPriceLoading:ve}=T("solana");return r((()=>{if("preparing"!==te||ve||!he)return;let e="SOL"===de?Z(ce):function(e){return BigInt(Math.floor(1e6*parseFloat(e)))}(ce);ie({amount:("SOL"===de&&we?V(e,we):ce)??ce}),("SOL"===de?async function({solanaClient:e,source:t,destination:a,amountInLamports:n}){let{value:o}=await e.rpc.getLatestBlockhash().send(),r={address:t},s=b(P({version:0}),(e=>D(r,e)),(e=>N(o,e)),(e=>O(W({amount:n,source:r,destination:a}),e)),(e=>E(e)));return new Uint8Array(M().encode(s))}({solanaClient:Ie,source:he.address,destination:fe,amountInLamports:e}):async function({solanaClient:e,source:t,destination:a,amountInBaseUnits:n}){let o=q(e.chain),{value:r}=await e.rpc.getLatestBlockhash().send(),s={address:t},[i]=await B({mint:o,owner:t,tokenProgram:H}),[l]=await B({mint:o,owner:a,tokenProgram:H}),[m,c]=await Promise.all([e.rpc.getAccountInfo(i,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null)),e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null))]);if(!m?.value)throw Error(`Source token account does not exist for address: ${t}`);let d=$({payer:s,ata:l,owner:a,mint:o}),u=b(P({version:0}),(e=>D(s,e)),(e=>N(r,e)),(e=>c?.value?e:O(d,e)),(e=>O(R({source:i,destination:l,authority:s,amount:n}),e)),(e=>E(e)));return new Uint8Array(M().encode(u))}({solanaClient:Ie,source:he.address,destination:fe,amountInBaseUnits:e})).then(re).catch((e=>{ne("error"),me(e)}))}),[te,ce,de,ue,he,fe,ve,we]),r((()=>{"preparing"===te&&oe&&ae({tx:oe,solanaClient:Ie,amount:ce,asset:de,tokenPrice:we}).then((e=>{ne("loaded"),ie({amount:e?.amountInUsd??e?.amountInUsdc??e?.amountInSol??ce,fee:e?.feeInUsd??e?.feeInSol,total:e?.totalInUsd??e?.totalInSol})})).catch((e=>{ne("error"),me(e)}))}),[oe,ce,de,te,we]),r((()=>{"error"===te&&le&&(G({errorModalData:{error:le,previousScreen:"FundSolWalletWithExternalSolanaWallet"},solanaFundingData:S.solanaFundingData}),z("ErrorScreen",!1))}),[te,z]),r((()=>{if("success"!==te)return;let e=setTimeout(ge?()=>z(ge):w,C);return()=>clearTimeout(e)}),[te]),/*#__PURE__*/t(a,"success"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(m,{}),/*#__PURE__*/t(c,{children:[/*#__PURE__*/e(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e(p,{title:"Success!",description:`You’ve successfully added ${ce} ${de} to your ${I.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/e(d,{}),/*#__PURE__*/e(i,{})]}:"preparing"===te||"loaded"===te||"sending"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(u,{style:{marginTop:"16px"},children:/*#__PURE__*/e(g,{icon:he?.standardWallet.icon,name:he?.standardWallet.name})}),/*#__PURE__*/e(p,{style:{marginTop:"8px",marginBottom:"12px"},title:"sending"===te&&he?`Confirming with ${he.standardWallet.name}`:"Confirm transaction"}),/*#__PURE__*/e(K,{rows:[{label:"Source",value:s(pe.address)},{label:"Destination",value:s(fe)},{label:"Network",value:Y(ue)},{label:"Amount",value:se?.amount,isLoading:"preparing"===te},{label:"Estimated fee",value:se?.fee,isLoading:"preparing"===te},{label:"Total",value:se?.total,isLoading:"preparing"===te}]}),/*#__PURE__*/e(l,{style:{marginTop:"1rem"},loading:"preparing"===te||"sending"===te,onClick:function(){"loaded"===te&&oe&&he&&(ne("sending"),async function({transaction:e,chain:t,sourceWallet:a,solanaClient:n}){let{hasFunds:o}=await Q({solanaClient:n,tx:e});if(!o)throw new L(`Wallet ${s(a.address)} does not have enough funds.`,void 0,x.INSUFFICIENT_BALANCE);let r=U((await a.signAndSendTransaction({transaction:e,chain:t}).catch((e=>{throw new L("Transaction was rejected by the user",e,x.TRANSACTION_FAILURE)}))).signature);return await X({rpcSubscriptions:n.rpcSubscriptions,signature:r,timeout:2e4}),r}({solanaClient:Ie,transaction:oe,chain:ue,sourceWallet:he}).then((e=>{ne("success"),v({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:he.address,value:ce,chainType:"solana",clusterName:ue,token:de,destinationAddress:fe,destinationValue:ce,destinationChainType:"solana",destinationClusterName:ue,destinationToken:de}})})).catch((e=>{ne("error"),me(e)})))},children:"Confirm"}),/*#__PURE__*/e(i,{})]}:{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(h,{}),/*#__PURE__*/e("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/e(i,{})]})}};export{ne as FundSolWalletWithExternalSolanaWallet,ne as default};
1
+ import{jsx as e,jsxs as t,Fragment as a}from"react/jsx-runtime";import n from"@heroicons/react/24/outline/CheckCircleIcon";import{useState as o,useEffect as r}from"react";import{formatWalletAddress as s}from"@privy-io/js-sdk-core";import{B as i,P as l}from"./ModalHeader-D8-mhjp4.mjs";import{b as m,c,R as d,e as u}from"./Layouts-BlFm53ED.mjs";import{C as p}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as f}from"./FundWalletMethodHeader-Cfci4-83.mjs";import{I as g}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as h}from"./index-Dq_xe9dz.mjs";import{L as I,V as w}from"./Value-tcJV9e0L.mjs";import{a as v,R as S}from"./Row-C9vrS4Zi.mjs";import{u as j,t as C}from"./context-WTldtXS8.mjs";import{u as y,a as L,b as x}from"./internal-context-Z-fyxadS.mjs";import{a as k}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{u as F,g as U}from"./useWallets-C_dCo2_Q.mjs";import{u as T}from"./useGetTokenPrice-BPBpM07F.mjs";import{O as A}from"./analytics-mkkvFRju.mjs";import{getTransferSolInstruction as W}from"@solana-program/system";import{pipe as b,createTransactionMessage as P,setTransactionMessageFeePayerSigner as D,setTransactionMessageLifetimeUsingBlockhash as N,appendTransactionMessageInstruction as O,compileTransaction as E,getTransactionEncoder as M}from"@solana/kit";import{findAssociatedTokenPda as B,getCreateAssociatedTokenIdempotentInstruction as $,getTransferInstruction as R}from"@solana-program/token";import{T as H,L as G,g as V}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as q}from"./getUsdcMintAddress-DFI1hv05.mjs";import{u as _,f as z,s as Q,w as X}from"./useSolanaRpcClient-BUWOblv_.mjs";import{g as Y}from"./getChainName-DjpPdUSc.mjs";import{t as J}from"./use-export-wallet-CV4p7L0b.mjs";import"styled-components";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"viem";import"viem/utils";import"./getPublicClient-B4uPLKn-.mjs";import"./useWallets-CR0z5IIt.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@heroicons/react/24/outline/WalletIcon";import"./LoadingSkeleton-U6-3yFwI.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./usePrivy-6nkpbErN.mjs";import"eventemitter3";import"@scure/base";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./useGetSolPrice-DwwjjGbd.mjs";function K({rows:a}){/*#__PURE__*/return e(v,{children:a.filter((e=>!!e)).map(((a,n)=>null!=a.value||a.isLoading?/*#__PURE__*/t(S,{children:[/*#__PURE__*/e(I,{children:a.label}),/*#__PURE__*/e(w,{$isLoading:a.isLoading,children:a.value})]},n):null))})}function Z(e){return BigInt(Math.floor(1e9*parseFloat(e)))}function ee(e){return+te.format(parseFloat(e.toString())/1e9)}let te=Intl.NumberFormat(void 0,{maximumFractionDigits:8});async function ae({tx:e,solanaClient:t,amount:a,asset:n,tokenPrice:o}){if(!e)return null;if("SOL"===n&&o){let n=Z(a),r=V(n,o),s=await z({solanaClient:t,tx:e});return{amountInUsd:r,feeInUsd:o?V(s,o):void 0,totalInUsd:V(n+s,o)}}if("USDC"===n&&o){let n="$"+a,r=await z({solanaClient:t,tx:e}),s=function(e,t){let a=parseFloat(e.toString())/G*t;return a<.01?0:a}(r,o);return{amountInUsd:n,feeInUsd:V(r,o),totalInUsd:"$"+(parseFloat(a)+s).toFixed(2)}}if("SOL"===n){let n=Z(a),o=await z({solanaClient:t,tx:e});return{amountInSol:a+" SOL",feeInSol:ee(o)+" SOL",totalInSol:ee(n+o)+" SOL"}}return{amountInUsdc:a+" USDC",feeInSol:ee(await z({solanaClient:t,tx:e}))+" SOL"}}const ne={component:function(){let I=j(),{closePrivyModal:w,createAnalyticsEvent:v}=y(),{data:S,setModalData:G,navigate:z}=k(),{wallets:ee}=F(),[te,ne]=o("preparing"),[oe,re]=o(),[se,ie]=o(),[le,me]=o();if(!S?.solanaFundingData)throw Error("Funding config is missing");if(!S.solanaFundingData.sourceWalletData)throw Error("Funding config is missing source wallet data");let{amount:ce,asset:de,chain:ue,sourceWalletData:pe,destinationAddress:fe,afterSuccessScreen:ge}=S.solanaFundingData,he=ee.find((e=>e.address===pe.address&&J(pe.walletClientType)===J(e.standardWallet.name))),Ie=_()(ue),{tokenPrice:we,isTokenPriceLoading:ve}=T("solana");return r((()=>{if("preparing"!==te||ve||!he)return;let e="SOL"===de?Z(ce):function(e){return BigInt(Math.floor(1e6*parseFloat(e)))}(ce);ie({amount:("SOL"===de&&we?V(e,we):ce)??ce}),("SOL"===de?async function({solanaClient:e,source:t,destination:a,amountInLamports:n}){let{value:o}=await e.rpc.getLatestBlockhash().send(),r={address:t},s=b(P({version:0}),(e=>D(r,e)),(e=>N(o,e)),(e=>O(W({amount:n,source:r,destination:a}),e)),(e=>E(e)));return new Uint8Array(M().encode(s))}({solanaClient:Ie,source:he.address,destination:fe,amountInLamports:e}):async function({solanaClient:e,source:t,destination:a,amountInBaseUnits:n}){let o=q(e.chain),{value:r}=await e.rpc.getLatestBlockhash().send(),s={address:t},[i]=await B({mint:o,owner:t,tokenProgram:H}),[l]=await B({mint:o,owner:a,tokenProgram:H}),[m,c]=await Promise.all([e.rpc.getAccountInfo(i,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null)),e.rpc.getAccountInfo(l,{commitment:"confirmed",encoding:"jsonParsed"}).send().catch((()=>null))]);if(!m?.value)throw Error(`Source token account does not exist for address: ${t}`);let d=$({payer:s,ata:l,owner:a,mint:o}),u=b(P({version:0}),(e=>D(s,e)),(e=>N(r,e)),(e=>c?.value?e:O(d,e)),(e=>O(R({source:i,destination:l,authority:s,amount:n}),e)),(e=>E(e)));return new Uint8Array(M().encode(u))}({solanaClient:Ie,source:he.address,destination:fe,amountInBaseUnits:e})).then(re).catch((e=>{ne("error"),me(e)}))}),[te,ce,de,ue,he,fe,ve,we]),r((()=>{"preparing"===te&&oe&&ae({tx:oe,solanaClient:Ie,amount:ce,asset:de,tokenPrice:we}).then((e=>{ne("loaded"),ie({amount:e?.amountInUsd??e?.amountInUsdc??e?.amountInSol??ce,fee:e?.feeInUsd??e?.feeInSol,total:e?.totalInUsd??e?.totalInSol})})).catch((e=>{ne("error"),me(e)}))}),[oe,ce,de,te,we]),r((()=>{"error"===te&&le&&(G({errorModalData:{error:le,previousScreen:"FundSolWalletWithExternalSolanaWallet"},solanaFundingData:S.solanaFundingData}),z("ErrorScreen",!1))}),[te,z]),r((()=>{if("success"!==te)return;let e=setTimeout(ge?()=>z(ge):w,C);return()=>clearTimeout(e)}),[te]),/*#__PURE__*/t(a,"success"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(m,{}),/*#__PURE__*/t(c,{children:[/*#__PURE__*/e(n,{color:"var(--privy-color-success)",width:"64px",height:"64px"}),/*#__PURE__*/e(p,{title:"Success!",description:`You’ve successfully added ${ce} ${de} to your ${I.name} wallet. It may take a minute before the funds are available to use.`})]}),/*#__PURE__*/e(d,{}),/*#__PURE__*/e(i,{})]}:"preparing"===te||"loaded"===te||"sending"===te?{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(u,{style:{marginTop:"16px"},children:/*#__PURE__*/e(g,{icon:he?.standardWallet.icon,name:he?.standardWallet.name})}),/*#__PURE__*/e(p,{style:{marginTop:"8px",marginBottom:"12px"},title:"sending"===te&&he?`Confirming with ${he.standardWallet.name}`:"Confirm transaction"}),/*#__PURE__*/e(K,{rows:[{label:"Source",value:s(pe.address)},{label:"Destination",value:s(fe)},{label:"Network",value:Y(ue)},{label:"Amount",value:se?.amount,isLoading:"preparing"===te},{label:"Estimated fee",value:se?.fee,isLoading:"preparing"===te},{label:"Total",value:se?.total,isLoading:"preparing"===te}]}),/*#__PURE__*/e(l,{style:{marginTop:"1rem"},loading:"preparing"===te||"sending"===te,onClick:function(){"loaded"===te&&oe&&he&&(ne("sending"),async function({transaction:e,chain:t,sourceWallet:a,solanaClient:n}){let{hasFunds:o}=await Q({solanaClient:n,tx:e});if(!o)throw new L(`Wallet ${s(a.address)} does not have enough funds.`,void 0,x.INSUFFICIENT_BALANCE);let r=U((await a.signAndSendTransaction({transaction:e,chain:t}).catch((e=>{throw new L("Transaction was rejected by the user",e,x.TRANSACTION_FAILURE)}))).signature);return await X({rpcSubscriptions:n.rpcSubscriptions,signature:r,timeout:2e4}),r}({solanaClient:Ie,transaction:oe,chain:ue,sourceWallet:he}).then((e=>{ne("success"),v({eventName:A,payload:{provider:"external",status:"success",txHash:e,address:he.address,value:ce,chainType:"solana",clusterName:ue,token:de,destinationAddress:fe,destinationValue:ce,destinationChainType:"solana",destinationClusterName:ue,destinationToken:de}})})).catch((e=>{ne("error"),me(e)})))},children:"Confirm"}),/*#__PURE__*/e(i,{})]}:{children:[/*#__PURE__*/e(f,{}),/*#__PURE__*/e(h,{}),/*#__PURE__*/e("div",{style:{marginTop:"1rem"}}),/*#__PURE__*/e(i,{})]})}};export{ne as FundSolWalletWithExternalSolanaWallet,ne as default};
@@ -1 +1 @@
1
- import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-j2fzd2YE.mjs";import{M as a}from"./ModalHeader-DBfMXKy4.mjs";function t({title:t}){let{currentScreen:i,navigateBack:r,navigate:d,data:o,setModalData:u}=e();/*#__PURE__*/return n(a,{title:t,backFn:"ManualTransferScreen"===i?r:i===o?.funding?.methodScreen?o.funding.comingFromSendTransactionScreen?()=>d("SendTransactionScreen"):void 0:o?.funding?.methodScreen?()=>{let n=o.funding;n.usingDefaultFundingMethod&&(n.usingDefaultFundingMethod=!1),u({funding:n,solanaFundingData:o?.solanaFundingData}),d(n.methodScreen)}:void 0})}export{t};
1
+ import{jsx as n}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{M as a}from"./ModalHeader-D8-mhjp4.mjs";function t({title:t}){let{currentScreen:i,navigateBack:r,navigate:d,data:o,setModalData:u}=e();/*#__PURE__*/return n(a,{title:t,backFn:"ManualTransferScreen"===i?r:i===o?.funding?.methodScreen?o.funding.comingFromSendTransactionScreen?()=>d("SendTransactionScreen"):void 0:o?.funding?.methodScreen?()=>{let n=o.funding;n.usingDefaultFundingMethod&&(n.usingDefaultFundingMethod=!1),u({funding:n,solanaFundingData:o?.solanaFundingData}),d(n.methodScreen)}:void 0})}export{t};