@privy-io/react-auth 3.14.1 → 3.14.2-beta-20260225204743

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-C25iBRLm.js → AccountNotFoundScreen-Da9qA-56.js} +1 -1
  2. package/dist/cjs/{Address-CHKhHgKJ.js → Address-BqWF0i-J.js} +1 -1
  3. package/dist/cjs/{AffirmativeConsentScreen-DT0ojGpw.js → AffirmativeConsentScreen-BClNt_0J.js} +1 -1
  4. package/dist/cjs/{AllowlistRejectionScreen-D0I4vTcK.js → AllowlistRejectionScreen-zV6NXsBd.js} +1 -1
  5. package/dist/cjs/{AuthenticateWithWalletScreen-dcVrFqXU.js → AuthenticateWithWalletScreen-BoREWQDU.js} +1 -1
  6. package/dist/cjs/{AwaitingEvmToSolBridgingScreen-20Lokl_2.js → AwaitingEvmToSolBridgingScreen-CTZe2U-l.js} +1 -1
  7. package/dist/cjs/{AwaitingExternalEthereumTransferScreen-B2BOyvEP.js → AwaitingExternalEthereumTransferScreen-CWgaBnmf.js} +1 -1
  8. package/dist/cjs/{AwaitingPasswordlessCodeScreen-CjeHuBk7.js → AwaitingPasswordlessCodeScreen-CWWgEkCs.js} +1 -1
  9. package/dist/cjs/{AwaitingSolToEvmBridgingScreen-NSyS8djM.js → AwaitingSolToEvmBridgingScreen-B3hSbpSm.js} +1 -1
  10. package/dist/cjs/{BridgeNetworkSelectionView-Cy4dUUah.js → BridgeNetworkSelectionView-BJ4HU7kS.js} +1 -1
  11. package/dist/cjs/{CaptchaScreen-CchfnELg.js → CaptchaScreen-CuPGvzuE.js} +1 -1
  12. package/dist/cjs/{CoinbaseOnrampStatusScreen-RmmivwEu.js → CoinbaseOnrampStatusScreen-BYh_mtXY.js} +1 -1
  13. package/dist/cjs/{ConnectEmailForm-BibKRhlR.js → ConnectEmailForm-Cw7gmFFy.js} +1 -1
  14. package/dist/cjs/{ConnectLedgerScreen-CB1oTLjq.js → ConnectLedgerScreen-JGZIZrO9.js} +1 -1
  15. package/dist/cjs/{ConnectOnlyLandingScreen-BI0zDj3o.js → ConnectOnlyLandingScreen-BEyo7yCb.js} +1 -1
  16. package/dist/cjs/{ConnectOnlyStatusScreen-BAUS-OpP.js → ConnectOnlyStatusScreen-CHQLiEij.js} +1 -1
  17. package/dist/cjs/{ConnectOrCreateScreen-CdoSL34u.js → ConnectOrCreateScreen-BLz6pmTF.js} +1 -1
  18. package/dist/cjs/{ConnectPhoneForm-BPgbe0j3.js → ConnectPhoneForm-BY1-1V8g.js} +1 -1
  19. package/dist/cjs/{ConnectWalletView-BB2DjcE-.js → ConnectWalletView-CWrY-kEt.js} +1 -1
  20. package/dist/cjs/{ConnectionStatusScreen-D2pFs10v.js → ConnectionStatusScreen-DKwnv7_i.js} +1 -1
  21. package/dist/cjs/{CrossAppAuthScreen-Dzqgp4fv.js → CrossAppAuthScreen-COXktzZ_.js} +1 -1
  22. package/dist/cjs/{CustomLandingScreenView-Pamy7vPb.js → CustomLandingScreenView-BBBb_pIa.js} +1 -1
  23. package/dist/cjs/{DelegatedActionsConsentScreen-B1RznIyD.js → DelegatedActionsConsentScreen-BXuRbdhT.js} +1 -1
  24. package/dist/cjs/{DelegatedActionsRevokeScreen-BfYkymoM.js → DelegatedActionsRevokeScreen-Bi79TDY8.js} +1 -1
  25. package/dist/cjs/{EmbeddedWalletConnectingScreen-DaOL3Ico.js → EmbeddedWalletConnectingScreen-BAdYnWdp.js} +1 -1
  26. package/dist/cjs/{EmbeddedWalletCreatedScreen-B5K1ek4V.js → EmbeddedWalletCreatedScreen-CWkg3irZ.js} +1 -1
  27. package/dist/cjs/{EmbeddedWalletKeyExportScreen-BJTyn-Lk.js → EmbeddedWalletKeyExportScreen-ClvfSZ4d.js} +1 -1
  28. package/dist/cjs/{EmbeddedWalletOnAccountCreateScreen-BbZKkeLp.js → EmbeddedWalletOnAccountCreateScreen-ZGVRCKAf.js} +1 -1
  29. package/dist/cjs/{EmbeddedWalletPasswordUpdateScreen-DMx4Tn8E.js → EmbeddedWalletPasswordUpdateScreen-D9-AY8aF.js} +1 -1
  30. package/dist/cjs/{EmbeddedWalletPasswordUpdateSplashScreen-wUfHEYpF.js → EmbeddedWalletPasswordUpdateSplashScreen-CX3MNNni.js} +1 -1
  31. package/dist/cjs/{EnrollTotp-B1qE1mCx.js → EnrollTotp-oC6vnm7x.js} +1 -1
  32. package/dist/cjs/{ErrorScreen-BPXQabSS.js → ErrorScreen-Ci7dzQ7X.js} +1 -1
  33. package/dist/cjs/{FarcasterConnectStatusScreen-C_NK2UCS.js → FarcasterConnectStatusScreen-DnrqDPpm.js} +1 -1
  34. package/dist/cjs/{FarcasterSignerStatusScreen-D3DUvPPw.js → FarcasterSignerStatusScreen-m-EKHgqe.js} +1 -1
  35. package/dist/cjs/{FundSolWalletWithExternalSolanaWallet-BoOhBVX9.js → FundSolWalletWithExternalSolanaWallet-CL5Jl0zy.js} +1 -1
  36. package/dist/cjs/{FundWalletMethodHeader-BUHyY_8M.js → FundWalletMethodHeader-BncLLS1i.js} +1 -1
  37. package/dist/cjs/FundWithBankDepositScreen-DV41ZeH_.js +176 -0
  38. package/dist/cjs/{FundingEditAmountScreen-DLWLIjEZ.js → FundingEditAmountScreen-C1fCTPJJ.js} +1 -1
  39. package/dist/cjs/{FundingMethodSelectionScreen-BRz8TLz5.js → FundingMethodSelectionScreen-CQt7Dklt.js} +1 -1
  40. package/dist/cjs/{InAppBrowserLoginNotPossible-iLA0OVLk.js → InAppBrowserLoginNotPossible-Cnr9M3gC.js} +1 -1
  41. package/dist/cjs/{InstallWalletScreen-BS2Bwxvi.js → InstallWalletScreen-33F7RRlP.js} +1 -1
  42. package/dist/cjs/{LandingScreen-C4KpTL08.js → LandingScreen-C8pFLR7T.js} +1 -1
  43. package/dist/cjs/{LinkConflictScreen-CNQSun1F.js → LinkConflictScreen-Byy8LnZZ.js} +1 -1
  44. package/dist/cjs/{LinkEmailScreen-oNzcpVes.js → LinkEmailScreen-CM-irais.js} +1 -1
  45. package/dist/cjs/{LinkPasskeyScreen-CjdxFDoA.js → LinkPasskeyScreen-ovk6Ez-d.js} +1 -1
  46. package/dist/cjs/{LinkPhoneScreen-B6OzKZnd.js → LinkPhoneScreen-v6zm1YHw.js} +1 -1
  47. package/dist/cjs/{LoginFailedScreen-Cj3ATfwH.js → LoginFailedScreen-DgYbc_LC.js} +1 -1
  48. package/dist/cjs/{ManualTransferScreen-M26HCQmU.js → ManualTransferScreen-BA6n3GUi.js} +1 -1
  49. package/dist/cjs/{MfaAuthEnrollmentFlowScreen-D1zKxqD8.js → MfaAuthEnrollmentFlowScreen-ZiVEcykS.js} +1 -1
  50. package/dist/cjs/{MfaAuthVerifyFlowScreen-D3eQj9zt.js → MfaAuthVerifyFlowScreen-CdT_6UHO.js} +1 -1
  51. package/dist/cjs/{MfaEnrollmentFlowScreen-B2gvvMfX.js → MfaEnrollmentFlowScreen-t1tyDWZQ.js} +1 -1
  52. package/dist/cjs/{MfaVerifyFlowScreen-AyHxACnF.js → MfaVerifyFlowScreen-B6fjUQhB.js} +1 -1
  53. package/dist/cjs/{ModalHeader-BCPQgekO.js → ModalHeader-C4VvvcJI.js} +1 -1
  54. package/dist/cjs/{MoonpayStatusScreen-BQaJBdWu.js → MoonpayStatusScreen-mQ_glqMp.js} +1 -1
  55. package/dist/cjs/{OAuthStatusScreen-JHIOff6A.js → OAuthStatusScreen-DjGxQpVS.js} +1 -1
  56. package/dist/cjs/{PasskeySelectSignupOrLogin-B9J49RMF.js → PasskeySelectSignupOrLogin-CxmbNK8J.js} +1 -1
  57. package/dist/cjs/{PasskeyStatusScreen-ms-tH4cc.js → PasskeyStatusScreen-DvQuDzXU.js} +1 -1
  58. package/dist/cjs/{PasswordRecoveryScreen-CDHZosNL.js → PasswordRecoveryScreen-CkRGgvXb.js} +1 -1
  59. package/dist/cjs/{QrCode-CE12LRBB.js → QrCode-BhyIQUmQ.js} +1 -1
  60. package/dist/cjs/{RecoveryOAuthStatusScreen-BUxNTtqd.js → RecoveryOAuthStatusScreen-DPR9CgJE.js} +1 -1
  61. package/dist/cjs/{RecoveryPasswordCreateScreen-BkFOrb6m.js → RecoveryPasswordCreateScreen-CxU7NBwk.js} +1 -1
  62. package/dist/cjs/{RecoverySelectionScreen-HBLOm2va.js → RecoverySelectionScreen-DdNob--S.js} +1 -1
  63. package/dist/cjs/{Screen-BfKedqka.js → Screen-CCE-b3Bs.js} +1 -1
  64. package/dist/cjs/{ScreenLayout-CMb-Fua0.js → ScreenLayout-CIucWNBD.js} +1 -1
  65. package/dist/cjs/{SetAutomaticRecoveryScreen-DPjXBMos.js → SetAutomaticRecoveryScreen-DboKNW8C.js} +1 -1
  66. package/dist/cjs/{SetWalletPasswordForm-BslxSGLC.js → SetWalletPasswordForm-BXVDxfaR.js} +1 -1
  67. package/dist/cjs/{SignRequestScreen-Cjn1PsqC.js → SignRequestScreen-B6eHE2B5.js} +1 -1
  68. package/dist/cjs/{StandardSignAndSendTransactionScreen-BIh1TSV6.js → StandardSignAndSendTransactionScreen-DcqaQHy5.js} +1 -1
  69. package/dist/cjs/{TelegramAuthScreen-BZpPqkC8.js → TelegramAuthScreen-DyPX_iGV.js} +1 -1
  70. package/dist/cjs/{TransactionDetails-BY2Ynu2J.js → TransactionDetails-B1h6EeBW.js} +1 -1
  71. package/dist/cjs/{TransactionErrorView-CueeggTz.js → TransactionErrorView-B5sT73Ba.js} +1 -1
  72. package/dist/cjs/{TransferFromWalletScreen-BfWPkgYH.js → TransferFromWalletScreen-BMOX1MK_.js} +1 -1
  73. package/dist/cjs/{TransferOrBridgeLoadingScreen-CI2oh7CB.js → TransferOrBridgeLoadingScreen-Cfn5rlzi.js} +1 -1
  74. package/dist/cjs/{UpdateEmailScreen-BHgHi-KQ.js → UpdateEmailScreen-3BTc4v0E.js} +1 -1
  75. package/dist/cjs/{UpdatePhoneScreen-J83rbDYY.js → UpdatePhoneScreen-CmsYMIzD.js} +1 -1
  76. package/dist/cjs/{UserLimitReachedScreen-CYNd-wAp.js → UserLimitReachedScreen-I9UUK49o.js} +1 -1
  77. package/dist/cjs/{WalletInfoCard-CHdyZdLe.js → WalletInfoCard-ChY3FD9q.js} +1 -1
  78. package/dist/cjs/{WalletInterstitialScreen-CmqF-Oas.js → WalletInterstitialScreen-BUlgDZh5.js} +1 -1
  79. package/dist/cjs/{WalletLink-Bs_1C81F.js → WalletLink-C7ZIDy-A.js} +1 -1
  80. package/dist/cjs/{WalletOverflowButton-BqeWaSEy.js → WalletOverflowButton-Dc59wfc3.js} +1 -1
  81. package/dist/cjs/abstract-smart-wallets.js +1 -1
  82. package/dist/cjs/{context-D-ZJYjUg.js → context-DuuxPOa_.js} +1 -1
  83. package/dist/cjs/{ethers-SCb3aakT.js → ethers-zYuc0hQo.js} +1 -1
  84. package/dist/cjs/extended-chains.js +1 -1
  85. package/dist/cjs/{get-is-unified-wallet-UpdjHxOV.js → get-is-unified-wallet-BLVPD3_u.js} +1 -1
  86. package/dist/cjs/{index-gohEbwKU.js → index-BLtm61jZ.js} +1 -1
  87. package/dist/cjs/{index-BcyDbfqY.js → index-C_DdsmQ1.js} +1 -1
  88. package/dist/cjs/index-nm4KctZS.js +174 -0
  89. package/dist/cjs/index.js +1 -1
  90. package/dist/cjs/internal.js +1 -1
  91. package/dist/cjs/{shared-e1wjsjhc.js → shared-B3lDvuTo.js} +1 -1
  92. package/dist/cjs/{shouldProceedtoEmbeddedWalletCreationFlow-DADJI9f0.js → shouldProceedtoEmbeddedWalletCreationFlow-BWLhx4le.js} +1 -1
  93. package/dist/cjs/{smart-wallets-D-oPjsFS.js → smart-wallets-DVpUjsHG.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-DUvzIwf1.js → styles-ClNz-IKw.js} +1 -1
  97. package/dist/cjs/{to-ui-error-BJRhg6yc.js → to-ui-error-DK3jeQuM.js} +1 -1
  98. package/dist/cjs/ui.js +1 -1
  99. package/dist/cjs/{use-export-wallet-Dt1qheK5.js → use-export-wallet-BIKY-giO.js} +1 -1
  100. package/dist/cjs/{use-export-wallet-B5ujV5Nk.js → use-export-wallet-CTQ2_-Js.js} +1 -1
  101. package/dist/cjs/{useActiveWallet-Cn6zOXx5.js → useActiveWallet-Dkf84FVu.js} +1 -1
  102. package/dist/cjs/{useGetTokenPrice-761HAiva.js → useGetTokenPrice-BarE9ei-.js} +1 -1
  103. package/dist/cjs/{useI18n-DFGBJl_S.js → useI18n-BhKJoNb2.js} +1 -1
  104. package/dist/cjs/{usePrivy-cfS6o4tX.js → usePrivy-DhBaXRgr.js} +1 -1
  105. package/dist/cjs/{useSolanaRpcClient-PnNtmWdo.js → useSolanaRpcClient-ugDx2qoe.js} +1 -1
  106. package/dist/cjs/{useWallets-CKAypPZB.js → useWallets-BTiaq6pw.js} +1 -1
  107. package/dist/cjs/{useWallets-DeTGSqF_.js → useWallets-BWoRnKwk.js} +1 -1
  108. package/dist/dts/{events-context-Bz1yk0zU.d.mts → events-context-rAo2eQMj.d.mts} +1 -1
  109. package/dist/dts/{events-context-Bz1yk0zU.d.ts → events-context-rAo2eQMj.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 +46 -5
  115. package/dist/dts/index.d.ts +46 -5
  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-CIvz-X6P.d.mts → types-CDJGb3Hz.d.mts} +1 -37
  123. package/dist/dts/{types-CIvz-X6P.d.ts → types-CDJGb3Hz.d.ts} +1 -37
  124. package/dist/dts/ui.d.mts +1 -1
  125. package/dist/dts/ui.d.ts +1 -1
  126. package/dist/esm/{AccountNotFoundScreen-C055cesr.mjs → AccountNotFoundScreen-Bl7G6bA0.mjs} +1 -1
  127. package/dist/esm/{Address-BjZb-TIL.mjs → Address-CYplVOfb.mjs} +1 -1
  128. package/dist/esm/{AffirmativeConsentScreen-DXy2kEcy.mjs → AffirmativeConsentScreen-DM4TcGfm.mjs} +1 -1
  129. package/dist/esm/{AllowlistRejectionScreen-BIzWPeoe.mjs → AllowlistRejectionScreen-DVLzrq3E.mjs} +1 -1
  130. package/dist/esm/{AuthenticateWithWalletScreen-q3jQKiH6.mjs → AuthenticateWithWalletScreen-Dpv6YNie.mjs} +1 -1
  131. package/dist/esm/{AwaitingEvmToSolBridgingScreen-B4R4PEVm.mjs → AwaitingEvmToSolBridgingScreen-DZeUe4U5.mjs} +1 -1
  132. package/dist/esm/{AwaitingExternalEthereumTransferScreen-Dwy69FD1.mjs → AwaitingExternalEthereumTransferScreen-C0pxxksh.mjs} +1 -1
  133. package/dist/esm/{AwaitingPasswordlessCodeScreen-Ch_YXDTX.mjs → AwaitingPasswordlessCodeScreen-dIOkXMLZ.mjs} +1 -1
  134. package/dist/esm/{AwaitingSolToEvmBridgingScreen-spElnpUE.mjs → AwaitingSolToEvmBridgingScreen-Bnd2OljW.mjs} +1 -1
  135. package/dist/esm/{BridgeNetworkSelectionView-CaDh-Zck.mjs → BridgeNetworkSelectionView-BxiyBV8x.mjs} +1 -1
  136. package/dist/esm/{CaptchaScreen-BZy78GrD.mjs → CaptchaScreen-DQDC7JzN.mjs} +1 -1
  137. package/dist/esm/{CoinbaseOnrampStatusScreen-CTWZaE1o.mjs → CoinbaseOnrampStatusScreen-DXWKfYnS.mjs} +1 -1
  138. package/dist/esm/{ConnectEmailForm-0GOHNayM.mjs → ConnectEmailForm-BPL4v6UQ.mjs} +1 -1
  139. package/dist/esm/{ConnectLedgerScreen-CIPOaq8e.mjs → ConnectLedgerScreen-D-YZA4pE.mjs} +1 -1
  140. package/dist/esm/{ConnectOnlyLandingScreen-CbLV-cj4.mjs → ConnectOnlyLandingScreen-BG56JKfT.mjs} +1 -1
  141. package/dist/esm/{ConnectOnlyStatusScreen-bmx1wwk1.mjs → ConnectOnlyStatusScreen-BqVQKn1g.mjs} +1 -1
  142. package/dist/esm/{ConnectOrCreateScreen-DXw5Y8gN.mjs → ConnectOrCreateScreen-C8u98p86.mjs} +1 -1
  143. package/dist/esm/{ConnectPhoneForm-_lOAQG_X.mjs → ConnectPhoneForm-CvRD6txR.mjs} +1 -1
  144. package/dist/esm/{ConnectWalletView-CDqboUej.mjs → ConnectWalletView-DMF1481Z.mjs} +1 -1
  145. package/dist/esm/{ConnectionStatusScreen-D-9fLZfA.mjs → ConnectionStatusScreen-BqtmBBAM.mjs} +1 -1
  146. package/dist/esm/{CrossAppAuthScreen-Co723kT3.mjs → CrossAppAuthScreen-CNTOhQXE.mjs} +1 -1
  147. package/dist/esm/{CustomLandingScreenView-9mrgsDhT.mjs → CustomLandingScreenView-BDZmrAgq.mjs} +1 -1
  148. package/dist/esm/{DelegatedActionsConsentScreen-CyQTJHgT.mjs → DelegatedActionsConsentScreen-CRl17MGE.mjs} +1 -1
  149. package/dist/esm/{DelegatedActionsRevokeScreen-CFm4F3CM.mjs → DelegatedActionsRevokeScreen-cOpjsU01.mjs} +1 -1
  150. package/dist/esm/{EmbeddedWalletConnectingScreen-DmTtzGwq.mjs → EmbeddedWalletConnectingScreen-DC36YcCz.mjs} +1 -1
  151. package/dist/esm/EmbeddedWalletCreatedScreen-B1DDJTYV.mjs +1 -0
  152. package/dist/esm/{EmbeddedWalletKeyExportScreen-CsWRTEgd.mjs → EmbeddedWalletKeyExportScreen-BoFnx_RO.mjs} +1 -1
  153. package/dist/esm/{EmbeddedWalletOnAccountCreateScreen-DBAmWm90.mjs → EmbeddedWalletOnAccountCreateScreen-D_4FNOwi.mjs} +1 -1
  154. package/dist/esm/{EmbeddedWalletPasswordUpdateScreen-B5w6wtgf.mjs → EmbeddedWalletPasswordUpdateScreen-D6Uuy-A9.mjs} +1 -1
  155. package/dist/esm/{EmbeddedWalletPasswordUpdateSplashScreen-BvsscceO.mjs → EmbeddedWalletPasswordUpdateSplashScreen-BF8d9FtJ.mjs} +1 -1
  156. package/dist/esm/{EnrollTotp-uSQt9d2Q.mjs → EnrollTotp-BFVbJMub.mjs} +1 -1
  157. package/dist/esm/{ErrorScreen-DtGc3Chy.mjs → ErrorScreen-Gt5V4pQE.mjs} +1 -1
  158. package/dist/esm/{FarcasterConnectStatusScreen-DGeCyr6b.mjs → FarcasterConnectStatusScreen-CIOdHs1x.mjs} +1 -1
  159. package/dist/esm/{FarcasterSignerStatusScreen-DASa1xq2.mjs → FarcasterSignerStatusScreen-AvZdT50N.mjs} +1 -1
  160. package/dist/esm/{FundSolWalletWithExternalSolanaWallet-0jNi_hvn.mjs → FundSolWalletWithExternalSolanaWallet-Bd6oLp6j.mjs} +1 -1
  161. package/dist/esm/{FundWalletMethodHeader-Cfci4-83.mjs → FundWalletMethodHeader-DhUicNAG.mjs} +1 -1
  162. package/dist/esm/FundWithBankDepositScreen-Ct4tNUuQ.mjs +176 -0
  163. package/dist/esm/{FundingEditAmountScreen-vQUS-a80.mjs → FundingEditAmountScreen-DVXEtSrh.mjs} +1 -1
  164. package/dist/esm/{FundingMethodSelectionScreen-G8gkM1Mk.mjs → FundingMethodSelectionScreen-BmMfVAl1.mjs} +1 -1
  165. package/dist/esm/{InAppBrowserLoginNotPossible-C8mlSbYe.mjs → InAppBrowserLoginNotPossible-C9mhGZgZ.mjs} +1 -1
  166. package/dist/esm/{InstallWalletScreen-D0kdHc5W.mjs → InstallWalletScreen-D0Z6ZDpC.mjs} +1 -1
  167. package/dist/esm/{LandingScreen-0MlIkV3C.mjs → LandingScreen-J2lzt1oF.mjs} +1 -1
  168. package/dist/esm/{LinkConflictScreen-DW31R5fr.mjs → LinkConflictScreen-Bug434v0.mjs} +1 -1
  169. package/dist/esm/{LinkEmailScreen-B10iXGH8.mjs → LinkEmailScreen-B0OLiefL.mjs} +1 -1
  170. package/dist/esm/{LinkPasskeyScreen-OxaghvUl.mjs → LinkPasskeyScreen-D9SIq3bj.mjs} +1 -1
  171. package/dist/esm/{LinkPhoneScreen-Cdg3eg7w.mjs → LinkPhoneScreen-D__kO_fD.mjs} +1 -1
  172. package/dist/esm/{LoginFailedScreen-BVOo2ycm.mjs → LoginFailedScreen-qfmnt41u.mjs} +1 -1
  173. package/dist/esm/{ManualTransferScreen-_04Sq7zU.mjs → ManualTransferScreen-BFCyDGSu.mjs} +1 -1
  174. package/dist/esm/{MfaAuthEnrollmentFlowScreen-DApO6DPY.mjs → MfaAuthEnrollmentFlowScreen-D0w3-vdh.mjs} +1 -1
  175. package/dist/esm/{MfaAuthVerifyFlowScreen-mdmdgWdO.mjs → MfaAuthVerifyFlowScreen-CRYURiDv.mjs} +1 -1
  176. package/dist/esm/{MfaEnrollmentFlowScreen-DRZTnt-I.mjs → MfaEnrollmentFlowScreen-DdMNW5I5.mjs} +1 -1
  177. package/dist/esm/{MfaVerifyFlowScreen-mrf95cEs.mjs → MfaVerifyFlowScreen-Cp4spBFc.mjs} +1 -1
  178. package/dist/esm/{ModalHeader-D8-mhjp4.mjs → ModalHeader-o3NBflPS.mjs} +1 -1
  179. package/dist/esm/{MoonpayStatusScreen-DDSK5dda.mjs → MoonpayStatusScreen-DEh0wNk6.mjs} +1 -1
  180. package/dist/esm/{OAuthStatusScreen-DSAUQ_YN.mjs → OAuthStatusScreen-C7AX6T_8.mjs} +1 -1
  181. package/dist/esm/{PasskeySelectSignupOrLogin-G19VpAdI.mjs → PasskeySelectSignupOrLogin-rWeNAlAx.mjs} +1 -1
  182. package/dist/esm/{PasskeyStatusScreen-TD2nYAnk.mjs → PasskeyStatusScreen-B787hD8-.mjs} +1 -1
  183. package/dist/esm/{PasswordRecoveryScreen-C0oVVZYe.mjs → PasswordRecoveryScreen-Cg8bsXya.mjs} +1 -1
  184. package/dist/esm/{QrCode-C1tgJtOy.mjs → QrCode-rl0SJEeD.mjs} +1 -1
  185. package/dist/esm/{RecoveryOAuthStatusScreen-Ca9VYOrA.mjs → RecoveryOAuthStatusScreen-gxcHRbq0.mjs} +1 -1
  186. package/dist/esm/{RecoveryPasswordCreateScreen-Q1zuy9fu.mjs → RecoveryPasswordCreateScreen-BA_D-kAG.mjs} +1 -1
  187. package/dist/esm/{RecoverySelectionScreen-scmqFA8Y.mjs → RecoverySelectionScreen-CRGkO5yf.mjs} +1 -1
  188. package/dist/esm/{Screen-Bp-TN9gb.mjs → Screen-Olwu6khI.mjs} +1 -1
  189. package/dist/esm/{ScreenLayout-DTmQLGPf.mjs → ScreenLayout-C8IaXeHq.mjs} +1 -1
  190. package/dist/esm/{SetAutomaticRecoveryScreen-D-__1Pf7.mjs → SetAutomaticRecoveryScreen-DvKhJA06.mjs} +1 -1
  191. package/dist/esm/{SetWalletPasswordForm-0nuoz3XZ.mjs → SetWalletPasswordForm-J_hFHP-B.mjs} +1 -1
  192. package/dist/esm/{SignRequestScreen-D6HSUOxx.mjs → SignRequestScreen-CL1SQeYq.mjs} +1 -1
  193. package/dist/esm/{StandardSignAndSendTransactionScreen-YlstFfkB.mjs → StandardSignAndSendTransactionScreen-DJMqA41z.mjs} +1 -1
  194. package/dist/esm/{TelegramAuthScreen-DHCcieoC.mjs → TelegramAuthScreen-DpKMNMVv.mjs} +1 -1
  195. package/dist/esm/{TransactionDetails-BurRo8R0.mjs → TransactionDetails-D9-ndAu8.mjs} +1 -1
  196. package/dist/esm/{TransactionErrorView-CPFrt0L4.mjs → TransactionErrorView-yLqUT7Rl.mjs} +1 -1
  197. package/dist/esm/{TransferFromWalletScreen-BG5Mj5tz.mjs → TransferFromWalletScreen-5nMASUt-.mjs} +1 -1
  198. package/dist/esm/{TransferOrBridgeLoadingScreen-DcCdHB-g.mjs → TransferOrBridgeLoadingScreen-MqSi9Eb8.mjs} +1 -1
  199. package/dist/esm/{UpdateEmailScreen-ndRi1gY6.mjs → UpdateEmailScreen-Cu56W559.mjs} +1 -1
  200. package/dist/esm/{UpdatePhoneScreen-DoH__glA.mjs → UpdatePhoneScreen-55t_PLxV.mjs} +1 -1
  201. package/dist/esm/{UserLimitReachedScreen-BLzaOW7F.mjs → UserLimitReachedScreen-CizlxFDa.mjs} +1 -1
  202. package/dist/esm/{WalletInfoCard-DFt8ndGE.mjs → WalletInfoCard-CDrk5VVS.mjs} +1 -1
  203. package/dist/esm/{WalletInterstitialScreen-BQ-ku50j.mjs → WalletInterstitialScreen-C0EzB23i.mjs} +1 -1
  204. package/dist/esm/{WalletLink--05Hzo2b.mjs → WalletLink-CZavxRCS.mjs} +1 -1
  205. package/dist/esm/{WalletOverflowButton-BlijhJnI.mjs → WalletOverflowButton-CkCL3wvE.mjs} +1 -1
  206. package/dist/esm/abstract-smart-wallets.mjs +1 -1
  207. package/dist/esm/context-BeiVf64h.mjs +1 -0
  208. package/dist/esm/{ethers-D1WT71Ay.mjs → ethers-CJf4V9xJ.mjs} +1 -1
  209. package/dist/esm/extended-chains.mjs +1 -1
  210. package/dist/esm/{get-is-unified-wallet-Boa8DYrQ.mjs → get-is-unified-wallet-CyC08yWM.mjs} +1 -1
  211. package/dist/esm/index-BAl9y5La.mjs +174 -0
  212. package/dist/esm/{index-C9k7EfLZ.mjs → index-DCaoh7wM.mjs} +1 -1
  213. package/dist/esm/{index-BH9-XZRZ.mjs → index-M8HqoPUl.mjs} +1 -1
  214. package/dist/esm/index.mjs +1 -1
  215. package/dist/esm/internal.mjs +1 -1
  216. package/dist/esm/{shared-CwuyxHmv.mjs → shared-DWMbzbT_.mjs} +1 -1
  217. package/dist/esm/{shouldProceedtoEmbeddedWalletCreationFlow-BMF_3TVv.mjs → shouldProceedtoEmbeddedWalletCreationFlow-_LduuU-p.mjs} +1 -1
  218. package/dist/esm/{smart-wallets-DOAgnxKI.mjs → smart-wallets-69e9jC8u.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-BmZHuqSX.mjs → styles-DOOmqCS1.mjs} +1 -1
  222. package/dist/esm/{to-ui-error-REESv0kM.mjs → to-ui-error-Crh1yzND.mjs} +1 -1
  223. package/dist/esm/ui.mjs +1 -1
  224. package/dist/esm/{use-export-wallet-CV4p7L0b.mjs → use-export-wallet-5ZtAXJqT.mjs} +1 -1
  225. package/dist/esm/{use-export-wallet-DQde4t0V.mjs → use-export-wallet-CmiZHDwY.mjs} +1 -1
  226. package/dist/esm/{useActiveWallet-3RHPIBxJ.mjs → useActiveWallet-CdOTNCcL.mjs} +1 -1
  227. package/dist/esm/{useGetTokenPrice-BPBpM07F.mjs → useGetTokenPrice-TFzNln4c.mjs} +1 -1
  228. package/dist/esm/{useI18n-BuIe8nUA.mjs → useI18n-MsO3QTRN.mjs} +1 -1
  229. package/dist/esm/{usePrivy-6nkpbErN.mjs → usePrivy-D6pEtdwq.mjs} +1 -1
  230. package/dist/esm/{useSolanaRpcClient-BUWOblv_.mjs → useSolanaRpcClient-Re4dIYnK.mjs} +1 -1
  231. package/dist/esm/{useWallets-C_dCo2_Q.mjs → useWallets-AiuOd29U.mjs} +1 -1
  232. package/dist/esm/{useWallets-CR0z5IIt.mjs → useWallets-BCEKqhGq.mjs} +1 -1
  233. package/package.json +6 -6
  234. package/dist/cjs/FundWithBankDepositScreen-D_qA2wCk.js +0 -176
  235. package/dist/cjs/index-C8lpxYDX.js +0 -174
  236. package/dist/esm/EmbeddedWalletCreatedScreen-Cj1c5KyP.mjs +0 -1
  237. package/dist/esm/FundWithBankDepositScreen-D_uu3GEF.mjs +0 -176
  238. package/dist/esm/context-WTldtXS8.mjs +0 -1
  239. package/dist/esm/index-BBRkihRn.mjs +0 -174
@@ -1,3 +1,3 @@
1
- import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-WTldtXS8.mjs";import{c,b as m,u}from"./internal-context-Z-fyxadS.mjs";import{a as l,u as p}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-BMF_3TVv.mjs";import{S as y}from"./ScreenLayout-DTmQLGPf.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-BBRkihRn.mjs";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"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-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=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),f={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:f,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[b,C]=t("loading"),[A,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let x=async()=>{C("loading");try{k?await f():await y(),C("success")}catch(e){P(e),C("error")}};return s((()=>{if("success"===b&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,b]),s((()=>{x()}),[]),/*#__PURE__*/e(h,{status:b,passkeySignupFlow:k,error:A,onRetry:x})}};let g=i.span`
1
+ import{jsx as e}from"react/jsx-runtime";import{FingerprintIcon as r}from"lucide-react";import{useState as t,useRef as o,useEffect as s}from"react";import{styled as i}from"styled-components";import{u as a,q as n}from"./context-BeiVf64h.mjs";import{c,b as m,u}from"./internal-context-Z-fyxadS.mjs";import{a as l,u as p}from"./get-is-unified-wallet-CyC08yWM.mjs";import{s as d}from"./shouldProceedtoEmbeddedWalletCreationFlow-_LduuU-p.mjs";import{S as y}from"./ScreenLayout-C8IaXeHq.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./index-BAl9y5La.mjs";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"./useWallets-BCEKqhGq.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-D6pEtdwq.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./ModalHeader-o3NBflPS.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const h=({status:t,passkeySignupFlow:o=!1,error:s,onRetry:i})=>/*#__PURE__*/e(y,{title:(()=>{switch(t){case"loading":return"Waiting for passkey";case"success":return"Success";case"error":return"Something went wrong"}})(),subtitle:/*#__PURE__*/e(g,{children:(()=>{switch(t){case"loading":return o?"Please follow prompts to register your passkey.":"Please follow prompts to verify your passkey.\nYou will have to sign up with another method first to register a passkey for your account.";case"success":return"You've successfully logged in with your passkey.";case"error":if(s instanceof c){if(s.privyErrorCode===m.CANNOT_LINK_MORE_OF_TYPE)return"Cannot link more passkeys to account.";if(s.privyErrorCode===m.PASSKEY_NOT_ALLOWED)return"Passkey request timed out or rejected by user.\nYou will have to sign up with another method first to register a passkey for your account."}return"An unknown error occurred.\nYou will have to sign up with another method first to register a passkey for your account."}})()}),icon:r,iconVariant:"loading",iconLoadingStatus:{success:"success"===t,fail:"error"===t},primaryCta:"error"===t&&i?{label:"Retry",onClick:i}:"success"===t?{label:"Continue",disabled:!0}:void 0,watermark:!0}),f={component:()=>{let{data:r,setModalData:i,navigate:c}=l(),m=a(),{loginWithPasskey:y,signupWithPasskey:f,closePrivyModal:g,createAnalyticsEvent:v}=u(),{user:w,logout:j}=p(),{passkeySignupFlow:k}=r?.passkeyAuthModalData??{},S=n-500,[b,C]=t("loading"),[A,P]=t(null),E=o([]),W=e=>{E.current=[e,...E.current]};s((()=>()=>{E.current.forEach((e=>clearTimeout(e))),E.current=[]}),[]);let x=async()=>{C("loading");try{k?await f():await y(),C("success")}catch(e){P(e),C("error")}};return s((()=>{if("success"===b&&w){if(m?.legal.requireUsersAcceptTerms&&!w.hasAcceptedTerms)return void W(setTimeout((()=>{c("AffirmativeConsentScreen")}),S));if(!d(w,m?.embeddedWallets))return void W(setTimeout((()=>{g({shouldCallAuthOnSuccess:!0,isSuccess:!0})}),n));W(setTimeout((()=>{i({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),v({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"PasskeyStatusScreen"}}),j()},callAuthOnSuccessOnClose:!0}}),c("EmbeddedWalletOnAccountCreateScreen")}),S))}}),[w,b]),s((()=>{x()}),[]),/*#__PURE__*/e(h,{status:b,passkeySignupFlow:k,error:A,onRetry:x})}};let g=i.span`
2
2
  white-space: pre-wrap;
3
3
  `;export{f as PasskeyStatusScreen,h as PasskeyStatusScreenView,f as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as o,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as l,h as c}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{P as m}from"./ModalHeader-D8-mhjp4.mjs";import{S as d}from"./Layouts-BlFm53ED.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-CwuyxHmv.mjs";import{n as f}from"./index-BBRkihRn.mjs";import{u as w,m as g}from"./internal-context-Z-fyxadS.mjs";import{S as j}from"./Screen-Bp-TN9gb.mjs";import"@privy-io/are-addresses-equal";import"./context-WTldtXS8.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";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"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";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"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./index-Dq_xe9dz.mjs";const b={component:()=>{let[s,a]=o(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:I,createAnalyticsEvent:P,client:S}=w(),{navigate:W,data:T,onUserCloseViaDialogOrKeybindRef:_}=l(),[E,R]=o(void 0),[U,H]=o(""),[M,F]=o(!1),{entropyId:N,entropyIdVerifier:O,onCompleteNavigateTo:V,onSuccess:$,onFailure:z}=T.recoverWallet,L=(e="User exited before their wallet could be recovered")=>{I({shouldCallAuthOnSuccess:!1}),z("string"==typeof e?new g(e):e)};_.current=L,i((()=>{if(!m)return L("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:t,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:L}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&R(e)})(e.target.value),disabled:M,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!U&&/*#__PURE__*/r(k,{children:U})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(C,{loading:M||!A,disabled:!E,onClick:async()=>{F(!0);let e=await S.getAccessToken(),r=c(b,N);if(!e||!r||null===E)return L("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:N,entropyIdVerifier:O,recoveryPassword:E})),H(""),V?W(V):I({shouldCallAuthOnSuccess:!1}),$?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?H("Invalid recovery password, please try again."):H("An error has occurred, please try again.")}finally{F(!1)}},$hideAnimations:!N&&M,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=s.div`
1
+ import{jsxs as e,jsx as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ShieldCheckIcon";import{useState as o,useEffect as i}from"react";import{styled as s,css as a}from"styled-components";import{u as n,a as l,h as c}from"./get-is-unified-wallet-CyC08yWM.mjs";import{P as m}from"./ModalHeader-o3NBflPS.mjs";import{S as d}from"./Layouts-BlFm53ED.mjs";import{P as p,a as u,I as h,H as y,S as v}from"./shared-DWMbzbT_.mjs";import{n as f}from"./index-BAl9y5La.mjs";import{u as w,m as g}from"./internal-context-Z-fyxadS.mjs";import{S as j}from"./Screen-Olwu6khI.mjs";import"@privy-io/are-addresses-equal";import"./context-BeiVf64h.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.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"@heroicons/react/24/outline/ArrowPathIcon";import"@heroicons/react/24/outline/EyeIcon";import"@heroicons/react/24/outline/EyeSlashIcon";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.mjs";import"@scure/base";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.mjs";import"./index-Dq_xe9dz.mjs";const b={component:()=>{let[s,a]=o(!0),{authenticated:m,user:b}=n(),{walletProxy:A,closePrivyModal:I,createAnalyticsEvent:P,client:S}=w(),{navigate:W,data:T,onUserCloseViaDialogOrKeybindRef:_}=l(),[E,R]=o(void 0),[U,H]=o(""),[M,F]=o(!1),{entropyId:N,entropyIdVerifier:O,onCompleteNavigateTo:V,onSuccess:$,onFailure:z}=T.recoverWallet,L=(e="User exited before their wallet could be recovered")=>{I({shouldCallAuthOnSuccess:!1}),z("string"==typeof e?new g(e):e)};_.current=L,i((()=>{if(!m)return L("User must be authenticated and have a Privy wallet before it can be recovered")}),[m]);/*#__PURE__*/return e(j,{children:[/*#__PURE__*/r(j.Header,{icon:t,title:"Enter your password",subtitle:"Please provision your account on this new device. To continue, enter your recovery password.",showClose:!0,onClose:L}),/*#__PURE__*/r(j.Body,{children:/*#__PURE__*/r(x,{children:/*#__PURE__*/e("div",{children:[/*#__PURE__*/e(p,{children:[/*#__PURE__*/r(u,{type:s?"password":"text",onChange:e=>(e=>{e&&R(e)})(e.target.value),disabled:M,style:{paddingRight:"2.3rem"}}),/*#__PURE__*/r(h,{style:{right:"0.75rem"},children:s?/*#__PURE__*/r(y,{onClick:()=>a(!1)}):/*#__PURE__*/r(v,{onClick:()=>a(!0)})})]}),!!U&&/*#__PURE__*/r(k,{children:U})]})})}),/*#__PURE__*/e(j.Footer,{children:[/*#__PURE__*/r(j.HelpText,{children:/*#__PURE__*/e(d,{children:[/*#__PURE__*/r("h4",{children:"Why is this necessary?"}),/*#__PURE__*/r("p",{children:"You previously set a password for this wallet. This helps ensure only you can access it"})]})}),/*#__PURE__*/r(j.Actions,{children:/*#__PURE__*/r(C,{loading:M||!A,disabled:!E,onClick:async()=>{F(!0);let e=await S.getAccessToken(),r=c(b,N);if(!e||!r||null===E)return L("User must be authenticated and have a Privy wallet before it can be recovered");try{P({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r.address}}),await(A?.recover({accessToken:e,entropyId:N,entropyIdVerifier:O,recoveryPassword:E})),H(""),V?W(V):I({shouldCallAuthOnSuccess:!1}),$?.(r),P({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r.address}})}catch(e){f(e)?H("Invalid recovery password, please try again."):H("An error has occurred, please try again.")}finally{F(!1)}},$hideAnimations:!N&&M,children:"Recover your account"})}),/*#__PURE__*/r(j.Watermark,{})]})]})}};let x=s.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 1.5rem;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as c}from"./context-WTldtXS8.mjs";import{a2 as n,a3 as a}from"./useActiveWallet-3RHPIBxJ.mjs";const g=()=>/*#__PURE__*/e("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let h=(e,r,o,t,l)=>{for(let i=r;i<r+t;i++)for(let r=o;r<o+l;r++){let o=e?.[r];o&&o[i]&&(o[i]=0)}return e},m=(e,r)=>{let o=t.create(e,{errorCorrectionLevel:r}).modules,l=a(Array.from(o.data),o.size);return l=h(l,0,0,7,7),l=h(l,l.length-7,0,7,7),h(l,0,l.length-7,7,7)},d=({x:r,y:t,cellSize:l,bgColor:i,fgColor:c})=>
1
+ import{jsx as e,jsxs as r,Fragment as o}from"react/jsx-runtime";import t from"qrcode";import l from"react";import{styled as i}from"styled-components";import{u as c}from"./context-BeiVf64h.mjs";import{a2 as n,a3 as a}from"./useActiveWallet-CdOTNCcL.mjs";const g=()=>/*#__PURE__*/e("svg",{width:"200",height:"200",viewBox:"-77 -77 200 200",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"28px",width:"28px"},children:/*#__PURE__*/e("rect",{width:"50",height:"50",fill:"black",rx:10,ry:10})});let h=(e,r,o,t,l)=>{for(let i=r;i<r+t;i++)for(let r=o;r<o+l;r++){let o=e?.[r];o&&o[i]&&(o[i]=0)}return e},m=(e,r)=>{let o=t.create(e,{errorCorrectionLevel:r}).modules,l=a(Array.from(o.data),o.size);return l=h(l,0,0,7,7),l=h(l,l.length-7,0,7,7),h(l,0,l.length-7,7,7)},d=({x:r,y:t,cellSize:l,bgColor:i,fgColor:c})=>
2
2
  /*#__PURE__*/e(o,{children:[0,1,2].map((o=>/*#__PURE__*/e("circle",{r:l*(7-2*o)/2,cx:r+7*l/2,cy:t+7*l/2,fill:o%2!=0?i:c},`finder-${r}-${t}-${o}`)))}),s=({cellSize:r,matrixSize:t,bgColor:l,fgColor:i})=>/*#__PURE__*/e(o,{children:[[0,0],[(t-7)*r,0],[0,(t-7)*r]].map((([o,t])=>/*#__PURE__*/e(d,{x:o,y:t,cellSize:r,bgColor:l,fgColor:i},`finder-${o}-${t}`)))}),p=({matrix:r,cellSize:t,color:i})=>/*#__PURE__*/e(o,{children:r.map(((r,o)=>r.map(((r,c)=>r?/*#__PURE__*/e("rect",{height:t-.4,width:t-.4,x:o*t+.1*t,y:c*t+.1*t,rx:.5*t,ry:.5*t,fill:i},`cell-${o}-${c}`):/*#__PURE__*/e(l.Fragment,{},`circle-${o}-${c}`)))))}),u=({cellSize:t,matrixSize:l,element:i,sizePercentage:c,bgColor:n})=>{if(!i)/*#__PURE__*/return e(o,{});let a=l*(c||.14),g=Math.floor(l/2-a/2),h=Math.floor(l/2+a/2);(h-g)%2!=l%2&&(h+=1);let m=(h-g)*t,d=m-.2*m,s=g*t;/*#__PURE__*/return r(o,{children:[/*#__PURE__*/e("rect",{x:g*t,y:g*t,width:m,height:m,fill:n}),/*#__PURE__*/e(i,{x:s+.1*m,y:s+.1*m,height:d,width:d})]})},f=o=>{let t=o.outputSize,l=m(o.url,o.errorCorrectionLevel),i=t/l.length,c=n(2*i,{min:.025*t,max:.036*t});/*#__PURE__*/return r("svg",{height:o.outputSize,width:o.outputSize,viewBox:`0 0 ${o.outputSize} ${o.outputSize}`,style:{height:"100%",width:"100%",padding:`${c}px`},children:[/*#__PURE__*/e(p,{matrix:l,cellSize:i,color:o.fgColor}),/*#__PURE__*/e(s,{cellSize:i,matrixSize:l.length,fgColor:o.fgColor,bgColor:o.bgColor}),/*#__PURE__*/e(u,{cellSize:i,element:o.logo?.element,bgColor:o.bgColor,matrixSize:l.length})]})},x=i.div.attrs({className:"ph-no-capture"})`
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{M as c,P as s,B as l}from"./ModalHeader-D8-mhjp4.mjs";import{C as n}from"./ScreenHeader-CHmc4-Lu.mjs";import{q as d}from"./context-WTldtXS8.mjs";import{o as p,q as u,r as m,v,R as h,l as w}from"./index-BBRkihRn.mjs";import{a as y,f,b as _,u as A}from"./internal-context-Z-fyxadS.mjs";import{a as E,u as g,g as C}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{a8 as b,a9 as R,aa as k}from"./paths-3HW55qZg.mjs";import{g as T}from"./useWallets-CR0z5IIt.mjs";import{a as O}from"./events-context-CI0iqAXA.mjs";import{A as N,G as S,R as x}from"./styles-BsotlekN.mjs";import"styled-components";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"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"tinycolor2";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";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";async function I({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function j({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new y("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new y("User denied confirmation during OAuth flow");try{return(await e.post(b,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=f(e);if(t.privyErrorCode)throw new y(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new y("Invalid code during oauth flow.",void 0,_.OAUTH_USER_DENIED);throw new y("Invalid code during OAuth flow.",void 0,_.UNKNOWN_AUTH_ERROR)}}async function M({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(R,{client_type:"web"})).url}:{url:(await e.post(k,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw f(e)}}let U={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=g(),{navigate:u,setModalData:m,data:f}=E(),{closePrivyModal:b,createAnalyticsEvent:R}=A(),{execute:k}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=A(),{data:o}=E(),{user:a}=g(),i=O(),{create:c}=v();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new y("Missing client");function v(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new y("Recovery OAuth failed")}switch(s){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await M({api:e.api,provider:s});v(o);try{let a=await I({url:o,popup:n,provider:s});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:t??""}}),new y("Unexpected auth flow. This may be a phishing attempt.",void 0,_.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:s}}),new y("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),j({api:e.api,provider:s,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await M({api:e.api,provider:s});v(t);let{ckWebAuthToken:r}=await I({url:t,popup:n,provider:s});m=r,u=await e.getAccessToken()}}if(!t)throw new y("Cannot connect to wallet proxy");if(!u)throw new y("Unable to authorize user");switch(l){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new y("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:s}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:s}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=C(a);if(!o)throw i("setWalletRecovery","onError",_.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:c,entropyIdVerifier:l}=T(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=C(await r());if(!n)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:n});break}default:throw new y("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:P,isInAccountCreateFlow:D,shouldCreateEth:V,shouldCreateSol:L}=f?.recoveryOAuthStatus,[z,H]=o(void 0),[$,B]=o("create-wallet"===P);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=U[W].name,q=U[W].component,G=f?.recoverWallet?.onCompleteNavigateTo,K=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await k({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){H({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===P?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==P&&K.execute(D?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{D?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{R({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):b({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let Y=i((async()=>{await K.execute("recover"),G?u(G):S(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===P?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===P?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(c,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(q,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(s,{onClick:()=>{w(),H(void 0),"create-wallet"===P?K.execute("create-wallet"):Y()},disabled:!N&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(q,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(s,{onClick:Y,children:["Confirm with ",X]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
1
+ import{jsxs as e,Fragment as t,jsx as r}from"react/jsx-runtime";import{useState as o,useEffect as a,useCallback as i}from"react";import{M as c,P as s,B as l}from"./ModalHeader-o3NBflPS.mjs";import{C as n}from"./ScreenHeader-CHmc4-Lu.mjs";import{q as d}from"./context-BeiVf64h.mjs";import{o as p,q as u,r as m,v,R as h,l as w}from"./index-BAl9y5La.mjs";import{a as y,f,b as _,u as A}from"./internal-context-Z-fyxadS.mjs";import{a as E,u as g,g as C}from"./get-is-unified-wallet-CyC08yWM.mjs";import{a8 as b,a9 as R,aa as k}from"./paths-3HW55qZg.mjs";import{g as T}from"./useWallets-BCEKqhGq.mjs";import{a as O}from"./events-context-CI0iqAXA.mjs";import{A as N,G as S,R as x}from"./styles-BsotlekN.mjs";import"styled-components";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"@privy-io/js-sdk-core";import"eventemitter3";import"viem/utils";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"tinycolor2";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./usePrivy-D6pEtdwq.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";async function I({url:e,popup:t,provider:r}){return t.location=e,new Promise(((e,r)=>{function o(){t?.close(),window.removeEventListener("message",a)}function a(t){t.data&&("PRIVY_OAUTH_RESPONSE"===t.data.type&&t.data.stateCode&&t.data.authorizationCode&&(e(t.data),o()),"https://cdn.apple-cloudkit.com"===t.origin&&t.data.ckSession&&(e({type:"PRIVY_OAUTH_RESPONSE",ckWebAuthToken:t.data.ckSession}),o()),"PRIVY_OAUTH_ERROR"===t.data.type&&(r(t.data.error),o()))}window.addEventListener("message",a)}))}async function j({api:e,provider:t,stateCode:r,codeVerifier:o,authorizationCode:a}){if(!a||!r)throw new y("[OAuth AuthFlow] Authorization and state codes code must be set prior to calling authenicate.");if("undefined"===a)throw new y("User denied confirmation during OAuth flow");try{return(await e.post(b,{authorization_code:a,state_code:r,code_verifier:o,provider:t})).access_token}catch(e){let t=f(e);if(t.privyErrorCode)throw new y(t.message||"Invalid code during OAuth flow.",void 0,t.privyErrorCode);if("User denied confirmation during OAuth flow"===t.message)throw new y("Invalid code during oauth flow.",void 0,_.OAUTH_USER_DENIED);throw new y("Invalid code during OAuth flow.",void 0,_.UNKNOWN_AUTH_ERROR)}}async function M({api:e,provider:t}){let r=p(),o=u(),a=await m(r);try{return"icloud"===t?{url:(await e.post(R,{client_type:"web"})).url}:{url:(await e.post(k,{redirect_to:window.location.href,code_challenge:a,state_code:o})).url,codeVerifier:r,stateCode:o,provider:t}}catch(e){throw f(e)}}let U={"google-drive":{name:"Google Drive",component:S},icloud:{name:"iCloud",component:N}};const W={component:()=>{let{logout:p}=g(),{navigate:u,setModalData:m,data:f}=E(),{closePrivyModal:b,createAnalyticsEvent:R}=A(),{execute:k}=(()=>{let{client:e,walletProxy:t,refreshSessionAndUser:r}=A(),{data:o}=E(),{user:a}=g(),i=O(),{create:c}=v();return{execute:async({provider:s,action:l,popup:n,shouldCreateEth:d,shouldCreateSol:p})=>{let u,m;if(!e)throw new y("Missing client");function v(t){if(!t&&e)throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:"Unable to open recovery OAuth popup",provider:s}}),new y("Recovery OAuth failed")}switch(s){case"google-drive":{let t,r,{url:o,codeVerifier:a,stateCode:i}=await M({api:e.api,provider:s});v(o);try{let a=await I({url:o,popup:n,provider:s});if(t=a.stateCode,r=a.authorizationCode,t!==i)throw e.createAnalyticsEvent({eventName:"possible_phishing_attempt",payload:{provider:s,storedStateCode:i??"",returnedStateCode:t??""}}),new y("Unexpected auth flow. This may be a phishing attempt.",void 0,_.OAUTH_UNEXPECTED)}catch(t){throw e.createAnalyticsEvent({eventName:"recovery_oauth_error",payload:{error:t.toString(),provider:s}}),new y("Recovery OAuth failed")}[u,m]=await Promise.all([e.getAccessToken(),j({api:e.api,provider:s,codeVerifier:a,stateCode:t,authorizationCode:r})]);break}case"icloud":{let{url:t}=await M({api:e.api,provider:s});v(t);let{ckWebAuthToken:r}=await I({url:t,popup:n,provider:s});m=r,u=await e.getAccessToken()}}if(!t)throw new y("Cannot connect to wallet proxy");if(!u)throw new y("Unable to authorize user");switch(l){case"recover":{let r=o?.recoverWallet?.entropyId,a=o?.recoverWallet?.entropyIdVerifier;if(!r||!a)throw new y("Recovery OAuth failed");e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_started",payload:{walletAddress:r,recoveryMethod:s}}),await t.recover({accessToken:u,entropyId:r,entropyIdVerifier:a,recoveryAccessToken:m}),e.createAnalyticsEvent({eventName:"embedded_wallet_recovery_completed",payload:{walletAddress:r,recoveryMethod:s}});break}case"create-wallet":{let t;if(e.createAnalyticsEvent({eventName:"embedded_wallet_creation_started"}),d&&p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a}),t=await c({chainType:"solana",walletIndex:0,latestUser:t.user});else if(p)t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"solana",walletIndex:0,latestUser:a});else{if(!d)throw Error("Invalid args to create wallet");t=await c({recoveryMethod:s,recoveryAccessToken:m,chainType:"ethereum",walletIndex:0,latestUser:a})}if(!t)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to create wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_creation_completed",payload:{walletAddress:t.account.address}}),i("createWallet","onSuccess",{wallet:t.account});break}case"set-recovery":{let o=C(a);if(!o)throw i("setWalletRecovery","onError",_.EMBEDDED_WALLET_NOT_FOUND),Error("Embedded wallet not found");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_started",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}});let{entropyId:c,entropyIdVerifier:l}=T(a);await t.setRecovery({accessToken:u,entropyId:c,entropyIdVerifier:l,recoveryMethod:s,recoveryAccessToken:m});let n=C(await r());if(!n)throw i("createWallet","onError",_.UNKNOWN_EMBEDDED_WALLET_ERROR),Error("Failed to set recovery on wallet");e.createAnalyticsEvent({eventName:"embedded_wallet_set_recovery_completed",payload:{walletAddress:o.address,existingRecoveryMethod:o.recoveryMethod,targetRecoveryMethod:s}}),i("setWalletRecovery","onSuccess",{method:s,wallet:n});break}default:throw new y("Unsupported recovery action")}}}})(),[N,S]=o(!1),{provider:W,action:P,isInAccountCreateFlow:D,shouldCreateEth:V,shouldCreateSol:L}=f?.recoveryOAuthStatus,[z,H]=o(void 0),[$,B]=o("create-wallet"===P);if("user-passcode"===W)throw Error("RecoveryOAuthScreen should never be called with a wallet that specifies recoveryMethod: `user-passcode`");let F=U[W].name,q=U[W].component,G=f?.recoverWallet?.onCompleteNavigateTo,K=new h((async(e="create-wallet")=>(B(!0),new Promise(((t,r)=>{setTimeout((async()=>{try{let r=window.open();await k({provider:W,action:e,popup:r,shouldCreateEth:V,shouldCreateSol:L}),S(!0),t()}catch(t){H({message:`${"recover"===e?"Recovery":"Back up"} with ${F} unsuccessful`,detail:"recover"===P?`Please verify that you are selecting the ${F} account associated with your backup.`:"",retryable:!0}),r()}}),0)})))));a((()=>{"recover"!==P&&K.execute(D?"create-wallet":"set-recovery")}),[]),a((()=>{if(!N)return;let e=setTimeout((()=>{D?(m({createWallet:{onSuccess:()=>{},onFailure:e=>{R({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,screen:"RecoveryOAuthScreen"}}),p()},callAuthOnSuccessOnClose:!0,shouldCreateEth:!1,shouldCreateSol:!1}}),u("EmbeddedWalletCreatedScreen")):b({shouldCallAuthOnSuccess:!1})}),d);return()=>clearTimeout(e)}),[N]);let Y=i((async()=>{await K.execute("recover"),G?u(G):S(!0)}),[]),X="google-drive"===W?"Google Drive":"Apple iCloud",Q=N&&`Successfully ${"recover"===P?"recovered":"backed up"} with ${X}.`||z&&z.message||`${"recover"===P?"Recovering":"Backing up"} with ${X}...`,J=z?z.detail:"";/*#__PURE__*/return e(t,{children:[/*#__PURE__*/r(c,{}),$?/*#__PURE__*/r(t,{children:/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:Q,icon:/*#__PURE__*/r(q,{style:{width:"38px",height:"38px"}}),description:J}),z&&z?.retryable?/*#__PURE__*/r(s,{onClick:()=>{w(),H(void 0),"create-wallet"===P?K.execute("create-wallet"):Y()},disabled:!N&&!z?.retryable,children:"Try again"}):null]})}):/*#__PURE__*/e(x,{children:[/*#__PURE__*/r(n,{title:"Confirm it's really you",icon:/*#__PURE__*/r(q,{style:{height:42,width:48}}),description:`To confirm your identity, please log in to ${X} where your account is backed up.`}),/*#__PURE__*/e(s,{onClick:Y,children:["Confirm with ",X]})]}),/*#__PURE__*/r(l,{})]})}};export{W as RecoveryOAuthScreen,W as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{u as r}from"./context-WTldtXS8.mjs";import{v as i,R as s}from"./index-BBRkihRn.mjs";import{u as a,m as n}from"./internal-context-Z-fyxadS.mjs";import{a as c,u as l}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-0nuoz3XZ.mjs";import"@privy-io/js-sdk-core";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"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.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"./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{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=o(""),[j,f]=o(!1),[C,g]=o(),[I,x]=o(null),{create:b}=i(),{authenticated:P,user:S}=l(),{closePrivyModal:A,isNewUserThisSession:U,initializeWalletProxy:k}=a(),{onSuccess:E,onFailure:M,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=o(null),R=new s((async()=>{try{let e;if(O&&W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S}),e=await b({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"solana",walletIndex:0,latestUser:S});else{if(!O)throw Error("Invalid args to create wallet");e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S})}L(e),U?u("EmbeddedWalletCreatedScreen"):(E(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));t((()=>{I||k(3e4).then((e=>x(e)))}),[I]),t((()=>{if(!P||!S)return u("LandingScreen"),void M(Error("User must be authenticated before creating a Privy wallet"))}),[P]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:j,buttonHideAnimations:!D&&j,isResettingPassword:!1,error:y,password:C||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(M(new n("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(E(D),A({shouldCallAuthOnSuccess:T})):(M(new n("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:g,onPasswordGenerate:()=>g(p()),onSubmit:async()=>(f(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>f(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as o,useEffect as t}from"react";import{u as r}from"./context-BeiVf64h.mjs";import{v as i,R as s}from"./index-BAl9y5La.mjs";import{u as a,m as n}from"./internal-context-Z-fyxadS.mjs";import{a as c,u as l}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as m,g as p}from"./SetWalletPasswordForm-J_hFHP-B.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"./useWallets-BCEKqhGq.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-D6pEtdwq.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"@heroicons/react/24/outline/ExclamationTriangleIcon";import"./Layouts-BlFm53ED.mjs";import"./ModalHeader-o3NBflPS.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-DWMbzbT_.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{navigate:u,data:d,onUserCloseViaDialogOrKeybindRef:h}=c(),w=r(),[y,v]=o(""),[j,f]=o(!1),[C,g]=o(),[I,x]=o(null),{create:b}=i(),{authenticated:P,user:S}=l(),{closePrivyModal:A,isNewUserThisSession:U,initializeWalletProxy:k}=a(),{onSuccess:E,onFailure:M,callAuthOnSuccessOnClose:T,shouldCreateEth:O,shouldCreateSol:W}=d.createWallet,[D,L]=o(null),R=new s((async()=>{try{let e;if(O&&W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S}),e=await b({chainType:"solana",walletIndex:0,latestUser:e.user});else if(W)e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"solana",walletIndex:0,latestUser:S});else{if(!O)throw Error("Invalid args to create wallet");e=await b({recoveryMethod:"user-passcode",recoveryPassword:C,chainType:"ethereum",walletIndex:0,latestUser:S})}L(e),U?u("EmbeddedWalletCreatedScreen"):(E(e),A({shouldCallAuthOnSuccess:T}))}catch(e){v(e.message)}}));t((()=>{I||k(3e4).then((e=>x(e)))}),[I]),t((()=>{if(!P||!S)return u("LandingScreen"),void M(Error("User must be authenticated before creating a Privy wallet"))}),[P]),h.current=()=>null;/*#__PURE__*/return e(m,{config:{initiatedBy:"automatic"},appName:w?.name||"privy",loading:!I,buttonLoading:j,buttonHideAnimations:!D&&j,isResettingPassword:!1,error:y,password:C||"",onClose:()=>{D&&"user-passcode"!==D.account.recoveryMethod?(M(new n("User created a wallet but failed to set a password for it")),A({shouldCallAuthOnSuccess:!1})):D?(E(D),A({shouldCallAuthOnSuccess:T})):(M(new n("User wallet creation failed")),A({shouldCallAuthOnSuccess:!1}))},onPasswordChange:g,onPasswordGenerate:()=>g(p()),onSubmit:async()=>(f(!0),R.execute().then((()=>new Promise((e=>setTimeout(e,250))))).finally((()=>f(!1))))})}};export{u as EmbeddedWalletPasswordCreateScreen,u as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a,u as l,g as p}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{M as d,B as u,P as m}from"./ModalHeader-D8-mhjp4.mjs";import{C as h}from"./ScreenHeader-CHmc4-Lu.mjs";import{u as y}from"./context-WTldtXS8.mjs";import{u as v}from"./internal-context-Z-fyxadS.mjs";import{w as g}from"./index-BBRkihRn.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BsotlekN.mjs";import{U as k}from"./useActiveWallet-3RHPIBxJ.mjs";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useWallets-CR0z5IIt.mjs";import"./use-export-wallet-CV4p7L0b.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-6nkpbErN.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"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";let S=n.div`
1
+ import{jsxs as e,jsx as o,Fragment as r}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/LockClosedIcon";import i from"@heroicons/react/24/outline/PencilSquareIcon";import s from"@heroicons/react/24/outline/QuestionMarkCircleIcon";import{useState as c}from"react";import{styled as n}from"styled-components";import{a,u as l,g as p}from"./get-is-unified-wallet-CyC08yWM.mjs";import{M as d,B as u,P as m}from"./ModalHeader-o3NBflPS.mjs";import{C as h}from"./ScreenHeader-CHmc4-Lu.mjs";import{u as y}from"./context-BeiVf64h.mjs";import{u as v}from"./internal-context-Z-fyxadS.mjs";import{w as g}from"./index-BAl9y5La.mjs";import{R as f,A as w,G as C,a as j}from"./styles-BsotlekN.mjs";import{U as k}from"./useActiveWallet-CdOTNCcL.mjs";import"@privy-io/are-addresses-equal";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/XMarkIcon";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BCEKqhGq.mjs";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"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";let S=n.div`
2
2
  width: 24px;
3
3
  height: 24px;
4
4
  display: flex;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-3RHPIBxJ.mjs";import{M as t,B as a}from"./ModalHeader-D8-mhjp4.mjs";import{N as l}from"./index-Dq_xe9dz.mjs";const c=o.div`
1
+ import{jsx as e,jsxs as r}from"react/jsx-runtime";import i from"react";import{styled as o}from"styled-components";import{a4 as n}from"./useActiveWallet-CdOTNCcL.mjs";import{M as t,B as a}from"./ModalHeader-o3NBflPS.mjs";import{N as l}from"./index-Dq_xe9dz.mjs";const c=o.div`
2
2
  /* spacing tokens */
3
3
  --screen-space: 16px; /* base 1x = 16 */
4
4
  --screen-space-lg: calc(var(--screen-space) * 1.5); /* 24px */
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as l}from"react/jsx-runtime";import{a as t}from"./ModalHeader-D8-mhjp4.mjs";import{S as a}from"./Screen-Bp-TN9gb.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,footerText:o,watermark:c=!0,children:s,...m})=>{let h=n||i?/*#__PURE__*/e(r,{children:[n&&(()=>{let{label:e,...r}=n,a=r.variant||"primary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})(),i&&(()=>{let{label:e,...r}=i,a=r.variant||"secondary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})()]}):null;/*#__PURE__*/return e(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),s?/*#__PURE__*/l(a.Body,{children:s}):null,d||h||c?/*#__PURE__*/e(a.Footer,{children:[d?/*#__PURE__*/l(a.HelpText,{children:d}):null,h?/*#__PURE__*/l(a.Actions,{children:h}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null,o?/*#__PURE__*/l(a.FooterText,{children:o}):null]})};export{n as S};
1
+ import{jsxs as e,Fragment as r,jsx as l}from"react/jsx-runtime";import{a as t}from"./ModalHeader-o3NBflPS.mjs";import{S as a}from"./Screen-Olwu6khI.mjs";const n=({primaryCta:n,secondaryCta:i,helpText:d,footerText:o,watermark:c=!0,children:s,...m})=>{let h=n||i?/*#__PURE__*/e(r,{children:[n&&(()=>{let{label:e,...r}=n,a=r.variant||"primary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})(),i&&(()=>{let{label:e,...r}=i,a=r.variant||"secondary";/*#__PURE__*/return l(t,{...r,variant:a,style:{width:"100%",...r.style},children:e})})()]}):null;/*#__PURE__*/return e(a,{id:m.id,className:m.className,children:[/*#__PURE__*/l(a.Header,{...m}),s?/*#__PURE__*/l(a.Body,{children:s}):null,d||h||c?/*#__PURE__*/e(a.Footer,{children:[d?/*#__PURE__*/l(a.HelpText,{children:d}):null,h?/*#__PURE__*/l(a.Actions,{children:h}):null,c?/*#__PURE__*/l(a.Watermark,{}):null]}):null,o?/*#__PURE__*/l(a.FooterText,{children:o}):null]})};export{n as S};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{M as c,c as m,B as d}from"./ModalHeader-D8-mhjp4.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as h}from"./context-WTldtXS8.mjs";import{u as f}from"./internal-context-Z-fyxadS.mjs";import{Y as v}from"./useActiveWallet-3RHPIBxJ.mjs";import"@privy-io/are-addresses-equal";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"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";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";const g=p.div`
1
+ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/ExclamationTriangleIcon";import i from"@heroicons/react/24/outline/LockClosedIcon";import{useState as n}from"react";import{u as l,a,h as s}from"./get-is-unified-wallet-CyC08yWM.mjs";import{M as c,c as m,B as d}from"./ModalHeader-o3NBflPS.mjs";import{styled as p}from"styled-components";import{S as u}from"./Subtitle-CV-2yKE4.mjs";import{T as y}from"./Title-BnzYV3Is.mjs";import{q as h}from"./context-BeiVf64h.mjs";import{u as f}from"./internal-context-Z-fyxadS.mjs";import{Y as v}from"./useActiveWallet-CdOTNCcL.mjs";import"@privy-io/are-addresses-equal";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"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";const g=p.div`
2
2
  && {
3
3
  border-width: 4px;
4
4
  }
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-WTldtXS8.mjs";import{a as s}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as u,c as p}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-D8-mhjp4.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as j,e as A,f as I,g as L}from"./shared-CwuyxHmv.mjs";import{styled as E}from"styled-components";import{C as U}from"./Checkbox-BhNoOKjX.mjs";import z from"@heroicons/react/24/outline/KeyIcon";import D from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as T from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[p,y]=n(!0),[v,R]=n(!1),[P,j]=n(""),A=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:p?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:p?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!0)})})]}),
1
+ import{jsxs as e,Fragment as r,jsx as o}from"react/jsx-runtime";import{useState as n,useEffect as i,useMemo as t,useCallback as a,useReducer as l}from"react";import{q as c}from"./context-BeiVf64h.mjs";import{a as s}from"./get-is-unified-wallet-CyC08yWM.mjs";import d from"@heroicons/react/24/outline/ExclamationTriangleIcon";import{b as h,R as u,c as p}from"./Layouts-BlFm53ED.mjs";import{M as m,B as g,S as y,P as v}from"./ModalHeader-o3NBflPS.mjs";import{E as f,b as w,P as b,a as k,I as C,H as S,S as x,c as $,N as B,D as R,d as P,R as j,e as A,f as I,g as L}from"./shared-DWMbzbT_.mjs";import{styled as E}from"styled-components";import{C as U}from"./Checkbox-BhNoOKjX.mjs";import z from"@heroicons/react/24/outline/KeyIcon";import D from"@heroicons/react/24/solid/CheckCircleIcon";import H from"fast-password-entropy";import*as T from"secure-password-utilities";import{DEFAULT_WORDLIST as F}from"secure-password-utilities/wordlists";import M from"@heroicons/react/24/outline/ArrowDownTrayIcon";import K from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import O from"@heroicons/react/24/outline/DocumentDuplicateIcon";import N from"@heroicons/react/24/solid/XCircleIcon";import{C as W}from"./ScreenHeader-CHmc4-Lu.mjs";const Y=({buttonHideAnimations:t,buttonLoading:a,password:l,onSubmit:c,onBack:s})=>{let[p,y]=n(!0),[v,R]=n(!1),[P,j]=n(""),A=l===P;return i((()=>{P&&!v&&R(!0)}),[P]),/*#__PURE__*/e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:s}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-accent)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm your password"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Please re-enter your password below to continue."})]}),/*#__PURE__*/e(b,{children:[/*#__PURE__*/o(k,{value:P,onChange:e=>j(e.target.value),onKeyUp:e=>{"Enter"===e.key&&c()},onBlur:()=>R(!0),placeholder:"confirm your password",type:p?"password":"text",style:{paddingRight:"2.3rem"}}),/*#__PURE__*/o(C,{style:{right:"0.75rem"},children:p?/*#__PURE__*/o(S,{onClick:()=>y(!1)}):/*#__PURE__*/o(x,{onClick:()=>y(!0)})})]}),
2
2
  /*#__PURE__*/o($,{"aria-hidden":!v||A,error:!0,children:"Passwords do not match"})]}),/*#__PURE__*/o(B,{onClick:c,loading:a,disabled:!A,$hideAnimations:t,children:"Continue"}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})},Z=({buttonHideAnimations:i,buttonLoading:t,onSubmit:a,onBack:l,config:c})=>{let[s,p]=n(!1);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/o(m,{closeable:!1,backFn:l}),/*#__PURE__*/o(h,{}),/*#__PURE__*/e(f,{children:[/*#__PURE__*/e(w,{children:[/*#__PURE__*/o(d,{height:48,width:48,stroke:"var(--privy-color-background)",fill:"var(--privy-color-error)"}),/*#__PURE__*/o("h3",{style:{color:"var(--privy-color-foreground)"},children:"Confirm you have saved"}),/*#__PURE__*/o("p",{style:{color:"var(--privy-color-foreground-2)"},children:"Losing access to your password means you will lose access to your account."})]}),/*#__PURE__*/o(R,{children:/*#__PURE__*/e(P,{style:{color:"var(--privy-color-error)",cursor:"pointer"},onClick:e=>{e.preventDefault(),p((e=>!e))},children:[/*#__PURE__*/o(U,{color:"var(--privy-color-error)",readOnly:!0,checked:s}),/*#__PURE__*/o(r,{children:"I understand that if I lose my password and device, I will lose access to my account and my assets."})]})})]}),/*#__PURE__*/e(_,{children:["user"===c.initiatedBy&&/*#__PURE__*/o(y,{onClick:c.onCancel,disabled:t,children:"Cancel"}),/*#__PURE__*/o(B,{onClick:a,loading:t,$hideAnimations:i,disabled:!s,children:"Set Password"})]}),/*#__PURE__*/o(u,{}),/*#__PURE__*/o(g,{})]})};let _=E.div`
3
3
  display: flex;
4
4
  gap: 10px;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as h,j as y}from"./use-export-wallet-CV4p7L0b.mjs";import{W as f,q as x}from"./context-WTldtXS8.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{u as j,a as w}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as b}from"./ScreenLayout-DTmQLGPf.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-CR0z5IIt.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-D8-mhjp4.mjs";import"./useActiveWallet-3RHPIBxJ.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const v=s.img`
1
+ import{jsx as e,jsxs as t,Fragment as o}from"react/jsx-runtime";import{base64 as r}from"@scure/base";import{Edit as i}from"lucide-react";import{useState as n,useEffect as a}from"react";import{styled as s}from"styled-components";import{isHex as l,hexToString as c}from"viem";import{ProviderErrors as m}from"@privy-io/js-sdk-core";import{C as p}from"./CopyToClipboard-DSTf_eKU.mjs";import{a as d}from"./Layouts-BlFm53ED.mjs";import{M as u,D as g}from"./JsonTree-aPaJmPx7.mjs";import{P as h,j as y}from"./use-export-wallet-5ZtAXJqT.mjs";import{W as f,q as x}from"./context-BeiVf64h.mjs";import{u as C}from"./internal-context-Z-fyxadS.mjs";import{u as j,a as w}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as b}from"./ScreenLayout-C8IaXeHq.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"tinycolor2";import"ofetch";import"@privy-io/are-addresses-equal";import"./ModalHeader-o3NBflPS.mjs";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./events-context-CI0iqAXA.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const v=s.img`
2
2
  && {
3
3
  height: ${e=>"sm"===e.size?"65px":"140px"};
4
4
  width: ${e=>"sm"===e.size?"65px":"140px"};
@@ -1,4 +1,4 @@
1
- import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,k as l,g as d}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{u}from"./context-WTldtXS8.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-DtGc3Chy.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-D8-mhjp4.mjs";import{R as b}from"./Layouts-BlFm53ED.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink--05Hzo2b.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-3RHPIBxJ.mjs";import{T as $,a as L}from"./TransactionErrorView-CPFrt0L4.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as P,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as F,setTransactionMessageLifetimeUsingBlockhash as W,compileTransaction as B,getTransactionEncoder as J,getBase58Decoder as R,fetchAddressesForLookupTables as q}from"@solana/kit";import{a as D,f as M,s as U,b as H,u as V}from"./useSolanaRpcClient-BUWOblv_.mjs";import{D as z,T as G,a as X,S as Y,A as K,R as N,J as Q,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"@privy-io/are-addresses-equal";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-BBRkihRn.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-CR0z5IIt.mjs";import"./use-export-wallet-CV4p7L0b.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-6nkpbErN.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"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"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-DTmQLGPf.mjs";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.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"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-D1WT71Ay.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-BjZb-TIL.mjs";import"./WalletInfoCard-DFt8ndGE.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
1
+ import{jsxs as t,jsx as n,Fragment as e}from"react/jsx-runtime";import{useState as a,useMemo as r,useEffect as o}from"react";import{formatTokenAmount as i}from"@privy-io/js-sdk-core";import{a as s,u as c,k as l,g as d}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u}from"./context-BeiVf64h.mjs";import{u as m}from"./internal-context-Z-fyxadS.mjs";import{u as p}from"./useGetSolPrice-DwwjjGbd.mjs";import{ErrorScreenView as f}from"./ErrorScreen-Gt5V4pQE.mjs";import g from"@heroicons/react/24/outline/CheckCircleIcon";import{styled as h}from"styled-components";import{M as y,B as w,P as k}from"./ModalHeader-o3NBflPS.mjs";import{R as b}from"./Layouts-BlFm53ED.mjs";import{C as v}from"./ScreenHeader-CHmc4-Lu.mjs";import{a as A,R as I}from"./Row-C9vrS4Zi.mjs";import{L as S,V as j}from"./Value-tcJV9e0L.mjs";import{S as C,W as T}from"./WalletLink-CZavxRCS.mjs";import{e as O}from"./StackedContainer-B2vaEl56.mjs";import{Y as x}from"./useActiveWallet-CdOTNCcL.mjs";import{T as $,a as L}from"./TransactionErrorView-yLqUT7Rl.mjs";import{g as E}from"./transaction-CnfuREWo.mjs";import{pipe as P,getCompiledTransactionMessageDecoder as _,decompileTransactionMessage as F,setTransactionMessageLifetimeUsingBlockhash as W,compileTransaction as B,getTransactionEncoder as J,getBase58Decoder as R,fetchAddressesForLookupTables as q}from"@solana/kit";import{a as D,f as M,s as U,b as H,u as V}from"./useSolanaRpcClient-Re4dIYnK.mjs";import{D as z,T as G,a as X,S as Y,A as K,R as N,J as Q,g as Z}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import"@privy-io/are-addresses-equal";import"tinycolor2";import"ofetch";import"lucide-react";import"./index-BAl9y5La.mjs";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BCEKqhGq.mjs";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"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"./reservoir-0wfhnc0j.mjs";import"./ScreenLayout-C8IaXeHq.mjs";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.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"./LoadingSkeleton-U6-3yFwI.mjs";import"./ethers-CJf4V9xJ.mjs";import"@heroicons/react/24/outline";import"./ErrorMessage-D8VaAP5m.mjs";import"./LabelXs-oqZNqbm_.mjs";import"./Subtitle-CV-2yKE4.mjs";import"./Title-BnzYV3Is.mjs";import"./Address-CYplVOfb.mjs";import"./WalletInfoCard-CDrk5VVS.mjs";import"./shared-FM0rljBt.mjs";import"./Checkbox-BhNoOKjX.mjs";import"./ErrorBanner-CQERa7bL.mjs";import"@heroicons/react/24/outline/ExclamationCircleIcon";import"./WarningBanner-c8L53pJ2.mjs";import"@heroicons/react/24/outline/ExclamationTriangleIcon";import"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import"@heroicons/react/24/outline/ClipboardDocumentIcon";const tt=h.span`
2
2
  && {
3
3
  width: 82px;
4
4
  height: 82px;
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-BBRkihRn.mjs";import{u as s,q as n}from"./context-WTldtXS8.mjs";import{u as l,b as m,k as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as u}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-BMF_3TVv.mjs";import{S as g}from"./ScreenLayout-DTmQLGPf.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";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"tinycolor2";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 y=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(g,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},f={component:()=>{let{authenticated:g,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:j,resetNavigation:b,data:T}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:L}=l(),[k,x]=t(!1),[M,I]=t(void 0),D=o();async function N(){try{let e=await async function(){let e;if(!g){if(D.enabled&&"error"===D.status)throw new a(D.error,null,m.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),x(!0),R(!0)}catch(e){if(e?.privyErrorCode===m.ALLOWLIST_REJECTED)return I(void 0),b(),void j("AllowlistRejectionScreen");if(e?.privyErrorCode===m.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),b(),void j("UserLimitReachedScreen");if(e?.privyErrorCode===m.USER_DOES_NOT_EXIST)return I(void 0),b(),void j("AccountNotFoundScreen");if(e?.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),b(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:L()?.telegramAuthResult,telegramWebAppData:L()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void j("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{N()}),[]),r((()=>{if(!(f&&g&&k&&h))return;if(S?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{j("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),j("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[f,g,k,h]);/*#__PURE__*/return e(y,{success:k,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await C(void 0,T?.login?.disableSignup),await N()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{f as TelegramAuthScreen,y as TelegramAuthScreenView,f as default};
1
+ import{jsx as e}from"react/jsx-runtime";import{useState as t,useEffect as r}from"react";import{a as o,m as i,C as a}from"./index-BAl9y5La.mjs";import{u as s,q as n}from"./context-BeiVf64h.mjs";import{u as l,b as m,k as c}from"./internal-context-Z-fyxadS.mjs";import{u as d,a as u}from"./get-is-unified-wallet-CyC08yWM.mjs";import{s as p}from"./shouldProceedtoEmbeddedWalletCreationFlow-_LduuU-p.mjs";import{S as g}from"./ScreenLayout-C8IaXeHq.mjs";import{T as v}from"./telegram-B-JqnkqZ.mjs";import"@privy-io/js-sdk-core";import"uuid";import"jose";import"eventemitter3";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"styled-components";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"./useWallets-BCEKqhGq.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-D6pEtdwq.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"tinycolor2";import"./ModalHeader-o3NBflPS.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const y=({success:t,errorMessage:r,onRetry:o})=>{let i=t?"Successfully connected with Telegram":r?r.message:"Verifying connection to Telegram";/*#__PURE__*/return e(g,{title:i,subtitle:t?"You're good to go!":r?r.detail:"Just a few moments more",icon:v,iconVariant:"loading",iconLoadingStatus:{success:t,fail:!!r},secondaryCta:r?.retryable&&o?{label:"Retry",onClick:o}:void 0,watermark:!0})},f={component:()=>{let{authenticated:g,logout:v,ready:f,user:h}=d(),{setModalData:A,navigate:j,resetNavigation:b,data:T}=u(),S=s(),{initLoginWithTelegram:C,loginWithTelegram:w,updateWallets:E,setReadyToTrue:R,closePrivyModal:W,createAnalyticsEvent:_,getAuthMeta:L}=l(),[k,x]=t(!1),[M,I]=t(void 0),D=o();async function N(){try{let e=await async function(){let e;if(!g){if(D.enabled&&"error"===D.status)throw new a(D.error,null,m.CAPTCHA_FAILURE);return D.enabled&&"success"!==D.status&&(D.execute(),e=await D.waitForResult()),e}}();await w({captchaToken:e}),x(!0),R(!0)}catch(e){if(e?.privyErrorCode===m.ALLOWLIST_REJECTED)return I(void 0),b(),void j("AllowlistRejectionScreen");if(e?.privyErrorCode===m.USER_LIMIT_REACHED)return console.error(new c(e).toString()),I(void 0),b(),void j("UserLimitReachedScreen");if(e?.privyErrorCode===m.USER_DOES_NOT_EXIST)return I(void 0),b(),void j("AccountNotFoundScreen");if(e?.privyErrorCode===m.ACCOUNT_TRANSFER_REQUIRED&&e.data?.data?.nonce)return I(void 0),b(),A({accountTransfer:{nonce:e.data?.data?.nonce,account:e.data?.data?.subject,telegramAuthResult:L()?.telegramAuthResult,telegramWebAppData:L()?.telegramWebAppData,displayName:e.data?.data?.account?.displayName,linkMethod:"telegram",embeddedWalletAddress:e.data?.data?.otherUser?.embeddedWalletAddress}}),void j("LinkConflictScreen");let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}r((()=>{N()}),[]),r((()=>{if(!(f&&g&&k&&h))return;if(S?.legal.requireUsersAcceptTerms&&!h.hasAcceptedTerms){let e=setTimeout((()=>{j("AffirmativeConsentScreen")}),n);return()=>clearTimeout(e)}if(p(h,S.embeddedWallets)){let e=setTimeout((()=>{A({createWallet:{onSuccess:()=>{},onFailure:e=>{console.error(e),_({eventName:"embedded_wallet_creation_failure_logout",payload:{error:e,provider:"telegram",screen:"TelegramAuthScreen"}}),v()},callAuthOnSuccessOnClose:!0}}),j("EmbeddedWalletOnAccountCreateScreen")}),n);return()=>clearTimeout(e)}E();let e=setTimeout((()=>W({shouldCallAuthOnSuccess:!0,isSuccess:!0})),n);return()=>clearTimeout(e)}),[f,g,k,h]);/*#__PURE__*/return e(y,{success:k,errorMessage:M,onRetry:M?.retryable?async()=>{try{I(void 0),T?.telegramAuthModalData?.seamlessAuth||await C(void 0,T?.login?.disableSignup),await N()}catch(e){let{retryable:t,detail:r}=i(e);I({retryable:t,detail:r,message:"Authentication failed"})}}:void 0})},isCaptchaRequired:!0,isShownBeforeReady:!0};export{f as TelegramAuthScreen,y as TelegramAuthScreenView,f as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink--05Hzo2b.mjs";import{g as d}from"./ethers-D1WT71Ay.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-WTldtXS8.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(m,{style:{...r},children:n})]});let f=n.div`
1
+ import{jsxs as e,jsx as i,Fragment as t}from"react/jsx-runtime";import{styled as n}from"styled-components";import{P as r,H as l,W as o}from"./WalletLink-CZavxRCS.mjs";import{g as d}from"./ethers-CJf4V9xJ.mjs";import{F as a}from"./Layouts-BlFm53ED.mjs";import c from"@heroicons/react/24/outline/ChevronDownIcon";import{createContext as s,useState as h,useContext as p}from"react";import{s as v,u}from"./context-BeiVf64h.mjs";const g=({label:t,children:n,valueStyles:r})=>/*#__PURE__*/e(f,{children:[/*#__PURE__*/i("div",{children:t}),/*#__PURE__*/i(m,{style:{...r},children:n})]});let f=n.div`
2
2
  display: flex;
3
3
  align-items: center;
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon as i,ArrowRightIcon as o,ChevronDownIcon as t}from"@heroicons/react/24/outline";import{useState as l}from"react";import{styled as a}from"styled-components";import{formatTokenAmount as s}from"@privy-io/js-sdk-core";import{M as c,P as d,E as h,B as m,b as u}from"./ModalHeader-D8-mhjp4.mjs";import{L as p,V as g,a as f}from"./Value-tcJV9e0L.mjs";import{a as y,R as k}from"./Row-C9vrS4Zi.mjs";import{E as x}from"./ErrorMessage-D8VaAP5m.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{S as b}from"./Subtitle-CV-2yKE4.mjs";import{T as w}from"./Title-BnzYV3Is.mjs";import{A as T}from"./Address-BjZb-TIL.mjs";import{W as I}from"./WalletInfoCard-DFt8ndGE.mjs";import{u as A}from"./context-WTldtXS8.mjs";import{Y as S}from"./useActiveWallet-3RHPIBxJ.mjs";import{L as C}from"./LoadingSkeleton-U6-3yFwI.mjs";import{isAddress as $}from"viem";import{B as j}from"./shared-FM0rljBt.mjs";import{C as M}from"./Checkbox-BhNoOKjX.mjs";import{E}from"./ErrorBanner-CQERa7bL.mjs";import{W as O}from"./WarningBanner-c8L53pJ2.mjs";import D from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentIcon";import F from"@heroicons/react/24/outline/ExclamationCircleIcon";import{u as L}from"./internal-context-Z-fyxadS.mjs";const P=a(p)`
1
+ import{jsx as e,jsxs as r,Fragment as n}from"react/jsx-runtime";import{BoltIcon as i,ArrowRightIcon as o,ChevronDownIcon as t}from"@heroicons/react/24/outline";import{useState as l}from"react";import{styled as a}from"styled-components";import{formatTokenAmount as s}from"@privy-io/js-sdk-core";import{M as c,P as d,E as h,B as m,b as u}from"./ModalHeader-o3NBflPS.mjs";import{L as p,V as g,a as f}from"./Value-tcJV9e0L.mjs";import{a as y,R as k}from"./Row-C9vrS4Zi.mjs";import{E as x}from"./ErrorMessage-D8VaAP5m.mjs";import{L as v}from"./LabelXs-oqZNqbm_.mjs";import{S as b}from"./Subtitle-CV-2yKE4.mjs";import{T as w}from"./Title-BnzYV3Is.mjs";import{A as T}from"./Address-CYplVOfb.mjs";import{W as I}from"./WalletInfoCard-CDrk5VVS.mjs";import{u as A}from"./context-BeiVf64h.mjs";import{Y as S}from"./useActiveWallet-CdOTNCcL.mjs";import{L as C}from"./LoadingSkeleton-U6-3yFwI.mjs";import{isAddress as $}from"viem";import{B as j}from"./shared-FM0rljBt.mjs";import{C as M}from"./Checkbox-BhNoOKjX.mjs";import{E}from"./ErrorBanner-CQERa7bL.mjs";import{W as O}from"./WarningBanner-c8L53pJ2.mjs";import D from"@heroicons/react/24/outline/ClipboardDocumentCheckIcon";import N from"@heroicons/react/24/outline/ClipboardDocumentIcon";import F from"@heroicons/react/24/outline/ExclamationCircleIcon";import{u as L}from"./internal-context-Z-fyxadS.mjs";const P=a(p)`
2
2
  cursor: pointer;
3
3
  display: inline-flex;
4
4
  gap: 8px;
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import{M as o,B as i}from"./ModalHeader-D8-mhjp4.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-Cfci4-83.mjs";import{C as s}from"./Chip-D2-wZOHJ.mjs";import{S as p}from"./Subtitle-CV-2yKE4.mjs";import{u as d}from"./context-WTldtXS8.mjs";import{F as m,Q as y,m as u,T as h,U as w,v as f,a8 as T}from"./useActiveWallet-3RHPIBxJ.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as C}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{u as v}from"./useWallets-CR0z5IIt.mjs";import{W as _}from"./WalletOverflowButton-BlijhJnI.mjs";import{A as j,D as x,E as S}from"./index-BBRkihRn.mjs";import{isMobile as W}from"react-device-detect";import{styled as b}from"styled-components";import{I as $}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{I as k}from"./styles-BmZHuqSX.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"./LoadingSkeleton-U6-3yFwI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"zustand";import"./use-export-wallet-CV4p7L0b.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"lucide-react";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"@heroicons/react/24/outline/WalletIcon";import"./LinkPasskeyScreen-OxaghvUl.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-DTmQLGPf.mjs";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=C(),{connectWallet:p}=g(),d=m(),w=y(t),f="wallet_connect_v2"===i.connectorType?t:i.walletClientType,T=window.matchMedia("(display-mode: standalone)").matches,v=u({connectorType:i.connectorType,walletClientType:f});r=v&&v.chainTypes.includes(i.chainType)?()=>{v.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,f),c(o?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):W?(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("WalletInterstitialScreen")):(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!W||T||h()?()=>{(!j(window.navigator.userAgent)||event?.isTrusted)&&(p(i,f),o?"wallet_connect_v2"===i.connectorType?(s((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),c("ConnectOnlyLandingScreen")):c("ConnectOnlyStatusScreen"):c("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let _=l||w?.metadata?.shortName||w?.name||i.walletClientType;/*#__PURE__*/return e(D,{onClick:r,children:[/*#__PURE__*/n($,{icon:a||w?.image_url?.md,name:_}),/*#__PURE__*/n("span",{children:_}),/*#__PURE__*/e(F,{id:"chip-container",children:[d?.walletClientType===f&&d?.chainType===i.chainType?/*#__PURE__*/n(I,{color:"gray",children:"Recent"}):/*#__PURE__*/n("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/n(I,{color:"gray",children:"Solana"})]})]})};let D=b(w)`
1
+ import{jsxs as e,jsx as n,Fragment as t}from"react/jsx-runtime";import{useState as l,useEffect as a}from"react";import{M as o,B as i}from"./ModalHeader-o3NBflPS.mjs";import{C as r}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as c}from"./FundWalletMethodHeader-DhUicNAG.mjs";import{C as s}from"./Chip-D2-wZOHJ.mjs";import{S as p}from"./Subtitle-CV-2yKE4.mjs";import{u as d}from"./context-BeiVf64h.mjs";import{F as m,Q as y,m as u,T as h,U as w,v as f,a8 as T}from"./useActiveWallet-CdOTNCcL.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{a as C}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u as v}from"./useWallets-BCEKqhGq.mjs";import{W as _}from"./WalletOverflowButton-CkCL3wvE.mjs";import{A as j,D as x,E as S}from"./index-BAl9y5La.mjs";import{isMobile as W}from"react-device-detect";import{styled as b}from"styled-components";import{I as $}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{I as k}from"./styles-DOOmqCS1.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"./LoadingSkeleton-U6-3yFwI.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"zustand";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"lucide-react";import"uuid";import"jose";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.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"@heroicons/react/24/outline/WalletIcon";import"./LinkPasskeyScreen-D9SIq3bj.mjs";import"./TodoList-CgrU7uwu.mjs";import"./ScreenLayout-C8IaXeHq.mjs";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const O=({provider:t,displayName:l,logo:a,connectOnly:o,connector:i})=>{let r,{navigate:c,setModalData:s}=C(),{connectWallet:p}=g(),d=m(),w=y(t),f="wallet_connect_v2"===i.connectorType?t:i.walletClientType,T=window.matchMedia("(display-mode: standalone)").matches,v=u({connectorType:i.connectorType,walletClientType:f});r=v&&v.chainTypes.includes(i.chainType)?()=>{v.isInstalled||"solana"===i.chainType&&"isInstalled"in i&&i.isInstalled?(p(i,f),c(o?"ConnectOnlyStatusScreen":"ConnectionStatusScreen")):W?(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("WalletInterstitialScreen")):(s({installWalletModalData:{walletConfig:v,chainType:i.chainType,connectOnly:o}}),c("InstallWalletScreen"))}:"coinbase_wallet"!==i.connectorType||"eoaOnly"!==i.coinbaseWalletConfig.preference?.options||!W||T||h()?()=>{(!j(window.navigator.userAgent)||event?.isTrusted)&&(p(i,f),o?"wallet_connect_v2"===i.connectorType?(s((e=>({...e,externalConnectWallet:{...e?.externalConnectWallet,preSelectedWalletId:"wallet_connect_qr"}}))),c("ConnectOnlyLandingScreen")):c("ConnectOnlyStatusScreen"):c("ConnectionStatusScreen"))}:()=>{window.location.href=`https://go.cb-w.com/dapp?cb_url=${encodeURI(window.location.href)}`};let _=l||w?.metadata?.shortName||w?.name||i.walletClientType;/*#__PURE__*/return e(D,{onClick:r,children:[/*#__PURE__*/n($,{icon:a||w?.image_url?.md,name:_}),/*#__PURE__*/n("span",{children:_}),/*#__PURE__*/e(F,{id:"chip-container",children:[d?.walletClientType===f&&d?.chainType===i.chainType?/*#__PURE__*/n(I,{color:"gray",children:"Recent"}):/*#__PURE__*/n("span",{id:"connect-text",children:"Connect"}),"solana"===i.chainType&&/*#__PURE__*/n(I,{color:"gray",children:"Solana"})]})]})};let D=b(w)`
2
2
  /* Wallet name text color */
3
3
  > span {
4
4
  color: var(--privy-color-foreground);
@@ -1,4 +1,4 @@
1
- import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{styled as t}from"styled-components";import{d as o}from"./Layouts-BlFm53ED.mjs";import{B as n}from"./ModalHeader-D8-mhjp4.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as s}from"./FundWalletMethodHeader-Cfci4-83.mjs";import{I as a}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as d}from"./index-Dq_xe9dz.mjs";import{a as l,R as c}from"./Row-C9vrS4Zi.mjs";import{L as h,V as p}from"./Value-tcJV9e0L.mjs";import{A as f}from"./Address-BjZb-TIL.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{Q as j}from"./useActiveWallet-3RHPIBxJ.mjs";const I=({walletClientType:t,displayName:I,addressToFund:w,chainId:y,chainName:x,isBridging:N,isErc20Flow:C,totalPriceInNativeCurrency:T,totalPriceInUsd:v,gasPriceInNativeCurrency:B,gasPriceInUsd:P})=>{let k=j(t);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/i(s,{}),/*#__PURE__*/i(d,{centerIcon:/*#__PURE__*/i(a,{icon:k?.image_url?.md,name:t})}),/*#__PURE__*/i(m,{style:{marginTop:"8px",marginBottom:"12px"},title:`${N?"Bridging":"Confirming"} with ${I}`}),!N&&!C&&/*#__PURE__*/e(l,{children:[/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Total"}),/*#__PURE__*/i(p,{children:v||T})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"To"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/i(f,{address:w,showCopyIcon:!1})})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Network"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/e(u,{children:[/*#__PURE__*/i(g,{chainId:y,height:16,width:16})," ",x]})})]}),B&&/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Estimated fee"}),/*#__PURE__*/i(p,{children:P||B})]})]}),/*#__PURE__*/i(o,{height:24}),/*#__PURE__*/i(n,{})]})};let u=t.div`
1
+ import{jsxs as e,Fragment as r,jsx as i}from"react/jsx-runtime";import{styled as t}from"styled-components";import{d as o}from"./Layouts-BlFm53ED.mjs";import{B as n}from"./ModalHeader-o3NBflPS.mjs";import{C as m}from"./ScreenHeader-CHmc4-Lu.mjs";import{t as s}from"./FundWalletMethodHeader-DhUicNAG.mjs";import{I as a}from"./InjectedWalletIcon-DLcYOGDj.mjs";import{N as d}from"./index-Dq_xe9dz.mjs";import{a as l,R as c}from"./Row-C9vrS4Zi.mjs";import{L as h,V as p}from"./Value-tcJV9e0L.mjs";import{A as f}from"./Address-CYplVOfb.mjs";import{N as g}from"./NetworkIcon-B48ilzF8.mjs";import{Q as j}from"./useActiveWallet-CdOTNCcL.mjs";const I=({walletClientType:t,displayName:I,addressToFund:w,chainId:y,chainName:x,isBridging:N,isErc20Flow:C,totalPriceInNativeCurrency:T,totalPriceInUsd:v,gasPriceInNativeCurrency:B,gasPriceInUsd:P})=>{let k=j(t);/*#__PURE__*/return e(r,{children:[/*#__PURE__*/i(s,{}),/*#__PURE__*/i(d,{centerIcon:/*#__PURE__*/i(a,{icon:k?.image_url?.md,name:t})}),/*#__PURE__*/i(m,{style:{marginTop:"8px",marginBottom:"12px"},title:`${N?"Bridging":"Confirming"} with ${I}`}),!N&&!C&&/*#__PURE__*/e(l,{children:[/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Total"}),/*#__PURE__*/i(p,{children:v||T})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"To"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/i(f,{address:w,showCopyIcon:!1})})]}),/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Network"}),/*#__PURE__*/i(p,{children:/*#__PURE__*/e(u,{children:[/*#__PURE__*/i(g,{chainId:y,height:16,width:16})," ",x]})})]}),B&&/*#__PURE__*/e(c,{children:[/*#__PURE__*/i(h,{children:"Estimated fee"}),/*#__PURE__*/i(p,{children:P||B})]})]}),/*#__PURE__*/i(o,{height:24}),/*#__PURE__*/i(n,{})]})};let u=t.div`
2
2
  display: flex;
3
3
  flex-direction: row;
4
4
  align-items: center;
@@ -1 +1 @@
1
- import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import i from"@heroicons/react/24/outline/EnvelopeIcon";import{B as o}from"./Layouts-BlFm53ED.mjs";import{Mail as a}from"lucide-react";import{forwardRef as s,useState as m}from"react";import{u as n}from"./context-WTldtXS8.mjs";import{a as l}from"./index-BBRkihRn.mjs";import{u as d}from"./internal-context-Z-fyxadS.mjs";import{u as c,a as p}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{a1 as u,V as h}from"./useActiveWallet-3RHPIBxJ.mjs";import{E as j,P as v}from"./ModalHeader-D8-mhjp4.mjs";import{I as f,E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-DTmQLGPf.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-CR0z5IIt.mjs";import"./use-export-wallet-CV4p7L0b.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-6nkpbErN.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.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 k=/*#__PURE__*/s(((i,o)=>{let[s,f]=m(""),[y,w]=m(""),[k,S]=m(!1),{authenticated:x,user:A}=c(),{initUpdateEmail:C}=d(),{navigate:P,setModalData:I,currentScreen:M}=p(),{enabled:T,token:U}=l(),L=n(),q=u(s)&&(L.disablePlusEmails&&s.includes("+")?(y||w("Please enter a valid email address without a '+'."),!1):(y&&w(""),!0)),D=k||!q,W=()=>{!T||U||x?(async e=>{if(!A?.email)throw Error("User is required to have an email address to update it.");S(!0);try{await C({oldAddress:A.email.address,newAddress:s,captchaToken:e}),P("AwaitingPasswordlessCodeScreen")}catch(e){I({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),P("ErrorScreen")}S(!1)})(U):(I({captchaModalData:{callback:e=>{if(!A?.email)throw Error("User is required to have an email address to update it.");return C({oldAddress:A.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),P("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(b,{children:[y&&/*#__PURE__*/t(g,{style:{marginTop:"0.25rem",textAlign:"left"},children:y}),/*#__PURE__*/e(E,{$error:!!y,children:[/*#__PURE__*/t(h,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>f(e.target.value),onKeyUp:e=>{"Enter"===e.key&&W()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(j,{isSubmitting:k,onClick:W,disabled:D,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(v,{loadingText:null,loading:k,disabled:D,onClick:W,style:{width:"100%"},children:"Submit"}):null]})}));let b=f,E=y;const S=({title:e="Update your email",subtitle:r="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/t(w,{title:e,subtitle:r,icon:i,watermark:!0,children:/*#__PURE__*/t(o,{children:/*#__PURE__*/t(k,{stacked:!0})})}),x={component:()=>/*#__PURE__*/t(S,{})};export{x as UpdateEmailScreen,S as UpdateEmailScreenView,x as default};
1
+ import{jsxs as e,Fragment as r,jsx as t}from"react/jsx-runtime";import i from"@heroicons/react/24/outline/EnvelopeIcon";import{B as o}from"./Layouts-BlFm53ED.mjs";import{Mail as a}from"lucide-react";import{forwardRef as s,useState as m}from"react";import{u as n}from"./context-BeiVf64h.mjs";import{a as l}from"./index-BAl9y5La.mjs";import{u as d}from"./internal-context-Z-fyxadS.mjs";import{u as c,a as p}from"./get-is-unified-wallet-CyC08yWM.mjs";import{a1 as u,V as h}from"./useActiveWallet-CdOTNCcL.mjs";import{E as j,P as v}from"./ModalHeader-o3NBflPS.mjs";import{I as f,E as y}from"./EmailInputForm-Dgoii4vf.mjs";import{E as g}from"./ErrorMessage-D8VaAP5m.mjs";import{S as w}from"./ScreenLayout-C8IaXeHq.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"tinycolor2";import"uuid";import"jose";import"eventemitter3";import"./useWallets-BCEKqhGq.mjs";import"./use-export-wallet-5ZtAXJqT.mjs";import"viem/utils";import"@coinbase/wallet-sdk";import"@privy-io/ethereum";import"mipd";import"react-device-detect";import"@privy-io/popup";import"./paths-3HW55qZg.mjs";import"./usePrivy-D6pEtdwq.mjs";import"./events-context-CI0iqAXA.mjs";import"@scure/base";import"zustand";import"@headlessui/react";import"@walletconnect/ethereum-provider";import"@privy-io/urls";import"viem";import"./PrivyPluginContext-2QN2dVUw.mjs";import"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import"./getPublicClient-B4uPLKn-.mjs";import"ofetch";import"js-cookie";import"./frame-uzTmvtww.mjs";import"@privy-io/routes";import"x402/client";import"@privy-io/api-base";import"@privy-io/are-addresses-equal";import"viem/accounts";import"./use-sign-with-user-signer-Do5Oi_rb.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const k=/*#__PURE__*/s(((i,o)=>{let[s,f]=m(""),[y,w]=m(""),[k,S]=m(!1),{authenticated:x,user:A}=c(),{initUpdateEmail:C}=d(),{navigate:P,setModalData:I,currentScreen:M}=p(),{enabled:T,token:U}=l(),L=n(),q=u(s)&&(L.disablePlusEmails&&s.includes("+")?(y||w("Please enter a valid email address without a '+'."),!1):(y&&w(""),!0)),D=k||!q,W=()=>{!T||U||x?(async e=>{if(!A?.email)throw Error("User is required to have an email address to update it.");S(!0);try{await C({oldAddress:A.email.address,newAddress:s,captchaToken:e}),P("AwaitingPasswordlessCodeScreen")}catch(e){I({errorModalData:{error:e,previousScreen:M||"LandingScreen"}}),P("ErrorScreen")}S(!1)})(U):(I({captchaModalData:{callback:e=>{if(!A?.email)throw Error("User is required to have an email address to update it.");return C({oldAddress:A.email.address,newAddress:s,captchaToken:e})},userIntentRequired:!1,onSuccessNavigateTo:"AwaitingPasswordlessCodeScreen",onErrorNavigateTo:"ErrorScreen"}}),P("CaptchaScreen"))};/*#__PURE__*/return e(r,{children:[/*#__PURE__*/e(b,{children:[y&&/*#__PURE__*/t(g,{style:{marginTop:"0.25rem",textAlign:"left"},children:y}),/*#__PURE__*/e(E,{$error:!!y,children:[/*#__PURE__*/t(h,{children:/*#__PURE__*/t(a,{})}),/*#__PURE__*/t("input",{ref:o,id:"email-input",type:"email",placeholder:"your@email.com",onChange:e=>f(e.target.value),onKeyUp:e=>{"Enter"===e.key&&W()},value:s,autoComplete:"email"}),i.stacked?null:/*#__PURE__*/t(j,{isSubmitting:k,onClick:W,disabled:D,children:"Submit"})]})]}),i.stacked?/*#__PURE__*/t(v,{loadingText:null,loading:k,disabled:D,onClick:W,style:{width:"100%"},children:"Submit"}):null]})}));let b=f,E=y;const S=({title:e="Update your email",subtitle:r="Add the email address you'd like to use going forward. We'll send you a confirmation code"})=>/*#__PURE__*/t(w,{title:e,subtitle:r,icon:i,watermark:!0,children:/*#__PURE__*/t(o,{children:/*#__PURE__*/t(k,{stacked:!0})})}),x={component:()=>/*#__PURE__*/t(S,{})};export{x as UpdateEmailScreen,S as UpdateEmailScreenView,x as default};
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-_lOAQG_X.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as a}from"./ScreenLayout-DTmQLGPf.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-WTldtXS8.mjs";import"tinycolor2";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"./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"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-Bp-TN9gb.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null);/*#__PURE__*/return e(a,{title:i,subtitle:n,icon:t,primaryCta:{label:s?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await m(c)},disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/e(r,{onChange:e=>{u(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:t,data:r,navigate:a,setModalData:c}=n(),{user:u}=m(),{initUpdatePhone:p}=i(),[l,d]=o(!1);/*#__PURE__*/return e(s,{onSubmit:async e=>{d(!0);try{if(!u?.phone?.number)throw Error("User is required to have an phone number to update it.");await p(u?.phone?.number,e.qualifiedPhoneNumber),a("AwaitingPasswordlessCodeScreen")}catch(e){c({errorModalData:{error:e,previousScreen:r?.errorModalData?.previousScreen||t||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:l})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
1
+ import{jsx as e}from"react/jsx-runtime";import t from"@heroicons/react/24/outline/PhoneIcon";import{useState as o}from"react";import{C as r}from"./ConnectPhoneForm-CvRD6txR.mjs";import{u as i}from"./internal-context-Z-fyxadS.mjs";import{a as n,u as m}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as a}from"./ScreenLayout-C8IaXeHq.mjs";import"styled-components";import"@privy-io/js-sdk-core";import"./context-BeiVf64h.mjs";import"tinycolor2";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.mjs";import"./events-context-CI0iqAXA.mjs";import"viem";import"./getPublicClient-B4uPLKn-.mjs";import"./ModalHeader-o3NBflPS.mjs";import"@heroicons/react/24/outline/ArrowLeftIcon";import"@heroicons/react/24/outline/ArrowRightIcon";import"@heroicons/react/24/outline/QuestionMarkCircleIcon";import"@heroicons/react/24/outline/XMarkIcon";import"./Chip-D2-wZOHJ.mjs";import"./LoadingSkeleton-U6-3yFwI.mjs";import"ofetch";import"@privy-io/are-addresses-equal";import"./Screen-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const s=({title:i="Update your phone number",subtitle:n="Add the phone number you'd like to use going forward. We'll send you a confirmation code",onSubmit:m,isSubmitting:s=!1})=>{let[c,u]=o(null);/*#__PURE__*/return e(a,{title:i,subtitle:n,icon:t,primaryCta:{label:s?"Submitting":"Update",onClick:async()=>{c?.qualifiedPhoneNumber&&await m(c)},disabled:!c?.isValid||s},watermark:!0,children:/*#__PURE__*/e(r,{onChange:e=>{u(e)},onSubmit:async()=>{},noIncludeSubmitButton:!0,hideRecent:!0})})},c={component:()=>{let{currentScreen:t,data:r,navigate:a,setModalData:c}=n(),{user:u}=m(),{initUpdatePhone:p}=i(),[l,d]=o(!1);/*#__PURE__*/return e(s,{onSubmit:async e=>{d(!0);try{if(!u?.phone?.number)throw Error("User is required to have an phone number to update it.");await p(u?.phone?.number,e.qualifiedPhoneNumber),a("AwaitingPasswordlessCodeScreen")}catch(e){c({errorModalData:{error:e,previousScreen:r?.errorModalData?.previousScreen||t||"LinkPhoneScreen"}}),a("ErrorScreen")}finally{d(!1)}},isSubmitting:l})}};export{c as UpdatePhoneScreen,s as UpdatePhoneScreenView,c as default};
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as o}from"./ScreenLayout-DTmQLGPf.mjs";import"@privy-io/are-addresses-equal";import"react";import"./context-WTldtXS8.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";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 i=({style:e,...o})=>/*#__PURE__*/t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...e},...o,children:/*#__PURE__*/t("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),r=({title:e="Unable to sign in",subtitle:r="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/t(o,{title:e,subtitle:r,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:o}=e();/*#__PURE__*/return t(r,{onGoBack:()=>{o("LandingScreen")}})}};export{n as UserLimitReachedScreen,r as UserLimitReachedScreenView,n as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{a as e}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as o}from"./ScreenLayout-C8IaXeHq.mjs";import"@privy-io/are-addresses-equal";import"react";import"./context-BeiVf64h.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-o3NBflPS.mjs";import"styled-components";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const i=({style:e,...o})=>/*#__PURE__*/t("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:{height:"38px",width:"38px",...e},...o,children:/*#__PURE__*/t("path",{d:"M20 13.6V20M20 26.4H20.016M36 20C36 28.8365 28.8366 36 20 36C11.1635 36 4.00001 28.8365 4.00001 20C4.00001 11.1634 11.1635 3.99999 20 3.99999C28.8366 3.99999 36 11.1634 36 20Z",stroke:"currentColor",strokeWidth:"3.2",strokeLinecap:"round",strokeLinejoin:"round"})}),r=({title:e="Unable to sign in",subtitle:r="This is a test application that has reached its user limit. To allow more users, this app needs to be upgraded to production.",onGoBack:n})=>/*#__PURE__*/t(o,{title:e,subtitle:r,icon:i,iconVariant:"subtle",primaryCta:{label:"Go back",onClick:n},showBack:!0,onBack:n,watermark:!0}),n={component:()=>{let{navigate:o}=e();/*#__PURE__*/return t(r,{onGoBack:()=>{o("LandingScreen")}})}};export{n as UserLimitReachedScreen,r as UserLimitReachedScreenView,n as default};
@@ -1,4 +1,4 @@
1
- import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-D8-mhjp4.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-BjZb-TIL.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
1
+ import{jsxs as e,jsx as r,Fragment as o}from"react/jsx-runtime";import{Check as i,Copy as t}from"lucide-react";import{useState as s,useEffect as a}from"react";import{styled as n}from"styled-components";import{S as m}from"./ModalHeader-o3NBflPS.mjs";import{E as l}from"./ErrorMessage-D8VaAP5m.mjs";import{L as d}from"./LabelXs-oqZNqbm_.mjs";import{A as c}from"./Address-CYplVOfb.mjs";import{B as p}from"./shared-FM0rljBt.mjs";let h=n(p)`
2
2
  && {
3
3
  padding: 0.75rem;
4
4
  height: 56px;
@@ -1 +1 @@
1
- import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o,a as i}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{S as r}from"./ScreenLayout-DTmQLGPf.mjs";import"@privy-io/are-addresses-equal";import"./context-WTldtXS8.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";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 l=({title:e,subtitle:o,buttonText:i,buttonHref:l,isLoading:n=!1,helpText:a,onButtonClick:s})=>/*#__PURE__*/t(r,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{l&&window.open(l,"_self"),s?.()},disabled:n},helpText:a,watermark:!0}),n={component:()=>{let{ready:r}=o(),{data:n}=i(),[a,s]=e(!1);if(!n?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:m,connectOnly:c,chainType:p}=n.installWalletModalData,u=m.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=m.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return r&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${m.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${m.name} wallet to complete the login.`),/*#__PURE__*/t(l,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:r&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>s(!0)),1e3)}})}};export{n as WalletInterstitialScreen,l as WalletInterstitialScreenView,n as default};
1
+ import{jsx as t}from"react/jsx-runtime";import{useState as e}from"react";import{u as o,a as i}from"./get-is-unified-wallet-CyC08yWM.mjs";import{S as r}from"./ScreenLayout-C8IaXeHq.mjs";import"@privy-io/are-addresses-equal";import"./context-BeiVf64h.mjs";import"@privy-io/js-sdk-core";import"tinycolor2";import"./internal-context-Z-fyxadS.mjs";import"ofetch";import"./ModalHeader-o3NBflPS.mjs";import"styled-components";import"./useActiveWallet-CdOTNCcL.mjs";import"zustand";import"react-device-detect";import"./use-export-wallet-5ZtAXJqT.mjs";import"eventemitter3";import"viem/utils";import"./useWallets-BCEKqhGq.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-Olwu6khI.mjs";import"./index-Dq_xe9dz.mjs";const l=({title:e,subtitle:o,buttonText:i,buttonHref:l,isLoading:n=!1,helpText:a,onButtonClick:s})=>/*#__PURE__*/t(r,{title:e,subtitle:o,primaryCta:{label:i,onClick:()=>{l&&window.open(l,"_self"),s?.()},disabled:n},helpText:a,watermark:!0}),n={component:()=>{let{ready:r}=o(),{data:n}=i(),[a,s]=e(!1);if(!n?.installWalletModalData)throw Error("Wallet data is missing");let{walletConfig:m,connectOnly:c,chainType:p}=n.installWalletModalData,u=m.getMobileRedirect({useUniversalLink:!a,isSolana:"solana"===p,connectOnly:c}),d=m.name.replace(/ wallet/gi,""),h={title:`Redirecting to ${d} Mobile Wallet`,description:`We'll take you to the ${d} Mobile Wallet app to continue your login experience.`,footnote:""};return r&&(h.description=`For the best experience, we'll automatically log you into the ${d} Mobile Wallet in-app browser.`,h.footnote="You can always return here to login via other methods."),a&&(h.title="Still here?",h.description=`You may need to install the ${m.name} mobile app.`,h.footnote=`Once you're done, you can connect with ${m.name} wallet to complete the login.`),/*#__PURE__*/t(l,{title:h.title,subtitle:h.description,buttonText:a?"Go to App Store":"Continue",buttonHref:u,isLoading:r&&!u,helpText:h.footnote||void 0,onButtonClick:()=>{setTimeout((()=>s(!0)),1e3)}})}};export{n as WalletInterstitialScreen,l as WalletInterstitialScreenView,n as default};
@@ -1,4 +1,4 @@
1
- import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-D1WT71Ay.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as m}from"./transaction-CnfuREWo.mjs";import{D as d}from"./useActiveWallet-3RHPIBxJ.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),m=i?s(c,i):void 0,d=a(c,l);/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(g,{children:"USD"}),"<$0.01"===m?
1
+ import{jsx as e,Fragment as t,jsxs as r}from"react/jsx-runtime";import{styled as n}from"styled-components";import{formatUnits as i}from"viem";import{s as o,a as s,g as a,b as l}from"./ethers-CJf4V9xJ.mjs";import{g as c}from"./getFormattedUsdFromLamports-B6EqSEho.mjs";import{g as m}from"./transaction-CnfuREWo.mjs";import{D as d}from"./useActiveWallet-CdOTNCcL.mjs";const p=({weiQuantities:t,tokenPrice:r,tokenSymbol:n})=>{let i=o(t),l=r?s(i,r):void 0,c=a(i,n);/*#__PURE__*/return e(u,{children:l||c})},h=({weiQuantities:n,tokenPrice:i,tokenSymbol:l})=>{let c=o(n),m=i?s(c,i):void 0,d=a(c,l);/*#__PURE__*/return e(u,{children:m?/*#__PURE__*/r(t,{children:[/*#__PURE__*/e(g,{children:"USD"}),"<$0.01"===m?
2
2
  /*#__PURE__*/r(S,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):m]}):d})},f=({quantities:n,tokenPrice:o,tokenSymbol:s="SOL",tokenDecimals:a=9})=>{let l=n.reduce(((e,t)=>e+t),0n),d=o&&"SOL"===s&&9===a?c(l,o):void 0,p="SOL"===s&&9===a?m(l):`${i(l,a)} ${s}`;/*#__PURE__*/return e(u,{children:d?/*#__PURE__*/e(t,{children:"<$0.01"===d?
3
3
  /*#__PURE__*/r(S,{children:[/*#__PURE__*/e(x,{children:"<"}),"$0.01"]}):d}):p})};let u=n.span`
4
4
  font-size: 14px;
@@ -1 +1 @@
1
- import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{U as i,V as c,Y as o}from"./useActiveWallet-3RHPIBxJ.mjs";const l=({onClick:l,text:m})=>/*#__PURE__*/r(i,{onClick:l,children:[/*#__PURE__*/e(c,{children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(o,{children:m})]});export{l as W};
1
+ import{jsxs as r,jsx as e}from"react/jsx-runtime";import{Wallet as t}from"lucide-react";import{U as i,V as c,Y as o}from"./useActiveWallet-CdOTNCcL.mjs";const l=({onClick:l,text:m})=>/*#__PURE__*/r(i,{onClick:l,children:[/*#__PURE__*/e(c,{children:/*#__PURE__*/e(t,{})}),/*#__PURE__*/e(o,{children:m})]});export{l as W};
@@ -1 +1 @@
1
- import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as a}from"@abstract-foundation/agw-client/actions";import{hexToNumber as n,createWalletClient as t,custom as r,http as s}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as o,zksync as c}from"viem/chains";import{u as d,a as l,c as m,b as p}from"./get-is-unified-wallet-Boa8DYrQ.mjs";import{u}from"./context-WTldtXS8.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{u as y,g as f}from"./useWallets-CR0z5IIt.mjs";import{a as h}from"./getPublicClient-B4uPLKn-.mjs";import{g as v}from"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import{c as I}from"./smart-wallets-DOAgnxKI.mjs";import"@privy-io/are-addresses-equal";import"react/jsx-runtime";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./PrivyPluginContext-2QN2dVUw.mjs";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=d(),{hideWalletUIs:S,openPrivyModal:w,chains:P,appId:W,rpcConfig:b,client:C}=g(),F=u(),{wallets:M}=y(),{setModalData:x}=l(),_=m(T),q=!!_&&p(_),A=async(a=o.id)=>{let d=v(M);if(!d)throw Error("No connected wallet found");let l="string"==typeof a?n(a):a;if(![o.id,2741,c.id].includes(l))throw Error("Error, only Abstract and ZKSync Era chains are supported");let m=P.find((e=>e.id===l));if(!m)throw Error("Chain not configured");await d.switchChain(m.id);let p=await d.getEthereumProvider(),u=t({account:d.address,transport:r(p)}),g=i({address:d.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e({chain:m,transport:s(h(m,b,W)),publicTransport:s(h(m,b,W)),signer:g})};return{signMessage:async({message:e},a)=>{let n=await A(a);return new Promise((async(a,t)=>{let{entropyId:r,entropyIdVerifier:s}=f(T);S.current=!0,x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>n.signMessage({message:e}),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTypedData:async(e,a)=>{let n=await A(a);return new Promise((async(a,t)=>{S.current=!0;let{entropyId:r,entropyIdVerifier:s}=f(T);x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>n.signTypedData(e),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let n=await A(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let n=await A(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return n.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))}}}export{T as useAbstractSmartWallets};
1
+ import{createAbstractClient as e}from"@abstract-foundation/agw-client";import{getBatchTransactionObject as a}from"@abstract-foundation/agw-client/actions";import{hexToNumber as n,createWalletClient as t,custom as r,http as s}from"viem";import{toAccount as i}from"viem/accounts";import{abstractTestnet as o,zksync as c}from"viem/chains";import{u as d,a as l,c as m,b as p}from"./get-is-unified-wallet-CyC08yWM.mjs";import{u}from"./context-BeiVf64h.mjs";import{u as g}from"./internal-context-Z-fyxadS.mjs";import{u as y,g as f}from"./useWallets-BCEKqhGq.mjs";import{a as h}from"./getPublicClient-B4uPLKn-.mjs";import{g as v}from"./getEmbeddedConnectedWallet-JzK4iD-L.mjs";import{c as I}from"./smart-wallets-69e9jC8u.mjs";import"@privy-io/are-addresses-equal";import"react/jsx-runtime";import"react";import"@privy-io/js-sdk-core";import"tinycolor2";import"ofetch";import"./PrivyPluginContext-2QN2dVUw.mjs";import"permissionless";import"permissionless/accounts";import"permissionless/clients/pimlico";import"viem/account-abstraction";function T(){let{user:T}=d(),{hideWalletUIs:S,openPrivyModal:w,chains:P,appId:W,rpcConfig:b,client:C}=g(),F=u(),{wallets:M}=y(),{setModalData:x}=l(),_=m(T),q=!!_&&p(_),A=async(a=o.id)=>{let d=v(M);if(!d)throw Error("No connected wallet found");let l="string"==typeof a?n(a):a;if(![o.id,2741,c.id].includes(l))throw Error("Error, only Abstract and ZKSync Era chains are supported");let m=P.find((e=>e.id===l));if(!m)throw Error("Chain not configured");await d.switchChain(m.id);let p=await d.getEthereumProvider(),u=t({account:d.address,transport:r(p)}),g=i({address:d.address,signMessage:u.signMessage,signTransaction:u.signTransaction,signTypedData:u.signTypedData});return await e({chain:m,transport:s(h(m,b,W)),publicTransport:s(h(m,b,W)),signer:g})};return{signMessage:async({message:e},a)=>{let n=await A(a);return new Promise((async(a,t)=>{let{entropyId:r,entropyIdVerifier:s}=f(T);S.current=!0,x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"personal_sign",data:e,confirmAndSign:()=>n.signMessage({message:e}),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTypedData:async(e,a)=>{let n=await A(a);return new Promise((async(a,t)=>{S.current=!0;let{entropyId:r,entropyIdVerifier:s}=f(T);x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:r,entropyIdVerifier:s,onCompleteNavigateTo:"SignRequestScreen",onFailure:()=>{}},signMessage:{method:"eth_signTypedData_v4",data:e,confirmAndSign:()=>n.signTypedData(e),onSuccess:e=>a(e),onFailure:t,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},sendTransaction:async e=>{let n=await A(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!1,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:()=>r?n.sendTransactionBatch(e):n.sendTransaction(e),onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))},signTransaction:async e=>{let n=await A(e.chainId),t=[],r="calls"in e&&void 0!==e.calls;return t=r?[...e.calls]:[e],new Promise((async(s,i)=>{S.current=!0;let{entropyId:o,entropyIdVerifier:c}=f(T);x({connectWallet:{recoveryMethod:_.recoveryMethod,connectingWalletAddress:_.address,isUnifiedWallet:q,entropyId:o,entropyIdVerifier:c,onCompleteNavigateTo:"SendTransactionScreen",onFailure:()=>{}},sendTransaction:{transactionRequests:I({calls:t,chain:n.chain,maxPriorityFeePerGas:e.maxPriorityFeePerGas,maxFeePerGas:e.maxFeePerGas,nonce:e.nonce?BigInt(e.nonce):void 0}),entropyId:o,entropyIdVerifier:c,transactingWalletAddress:n.account.address,transactingWalletIndex:void 0,prepareTransactionRequest:async()=>{let t=r?a(n.account.address,e):e;return await n.prepareAbstractTransactionRequest(t)},scanTransaction:async()=>{if(!C)throw Error("Privy client not found");let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return await C.scanTransaction({metadata:{domain:F.embeddedWallets.transactionScanning.domain},chain_id:e.chainId.toString(),request:{method:"eth_sendTransaction",params:[{from:s.from,to:s.to,value:s.value?.toString(),gas:s.gas?.toString(),gasPrice:s.gasPrice?.toString(),nonce:s.nonce?.toString(),data:s.data,eip_712_meta:{paymaster_params:{paymaster:s.paymaster,paymaster_input:s.paymasterInput}}}]}})},signOnly:!0,getIsSponsored:async()=>void 0!==e.paymaster&&void 0!==e.paymasterInput,onConfirm:async()=>{let t=r?a(n.account.address,e):e,s=await n.prepareAbstractTransactionRequest(t);return n.signTransaction(s)},onSuccess:e=>s(e.hash),onFailure:i,uiOptions:{isCancellable:!0}}}),w("EmbeddedWalletConnectingScreen")})).finally((()=>{S.current=!1}))}}}export{T as useAbstractSmartWallets};