@crossmint/client-sdk-react-ui 1.19.0-alpha.0 → 1.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (793) hide show
  1. package/dist/chunk-2BOQSASO.cjs +1 -0
  2. package/dist/chunk-2POV64LQ.js +1 -0
  3. package/dist/chunk-2PVYNZP7.cjs +1 -0
  4. package/dist/chunk-2VBA64WU.js +1 -0
  5. package/dist/chunk-2VQLMU5A.cjs +1 -0
  6. package/dist/chunk-2WSEHVNP.cjs +1 -0
  7. package/dist/chunk-2ZIM34DD.js +1 -0
  8. package/dist/chunk-3BUVHV54.js +0 -0
  9. package/dist/chunk-3CEBGWSO.cjs +1 -0
  10. package/dist/chunk-3EQVCVCE.cjs +1 -0
  11. package/dist/chunk-3U4DUXCZ.cjs +1 -0
  12. package/dist/chunk-4IHRWQWT.js +1 -0
  13. package/dist/chunk-4KDASQO6.js +1 -0
  14. package/dist/chunk-4OE5NI6E.js +1 -0
  15. package/dist/chunk-56YL3XJW.cjs +1 -0
  16. package/dist/chunk-5ASQCIUO.js +1 -0
  17. package/dist/chunk-5IFQJPBE.cjs +1 -0
  18. package/dist/chunk-5X3MPD2V.js +1 -0
  19. package/dist/chunk-72MMCJ2E.js +0 -0
  20. package/dist/chunk-72P3JMXX.js +1 -0
  21. package/dist/chunk-77PBG2JJ.js +1 -0
  22. package/dist/chunk-7YHGBWRD.js +1 -0
  23. package/dist/chunk-ADHZO4XH.cjs +6 -0
  24. package/dist/chunk-AHD64NAJ.cjs +1 -0
  25. package/dist/chunk-BFHQZOV3.js +1 -0
  26. package/dist/chunk-BR77Q3PK.cjs +1 -0
  27. package/dist/chunk-BUMEWB2D.js +1 -0
  28. package/dist/chunk-C22ZEFQD.js +1 -0
  29. package/dist/chunk-C3JRTLQP.js +1 -0
  30. package/dist/chunk-C44EHIPT.cjs +1 -0
  31. package/dist/chunk-CDSQUWS7.cjs +1 -0
  32. package/dist/chunk-CPRLL4GL.js +1 -0
  33. package/dist/chunk-DGZQUCSD.js +1 -0
  34. package/dist/chunk-DQD3L5EO.cjs +1 -0
  35. package/dist/chunk-E3WXNW4S.js +1 -0
  36. package/dist/chunk-E4TBJMOO.js +1 -0
  37. package/dist/chunk-E65EGG73.cjs +1 -0
  38. package/dist/chunk-EA7H4AXL.js +1 -0
  39. package/dist/chunk-EAYBW3VK.cjs +2 -0
  40. package/dist/chunk-EMXNIC4M.js +1 -0
  41. package/dist/chunk-EUXGP4IN.cjs +1 -0
  42. package/dist/chunk-FASRTACD.cjs +1 -0
  43. package/dist/chunk-FQ246XXN.cjs +1 -0
  44. package/dist/chunk-G4LRVSOY.cjs +1 -0
  45. package/dist/chunk-GARYGAY7.cjs +1 -0
  46. package/dist/chunk-GPQZG7HC.cjs +1 -0
  47. package/dist/chunk-H34D6PAN.js +1 -0
  48. package/dist/chunk-HFFTNDOR.cjs +1 -0
  49. package/dist/chunk-HG5ML6KX.cjs +1 -0
  50. package/dist/chunk-HLGNSXEQ.cjs +1 -0
  51. package/dist/chunk-HVZ5M3FY.js +1 -0
  52. package/dist/chunk-I4GMMHQR.cjs +1 -0
  53. package/dist/chunk-IAJBYU5C.js +1 -0
  54. package/dist/chunk-IMV35JZB.cjs +1 -0
  55. package/dist/chunk-IOHFOH6A.js +1 -0
  56. package/dist/chunk-IOYFNS7R.js +1 -0
  57. package/dist/chunk-IQ7CQQXG.cjs +1 -0
  58. package/dist/chunk-IWS5P323.cjs +1 -0
  59. package/dist/chunk-JGM3G5E2.js +1 -0
  60. package/dist/chunk-JNLQRLIC.cjs +1 -0
  61. package/dist/chunk-JOMJPVZA.js +1 -0
  62. package/dist/chunk-JPJKOERH.js +1 -0
  63. package/dist/chunk-JSNUJJQJ.js +1 -0
  64. package/dist/chunk-KFL42A3A.js +1 -0
  65. package/dist/chunk-KI4HRYHD.cjs +1 -0
  66. package/dist/chunk-LCMWTOWW.js +1 -0
  67. package/dist/chunk-LD3MRJ3F.js +1 -0
  68. package/dist/chunk-LOA5MXSU.js +2 -0
  69. package/dist/chunk-LYUOGA56.cjs +1 -0
  70. package/dist/chunk-NB7AJIPT.js +0 -0
  71. package/dist/chunk-NBJIJZGO.js +1 -0
  72. package/dist/chunk-NFLGT52C.cjs +1 -0
  73. package/dist/chunk-NRN4WNQL.cjs +1 -0
  74. package/dist/chunk-NYVBWAX7.js +1 -0
  75. package/dist/chunk-NZQIZ4ZY.cjs +1 -0
  76. package/dist/chunk-O5J2ZIJ6.cjs +1 -0
  77. package/dist/chunk-OOLXYAO7.js +1 -0
  78. package/dist/chunk-P64NXOJW.js +6 -0
  79. package/dist/chunk-PJJNLC25.cjs +1 -0
  80. package/dist/chunk-PTLQBARH.cjs +1 -0
  81. package/dist/chunk-PXDN3KFO.js +1 -0
  82. package/dist/chunk-PZ3KXKJD.cjs +1 -0
  83. package/dist/chunk-PZUWRGVP.cjs +1 -0
  84. package/dist/chunk-QASKWI5Y.js +1 -0
  85. package/dist/chunk-QCQ2CJA4.cjs +1 -0
  86. package/dist/chunk-QLPV72AE.cjs +1 -0
  87. package/dist/chunk-QOQHRIIO.cjs +1 -0
  88. package/dist/chunk-QUO652MG.cjs +1 -0
  89. package/dist/chunk-QVXTNSBH.js +1 -0
  90. package/dist/chunk-QYQERFYL.cjs +1 -0
  91. package/dist/chunk-RB7BW66E.js +1 -0
  92. package/dist/chunk-RML5QI3S.cjs +1 -0
  93. package/dist/chunk-ROJ6HFVK.js +1 -0
  94. package/dist/chunk-RYQRCUKB.js +1 -0
  95. package/dist/chunk-RZG2PAKA.js +1 -0
  96. package/dist/chunk-S73E6EBO.cjs +1 -0
  97. package/dist/chunk-SFDQPSSP.js +1 -0
  98. package/dist/chunk-SRQAQHYK.cjs +1 -0
  99. package/dist/chunk-T66BUSHV.cjs +1 -0
  100. package/dist/chunk-TM7WDKYR.cjs +1 -0
  101. package/dist/chunk-TNCETEEL.js +1 -0
  102. package/dist/chunk-TWX7ZBKZ.cjs +1 -0
  103. package/dist/chunk-TXOVDTYK.cjs +1 -0
  104. package/dist/chunk-UAFW3OWA.js +1 -0
  105. package/dist/chunk-UDQUVZUQ.js +1 -0
  106. package/dist/chunk-UILJI3DM.js +1 -0
  107. package/dist/chunk-VHH5YO6J.js +1 -0
  108. package/dist/chunk-VHNBXIOC.js +1 -0
  109. package/dist/chunk-VI6TW7JT.cjs +1 -0
  110. package/dist/chunk-VLDE23JX.js +1 -0
  111. package/dist/chunk-VWL76U5G.js +1 -0
  112. package/dist/chunk-W4UPIFFS.cjs +1 -0
  113. package/dist/chunk-WABJHG6B.cjs +1 -0
  114. package/dist/chunk-WHFUW3W3.js +0 -0
  115. package/dist/chunk-WMBBIP2C.cjs +1 -0
  116. package/dist/chunk-WQVJJ44F.js +1 -0
  117. package/dist/chunk-WW6GUXHG.js +1 -0
  118. package/dist/chunk-X5BBXO27.cjs +1 -0
  119. package/dist/chunk-XUT4N66R.cjs +1 -0
  120. package/dist/chunk-XZPREGSV.js +1 -0
  121. package/dist/chunk-YXF74MVI.cjs +1 -0
  122. package/dist/chunk-Z2FGFHRQ.cjs +1 -0
  123. package/dist/chunk-ZBQCXWMD.cjs +1 -0
  124. package/dist/chunk-ZZYJ6XM2.js +1 -0
  125. package/dist/components/CrossmintNFTCollectionView.cjs +1 -9
  126. package/dist/components/CrossmintNFTCollectionView.js +1 -9
  127. package/dist/components/CrossmintNFTDetail.cjs +1 -9
  128. package/dist/components/CrossmintNFTDetail.js +1 -9
  129. package/dist/components/auth/AuthForm.cjs +1 -44
  130. package/dist/components/auth/AuthForm.js +1 -44
  131. package/dist/components/auth/AuthFormBackButton.cjs +1 -44
  132. package/dist/components/auth/AuthFormBackButton.js +1 -44
  133. package/dist/components/auth/AuthFormDialog.cjs +1 -44
  134. package/dist/components/auth/AuthFormDialog.js +1 -44
  135. package/dist/components/auth/EmbeddedAuthForm.cjs +1 -45
  136. package/dist/components/auth/EmbeddedAuthForm.js +1 -45
  137. package/dist/components/auth/PasskeyPrompt.cjs +1 -15
  138. package/dist/components/auth/PasskeyPrompt.js +1 -15
  139. package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -44
  140. package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -44
  141. package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -46
  142. package/dist/components/auth/methods/email/EmailOTPInput.js +1 -46
  143. package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -44
  144. package/dist/components/auth/methods/email/EmailSignIn.js +1 -44
  145. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -44
  146. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -44
  147. package/dist/components/auth/methods/google/ContinueWithGoogle.cjs +1 -44
  148. package/dist/components/auth/methods/google/ContinueWithGoogle.js +1 -44
  149. package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -44
  150. package/dist/components/auth/methods/google/GoogleSignIn.js +1 -44
  151. package/dist/components/auth/methods/twitter/TwitterSignIn.cjs +1 -44
  152. package/dist/components/auth/methods/twitter/TwitterSignIn.js +1 -44
  153. package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -44
  154. package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -44
  155. package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -44
  156. package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -44
  157. package/dist/components/auth/methods/web3/Web3Connector.cjs +1 -65
  158. package/dist/components/auth/methods/web3/Web3Connector.js +1 -65
  159. package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +1 -53
  160. package/dist/components/auth/methods/web3/Web3ConnectorButton.js +1 -53
  161. package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -44
  162. package/dist/components/auth/methods/web3/Web3Connectors.js +1 -44
  163. package/dist/components/common/CountdownButton.cjs +1 -9
  164. package/dist/components/common/CountdownButton.js +1 -9
  165. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.cjs +1 -9
  166. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js +1 -9
  167. package/dist/components/common/CrossmintLogoV2/consts.cjs +1 -12
  168. package/dist/components/common/CrossmintLogoV2/consts.js +1 -12
  169. package/dist/components/common/CrossmintLogoV2/schemas.cjs +1 -34
  170. package/dist/components/common/CrossmintLogoV2/schemas.js +1 -34
  171. package/dist/components/common/Dialog.cjs +1 -26
  172. package/dist/components/common/Dialog.js +1 -26
  173. package/dist/components/common/Divider.cjs +1 -44
  174. package/dist/components/common/Divider.js +1 -44
  175. package/dist/components/common/InputOTP.cjs +1 -14
  176. package/dist/components/common/InputOTP.js +1 -14
  177. package/dist/components/common/SecuredByCrossmint.cjs +1 -10
  178. package/dist/components/common/SecuredByCrossmint.js +1 -10
  179. package/dist/components/common/Spinner.cjs +1 -9
  180. package/dist/components/common/Spinner.js +1 -9
  181. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs +1 -8
  182. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js +1 -8
  183. package/dist/components/embed/EmbeddedCheckoutIFrame.cjs +1 -8
  184. package/dist/components/embed/EmbeddedCheckoutIFrame.js +1 -8
  185. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs +1 -11
  186. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js +1 -11
  187. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs +1 -10
  188. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js +1 -10
  189. package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs +1 -11
  190. package/dist/components/embed/fiat/FiatEmbeddedCheckout.js +1 -11
  191. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs +1 -10
  192. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js +1 -10
  193. package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs +1 -75
  194. package/dist/components/embed/fiat/FiatPaymentElement_OLD.js +1 -75
  195. package/dist/components/embed/index.cjs +1 -14
  196. package/dist/components/embed/index.js +1 -14
  197. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -47
  198. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -47
  199. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -46
  200. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -46
  201. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +1 -174
  202. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +1 -174
  203. package/dist/components/embed/v3/crypto/PayerConnectionHandler.cjs +1 -8
  204. package/dist/components/embed/v3/crypto/PayerConnectionHandler.js +1 -8
  205. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs +1 -72
  206. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js +1 -72
  207. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +1 -8
  208. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +1 -8
  209. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs +1 -55
  210. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js +1 -55
  211. package/dist/components/embed/v3/crypto/utils/handleSuiTransaction.cjs +1 -71
  212. package/dist/components/embed/v3/crypto/utils/handleSuiTransaction.js +1 -71
  213. package/dist/components/embed/v3/index.cjs +1 -48
  214. package/dist/components/embed/v3/index.js +1 -48
  215. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.cjs +1 -11
  216. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.js +1 -11
  217. package/dist/components/hosted/index.cjs +1 -21
  218. package/dist/components/hosted/index.js +1 -21
  219. package/dist/components/hosted/styles.cjs +1 -10
  220. package/dist/components/hosted/styles.js +1 -10
  221. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -13
  222. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -13
  223. package/dist/components/hosted/v3/index.cjs +1 -14
  224. package/dist/components/hosted/v3/index.js +1 -14
  225. package/dist/components/index.cjs +1 -85
  226. package/dist/components/index.js +1 -85
  227. package/dist/components/signers/EmailInput.cjs +1 -11
  228. package/dist/components/signers/EmailInput.js +1 -11
  229. package/dist/components/signers/EmailOTPInput.cjs +1 -13
  230. package/dist/components/signers/EmailOTPInput.js +1 -13
  231. package/dist/components/signers/EmailSignersDialog.cjs +1 -18
  232. package/dist/components/signers/EmailSignersDialog.d.cts +3 -1
  233. package/dist/components/signers/EmailSignersDialog.d.ts +3 -1
  234. package/dist/components/signers/EmailSignersDialog.js +1 -18
  235. package/dist/consts/version.cjs +1 -8
  236. package/dist/consts/version.js +1 -8
  237. package/dist/hooks/index.cjs +1 -56
  238. package/dist/hooks/index.js +1 -56
  239. package/dist/hooks/useAuth.cjs +1 -44
  240. package/dist/hooks/useAuth.js +1 -44
  241. package/dist/hooks/useCrossmint.cjs +1 -10
  242. package/dist/hooks/useCrossmint.js +1 -10
  243. package/dist/hooks/useCrossmintAuth.cjs +1 -44
  244. package/dist/hooks/useCrossmintAuth.js +1 -44
  245. package/dist/hooks/useCrossmintCheckout.cjs +1 -13
  246. package/dist/hooks/useCrossmintCheckout.js +1 -13
  247. package/dist/hooks/useDeepEffect.cjs +1 -8
  248. package/dist/hooks/useDeepEffect.js +1 -8
  249. package/dist/hooks/useDynamicConnect.cjs +1 -8
  250. package/dist/hooks/useDynamicConnect.d.cts +3 -21
  251. package/dist/hooks/useDynamicConnect.d.ts +3 -21
  252. package/dist/hooks/useDynamicConnect.js +1 -8
  253. package/dist/hooks/useEnvironment.cjs +1 -8
  254. package/dist/hooks/useEnvironment.js +1 -8
  255. package/dist/hooks/useOAuthWindowListener.cjs +1 -44
  256. package/dist/hooks/useOAuthWindowListener.js +1 -44
  257. package/dist/hooks/useSignerInvisibleIFrame.cjs +1 -8
  258. package/dist/hooks/useSignerInvisibleIFrame.d.cts +73 -0
  259. package/dist/hooks/useSignerInvisibleIFrame.d.ts +73 -0
  260. package/dist/hooks/useSignerInvisibleIFrame.js +1 -8
  261. package/dist/hooks/useWallet.cjs +1 -44
  262. package/dist/hooks/useWallet.d.cts +8 -8
  263. package/dist/hooks/useWallet.d.ts +8 -8
  264. package/dist/hooks/useWallet.js +1 -44
  265. package/dist/icons/alert.cjs +1 -8
  266. package/dist/icons/alert.js +1 -8
  267. package/dist/icons/base64Icons.cjs +1 -12
  268. package/dist/icons/base64Icons.js +1 -12
  269. package/dist/icons/chevronRight.cjs +1 -8
  270. package/dist/icons/chevronRight.js +1 -8
  271. package/dist/icons/discord.cjs +1 -29
  272. package/dist/icons/discord.js +1 -29
  273. package/dist/icons/emailOTP.cjs +1 -8
  274. package/dist/icons/emailOTP.js +1 -8
  275. package/dist/icons/farcaster.cjs +1 -8
  276. package/dist/icons/farcaster.js +1 -8
  277. package/dist/icons/fingerprint.cjs +1 -8
  278. package/dist/icons/fingerprint.js +1 -8
  279. package/dist/icons/google.cjs +1 -8
  280. package/dist/icons/google.js +1 -8
  281. package/dist/icons/leftArrow.cjs +1 -8
  282. package/dist/icons/leftArrow.js +1 -8
  283. package/dist/icons/passkey.cjs +1 -8
  284. package/dist/icons/passkey.js +1 -8
  285. package/dist/icons/passkeyPromptLogo.cjs +1 -8
  286. package/dist/icons/passkeyPromptLogo.js +1 -8
  287. package/dist/icons/securedByLeaf.cjs +1 -8
  288. package/dist/icons/securedByLeaf.js +1 -8
  289. package/dist/icons/twitter.cjs +1 -8
  290. package/dist/icons/twitter.js +1 -8
  291. package/dist/icons/wallet.cjs +1 -8
  292. package/dist/icons/wallet.js +1 -8
  293. package/dist/icons/x.cjs +1 -29
  294. package/dist/icons/x.js +1 -29
  295. package/dist/index.cjs +1 -117
  296. package/dist/index.js +1 -117
  297. package/dist/providers/CrossmintAuthProvider.cjs +1 -46
  298. package/dist/providers/CrossmintAuthProvider.d.cts +2 -2
  299. package/dist/providers/CrossmintAuthProvider.d.ts +2 -2
  300. package/dist/providers/CrossmintAuthProvider.js +1 -46
  301. package/dist/providers/CrossmintWalletProvider.cjs +1 -46
  302. package/dist/providers/CrossmintWalletProvider.d.cts +2 -2
  303. package/dist/providers/CrossmintWalletProvider.d.ts +2 -2
  304. package/dist/providers/CrossmintWalletProvider.js +1 -46
  305. package/dist/providers/TwindProvider.cjs +1 -9
  306. package/dist/providers/TwindProvider.js +1 -9
  307. package/dist/providers/auth/AuthFormProvider.cjs +1 -46
  308. package/dist/providers/auth/AuthFormProvider.js +1 -46
  309. package/dist/providers/auth/FarcasterProvider.cjs +1 -8
  310. package/dist/providers/auth/FarcasterProvider.js +1 -8
  311. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs +1 -44
  312. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js +1 -44
  313. package/dist/providers/index.cjs +1 -50
  314. package/dist/providers/index.js +1 -50
  315. package/dist/providers/signers/CrossmintSignerProvider.cjs +1 -48
  316. package/dist/providers/signers/CrossmintSignerProvider.d.cts +2 -2
  317. package/dist/providers/signers/CrossmintSignerProvider.d.ts +2 -2
  318. package/dist/providers/signers/CrossmintSignerProvider.js +1 -48
  319. package/dist/testUtils.cjs +1 -8
  320. package/dist/testUtils.js +1 -8
  321. package/dist/twind.config.cjs +1 -8
  322. package/dist/twind.config.js +1 -8
  323. package/dist/types/auth.cjs +1 -1
  324. package/dist/types/auth.js +0 -1
  325. package/dist/types/passkey.cjs +1 -1
  326. package/dist/types/passkey.js +0 -1
  327. package/dist/types/wallet.cjs +1 -1
  328. package/dist/types/wallet.d.cts +1 -4
  329. package/dist/types/wallet.d.ts +1 -4
  330. package/dist/types/wallet.js +0 -1
  331. package/dist/utils/classNames.cjs +1 -8
  332. package/dist/utils/classNames.js +1 -8
  333. package/dist/utils/createCrossmintApiClient.cjs +1 -9
  334. package/dist/utils/createCrossmintApiClient.js +1 -9
  335. package/dist/utils/createPasskeySigner.cjs +1 -8
  336. package/dist/utils/createPasskeySigner.js +1 -8
  337. package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs +1 -10
  338. package/dist/utils/dynamic/dynamicChainToCrossmintChain.js +1 -10
  339. package/dist/utils/errorUtils.cjs +1 -8
  340. package/dist/utils/errorUtils.js +1 -8
  341. package/dist/utils/mapSignerToWalletType.cjs +1 -8
  342. package/dist/utils/mapSignerToWalletType.js +1 -8
  343. package/package.json +71 -68
  344. package/dist/chunk-2DG4R653.cjs +0 -79
  345. package/dist/chunk-2DG4R653.cjs.map +0 -1
  346. package/dist/chunk-2T2VCED7.js +0 -17
  347. package/dist/chunk-2T2VCED7.js.map +0 -1
  348. package/dist/chunk-33WZFL2D.js +0 -80
  349. package/dist/chunk-33WZFL2D.js.map +0 -1
  350. package/dist/chunk-35QBUT6F.js +0 -89
  351. package/dist/chunk-35QBUT6F.js.map +0 -1
  352. package/dist/chunk-35RV5AOT.cjs +0 -70
  353. package/dist/chunk-35RV5AOT.cjs.map +0 -1
  354. package/dist/chunk-3CWYQQ65.cjs +0 -45
  355. package/dist/chunk-3CWYQQ65.cjs.map +0 -1
  356. package/dist/chunk-3IQALRY5.js +0 -14
  357. package/dist/chunk-3IQALRY5.js.map +0 -1
  358. package/dist/chunk-3J6CUUWT.js +0 -50
  359. package/dist/chunk-3J6CUUWT.js.map +0 -1
  360. package/dist/chunk-3KR4GYLF.js +0 -26
  361. package/dist/chunk-3KR4GYLF.js.map +0 -1
  362. package/dist/chunk-43P7QWBK.cjs +0 -17
  363. package/dist/chunk-43P7QWBK.cjs.map +0 -1
  364. package/dist/chunk-4D4AAZAE.cjs +0 -32
  365. package/dist/chunk-4D4AAZAE.cjs.map +0 -1
  366. package/dist/chunk-4DAZAO6Y.cjs +0 -59
  367. package/dist/chunk-4DAZAO6Y.cjs.map +0 -1
  368. package/dist/chunk-4EZ2R33I.cjs +0 -28
  369. package/dist/chunk-4EZ2R33I.cjs.map +0 -1
  370. package/dist/chunk-5BYCXTC3.js +0 -17
  371. package/dist/chunk-5BYCXTC3.js.map +0 -1
  372. package/dist/chunk-5KK3YQWD.cjs +0 -1
  373. package/dist/chunk-5KK3YQWD.cjs.map +0 -1
  374. package/dist/chunk-5OGRPJ2L.js +0 -198
  375. package/dist/chunk-5OGRPJ2L.js.map +0 -1
  376. package/dist/chunk-5RDAQSJK.cjs +0 -27
  377. package/dist/chunk-5RDAQSJK.cjs.map +0 -1
  378. package/dist/chunk-5RX5WFEW.cjs +0 -11
  379. package/dist/chunk-5RX5WFEW.cjs.map +0 -1
  380. package/dist/chunk-5TH75X5L.js +0 -27
  381. package/dist/chunk-5TH75X5L.js.map +0 -1
  382. package/dist/chunk-6A5ZUKVT.cjs +0 -31
  383. package/dist/chunk-6A5ZUKVT.cjs.map +0 -1
  384. package/dist/chunk-6LO4NSRH.cjs +0 -21
  385. package/dist/chunk-6LO4NSRH.cjs.map +0 -1
  386. package/dist/chunk-6TFIQWYJ.js +0 -79
  387. package/dist/chunk-6TFIQWYJ.js.map +0 -1
  388. package/dist/chunk-72LSMHPL.js +0 -131
  389. package/dist/chunk-72LSMHPL.js.map +0 -1
  390. package/dist/chunk-7EPTEGBP.cjs +0 -51
  391. package/dist/chunk-7EPTEGBP.cjs.map +0 -1
  392. package/dist/chunk-7HBAJHZZ.cjs +0 -198
  393. package/dist/chunk-7HBAJHZZ.cjs.map +0 -1
  394. package/dist/chunk-7HENIDX5.js +0 -39
  395. package/dist/chunk-7HENIDX5.js.map +0 -1
  396. package/dist/chunk-7IC6PRTG.js +0 -10
  397. package/dist/chunk-7IC6PRTG.js.map +0 -1
  398. package/dist/chunk-7KIY6DLW.js +0 -28
  399. package/dist/chunk-7KIY6DLW.js.map +0 -1
  400. package/dist/chunk-7UXIFMNO.js +0 -1
  401. package/dist/chunk-7UXIFMNO.js.map +0 -1
  402. package/dist/chunk-A7J4DAE7.js +0 -16
  403. package/dist/chunk-A7J4DAE7.js.map +0 -1
  404. package/dist/chunk-ATHR4S2P.js +0 -48
  405. package/dist/chunk-ATHR4S2P.js.map +0 -1
  406. package/dist/chunk-AXZLLRBU.cjs +0 -26
  407. package/dist/chunk-AXZLLRBU.cjs.map +0 -1
  408. package/dist/chunk-B7LYPQ4K.cjs +0 -38
  409. package/dist/chunk-B7LYPQ4K.cjs.map +0 -1
  410. package/dist/chunk-C2VARNXL.js +0 -70
  411. package/dist/chunk-C2VARNXL.js.map +0 -1
  412. package/dist/chunk-C3MY2FND.cjs +0 -78
  413. package/dist/chunk-C3MY2FND.cjs.map +0 -1
  414. package/dist/chunk-CRTRMMJ7.js +0 -59
  415. package/dist/chunk-CRTRMMJ7.js.map +0 -1
  416. package/dist/chunk-DF5JCCWO.cjs +0 -124
  417. package/dist/chunk-DF5JCCWO.cjs.map +0 -1
  418. package/dist/chunk-EAEMD3DY.cjs +0 -34
  419. package/dist/chunk-EAEMD3DY.cjs.map +0 -1
  420. package/dist/chunk-EH64D65Z.cjs +0 -137
  421. package/dist/chunk-EH64D65Z.cjs.map +0 -1
  422. package/dist/chunk-EON274FF.cjs +0 -33
  423. package/dist/chunk-EON274FF.cjs.map +0 -1
  424. package/dist/chunk-EOWJ7775.js +0 -18
  425. package/dist/chunk-EOWJ7775.js.map +0 -1
  426. package/dist/chunk-F2AWZC4M.js +0 -51
  427. package/dist/chunk-F2AWZC4M.js.map +0 -1
  428. package/dist/chunk-F3AMLCQL.js +0 -22
  429. package/dist/chunk-F3AMLCQL.js.map +0 -1
  430. package/dist/chunk-FCL2DOPJ.js +0 -33
  431. package/dist/chunk-FCL2DOPJ.js.map +0 -1
  432. package/dist/chunk-FHPIRUUD.cjs +0 -17
  433. package/dist/chunk-FHPIRUUD.cjs.map +0 -1
  434. package/dist/chunk-FKL462NZ.js +0 -22
  435. package/dist/chunk-FKL462NZ.js.map +0 -1
  436. package/dist/chunk-FU74NHZW.js +0 -34
  437. package/dist/chunk-FU74NHZW.js.map +0 -1
  438. package/dist/chunk-FXKNGWFA.cjs +0 -17
  439. package/dist/chunk-FXKNGWFA.cjs.map +0 -1
  440. package/dist/chunk-H4F7UVPT.js +0 -34
  441. package/dist/chunk-H4F7UVPT.js.map +0 -1
  442. package/dist/chunk-H4TVOH5V.cjs +0 -51
  443. package/dist/chunk-H4TVOH5V.cjs.map +0 -1
  444. package/dist/chunk-HCW4RO2O.cjs +0 -29
  445. package/dist/chunk-HCW4RO2O.cjs.map +0 -1
  446. package/dist/chunk-HFPR3JUK.js +0 -31
  447. package/dist/chunk-HFPR3JUK.js.map +0 -1
  448. package/dist/chunk-HIU3FK4M.cjs +0 -13
  449. package/dist/chunk-HIU3FK4M.cjs.map +0 -1
  450. package/dist/chunk-HPOZ6I54.cjs +0 -44
  451. package/dist/chunk-HPOZ6I54.cjs.map +0 -1
  452. package/dist/chunk-I22MLYYW.cjs +0 -21
  453. package/dist/chunk-I22MLYYW.cjs.map +0 -1
  454. package/dist/chunk-I63FQCIV.js +0 -189
  455. package/dist/chunk-I63FQCIV.js.map +0 -1
  456. package/dist/chunk-IDJ7FOHB.js +0 -34
  457. package/dist/chunk-IDJ7FOHB.js.map +0 -1
  458. package/dist/chunk-IQPA3QOV.js +0 -27
  459. package/dist/chunk-IQPA3QOV.js.map +0 -1
  460. package/dist/chunk-IUCMANQB.js +0 -137
  461. package/dist/chunk-IUCMANQB.js.map +0 -1
  462. package/dist/chunk-JBCO6SN6.js +0 -50
  463. package/dist/chunk-JBCO6SN6.js.map +0 -1
  464. package/dist/chunk-JVVTHOFN.js +0 -153
  465. package/dist/chunk-JVVTHOFN.js.map +0 -1
  466. package/dist/chunk-KBMNS57M.js +0 -17
  467. package/dist/chunk-KBMNS57M.js.map +0 -1
  468. package/dist/chunk-KEKBOJCF.cjs +0 -50
  469. package/dist/chunk-KEKBOJCF.cjs.map +0 -1
  470. package/dist/chunk-KLWDDALZ.cjs +0 -14
  471. package/dist/chunk-KLWDDALZ.cjs.map +0 -1
  472. package/dist/chunk-KNOUJZN5.cjs +0 -32
  473. package/dist/chunk-KNOUJZN5.cjs.map +0 -1
  474. package/dist/chunk-KPQDVXHK.js +0 -105
  475. package/dist/chunk-KPQDVXHK.js.map +0 -1
  476. package/dist/chunk-KYC6TDD4.cjs +0 -82
  477. package/dist/chunk-KYC6TDD4.cjs.map +0 -1
  478. package/dist/chunk-L3FKENHU.js +0 -14
  479. package/dist/chunk-L3FKENHU.js.map +0 -1
  480. package/dist/chunk-LAI55KMW.cjs +0 -34
  481. package/dist/chunk-LAI55KMW.cjs.map +0 -1
  482. package/dist/chunk-LD7PAUBR.cjs +0 -31
  483. package/dist/chunk-LD7PAUBR.cjs.map +0 -1
  484. package/dist/chunk-LEAESLKV.cjs +0 -131
  485. package/dist/chunk-LEAESLKV.cjs.map +0 -1
  486. package/dist/chunk-LYNYDYMA.js +0 -31
  487. package/dist/chunk-LYNYDYMA.js.map +0 -1
  488. package/dist/chunk-LYUX72JO.cjs +0 -110
  489. package/dist/chunk-LYUX72JO.cjs.map +0 -1
  490. package/dist/chunk-MH37OJT2.cjs +0 -80
  491. package/dist/chunk-MH37OJT2.cjs.map +0 -1
  492. package/dist/chunk-MSZ635MU.cjs +0 -22
  493. package/dist/chunk-MSZ635MU.cjs.map +0 -1
  494. package/dist/chunk-OBYFRT3I.cjs +0 -14
  495. package/dist/chunk-OBYFRT3I.cjs.map +0 -1
  496. package/dist/chunk-OYO5HXKX.js +0 -32
  497. package/dist/chunk-OYO5HXKX.js.map +0 -1
  498. package/dist/chunk-OZKGMYKX.js +0 -21
  499. package/dist/chunk-OZKGMYKX.js.map +0 -1
  500. package/dist/chunk-PCY3N6C2.js +0 -1
  501. package/dist/chunk-PCY3N6C2.js.map +0 -1
  502. package/dist/chunk-PHCGCJSA.js +0 -107
  503. package/dist/chunk-PHCGCJSA.js.map +0 -1
  504. package/dist/chunk-PIBLEOBQ.js +0 -124
  505. package/dist/chunk-PIBLEOBQ.js.map +0 -1
  506. package/dist/chunk-PQSWDEZX.js +0 -28
  507. package/dist/chunk-PQSWDEZX.js.map +0 -1
  508. package/dist/chunk-Q3M4UH5U.cjs +0 -48
  509. package/dist/chunk-Q3M4UH5U.cjs.map +0 -1
  510. package/dist/chunk-QBYRMPKN.js +0 -82
  511. package/dist/chunk-QBYRMPKN.js.map +0 -1
  512. package/dist/chunk-QDKAU3H2.js +0 -31
  513. package/dist/chunk-QDKAU3H2.js.map +0 -1
  514. package/dist/chunk-QQXBYOKA.cjs +0 -16
  515. package/dist/chunk-QQXBYOKA.cjs.map +0 -1
  516. package/dist/chunk-QTL5I5C2.js +0 -38
  517. package/dist/chunk-QTL5I5C2.js.map +0 -1
  518. package/dist/chunk-QUZAE6AP.cjs +0 -1898
  519. package/dist/chunk-QUZAE6AP.cjs.map +0 -1
  520. package/dist/chunk-R6IL3WOE.cjs +0 -31
  521. package/dist/chunk-R6IL3WOE.cjs.map +0 -1
  522. package/dist/chunk-RB34BJZ6.js +0 -57
  523. package/dist/chunk-RB34BJZ6.js.map +0 -1
  524. package/dist/chunk-RU4ZOZP5.cjs +0 -1
  525. package/dist/chunk-RU4ZOZP5.cjs.map +0 -1
  526. package/dist/chunk-RZPQIRIY.js +0 -11
  527. package/dist/chunk-RZPQIRIY.js.map +0 -1
  528. package/dist/chunk-SBA6FMFT.cjs +0 -18
  529. package/dist/chunk-SBA6FMFT.cjs.map +0 -1
  530. package/dist/chunk-STNIRPZP.js +0 -78
  531. package/dist/chunk-STNIRPZP.js.map +0 -1
  532. package/dist/chunk-SZA3XDJ5.cjs +0 -1
  533. package/dist/chunk-SZA3XDJ5.cjs.map +0 -1
  534. package/dist/chunk-SZMTAO74.cjs +0 -50
  535. package/dist/chunk-SZMTAO74.cjs.map +0 -1
  536. package/dist/chunk-TKFSXTH5.js +0 -51
  537. package/dist/chunk-TKFSXTH5.js.map +0 -1
  538. package/dist/chunk-TOCRVS5A.js +0 -1898
  539. package/dist/chunk-TOCRVS5A.js.map +0 -1
  540. package/dist/chunk-UASNCH3A.cjs +0 -27
  541. package/dist/chunk-UASNCH3A.cjs.map +0 -1
  542. package/dist/chunk-UD3UTFV3.cjs +0 -1
  543. package/dist/chunk-UD3UTFV3.cjs.map +0 -1
  544. package/dist/chunk-URKPLEPV.cjs +0 -189
  545. package/dist/chunk-URKPLEPV.cjs.map +0 -1
  546. package/dist/chunk-UYMSOJYK.cjs +0 -89
  547. package/dist/chunk-UYMSOJYK.cjs.map +0 -1
  548. package/dist/chunk-V7CWLETC.js +0 -13
  549. package/dist/chunk-V7CWLETC.js.map +0 -1
  550. package/dist/chunk-VEPJM7ZC.cjs +0 -125
  551. package/dist/chunk-VEPJM7ZC.cjs.map +0 -1
  552. package/dist/chunk-VKQ4YOEX.cjs +0 -19
  553. package/dist/chunk-VKQ4YOEX.cjs.map +0 -1
  554. package/dist/chunk-VPXCDIYZ.cjs +0 -153
  555. package/dist/chunk-VPXCDIYZ.cjs.map +0 -1
  556. package/dist/chunk-VZIXXIU5.js +0 -32
  557. package/dist/chunk-VZIXXIU5.js.map +0 -1
  558. package/dist/chunk-WO6OW46H.cjs +0 -57
  559. package/dist/chunk-WO6OW46H.cjs.map +0 -1
  560. package/dist/chunk-WS6OOSH7.js +0 -110
  561. package/dist/chunk-WS6OOSH7.js.map +0 -1
  562. package/dist/chunk-WVM3I3I3.js +0 -45
  563. package/dist/chunk-WVM3I3I3.js.map +0 -1
  564. package/dist/chunk-XDJ6F7N4.cjs +0 -107
  565. package/dist/chunk-XDJ6F7N4.cjs.map +0 -1
  566. package/dist/chunk-XSXE5LWO.js +0 -19
  567. package/dist/chunk-XSXE5LWO.js.map +0 -1
  568. package/dist/chunk-XW53XESI.cjs +0 -39
  569. package/dist/chunk-XW53XESI.cjs.map +0 -1
  570. package/dist/chunk-XXJ7LQ44.js +0 -1
  571. package/dist/chunk-XXJ7LQ44.js.map +0 -1
  572. package/dist/chunk-XYMYRPVT.js +0 -1
  573. package/dist/chunk-XYMYRPVT.js.map +0 -1
  574. package/dist/chunk-YE55IKBP.cjs +0 -34
  575. package/dist/chunk-YE55IKBP.cjs.map +0 -1
  576. package/dist/chunk-YHFDNKTS.cjs +0 -10
  577. package/dist/chunk-YHFDNKTS.cjs.map +0 -1
  578. package/dist/chunk-YKL53K3C.cjs +0 -22
  579. package/dist/chunk-YKL53K3C.cjs.map +0 -1
  580. package/dist/chunk-YWGWSNTU.js +0 -125
  581. package/dist/chunk-YWGWSNTU.js.map +0 -1
  582. package/dist/chunk-Z6QSH522.cjs +0 -105
  583. package/dist/chunk-Z6QSH522.cjs.map +0 -1
  584. package/dist/chunk-ZDQGQY7Z.js +0 -29
  585. package/dist/chunk-ZDQGQY7Z.js.map +0 -1
  586. package/dist/chunk-ZIHCLVCD.js +0 -44
  587. package/dist/chunk-ZIHCLVCD.js.map +0 -1
  588. package/dist/chunk-ZMSST6ZZ.cjs +0 -28
  589. package/dist/chunk-ZMSST6ZZ.cjs.map +0 -1
  590. package/dist/chunk-ZUIS3FET.js +0 -21
  591. package/dist/chunk-ZUIS3FET.js.map +0 -1
  592. package/dist/components/CrossmintNFTCollectionView.cjs.map +0 -1
  593. package/dist/components/CrossmintNFTCollectionView.js.map +0 -1
  594. package/dist/components/CrossmintNFTDetail.cjs.map +0 -1
  595. package/dist/components/CrossmintNFTDetail.js.map +0 -1
  596. package/dist/components/auth/AuthForm.cjs.map +0 -1
  597. package/dist/components/auth/AuthForm.js.map +0 -1
  598. package/dist/components/auth/AuthFormBackButton.cjs.map +0 -1
  599. package/dist/components/auth/AuthFormBackButton.js.map +0 -1
  600. package/dist/components/auth/AuthFormDialog.cjs.map +0 -1
  601. package/dist/components/auth/AuthFormDialog.js.map +0 -1
  602. package/dist/components/auth/EmbeddedAuthForm.cjs.map +0 -1
  603. package/dist/components/auth/EmbeddedAuthForm.js.map +0 -1
  604. package/dist/components/auth/PasskeyPrompt.cjs.map +0 -1
  605. package/dist/components/auth/PasskeyPrompt.js.map +0 -1
  606. package/dist/components/auth/methods/email/EmailAuthFlow.cjs.map +0 -1
  607. package/dist/components/auth/methods/email/EmailAuthFlow.js.map +0 -1
  608. package/dist/components/auth/methods/email/EmailOTPInput.cjs.map +0 -1
  609. package/dist/components/auth/methods/email/EmailOTPInput.js.map +0 -1
  610. package/dist/components/auth/methods/email/EmailSignIn.cjs.map +0 -1
  611. package/dist/components/auth/methods/email/EmailSignIn.js.map +0 -1
  612. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs.map +0 -1
  613. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js.map +0 -1
  614. package/dist/components/auth/methods/google/ContinueWithGoogle.cjs.map +0 -1
  615. package/dist/components/auth/methods/google/ContinueWithGoogle.js.map +0 -1
  616. package/dist/components/auth/methods/google/GoogleSignIn.cjs.map +0 -1
  617. package/dist/components/auth/methods/google/GoogleSignIn.js.map +0 -1
  618. package/dist/components/auth/methods/twitter/TwitterSignIn.cjs.map +0 -1
  619. package/dist/components/auth/methods/twitter/TwitterSignIn.js.map +0 -1
  620. package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +0 -1
  621. package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +0 -1
  622. package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs.map +0 -1
  623. package/dist/components/auth/methods/web3/Web3AuthFlowButton.js.map +0 -1
  624. package/dist/components/auth/methods/web3/Web3Connector.cjs.map +0 -1
  625. package/dist/components/auth/methods/web3/Web3Connector.js.map +0 -1
  626. package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs.map +0 -1
  627. package/dist/components/auth/methods/web3/Web3ConnectorButton.js.map +0 -1
  628. package/dist/components/auth/methods/web3/Web3Connectors.cjs.map +0 -1
  629. package/dist/components/auth/methods/web3/Web3Connectors.js.map +0 -1
  630. package/dist/components/common/CountdownButton.cjs.map +0 -1
  631. package/dist/components/common/CountdownButton.js.map +0 -1
  632. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.cjs.map +0 -1
  633. package/dist/components/common/CrossmintLogoV2/CrossmintLogoV2.js.map +0 -1
  634. package/dist/components/common/CrossmintLogoV2/consts.cjs.map +0 -1
  635. package/dist/components/common/CrossmintLogoV2/consts.js.map +0 -1
  636. package/dist/components/common/CrossmintLogoV2/schemas.cjs.map +0 -1
  637. package/dist/components/common/CrossmintLogoV2/schemas.js.map +0 -1
  638. package/dist/components/common/Dialog.cjs.map +0 -1
  639. package/dist/components/common/Dialog.js.map +0 -1
  640. package/dist/components/common/Divider.cjs.map +0 -1
  641. package/dist/components/common/Divider.js.map +0 -1
  642. package/dist/components/common/InputOTP.cjs.map +0 -1
  643. package/dist/components/common/InputOTP.js.map +0 -1
  644. package/dist/components/common/SecuredByCrossmint.cjs.map +0 -1
  645. package/dist/components/common/SecuredByCrossmint.js.map +0 -1
  646. package/dist/components/common/Spinner.cjs.map +0 -1
  647. package/dist/components/common/Spinner.js.map +0 -1
  648. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs.map +0 -1
  649. package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js.map +0 -1
  650. package/dist/components/embed/EmbeddedCheckoutIFrame.cjs.map +0 -1
  651. package/dist/components/embed/EmbeddedCheckoutIFrame.js.map +0 -1
  652. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs.map +0 -1
  653. package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js.map +0 -1
  654. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs.map +0 -1
  655. package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js.map +0 -1
  656. package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs.map +0 -1
  657. package/dist/components/embed/fiat/FiatEmbeddedCheckout.js.map +0 -1
  658. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs.map +0 -1
  659. package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js.map +0 -1
  660. package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs.map +0 -1
  661. package/dist/components/embed/fiat/FiatPaymentElement_OLD.js.map +0 -1
  662. package/dist/components/embed/index.cjs.map +0 -1
  663. package/dist/components/embed/index.js.map +0 -1
  664. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs.map +0 -1
  665. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +0 -1
  666. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs.map +0 -1
  667. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js.map +0 -1
  668. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +0 -1
  669. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +0 -1
  670. package/dist/components/embed/v3/crypto/PayerConnectionHandler.cjs.map +0 -1
  671. package/dist/components/embed/v3/crypto/PayerConnectionHandler.js.map +0 -1
  672. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs.map +0 -1
  673. package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js.map +0 -1
  674. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs.map +0 -1
  675. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js.map +0 -1
  676. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs.map +0 -1
  677. package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js.map +0 -1
  678. package/dist/components/embed/v3/crypto/utils/handleSuiTransaction.cjs.map +0 -1
  679. package/dist/components/embed/v3/crypto/utils/handleSuiTransaction.js.map +0 -1
  680. package/dist/components/embed/v3/index.cjs.map +0 -1
  681. package/dist/components/embed/v3/index.js.map +0 -1
  682. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.cjs.map +0 -1
  683. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.js.map +0 -1
  684. package/dist/components/hosted/index.cjs.map +0 -1
  685. package/dist/components/hosted/index.js.map +0 -1
  686. package/dist/components/hosted/styles.cjs.map +0 -1
  687. package/dist/components/hosted/styles.js.map +0 -1
  688. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs.map +0 -1
  689. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js.map +0 -1
  690. package/dist/components/hosted/v3/index.cjs.map +0 -1
  691. package/dist/components/hosted/v3/index.js.map +0 -1
  692. package/dist/components/index.cjs.map +0 -1
  693. package/dist/components/index.js.map +0 -1
  694. package/dist/components/signers/EmailInput.cjs.map +0 -1
  695. package/dist/components/signers/EmailInput.js.map +0 -1
  696. package/dist/components/signers/EmailOTPInput.cjs.map +0 -1
  697. package/dist/components/signers/EmailOTPInput.js.map +0 -1
  698. package/dist/components/signers/EmailSignersDialog.cjs.map +0 -1
  699. package/dist/components/signers/EmailSignersDialog.js.map +0 -1
  700. package/dist/consts/version.cjs.map +0 -1
  701. package/dist/consts/version.js.map +0 -1
  702. package/dist/hooks/index.cjs.map +0 -1
  703. package/dist/hooks/index.js.map +0 -1
  704. package/dist/hooks/useAuth.cjs.map +0 -1
  705. package/dist/hooks/useAuth.js.map +0 -1
  706. package/dist/hooks/useCrossmint.cjs.map +0 -1
  707. package/dist/hooks/useCrossmint.js.map +0 -1
  708. package/dist/hooks/useCrossmintAuth.cjs.map +0 -1
  709. package/dist/hooks/useCrossmintAuth.js.map +0 -1
  710. package/dist/hooks/useCrossmintCheckout.cjs.map +0 -1
  711. package/dist/hooks/useCrossmintCheckout.js.map +0 -1
  712. package/dist/hooks/useDeepEffect.cjs.map +0 -1
  713. package/dist/hooks/useDeepEffect.js.map +0 -1
  714. package/dist/hooks/useDynamicConnect.cjs.map +0 -1
  715. package/dist/hooks/useDynamicConnect.js.map +0 -1
  716. package/dist/hooks/useEnvironment.cjs.map +0 -1
  717. package/dist/hooks/useEnvironment.js.map +0 -1
  718. package/dist/hooks/useOAuthWindowListener.cjs.map +0 -1
  719. package/dist/hooks/useOAuthWindowListener.js.map +0 -1
  720. package/dist/hooks/useSignerInvisibleIFrame.cjs.map +0 -1
  721. package/dist/hooks/useSignerInvisibleIFrame.js.map +0 -1
  722. package/dist/hooks/useWallet.cjs.map +0 -1
  723. package/dist/hooks/useWallet.js.map +0 -1
  724. package/dist/icons/alert.cjs.map +0 -1
  725. package/dist/icons/alert.js.map +0 -1
  726. package/dist/icons/base64Icons.cjs.map +0 -1
  727. package/dist/icons/base64Icons.js.map +0 -1
  728. package/dist/icons/chevronRight.cjs.map +0 -1
  729. package/dist/icons/chevronRight.js.map +0 -1
  730. package/dist/icons/discord.cjs.map +0 -1
  731. package/dist/icons/discord.js.map +0 -1
  732. package/dist/icons/emailOTP.cjs.map +0 -1
  733. package/dist/icons/emailOTP.js.map +0 -1
  734. package/dist/icons/farcaster.cjs.map +0 -1
  735. package/dist/icons/farcaster.js.map +0 -1
  736. package/dist/icons/fingerprint.cjs.map +0 -1
  737. package/dist/icons/fingerprint.js.map +0 -1
  738. package/dist/icons/google.cjs.map +0 -1
  739. package/dist/icons/google.js.map +0 -1
  740. package/dist/icons/leftArrow.cjs.map +0 -1
  741. package/dist/icons/leftArrow.js.map +0 -1
  742. package/dist/icons/passkey.cjs.map +0 -1
  743. package/dist/icons/passkey.js.map +0 -1
  744. package/dist/icons/passkeyPromptLogo.cjs.map +0 -1
  745. package/dist/icons/passkeyPromptLogo.js.map +0 -1
  746. package/dist/icons/securedByLeaf.cjs.map +0 -1
  747. package/dist/icons/securedByLeaf.js.map +0 -1
  748. package/dist/icons/twitter.cjs.map +0 -1
  749. package/dist/icons/twitter.js.map +0 -1
  750. package/dist/icons/wallet.cjs.map +0 -1
  751. package/dist/icons/wallet.js.map +0 -1
  752. package/dist/icons/x.cjs.map +0 -1
  753. package/dist/icons/x.js.map +0 -1
  754. package/dist/index.cjs.map +0 -1
  755. package/dist/index.js.map +0 -1
  756. package/dist/providers/CrossmintAuthProvider.cjs.map +0 -1
  757. package/dist/providers/CrossmintAuthProvider.js.map +0 -1
  758. package/dist/providers/CrossmintWalletProvider.cjs.map +0 -1
  759. package/dist/providers/CrossmintWalletProvider.js.map +0 -1
  760. package/dist/providers/TwindProvider.cjs.map +0 -1
  761. package/dist/providers/TwindProvider.js.map +0 -1
  762. package/dist/providers/auth/AuthFormProvider.cjs.map +0 -1
  763. package/dist/providers/auth/AuthFormProvider.js.map +0 -1
  764. package/dist/providers/auth/FarcasterProvider.cjs.map +0 -1
  765. package/dist/providers/auth/FarcasterProvider.js.map +0 -1
  766. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs.map +0 -1
  767. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js.map +0 -1
  768. package/dist/providers/index.cjs.map +0 -1
  769. package/dist/providers/index.js.map +0 -1
  770. package/dist/providers/signers/CrossmintSignerProvider.cjs.map +0 -1
  771. package/dist/providers/signers/CrossmintSignerProvider.js.map +0 -1
  772. package/dist/testUtils.cjs.map +0 -1
  773. package/dist/testUtils.js.map +0 -1
  774. package/dist/twind.config.cjs.map +0 -1
  775. package/dist/twind.config.js.map +0 -1
  776. package/dist/types/auth.cjs.map +0 -1
  777. package/dist/types/auth.js.map +0 -1
  778. package/dist/types/passkey.cjs.map +0 -1
  779. package/dist/types/passkey.js.map +0 -1
  780. package/dist/types/wallet.cjs.map +0 -1
  781. package/dist/types/wallet.js.map +0 -1
  782. package/dist/utils/classNames.cjs.map +0 -1
  783. package/dist/utils/classNames.js.map +0 -1
  784. package/dist/utils/createCrossmintApiClient.cjs.map +0 -1
  785. package/dist/utils/createCrossmintApiClient.js.map +0 -1
  786. package/dist/utils/createPasskeySigner.cjs.map +0 -1
  787. package/dist/utils/createPasskeySigner.js.map +0 -1
  788. package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs.map +0 -1
  789. package/dist/utils/dynamic/dynamicChainToCrossmintChain.js.map +0 -1
  790. package/dist/utils/errorUtils.cjs.map +0 -1
  791. package/dist/utils/errorUtils.js.map +0 -1
  792. package/dist/utils/mapSignerToWalletType.cjs.map +0 -1
  793. package/dist/utils/mapSignerToWalletType.js.map +0 -1
@@ -1,1898 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2
-
3
- var _chunkUYMSOJYKcjs = require('./chunk-UYMSOJYK.cjs');
4
-
5
-
6
- var _chunkQQXBYOKAcjs = require('./chunk-QQXBYOKA.cjs');
7
-
8
-
9
- var _chunkXW53XESIcjs = require('./chunk-XW53XESI.cjs');
10
-
11
-
12
- var _chunk7EPTEGBPcjs = require('./chunk-7EPTEGBP.cjs');
13
-
14
-
15
- var _chunk7HBAJHZZcjs = require('./chunk-7HBAJHZZ.cjs');
16
-
17
-
18
- var _chunk2DG4R653cjs = require('./chunk-2DG4R653.cjs');
19
-
20
-
21
-
22
-
23
-
24
- var _chunkLEAESLKVcjs = require('./chunk-LEAESLKV.cjs');
25
-
26
-
27
-
28
-
29
- var _chunkMH37OJT2cjs = require('./chunk-MH37OJT2.cjs');
30
-
31
-
32
- var _chunkFHPIRUUDcjs = require('./chunk-FHPIRUUD.cjs');
33
-
34
-
35
- var _chunkB7LYPQ4Kcjs = require('./chunk-B7LYPQ4K.cjs');
36
-
37
-
38
- var _chunk5RX5WFEWcjs = require('./chunk-5RX5WFEW.cjs');
39
-
40
-
41
- var _chunkMSZ635MUcjs = require('./chunk-MSZ635MU.cjs');
42
-
43
-
44
- var _chunkHIU3FK4Mcjs = require('./chunk-HIU3FK4M.cjs');
45
-
46
-
47
- var _chunkI22MLYYWcjs = require('./chunk-I22MLYYW.cjs');
48
-
49
-
50
- var _chunkVKQ4YOEXcjs = require('./chunk-VKQ4YOEX.cjs');
51
-
52
-
53
- var _chunkH4TVOH5Vcjs = require('./chunk-H4TVOH5V.cjs');
54
-
55
-
56
- var _chunkHCW4RO2Ocjs = require('./chunk-HCW4RO2O.cjs');
57
-
58
-
59
- var _chunk5RDAQSJKcjs = require('./chunk-5RDAQSJK.cjs');
60
-
61
-
62
- var _chunkKNOUJZN5cjs = require('./chunk-KNOUJZN5.cjs');
63
-
64
-
65
- var _chunkWO6OW46Hcjs = require('./chunk-WO6OW46H.cjs');
66
-
67
-
68
- var _chunkZMSST6ZZcjs = require('./chunk-ZMSST6ZZ.cjs');
69
-
70
-
71
- var _chunkAXZLLRBUcjs = require('./chunk-AXZLLRBU.cjs');
72
-
73
-
74
- var _chunkURKPLEPVcjs = require('./chunk-URKPLEPV.cjs');
75
-
76
-
77
- var _chunkHPOZ6I54cjs = require('./chunk-HPOZ6I54.cjs');
78
-
79
-
80
- var _chunkKEKBOJCFcjs = require('./chunk-KEKBOJCF.cjs');
81
-
82
-
83
- var _chunkC3MY2FNDcjs = require('./chunk-C3MY2FND.cjs');
84
-
85
-
86
-
87
-
88
-
89
- var _chunk4DAZAO6Ycjs = require('./chunk-4DAZAO6Y.cjs');
90
-
91
- // src/providers/signers/CrossmintSignerProvider.tsx
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- var _react = require('react');
100
- var _walletssdk = require('@crossmint/wallets-sdk');
101
- var _web3js = require('@solana/web3.js');
102
- var _bs58 = require('bs58'); var _bs582 = _interopRequireDefault(_bs58);
103
-
104
- // src/hooks/useWallet.ts
105
-
106
-
107
- // src/providers/CrossmintWalletProvider.tsx
108
-
109
- var _reactdom = require('react-dom');
110
-
111
- var _jsxruntime = require('react/jsx-runtime');
112
- var WalletContext = _react.createContext.call(void 0, {
113
- status: "not-loaded",
114
- getOrCreateWallet: () => Promise.resolve({ startedCreation: false }),
115
- createPasskeySigner: () => Promise.resolve(null),
116
- clearWallet: () => {
117
- }
118
- });
119
- function CrossmintWalletProvider({
120
- children,
121
- showPasskeyHelpers = true,
122
- appearance,
123
- experimental_enableRecoveryKeys = false
124
- }) {
125
- const [walletState, setWalletState] = _react.useState.call(void 0, {
126
- status: "not-loaded"
127
- });
128
- const walletProviderProps = {
129
- walletState,
130
- setWalletState,
131
- showPasskeyHelpers,
132
- appearance,
133
- experimental_enableRecoveryKeys
134
- };
135
- return experimental_enableRecoveryKeys ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVKQ4YOEXcjs.TwindProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CrossmintSignerProvider, { walletState, setWalletState, appearance, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletProvider, _chunk4DAZAO6Ycjs.__spreadProps.call(void 0, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {}, walletProviderProps), { children })) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WalletProvider, _chunk4DAZAO6Ycjs.__spreadProps.call(void 0, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {}, walletProviderProps), { children }));
136
- }
137
- function WalletProvider({
138
- children,
139
- showPasskeyHelpers = true,
140
- appearance,
141
- walletState,
142
- setWalletState,
143
- experimental_enableRecoveryKeys
144
- }) {
145
- const { crossmint } = _chunkKEKBOJCFcjs.useCrossmint.call(void 0, "CrossmintWalletProvider must be used within CrossmintProvider");
146
- const { experimental_getOrCreateWalletWithRecoveryKey } = useCrossmintSigner({
147
- enabled: experimental_enableRecoveryKeys != null ? experimental_enableRecoveryKeys : false
148
- });
149
- const smartWalletSDK = _react.useMemo.call(void 0,
150
- () => _walletssdk.CrossmintWallets.from({ apiKey: crossmint.apiKey, jwt: crossmint == null ? void 0 : crossmint.jwt }),
151
- [crossmint.apiKey, crossmint.jwt]
152
- );
153
- const [passkeyPromptState, setPasskeyPromptState] = _react.useState.call(void 0, { open: false });
154
- const getOrCreateWallet = (props) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
155
- var _a, _b;
156
- if (walletState.status == "in-progress") {
157
- return {
158
- startedCreation: false,
159
- reason: "Wallet is already loading."
160
- };
161
- }
162
- if (crossmint.jwt == null) {
163
- return {
164
- startedCreation: false,
165
- reason: `Jwt not set in "CrossmintProvider".`
166
- };
167
- }
168
- try {
169
- setWalletState({ status: "in-progress" });
170
- const passkeyPromptCallbacks = {
171
- onWalletCreationStart: createPasskeyPrompt("create-wallet"),
172
- onWalletCreationFail: createPasskeyPrompt("create-wallet-error"),
173
- onTransactionStart: createPasskeyPrompt("transaction"),
174
- onTransactionFail: createPasskeyPrompt("transaction-error")
175
- };
176
- switch (props.type) {
177
- case "evm-smart-wallet": {
178
- const walletArgs = {
179
- adminSigner: (_a = props.args.adminSigner) != null ? _a : { type: "evm-passkey" },
180
- linkedUser: props.args.linkedUser
181
- };
182
- const wallet = yield smartWalletSDK.getOrCreateWallet("evm-smart-wallet", walletArgs, {
183
- experimental_callbacks: ((_b = walletArgs.adminSigner) == null ? void 0 : _b.type) === "evm-passkey" ? passkeyPromptCallbacks : void 0
184
- });
185
- setWalletState({ status: "loaded", wallet, type: "evm-smart-wallet" });
186
- break;
187
- }
188
- case "solana-smart-wallet": {
189
- const wallet = yield smartWalletSDK.getOrCreateWallet("solana-smart-wallet", props.args);
190
- setWalletState({ status: "loaded", wallet, type: "solana-smart-wallet" });
191
- break;
192
- }
193
- }
194
- } catch (error) {
195
- console.error("There was an error creating a wallet ", error);
196
- setWalletState(_chunkHIU3FK4Mcjs.deriveWalletErrorState.call(void 0, error));
197
- }
198
- return { startedCreation: true };
199
- });
200
- const createPasskeyPrompt = (type) => () => new Promise((resolve) => {
201
- if (!showPasskeyHelpers) {
202
- resolve();
203
- return;
204
- }
205
- setPasskeyPromptState({
206
- type,
207
- open: true,
208
- primaryActionOnClick: () => {
209
- setPasskeyPromptState({ open: false });
210
- resolve();
211
- },
212
- secondaryActionOnClick: () => {
213
- setPasskeyPromptState({ open: false });
214
- resolve();
215
- }
216
- });
217
- });
218
- const clearWallet = () => {
219
- setWalletState({ status: "not-loaded" });
220
- };
221
- const createPasskeySigner = (name, promptType) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
222
- if (promptType != null) {
223
- yield createPasskeyPrompt(promptType)();
224
- }
225
- return yield _chunkMSZ635MUcjs.createWebAuthnPasskeySigner.call(void 0, name);
226
- });
227
- const contextValue = _react.useMemo.call(void 0,
228
- () => _chunk4DAZAO6Ycjs.__spreadProps.call(void 0, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {}, walletState), {
229
- getOrCreateWallet,
230
- createPasskeySigner,
231
- clearWallet,
232
- experimental_getOrCreateWalletWithRecoveryKey
233
- }),
234
- [walletState, experimental_getOrCreateWalletWithRecoveryKey]
235
- );
236
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, WalletContext.Provider, { value: contextValue, children: [
237
- children,
238
- passkeyPromptState.open ? _reactdom.createPortal.call(void 0, /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7HBAJHZZcjs.PasskeyPrompt, { state: passkeyPromptState, appearance }), document.body) : null
239
- ] });
240
- }
241
-
242
- // src/hooks/useWallet.ts
243
- function useWallet() {
244
- const walletContext = _react.useContext.call(void 0, WalletContext);
245
- if (!walletContext) {
246
- throw new Error("useWallet must be used within CrossmintAuthProvider or CrossmintWalletProvider");
247
- }
248
- return walletContext;
249
- }
250
-
251
- // src/hooks/useAuth.ts
252
-
253
-
254
- // src/providers/CrossmintAuthProvider.tsx
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
-
263
- var _clientsdkauth = require('@crossmint/client-sdk-auth');
264
- var _commonsdkbase = require('@crossmint/common-sdk-base');
265
- var _commonsdkauth = require('@crossmint/common-sdk-auth');
266
-
267
- // src/components/auth/AuthFormDialog.tsx
268
- var _reactvisuallyhidden = require('@radix-ui/react-visually-hidden');
269
-
270
- // src/providers/auth/AuthFormProvider.tsx
271
-
272
-
273
-
274
- // src/hooks/useCrossmintAuth.ts
275
-
276
- function useCrossmintAuth() {
277
- const context = _react.useContext.call(void 0, AuthContext);
278
- if (!context) {
279
- throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");
280
- }
281
- return context;
282
- }
283
-
284
- // src/providers/auth/AuthFormProvider.tsx
285
-
286
- var initialOAuthUrlMap = {
287
- google: "",
288
- twitter: ""
289
- // Farcaster is not included here as it uses a different authentication method
290
- };
291
- var AuthFormContext = _react.createContext.call(void 0, void 0);
292
- var useAuthForm = () => {
293
- const context = _react.useContext.call(void 0, AuthFormContext);
294
- if (!context) {
295
- throw new Error("useAuthForm must be used within an AuthFormProvider");
296
- }
297
- return context;
298
- };
299
- var AuthFormProvider = ({
300
- setDialogOpen,
301
- preFetchOAuthUrls,
302
- initialState,
303
- children
304
- }) => {
305
- const { crossmintAuth } = useCrossmintAuth();
306
- const [step, setStep] = _react.useState.call(void 0, "initial");
307
- const [error, setError] = _react.useState.call(void 0, null);
308
- const [oauthUrlMap, setOauthUrlMap] = _react.useState.call(void 0, initialOAuthUrlMap);
309
- const [isLoadingOauthUrlMap, setIsLoadingOauthUrlMap] = _react.useState.call(void 0, true);
310
- const { loginMethods, baseUrl, appearance, termsOfServiceText, authModalTitle, defaultEmail } = initialState;
311
- const preFetchAndSetOauthUrl = _react.useCallback.call(void 0, () => _chunk4DAZAO6Ycjs.__async.call(void 0, void 0, null, function* () {
312
- setIsLoadingOauthUrlMap(true);
313
- try {
314
- const oauthProviders = loginMethods.filter(
315
- (method) => method in initialOAuthUrlMap
316
- );
317
- const oauthPromiseList = oauthProviders.map((provider) => _chunk4DAZAO6Ycjs.__async.call(void 0, void 0, null, function* () {
318
- const url = yield crossmintAuth == null ? void 0 : crossmintAuth.getOAuthUrl(provider);
319
- return { [provider]: url };
320
- }));
321
- const oauthUrlMap2 = Object.assign({}, ...yield Promise.all(oauthPromiseList));
322
- setOauthUrlMap(oauthUrlMap2);
323
- } catch (error2) {
324
- setError(
325
- error2 instanceof _commonsdkauth.CrossmintAuthenticationError ? error2.message : "Unable to load oauth providers. Please try again later."
326
- );
327
- } finally {
328
- setIsLoadingOauthUrlMap(false);
329
- }
330
- }), [loginMethods, crossmintAuth]);
331
- _react.useEffect.call(void 0, () => {
332
- if (preFetchOAuthUrls) {
333
- preFetchAndSetOauthUrl();
334
- }
335
- }, [preFetchAndSetOauthUrl, preFetchOAuthUrls]);
336
- const handleToggleDialog = (open, successfulLogin) => {
337
- setDialogOpen == null ? void 0 : setDialogOpen(open, successfulLogin);
338
- if (!open) {
339
- setTimeout(() => setStep("initial"), 250);
340
- }
341
- };
342
- const value = {
343
- step,
344
- error,
345
- baseUrl,
346
- appearance,
347
- termsOfServiceText,
348
- authModalTitle,
349
- loginMethods,
350
- defaultEmail,
351
- oauthUrlMap,
352
- isLoadingOauthUrlMap,
353
- setDialogOpen: handleToggleDialog,
354
- setError,
355
- setStep
356
- };
357
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AuthFormContext.Provider, { value, children });
358
- };
359
-
360
- // src/components/auth/AuthForm.tsx
361
- var _color = require('color'); var _color2 = _interopRequireDefault(_color);
362
-
363
- // src/components/auth/methods/email/EmailAuthFlow.tsx
364
-
365
-
366
- // src/components/auth/methods/email/EmailOTPInput.tsx
367
-
368
-
369
- // src/components/auth/AuthFormBackButton.tsx
370
-
371
- var AuthFormBackButton = (_a) => {
372
- var _b = _a, {
373
- className,
374
- iconColor,
375
- ringColor,
376
- onClick
377
- } = _b, props = _chunk4DAZAO6Ycjs.__objRest.call(void 0, _b, [
378
- "className",
379
- "iconColor",
380
- "ringColor",
381
- "onClick"
382
- ]);
383
- const { setError } = useAuthForm();
384
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
385
- "button",
386
- _chunk4DAZAO6Ycjs.__spreadProps.call(void 0, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {
387
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
388
- "absolute left-4 top-4 min-[480px]:!left-6 min-[480px]:!top-6 rounded-full opacity-70 ring-offset-background text-cm-text-primary transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-cm-accent focus:ring-offset-2 disabled:pointer-events-none",
389
- className
390
- ),
391
- onClick: (event) => {
392
- setError(null);
393
- onClick == null ? void 0 : onClick(event);
394
- }
395
- }, props), {
396
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHCW4RO2Ocjs.LeftArrowIcon, { className: "w-6 h-6", style: { color: iconColor } })
397
- })
398
- );
399
- };
400
-
401
- // src/components/auth/methods/email/EmailOTPInput.tsx
402
-
403
- var EMAIL_VERIFICATION_TOKEN_LENGTH = 6;
404
- function EmailOTPInput({
405
- otpEmailData,
406
- setOtpEmailData
407
- }) {
408
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
409
- const { crossmintAuth } = useCrossmintAuth();
410
- const { appearance, setDialogOpen, setStep, setError } = useAuthForm();
411
- const [token, setToken] = _react.useState.call(void 0, "");
412
- const [hasError, setHasError] = _react.useState.call(void 0, false);
413
- const [loading, setLoading] = _react.useState.call(void 0, false);
414
- const handleOnSubmitOTP = () => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
415
- var _a2, _b2;
416
- setLoading(true);
417
- try {
418
- const oneTimeSecret = yield crossmintAuth == null ? void 0 : crossmintAuth.confirmEmailOtp(
419
- (_a2 = otpEmailData == null ? void 0 : otpEmailData.email) != null ? _a2 : "",
420
- (_b2 = otpEmailData == null ? void 0 : otpEmailData.emailId) != null ? _b2 : "",
421
- token
422
- );
423
- yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
424
- setDialogOpen(false, true);
425
- setStep("initial");
426
- } catch (error) {
427
- console.error("Error confirming email OTP", error);
428
- setError("Invalid code. Please try again.");
429
- setHasError(true);
430
- } finally {
431
- setLoading(false);
432
- }
433
- });
434
- const handleOnResendCode = () => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
435
- var _a2;
436
- try {
437
- yield crossmintAuth == null ? void 0 : crossmintAuth.sendEmailOtp((_a2 = otpEmailData == null ? void 0 : otpEmailData.email) != null ? _a2 : "");
438
- } catch (_e2) {
439
- setError("Failed to resend code. Please try again.");
440
- }
441
- });
442
- const handleOnBack = () => {
443
- setStep("initial");
444
- setOtpEmailData(null);
445
- };
446
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
447
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
448
- AuthFormBackButton,
449
- {
450
- onClick: handleOnBack,
451
- iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
452
- ringColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent
453
- }
454
- ),
455
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-start w-full", children: [
456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "relative left-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
457
- _chunkURKPLEPVcjs.EmailOtpIcon,
458
- {
459
- customAccentColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.accent,
460
- customButtonBackgroundColor: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.buttonBackground,
461
- customBackgroundColor: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.background
462
- }
463
- ) }),
464
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
465
- "p",
466
- {
467
- className: "text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",
468
- style: { color: (_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textPrimary },
469
- children: "Check your email"
470
- }
471
- ),
472
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
473
- "p",
474
- {
475
- className: "text-center text-cm-text-secondary px-4",
476
- style: { color: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.textSecondary },
477
- children: [
478
- "A temporary login code has been sent to",
479
- " ",
480
- (otpEmailData == null ? void 0 : otpEmailData.email) ? otpEmailData.email : "your email address"
481
- ]
482
- }
483
- ),
484
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
485
- _chunkMH37OJT2cjs.InputOTP,
486
- {
487
- maxLength: EMAIL_VERIFICATION_TOKEN_LENGTH,
488
- value: token,
489
- onChange: (val) => {
490
- setToken(val);
491
- setHasError(false);
492
- setError(null);
493
- },
494
- onComplete: handleOnSubmitOTP,
495
- disabled: loading,
496
- customStyles: {
497
- accent: (_i = (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.accent) != null ? _i : "#04AA6D",
498
- danger: (_k = (_j = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _j.danger) != null ? _k : "#f44336",
499
- border: (_m = (_l = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _l.border) != null ? _m : "#E5E7EB",
500
- textPrimary: (_o = (_n = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _n.textPrimary) != null ? _o : "#909ca3",
501
- buttonBackground: (_q = (_p = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _p.buttonBackground) != null ? _q : "#eff6ff",
502
- inputBackground: (_s = (_r = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _r.inputBackground) != null ? _s : "#FFFFFF",
503
- borderRadius: appearance == null ? void 0 : appearance.borderRadius
504
- },
505
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkMH37OJT2cjs.InputOTPGroup, { children: [
506
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMH37OJT2cjs.InputOTPSlot, { index: 0, hasError }),
507
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMH37OJT2cjs.InputOTPSlot, { index: 1, hasError }),
508
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMH37OJT2cjs.InputOTPSlot, { index: 2, hasError }),
509
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMH37OJT2cjs.InputOTPSlot, { index: 3, hasError }),
510
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMH37OJT2cjs.InputOTPSlot, { index: 4, hasError }),
511
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkMH37OJT2cjs.InputOTPSlot, { index: 5, hasError })
512
- ] })
513
- }
514
- ) }),
515
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-xs leading-tight text-cm-text-secondary text-center", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { style: { color: (_t = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _t.textSecondary }, children: [
516
- "Can't find the email? Check spam folder.",
517
- "\n",
518
- "Some emails may take several minutes to arrive."
519
- ] }) }),
520
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
521
- _chunk2DG4R653cjs.CountdownButton,
522
- {
523
- initialSeconds: 60,
524
- appearance,
525
- countdownText: (seconds) => `Re-send code in ${seconds}s`,
526
- countdownCompleteText: "Re-send code",
527
- handleOnClick: handleOnResendCode
528
- }
529
- )
530
- ] })
531
- ] });
532
- }
533
-
534
- // src/components/auth/methods/email/EmailSignIn.tsx
535
-
536
-
537
-
538
-
539
- // src/hooks/useOAuthWindowListener.ts
540
- var _clientsdkwindow = require('@crossmint/client-sdk-window');
541
-
542
- var _zod = require('zod');
543
- var useOAuthWindowListener = (provider) => {
544
- const { crossmintAuth } = useCrossmintAuth();
545
- const { oauthUrlMap, setError } = useAuthForm();
546
- const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
547
- const childRef = _react.useRef.call(void 0, null);
548
- _react.useEffect.call(void 0, () => {
549
- if (childRef.current == null) {
550
- childRef.current = new (0, _clientsdkwindow.ChildWindow)(window.opener || window.parent, "*", {
551
- incomingEvents
552
- });
553
- }
554
- return () => {
555
- if (childRef.current != null) {
556
- childRef.current.off("authMaterialFromPopupCallback");
557
- }
558
- };
559
- }, []);
560
- const createPopupAndSetupListeners = (providerLoginHint) => _chunk4DAZAO6Ycjs.__async.call(void 0, void 0, null, function* () {
561
- if (childRef.current == null) {
562
- throw new Error("Child window not initialized");
563
- }
564
- setIsLoading(true);
565
- setError(null);
566
- const baseUrl = new URL(oauthUrlMap[provider]);
567
- if (providerLoginHint != null) {
568
- const existingParams = Array.from(baseUrl.searchParams.entries());
569
- baseUrl.search = "";
570
- if (providerLoginHint) {
571
- baseUrl.searchParams.append("provider_login_hint", providerLoginHint);
572
- }
573
- existingParams.forEach(([key, value]) => {
574
- baseUrl.searchParams.append(key, value);
575
- });
576
- }
577
- const popup = yield _clientsdkwindow.PopupWindow.init(baseUrl.toString(), {
578
- awaitToLoad: false,
579
- crossOrigin: true,
580
- width: 400,
581
- height: 700
582
- });
583
- const handleAuthMaterial = (data) => _chunk4DAZAO6Ycjs.__async.call(void 0, void 0, null, function* () {
584
- var _a;
585
- yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(data.oneTimeSecret);
586
- (_a = childRef.current) == null ? void 0 : _a.off("authMaterialFromPopupCallback");
587
- popup.window.close();
588
- setIsLoading(false);
589
- });
590
- const handleError = (data) => {
591
- var _a;
592
- setError(data.error);
593
- (_a = childRef.current) == null ? void 0 : _a.off("errorFromPopupCallback");
594
- popup.window.close();
595
- setIsLoading(false);
596
- };
597
- childRef.current.on("authMaterialFromPopupCallback", handleAuthMaterial);
598
- childRef.current.on("errorFromPopupCallback", handleError);
599
- const checkWindowClosure = setInterval(() => {
600
- var _a;
601
- if (popup.window.closed) {
602
- clearInterval(checkWindowClosure);
603
- setIsLoading(false);
604
- (_a = childRef.current) == null ? void 0 : _a.off("authMaterialFromPopupCallback");
605
- }
606
- }, 2500);
607
- });
608
- return {
609
- createPopupAndSetupListeners,
610
- isLoading
611
- };
612
- };
613
- var incomingEvents = {
614
- authMaterialFromPopupCallback: _zod.z.object({ oneTimeSecret: _zod.z.string() }),
615
- errorFromPopupCallback: _zod.z.object({ error: _zod.z.string() })
616
- };
617
-
618
- // src/components/auth/methods/google/ContinueWithGoogle.tsx
619
-
620
- function ContinueWithGoogle({ emailInput, appearance }) {
621
- var _a, _b, _c, _d;
622
- const { createPopupAndSetupListeners, isLoading: isLoadingOAuthWindow } = useOAuthWindowListener("google");
623
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
624
- "button",
625
- {
626
- type: "button",
627
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
628
- "flex items-center gap-2 justify-center h-[32px] px-2.5 border border-cm-border rounded-xl bg-cm-background-primary",
629
- "hover:bg-cm-hover focus:bg-cm-hover outline-none",
630
- isLoadingOAuthWindow ? "cursor-not-allowed hover:bg-cm-muted-primary" : ""
631
- ),
632
- onClick: isLoadingOAuthWindow ? void 0 : () => createPopupAndSetupListeners(emailInput.trim().toLowerCase()),
633
- style: {
634
- backgroundColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.buttonBackground,
635
- borderRadius: appearance == null ? void 0 : appearance.borderRadius
636
- },
637
- children: [
638
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4TVOH5Vcjs.GoogleIcon, { className: "max-h-[18px] max-w-[18px] h-[18px] w-[18px]" }),
639
- isLoadingOAuthWindow ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
640
- _chunkB7LYPQ4Kcjs.Spinner,
641
- {
642
- style: {
643
- color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary,
644
- fill: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary,
645
- width: "18px",
646
- height: "18px"
647
- }
648
- }
649
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-cm-accent", style: { color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.accent }, children: "Continue" })
650
- ]
651
- }
652
- );
653
- }
654
-
655
- // src/components/auth/methods/email/EmailSignIn.tsx
656
-
657
- function EmailSignIn({ setOtpEmailData }) {
658
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n;
659
- const { crossmintAuth } = useCrossmintAuth();
660
- const { appearance, defaultEmail, setStep, setError } = useAuthForm();
661
- const [emailInput, setEmailInput] = _react.useState.call(void 0, defaultEmail != null ? defaultEmail : "");
662
- const [emailError, setEmailError] = _react.useState.call(void 0, "");
663
- const [isLoading, setIsLoading] = _react.useState.call(void 0, false);
664
- const showGoogleContinueButton = emailInput.toLowerCase().includes("@gmail.com") && !emailInput.toLowerCase().includes("+") && _commonsdkauth.isEmailValid.call(void 0, emailInput) && !isLoading;
665
- function handleOnSubmit(e) {
666
- return _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
667
- e.preventDefault();
668
- setIsLoading(true);
669
- try {
670
- const trimmedEmailInput = emailInput.trim().toLowerCase();
671
- const emailSignInRes = yield crossmintAuth == null ? void 0 : crossmintAuth.sendEmailOtp(trimmedEmailInput);
672
- setOtpEmailData({ email: trimmedEmailInput, emailId: emailSignInRes.emailId });
673
- setStep("otp");
674
- } catch (_e2) {
675
- setIsLoading(false);
676
- setError("Failed to send email. Please try again or contact support.");
677
- }
678
- });
679
- }
680
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col items-start justify-start w-full rounded-lg", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "w-full", children: [
681
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
682
- "label",
683
- {
684
- className: "text-cm-text-primary block mb-[5px]",
685
- style: { color: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary },
686
- children: "Email"
687
- }
688
- ),
689
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
690
- "form",
691
- {
692
- role: "form",
693
- className: "relative",
694
- onSubmit: (e) => {
695
- if (showGoogleContinueButton) {
696
- e.preventDefault();
697
- return;
698
- }
699
- if (_commonsdkauth.isEmailValid.call(void 0, emailInput)) {
700
- handleOnSubmit(e);
701
- } else {
702
- e.preventDefault();
703
- }
704
- },
705
- noValidate: true,
706
- children: [
707
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "emailInput", className: "sr-only", children: "Email" }),
708
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
709
- "input",
710
- {
711
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
712
- "flex-grow text-cm-text-primary text-left pl-[16px] h-[58px] w-full border border-cm-border rounded-xl bg-cm-background-primary placeholder:text-md",
713
- "transition-none duration-200 ease-in-out",
714
- "focus:outline-none focus-ring-custom",
715
- // Add focus ring
716
- "placeholder:[color:var(--placeholder-color)]",
717
- emailError ? "border-red-500" : "",
718
- showGoogleContinueButton ? "pr-[132px]" : "pr-[80px]"
719
- ),
720
- style: {
721
- color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textPrimary,
722
- borderRadius: appearance == null ? void 0 : appearance.borderRadius,
723
- borderColor: emailError ? (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.danger : (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.border,
724
- backgroundColor: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.inputBackground,
725
- // @ts-expect-error Add custom placeholder & ring color to tailwind
726
- "--placeholder-color": (_g = (_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textSecondary) != null ? _g : "#67797F",
727
- "--focus-ring-color": new (0, _color2.default)((_i = (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.accent) != null ? _i : "#04AA6D").alpha(0.18).toString()
728
- },
729
- type: "email",
730
- placeholder: "your@email.com",
731
- value: emailInput,
732
- onChange: (e) => {
733
- setEmailInput(e.target.value);
734
- setEmailError("");
735
- setError(null);
736
- },
737
- readOnly: isLoading,
738
- "aria-describedby": "emailError"
739
- }
740
- ),
741
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "absolute inset-y-0 right-0 flex items-center pr-4", children: [
742
- emailError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMSST6ZZcjs.AlertIcon, { customColor: (_j = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _j.danger }),
743
- isLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
744
- _chunkB7LYPQ4Kcjs.Spinner,
745
- {
746
- style: {
747
- color: (_k = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _k.textSecondary,
748
- fill: (_l = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _l.textPrimary
749
- }
750
- }
751
- ),
752
- showGoogleContinueButton ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ContinueWithGoogle, { emailInput, appearance }) : !emailError && !isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
753
- "button",
754
- {
755
- type: "submit",
756
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
757
- "font-medium text-cm-accent text-nowrap bg-cm-background-primary",
758
- !_commonsdkauth.isEmailValid.call(void 0, emailInput) ? "!cursor-not-allowed opacity-60" : "cursor-pointer"
759
- ),
760
- style: {
761
- color: (_m = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _m.accent,
762
- backgroundColor: (_n = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _n.inputBackground
763
- },
764
- disabled: !_commonsdkauth.isEmailValid.call(void 0, emailInput) || isLoading,
765
- children: "Submit"
766
- }
767
- ) : null
768
- ] })
769
- ]
770
- }
771
- ),
772
- emailError && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-red-500 mb-2 pt-2", children: emailError })
773
- ] }) }) });
774
- }
775
-
776
- // src/components/auth/methods/email/EmailAuthFlow.tsx
777
-
778
- function EmailAuthFlow() {
779
- const { step } = useAuthForm();
780
- const [otpEmailData, setOtpEmailData] = _react.useState.call(void 0, null);
781
- if (step === "otp") {
782
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailOTPInput, { otpEmailData, setOtpEmailData });
783
- }
784
- if (step === "initial") {
785
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailSignIn, { setOtpEmailData });
786
- }
787
- return null;
788
- }
789
-
790
- // src/components/common/Divider.tsx
791
-
792
- function Divider({ appearance, text }) {
793
- var _a, _b, _c;
794
- const { step } = useAuthForm();
795
- if (step !== "initial") {
796
- return null;
797
- }
798
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-center w-full pt-2 pb-3", children: [
799
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "w-full h-[1px] bg-cm-border", style: { backgroundColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.border } }),
800
- text != null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
801
- "p",
802
- {
803
- className: "flex-none px-2 text-sm text-cm-text-primary",
804
- style: { color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary },
805
- children: text
806
- }
807
- ) : null,
808
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "w-full h-[1px] bg-cm-border", style: { backgroundColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.border } })
809
- ] });
810
- }
811
-
812
- // src/components/auth/methods/google/GoogleSignIn.tsx
813
-
814
- function GoogleSignIn(_a) {
815
- var props = _chunk4DAZAO6Ycjs.__objRest.call(void 0, _a, []);
816
- var _a2, _b, _c, _d;
817
- const { step, appearance, isLoadingOauthUrlMap } = useAuthForm();
818
- const { createPopupAndSetupListeners, isLoading: isLoadingOAuthWindow } = useOAuthWindowListener("google");
819
- const isLoading = isLoadingOauthUrlMap || isLoadingOAuthWindow;
820
- if (step !== "initial") {
821
- return null;
822
- }
823
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
824
- "button",
825
- _chunk4DAZAO6Ycjs.__spreadProps.call(void 0, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {
826
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
827
- "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
828
- "transition-colors duration-200 ease-in-out",
829
- "hover:bg-cm-hover focus:bg-cm-hover outline-none",
830
- isLoading ? "cursor-not-allowed hover:bg-cm-muted-primary" : ""
831
- ),
832
- style: {
833
- borderRadius: appearance == null ? void 0 : appearance.borderRadius,
834
- backgroundColor: (_a2 = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a2.buttonBackground
835
- },
836
- onClick: isLoading ? void 0 : () => createPopupAndSetupListeners()
837
- }, props), {
838
- children: [
839
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
840
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkH4TVOH5Vcjs.GoogleIcon, { className: "max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]" }),
841
- isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
842
- _chunkB7LYPQ4Kcjs.Spinner,
843
- {
844
- style: {
845
- color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary,
846
- fill: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary
847
- }
848
- }
849
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
850
- "span",
851
- {
852
- className: "font-medium",
853
- style: { margin: "0px 32px", color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary },
854
- children: "Sign in with Google"
855
- }
856
- )
857
- ] }),
858
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Sign in with Google" })
859
- ]
860
- })
861
- );
862
- }
863
-
864
- // src/components/auth/methods/farcaster/FarcasterSignIn.tsx
865
-
866
- var _authkit = require('@farcaster/auth-kit');
867
-
868
- function FarcasterSignIn() {
869
- var _a, _b;
870
- const { step, appearance, setStep, setError } = useAuthForm();
871
- if (step === "initial") {
872
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
873
- "button",
874
- {
875
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
876
- "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
877
- "transition-colors duration-200 ease-in-out",
878
- "hover:bg-cm-hover focus:bg-cm-hover outline-none"
879
- ),
880
- style: {
881
- borderRadius: appearance == null ? void 0 : appearance.borderRadius,
882
- backgroundColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.buttonBackground
883
- },
884
- onClick: () => {
885
- setStep("qrCode");
886
- setError(null);
887
- },
888
- children: [
889
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkHPOZ6I54cjs.FarcasterIcon, { className: "max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]" }),
890
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
891
- "span",
892
- {
893
- className: "font-medium",
894
- style: { margin: "0px 32px", color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textPrimary },
895
- children: "Sign in with Farcaster"
896
- }
897
- ),
898
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Sign in with Farcaster" })
899
- ]
900
- }
901
- ) });
902
- }
903
- if (step === "qrCode") {
904
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FarcasterQRCode, {});
905
- }
906
- return null;
907
- }
908
- function FarcasterQRCode() {
909
- var _a, _b, _c, _d, _e, _f, _g, _h, _i;
910
- const { crossmintAuth } = useCrossmintAuth();
911
- const { appearance, setStep, setDialogOpen, setError } = useAuthForm();
912
- const [farcasterData, setFarcasterData] = _react.useState.call(void 0, null);
913
- const farcasterProps = _react.useMemo.call(void 0,
914
- () => ({
915
- onSuccess: (data) => {
916
- setFarcasterData(data);
917
- }
918
- }),
919
- []
920
- );
921
- const { signIn, url: qrCodeUrl, connect, signOut, isConnected } = _authkit.useSignIn.call(void 0, farcasterProps);
922
- const handleFarcasterSignIn = (data) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
923
- setError(null);
924
- try {
925
- const oneTimeSecret = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithFarcaster(data);
926
- yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
927
- setDialogOpen(false);
928
- setStep("initial");
929
- } catch (error) {
930
- console.error("Error during Farcaster sign-in:", error);
931
- setError("Failed to sign in with Farcaster");
932
- }
933
- });
934
- _react.useEffect.call(void 0, () => {
935
- if (farcasterData != null) {
936
- handleFarcasterSignIn(farcasterData);
937
- }
938
- }, [farcasterData]);
939
- _react.useEffect.call(void 0, () => {
940
- if (isConnected) {
941
- signIn();
942
- }
943
- }, [isConnected]);
944
- _react.useEffect.call(void 0, () => {
945
- connect();
946
- }, []);
947
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
948
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
949
- AuthFormBackButton,
950
- {
951
- onClick: () => {
952
- signOut();
953
- setStep("initial");
954
- },
955
- iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
956
- ringColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent
957
- }
958
- ),
959
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center gap-4", children: [
960
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
961
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
962
- "h3",
963
- {
964
- className: "text-lg font-semibold text-cm-text-primary mb-2",
965
- style: { color: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary },
966
- children: "Sign in with Farcaster"
967
- }
968
- ),
969
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
970
- "p",
971
- {
972
- className: "text-base font-normal text-cm-text-secondary",
973
- style: { color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textSecondary },
974
- children: "Scan with your phone's camera to continue."
975
- }
976
- )
977
- ] }),
978
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
979
- "div",
980
- {
981
- className: "bg-white aspect-square rounded-lg p-4",
982
- style: {
983
- backgroundColor: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.inputBackground,
984
- borderRadius: appearance == null ? void 0 : appearance.borderRadius
985
- },
986
- children: qrCodeUrl != null ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _authkit.QRCode, { uri: qrCodeUrl, size: 280 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-[246px] flex items-center justify-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
987
- _chunkB7LYPQ4Kcjs.Spinner,
988
- {
989
- style: {
990
- color: (_f = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _f.textSecondary,
991
- fill: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.textPrimary
992
- }
993
- }
994
- ) })
995
- }
996
- ),
997
- qrCodeUrl ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
998
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
999
- "p",
1000
- {
1001
- className: "text-base text-center font-normal text-cm-text-secondary",
1002
- style: { color: (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.textSecondary },
1003
- children: "Alternatively, click on this link to open Warpcast."
1004
- }
1005
- ),
1006
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1007
- "a",
1008
- {
1009
- href: qrCodeUrl,
1010
- rel: "noopener noreferrer",
1011
- target: "_blank",
1012
- className: "text-base font-normal text-cm-link",
1013
- style: { color: (_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.textLink },
1014
- children: "Open Warpcast"
1015
- }
1016
- )
1017
- ] }) : null
1018
- ] })
1019
- ] });
1020
- }
1021
-
1022
- // src/components/auth/methods/twitter/TwitterSignIn.tsx
1023
-
1024
- function TwitterSignIn(_a) {
1025
- var props = _chunk4DAZAO6Ycjs.__objRest.call(void 0, _a, []);
1026
- var _a2, _b, _c, _d;
1027
- const { step, appearance, isLoadingOauthUrlMap } = useAuthForm();
1028
- const { createPopupAndSetupListeners, isLoading: isLoadingOAuthWindow } = useOAuthWindowListener("twitter");
1029
- const isLoading = isLoadingOauthUrlMap || isLoadingOAuthWindow;
1030
- if (step !== "initial") {
1031
- return null;
1032
- }
1033
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1034
- "button",
1035
- _chunk4DAZAO6Ycjs.__spreadProps.call(void 0, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {
1036
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
1037
- "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
1038
- "transition-colors duration-200 ease-in-out",
1039
- "hover:bg-cm-hover focus:bg-cm-hover outline-none",
1040
- isLoading ? "cursor-not-allowed hover:bg-cm-muted-primary" : ""
1041
- ),
1042
- style: {
1043
- borderRadius: appearance == null ? void 0 : appearance.borderRadius,
1044
- backgroundColor: (_a2 = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a2.buttonBackground
1045
- },
1046
- onClick: isLoading ? void 0 : () => createPopupAndSetupListeners()
1047
- }, props), {
1048
- children: [
1049
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1050
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk5RDAQSJKcjs.TwitterIcon, { className: "max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]" }),
1051
- isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1052
- _chunkB7LYPQ4Kcjs.Spinner,
1053
- {
1054
- style: {
1055
- color: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary,
1056
- fill: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary
1057
- }
1058
- }
1059
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1060
- "span",
1061
- {
1062
- className: "font-medium",
1063
- style: { margin: "0px 32px", color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary },
1064
- children: "Sign in with X"
1065
- }
1066
- )
1067
- ] }),
1068
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Sign in with X" })
1069
- ]
1070
- })
1071
- );
1072
- }
1073
-
1074
- // src/components/auth/methods/web3/Web3AuthFlowButton.tsx
1075
-
1076
- function Web3AuthFlowButton() {
1077
- var _a, _b, _c, _d, _e;
1078
- const { step, appearance, setStep, setError } = useAuthForm();
1079
- if (step !== "initial") {
1080
- return null;
1081
- }
1082
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1083
- "button",
1084
- {
1085
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
1086
- "relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
1087
- "transition-colors duration-200 ease-in-out",
1088
- "hover:bg-cm-hover focus:bg-cm-hover outline-none"
1089
- ),
1090
- style: {
1091
- borderRadius: appearance == null ? void 0 : appearance.borderRadius,
1092
- borderColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.border,
1093
- backgroundColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.buttonBackground
1094
- },
1095
- onClick: () => {
1096
- setStep("web3");
1097
- setError(null);
1098
- },
1099
- children: [
1100
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1101
- _chunkKNOUJZN5cjs.WalletIcon,
1102
- {
1103
- className: "h-[21px] w-[21px] absolute left-[20px]",
1104
- style: { color: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary }
1105
- }
1106
- ),
1107
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium", style: { margin: "0px 32px", color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary }, children: "Continue with a wallet" }),
1108
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1109
- _chunkAXZLLRBUcjs.ChevronRightIcon,
1110
- {
1111
- className: "h-[21px] w-[21px] absolute right-[20px]",
1112
- style: { color: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.textSecondary }
1113
- }
1114
- ),
1115
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Continue with a wallet" })
1116
- ]
1117
- }
1118
- );
1119
- }
1120
-
1121
- // src/components/auth/methods/web3/Web3Connectors.tsx
1122
- var _sdkreactcore = require('@dynamic-labs/sdk-react-core');
1123
-
1124
- function Web3Connectors() {
1125
- var _a, _b;
1126
- const { appearance, step, setStep } = useAuthForm();
1127
- if (step === "web3") {
1128
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1129
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1130
- AuthFormBackButton,
1131
- {
1132
- onClick: () => setStep("initial"),
1133
- iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
1134
- ringColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent
1135
- }
1136
- ),
1137
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col items-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-col gap-[10px] w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "widget-container", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _sdkreactcore.DynamicEmbeddedWidget, { background: "none" }) }) }) })
1138
- ] });
1139
- }
1140
- return null;
1141
- }
1142
-
1143
- // src/components/auth/methods/web3/Web3AuthFlow.tsx
1144
-
1145
- function Web3AuthFlow() {
1146
- const { step } = useAuthForm();
1147
- if (step.startsWith("web3")) {
1148
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3Connectors, {});
1149
- }
1150
- if (step === "initial") {
1151
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3AuthFlowButton, {});
1152
- }
1153
- return null;
1154
- }
1155
-
1156
- // src/components/auth/AuthForm.tsx
1157
-
1158
- function AuthForm({ className }) {
1159
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
1160
- const { step, appearance, loginMethods, baseUrl, error, termsOfServiceText, authModalTitle } = useAuthForm();
1161
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1162
- "div",
1163
- {
1164
- className: _chunk5RX5WFEWcjs.classNames.call(void 0,
1165
- "relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none",
1166
- className
1167
- ),
1168
- children: [
1169
- error != null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1170
- "div",
1171
- {
1172
- className: "flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted",
1173
- style: {
1174
- backgroundColor: new (0, _color2.default)((_b = (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.danger) != null ? _b : "#f44336").alpha(0.12).toString()
1175
- },
1176
- children: [
1177
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-[20px]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkZMSST6ZZcjs.AlertIcon, { customColor: (_d = (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.danger) != null ? _d : "#f44336" }) }),
1178
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "ml-2 text-sm", style: { color: (_f = (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.danger) != null ? _f : "#f44336" }, children: error })
1179
- ]
1180
- }
1181
- ) : null,
1182
- step === "initial" ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
1183
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1184
- "h1",
1185
- {
1186
- className: "text-2xl font-bold text-cm-text-primary",
1187
- style: { color: (_g = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _g.textPrimary },
1188
- children: authModalTitle != null ? authModalTitle : "Sign in to Crossmint"
1189
- }
1190
- ),
1191
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1192
- "p",
1193
- {
1194
- className: "text-base font-normal mb-3 text-cm-text-secondary",
1195
- style: { color: (_h = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _h.textSecondary },
1196
- children: "Access using one of the options below."
1197
- }
1198
- )
1199
- ] }) : null,
1200
- loginMethods.includes("google") ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, GoogleSignIn, {}) : null,
1201
- loginMethods.includes("farcaster") ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkQQXBYOKAcjs.FarcasterProvider, { baseUrl, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FarcasterSignIn, {}) }) : null,
1202
- loginMethods.includes("twitter") ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TwitterSignIn, {}) : null,
1203
- loginMethods.some((method) => method.startsWith("web3")) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Web3AuthFlow, {}) : null,
1204
- loginMethods.includes("email") ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
1205
- loginMethods.length > 1 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Divider, { appearance, text: "OR" }) : null,
1206
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, EmailAuthFlow, {})
1207
- ] }) : null,
1208
- step === "initial" && termsOfServiceText != null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1209
- "div",
1210
- {
1211
- className: "text-sm text-center text-cm-text-secondary mt-2",
1212
- style: { color: (_i = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _i.textSecondary },
1213
- children: [
1214
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "style", { children: `
1215
- p a {
1216
- color: ${(_k = (_j = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _j.textLink) != null ? _k : "#1A74E9"};
1217
- }
1218
- ` }),
1219
- termsOfServiceText
1220
- ]
1221
- }
1222
- ) : null,
1223
- step === "initial" || step === "otp" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1224
- _chunkFHPIRUUDcjs.SecuredByCrossmint,
1225
- {
1226
- className: "mt-1.5 md:mt-4 justify-center",
1227
- color: (_m = (_l = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _l.textSecondary) != null ? _m : "#67797F"
1228
- }
1229
- ) : null
1230
- ]
1231
- }
1232
- );
1233
- }
1234
-
1235
- // src/components/auth/AuthFormDialog.tsx
1236
-
1237
-
1238
- function AuthFormDialog({ open }) {
1239
- var _a, _b, _c;
1240
- const { appearance, setDialogOpen } = useAuthForm();
1241
- _react.useEffect.call(void 0, () => {
1242
- document.body.style.overflow = open ? "hidden" : "";
1243
- }, [open]);
1244
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLEAESLKVcjs.Dialog, { modal: false, open, onOpenChange: setDialogOpen, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1245
- _chunkLEAESLKVcjs.DialogContent,
1246
- {
1247
- onInteractOutside: (e) => e.preventDefault(),
1248
- onOpenAutoFocus: (e) => e.preventDefault(),
1249
- closeButtonColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
1250
- closeButtonRingColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent,
1251
- className: "!p-0 !min-[480px]:p-0",
1252
- style: {
1253
- borderRadius: appearance == null ? void 0 : appearance.borderRadius,
1254
- backgroundColor: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.background
1255
- },
1256
- children: [
1257
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLEAESLKVcjs.DialogTitle, { children: "Crossmint Auth" }) }),
1258
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _reactvisuallyhidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkLEAESLKVcjs.DialogDescription, { children: "Sign in via Crossmint" }) }),
1259
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AuthForm, { className: "max-w-[448px]" })
1260
- ]
1261
- }
1262
- ) });
1263
- }
1264
-
1265
- // src/providers/auth/web3/DynamicWeb3WalletConnect.tsx
1266
-
1267
- var _ethereum = require('@dynamic-labs/ethereum');
1268
- var _solana = require('@dynamic-labs/solana');
1269
-
1270
- function DynamicWeb3WalletConnect({
1271
- children,
1272
- apiKeyEnvironment,
1273
- enabled
1274
- }) {
1275
- var _a, _b;
1276
- const { crossmintAuth } = useCrossmintAuth();
1277
- const { appearance, loginMethods } = useAuthForm();
1278
- let connectors = enabled ? [_ethereum.EthereumWalletConnectors, _solana.SolanaWalletConnectors] : void 0;
1279
- if (loginMethods.includes("web3:evm-only")) {
1280
- connectors = [_ethereum.EthereumWalletConnectors];
1281
- } else if (loginMethods.includes("web3:solana-only")) {
1282
- connectors = [_solana.SolanaWalletConnectors];
1283
- }
1284
- const cssOverrides = `.powered-by-dynamic { display: none !important; } .wallet-list__scroll-container { padding: 0px !important; } .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; } .dynamic-footer { display: none !important; } h1 { color: ${(_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary} !important; } * { color: ${(_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary} !important; }`;
1285
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1286
- _chunk7EPTEGBPcjs.DynamicContextProviderWrapper,
1287
- {
1288
- apiKeyEnvironment,
1289
- settings: {
1290
- walletConnectors: connectors,
1291
- cssOverrides,
1292
- events: {
1293
- onWalletRemoved() {
1294
- console.log("[CryptoWalletConnectionHandler] onWalletRemoved");
1295
- },
1296
- onAuthFlowCancel() {
1297
- console.log("[CryptoWalletConnectionHandler] onAuthFlowCancel");
1298
- },
1299
- onAuthFlowClose() {
1300
- console.log("[CryptoWalletConnectionHandler] onAuthFlowClose");
1301
- },
1302
- onAuthFailure(data, reason) {
1303
- console.error("[CryptoWalletConnectionHandler] onAuthFailure", data, reason);
1304
- },
1305
- onAuthSuccess(data) {
1306
- console.log("[CryptoWalletConnectionHandler] onAuthSuccess", data);
1307
- }
1308
- },
1309
- handlers: {
1310
- handleConnectedWallet: (args) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1311
- var _a2;
1312
- console.log("[CryptoWalletConnectionHandler] handleConnectedWallet", args);
1313
- const address = args.address;
1314
- if (!address) {
1315
- console.error("[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing");
1316
- return false;
1317
- }
1318
- const chain = yield _chunkXW53XESIcjs.dynamicChainToCrossmintChain.call(void 0, args);
1319
- const type = chain === "solana" ? "solana" : "evm";
1320
- try {
1321
- const res = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithSmartWallet(address, type);
1322
- const rawSignature = yield (_a2 = args.connector) == null ? void 0 : _a2.proveOwnership(
1323
- address,
1324
- res.challenge
1325
- );
1326
- let signature = rawSignature;
1327
- if (type === "solana") {
1328
- const signatureBuffer = Buffer.from(rawSignature, "base64");
1329
- signature = _bs582.default.encode(signatureBuffer);
1330
- }
1331
- const authResponse = yield crossmintAuth == null ? void 0 : crossmintAuth.authenticateSmartWallet(
1332
- address,
1333
- type,
1334
- signature
1335
- );
1336
- const oneTimeSecret = authResponse.oneTimeSecret;
1337
- yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
1338
- } catch (error) {
1339
- console.error("[CryptoWalletConnectionHandler] Error authenticating wallet:", error);
1340
- false;
1341
- }
1342
- return true;
1343
- })
1344
- }
1345
- },
1346
- children
1347
- },
1348
- `${apiKeyEnvironment}-${loginMethods.join(",")}`
1349
- );
1350
- }
1351
-
1352
- // src/providers/CrossmintAuthProvider.tsx
1353
-
1354
- var defaultContextValue = {
1355
- crossmintAuth: void 0,
1356
- login: () => {
1357
- },
1358
- logout: () => {
1359
- },
1360
- jwt: void 0,
1361
- user: void 0,
1362
- status: "initializing",
1363
- getUser: () => {
1364
- }
1365
- };
1366
- var AuthContext = _react.createContext.call(void 0, defaultContextValue);
1367
- var defaultEmbeddedWallets = {
1368
- createOnLogin: "off",
1369
- type: "evm-smart-wallet",
1370
- experimental_enableRecoveryKeys: false
1371
- };
1372
- function CrossmintAuthProvider({
1373
- embeddedWallets = defaultEmbeddedWallets,
1374
- children,
1375
- appearance,
1376
- termsOfServiceText,
1377
- prefetchOAuthUrls = true,
1378
- authModalTitle,
1379
- onLoginSuccess,
1380
- loginMethods = ["email", "google"],
1381
- refreshRoute,
1382
- logoutRoute
1383
- }) {
1384
- var _a;
1385
- const [user, setUser] = _react.useState.call(void 0, void 0);
1386
- const { crossmint, setJwt } = _chunkKEKBOJCFcjs.useCrossmint.call(void 0, "CrossmintAuthProvider must be used within CrossmintProvider");
1387
- const crossmintAuthRef = _react.useRef.call(void 0, null);
1388
- const crossmintAuth = _react.useMemo.call(void 0, () => {
1389
- if (!crossmintAuthRef.current) {
1390
- crossmintAuthRef.current = _clientsdkauth.CrossmintAuth.from(crossmint, {
1391
- callbacks: {
1392
- onLogout: () => {
1393
- setJwt(void 0);
1394
- setUser(void 0);
1395
- },
1396
- onTokenRefresh: (authMaterial) => {
1397
- setJwt(authMaterial.jwt);
1398
- setUser(authMaterial.user);
1399
- }
1400
- },
1401
- refreshRoute,
1402
- logoutRoute
1403
- });
1404
- }
1405
- return crossmintAuthRef.current;
1406
- }, []);
1407
- const crossmintBaseUrl = _commonsdkbase.validateApiKeyAndGetCrossmintBaseUrl.call(void 0, crossmint.apiKey);
1408
- const [dialogOpen, setDialogOpen] = _react.useState.call(void 0, false);
1409
- const [initialized, setInitialized] = _react.useState.call(void 0, false);
1410
- const [defaultEmail, setDefaultEmail] = _react.useState.call(void 0, void 0);
1411
- const [isDynamicSdkLoaded, setIsDynamicSdkLoaded] = _react.useState.call(void 0, false);
1412
- const isWeb3Enabled = loginMethods.some((method) => method.startsWith("web3"));
1413
- const triggerHasJustLoggedIn = _react.useCallback.call(void 0, () => {
1414
- onLoginSuccess == null ? void 0 : onLoginSuccess();
1415
- }, [onLoginSuccess]);
1416
- _react.useEffect.call(void 0, () => {
1417
- if (crossmint.jwt == null) {
1418
- const jwt = _clientsdkauth.getCookie.call(void 0, _commonsdkauth.SESSION_PREFIX);
1419
- setJwt(jwt);
1420
- }
1421
- setInitialized(true);
1422
- }, [crossmint.jwt, setJwt]);
1423
- _react.useEffect.call(void 0, () => {
1424
- if (crossmint.jwt != null && dialogOpen) {
1425
- setDialogOpen(false);
1426
- triggerHasJustLoggedIn();
1427
- }
1428
- }, [crossmint.jwt, dialogOpen, triggerHasJustLoggedIn]);
1429
- const login = _react.useCallback.call(void 0,
1430
- (defaultEmail2) => {
1431
- if (crossmint.jwt != null) {
1432
- console.log("User already logged in");
1433
- return;
1434
- }
1435
- if (defaultEmail2 != null && typeof defaultEmail2 === "string") {
1436
- setDefaultEmail(defaultEmail2);
1437
- }
1438
- setDialogOpen(true);
1439
- },
1440
- [crossmint.jwt]
1441
- );
1442
- const logout = _react.useCallback.call(void 0, () => {
1443
- crossmintAuth.logout();
1444
- }, [crossmintAuth]);
1445
- const getAuthStatus = _react.useCallback.call(void 0, () => {
1446
- if (!initialized) {
1447
- return "initializing";
1448
- }
1449
- if (isWeb3Enabled && !isDynamicSdkLoaded) {
1450
- return "initializing";
1451
- }
1452
- if (crossmint.jwt != null) {
1453
- return "logged-in";
1454
- }
1455
- if (dialogOpen) {
1456
- return "in-progress";
1457
- }
1458
- return "logged-out";
1459
- }, [initialized, crossmint.jwt, dialogOpen, isDynamicSdkLoaded, isWeb3Enabled]);
1460
- const getUser = _react.useCallback.call(void 0, () => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1461
- if (crossmint.jwt == null) {
1462
- console.log("User not logged in");
1463
- return;
1464
- }
1465
- const user2 = yield crossmintAuth.getUser();
1466
- setUser(user2);
1467
- }), [crossmint.jwt, crossmintAuth]);
1468
- const authContextValue = _react.useMemo.call(void 0,
1469
- () => ({
1470
- crossmintAuth,
1471
- login,
1472
- logout,
1473
- jwt: crossmint.jwt,
1474
- user,
1475
- status: getAuthStatus(),
1476
- getUser
1477
- }),
1478
- [crossmintAuth, login, logout, crossmint.jwt, user, getAuthStatus, getUser]
1479
- );
1480
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkVKQ4YOEXcjs.TwindProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AuthContext.Provider, { value: authContextValue, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1481
- CrossmintWalletProvider,
1482
- {
1483
- showPasskeyHelpers: embeddedWallets.showPasskeyHelpers,
1484
- appearance,
1485
- experimental_enableRecoveryKeys: (_a = embeddedWallets.experimental_enableRecoveryKeys) != null ? _a : false,
1486
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1487
- AuthFormProvider,
1488
- {
1489
- setDialogOpen: (open, successfulLogin) => {
1490
- setDialogOpen(open);
1491
- if (successfulLogin) {
1492
- triggerHasJustLoggedIn();
1493
- }
1494
- },
1495
- preFetchOAuthUrls: getAuthStatus() === "logged-out" && prefetchOAuthUrls,
1496
- initialState: {
1497
- appearance,
1498
- loginMethods,
1499
- termsOfServiceText,
1500
- authModalTitle,
1501
- embeddedWallets,
1502
- baseUrl: crossmintBaseUrl,
1503
- defaultEmail
1504
- },
1505
- children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1506
- DynamicWeb3WalletConnect,
1507
- {
1508
- enabled: isWeb3Enabled,
1509
- apiKeyEnvironment: crossmint.apiKey.includes("production") ? "production" : "staging",
1510
- children: [
1511
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1512
- WalletManager,
1513
- {
1514
- embeddedWallets,
1515
- accessToken: crossmint.jwt,
1516
- setIsDynamicSdkLoaded,
1517
- isWeb3Enabled
1518
- }
1519
- ),
1520
- children,
1521
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AuthFormDialog, { open: dialogOpen })
1522
- ]
1523
- }
1524
- )
1525
- }
1526
- )
1527
- },
1528
- crossmint.jwt
1529
- ) }) });
1530
- }
1531
- function WalletManager({
1532
- embeddedWallets,
1533
- accessToken,
1534
- setIsDynamicSdkLoaded,
1535
- isWeb3Enabled
1536
- }) {
1537
- const { getOrCreateWallet, clearWallet, status: walletStatus } = useWallet();
1538
- const { sdkHasLoaded, getAdminSigner, cleanup, isDynamicWalletConnected } = _chunkC3MY2FNDcjs.useDynamicConnect.call(void 0,
1539
- isWeb3Enabled,
1540
- setIsDynamicSdkLoaded,
1541
- accessToken
1542
- );
1543
- const { createOnLogin, adminSigner: defaultAdminSigner, linkedUser } = embeddedWallets;
1544
- const canGetOrCreateWallet = createOnLogin === "all-users" && walletStatus === "not-loaded" && accessToken != null && sdkHasLoaded;
1545
- const handleWalletCreation = _react.useCallback.call(void 0, () => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1546
- var _a, _b;
1547
- if (!canGetOrCreateWallet) {
1548
- return;
1549
- }
1550
- let adminSigner = defaultAdminSigner;
1551
- let walletType = embeddedWallets.type;
1552
- if (isDynamicWalletConnected) {
1553
- adminSigner = (_a = yield getAdminSigner()) != null ? _a : adminSigner;
1554
- walletType = (_b = _chunkI22MLYYWcjs.mapSignerToWalletType.call(void 0, adminSigner == null ? void 0 : adminSigner.type)) != null ? _b : walletType;
1555
- }
1556
- if (!isDynamicWalletConnected && embeddedWallets.type == null) {
1557
- console.error(
1558
- "[CrossmintAuthProvider] \u26A0\uFE0F embeddedWallets.type is required when no external wallet is connected"
1559
- );
1560
- return;
1561
- }
1562
- getOrCreateWallet({
1563
- type: walletType,
1564
- args: {
1565
- adminSigner,
1566
- linkedUser
1567
- }
1568
- });
1569
- }), [canGetOrCreateWallet, getOrCreateWallet, linkedUser, defaultAdminSigner, embeddedWallets.type, getAdminSigner]);
1570
- const handleWalletCleanup = _react.useCallback.call(void 0, () => {
1571
- if (accessToken == null && walletStatus === "loaded") {
1572
- clearWallet();
1573
- }
1574
- cleanup();
1575
- }, [walletStatus, accessToken, clearWallet, cleanup]);
1576
- _react.useEffect.call(void 0, () => {
1577
- handleWalletCreation();
1578
- handleWalletCleanup();
1579
- }, [handleWalletCreation, handleWalletCleanup]);
1580
- return null;
1581
- }
1582
-
1583
- // src/hooks/useAuth.ts
1584
- function useAuth() {
1585
- const context = _react.useContext.call(void 0, AuthContext);
1586
- if (context === void 0) {
1587
- throw new Error("useAuth must be used within an AuthProvider");
1588
- }
1589
- return context;
1590
- }
1591
-
1592
- // src/providers/signers/CrossmintSignerProvider.tsx
1593
-
1594
- var DEFAULT_EVENT_OPTIONS = {
1595
- timeoutMs: 1e4,
1596
- intervalMs: 5e3
1597
- };
1598
- var CrossmintSignerContext = _react.createContext.call(void 0, null);
1599
- function CrossmintSignerProvider({ children, setWalletState, appearance }) {
1600
- const {
1601
- crossmint: { apiKey, jwt }
1602
- } = _chunkKEKBOJCFcjs.useCrossmint.call(void 0, );
1603
- const smartWalletSDK = _react.useMemo.call(void 0, () => _walletssdk.CrossmintWallets.from({ apiKey, jwt }), [apiKey, jwt]);
1604
- const [step, setStep] = _react.useState.call(void 0, "initial");
1605
- const [dialogOpen, setDialogOpen] = _react.useState.call(void 0, false);
1606
- const iframeWindow = _chunkWO6OW46Hcjs.useSignerIFrameWindow.call(void 0, );
1607
- const successHandlerRef = _react.useRef.call(void 0, null);
1608
- const errorHandlerRef = _react.useRef.call(void 0, null);
1609
- const experimental_getOrCreateWalletWithRecoveryKey = (args) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1610
- var _a;
1611
- if (args.type !== "solana") {
1612
- throw new Error("Unsupported wallet type, only solana is supported at the moment");
1613
- }
1614
- if (!iframeWindow.current) {
1615
- throw new Error("IFrame window not initialized");
1616
- }
1617
- try {
1618
- setWalletState({ status: "in-progress" });
1619
- const signerResponse = yield (_a = iframeWindow.current) == null ? void 0 : _a.sendAction({
1620
- event: "request:get-public-key",
1621
- responseEvent: "response:get-public-key",
1622
- data: {
1623
- authData: {
1624
- jwt,
1625
- apiKey
1626
- },
1627
- data: {
1628
- chainLayer: "solana"
1629
- }
1630
- }
1631
- });
1632
- if (signerResponse.status === "success") {
1633
- yield getOrCreateSolanaWalletWithSigner(signerResponse.publicKey);
1634
- return;
1635
- }
1636
- if (args.email != null) {
1637
- yield handleEmailSubmit(args.email);
1638
- return;
1639
- }
1640
- return new Promise((resolve, reject) => {
1641
- setDialogOpen(true);
1642
- setStep("initial");
1643
- const cleanup = () => {
1644
- setDialogOpen(false);
1645
- setStep("initial");
1646
- };
1647
- const successHandler = () => {
1648
- cleanup();
1649
- resolve();
1650
- };
1651
- const errorHandler = (error) => {
1652
- cleanup();
1653
- reject(error);
1654
- };
1655
- successHandlerRef.current = successHandler;
1656
- errorHandlerRef.current = errorHandler;
1657
- });
1658
- } catch (error) {
1659
- console.error("There was an error creating a wallet ", error);
1660
- setWalletState(_chunkHIU3FK4Mcjs.deriveWalletErrorState.call(void 0, error));
1661
- throw error;
1662
- }
1663
- });
1664
- const handleOnGetOrCreateRecoveryKey = (email) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1665
- var _a;
1666
- try {
1667
- if (!iframeWindow.current) {
1668
- throw new Error("IFrame window not initialized");
1669
- }
1670
- if (jwt == null) {
1671
- throw new Error("JWT not set");
1672
- }
1673
- console.log("Creating Recovery Key");
1674
- const res = yield (_a = iframeWindow.current) == null ? void 0 : _a.sendAction({
1675
- event: "request:create-signer",
1676
- responseEvent: "response:create-signer",
1677
- data: {
1678
- authData: {
1679
- jwt,
1680
- apiKey
1681
- },
1682
- data: {
1683
- chainLayer: "solana",
1684
- authId: `email:${email}`
1685
- }
1686
- }
1687
- });
1688
- if (res.status === "error") {
1689
- throw new Error(res.error);
1690
- }
1691
- if (res.status === "success" && res.address != null) {
1692
- yield getOrCreateSolanaWalletWithSigner(res.address);
1693
- setStep("initial");
1694
- setDialogOpen(false);
1695
- }
1696
- } catch (err) {
1697
- console.error("There was an error creating a recovery key ", err);
1698
- throw err;
1699
- }
1700
- });
1701
- const handleEmailSubmit = (email) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1702
- var _a;
1703
- try {
1704
- yield handleOnGetOrCreateRecoveryKey(email);
1705
- setStep("otp");
1706
- setDialogOpen(true);
1707
- } catch (error) {
1708
- console.error("Error in email submission:", error);
1709
- (_a = errorHandlerRef.current) == null ? void 0 : _a.call(errorHandlerRef, error);
1710
- throw error;
1711
- }
1712
- });
1713
- const handleOTPSubmit = (token) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1714
- var _a, _b;
1715
- if (!iframeWindow.current) {
1716
- throw new Error("IFrame window not initialized");
1717
- }
1718
- if (jwt == null) {
1719
- throw new Error("JWT not set");
1720
- }
1721
- try {
1722
- const res = yield iframeWindow.current.sendAction({
1723
- event: "request:send-otp",
1724
- responseEvent: "response:send-otp",
1725
- data: {
1726
- authData: {
1727
- jwt,
1728
- apiKey
1729
- },
1730
- data: {
1731
- encryptedOtp: token,
1732
- chainLayer: "solana"
1733
- }
1734
- }
1735
- });
1736
- if (res.status === "error") {
1737
- throw new Error(res.error);
1738
- }
1739
- yield getOrCreateSolanaWalletWithSigner(res.address);
1740
- setStep("initial");
1741
- setDialogOpen(false);
1742
- (_a = successHandlerRef.current) == null ? void 0 : _a.call(successHandlerRef);
1743
- } catch (error) {
1744
- console.error("Error in OTP submission:", error);
1745
- (_b = errorHandlerRef.current) == null ? void 0 : _b.call(errorHandlerRef, error);
1746
- throw error;
1747
- }
1748
- });
1749
- function getOrCreateSolanaWalletWithSigner(publicSignerAddress) {
1750
- return _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1751
- if (jwt == null) {
1752
- throw new Error("[getOrCreateSolanaWalletWithSigner] JWT not set!");
1753
- }
1754
- try {
1755
- const wallet = yield smartWalletSDK.getOrCreateWallet("solana-smart-wallet", {
1756
- adminSigner: {
1757
- type: "solana-keypair",
1758
- address: publicSignerAddress,
1759
- signer: {
1760
- signMessage: (message) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1761
- if (iframeWindow.current == null) {
1762
- throw new Error("IFrame window not initialized");
1763
- }
1764
- const res = yield iframeWindow.current.sendAction({
1765
- event: "request:sign-message",
1766
- responseEvent: "response:sign-message",
1767
- data: {
1768
- authData: {
1769
- jwt,
1770
- apiKey
1771
- },
1772
- data: {
1773
- message: _bs582.default.encode(message),
1774
- chainLayer: "solana",
1775
- encoding: "base58"
1776
- }
1777
- },
1778
- options: DEFAULT_EVENT_OPTIONS
1779
- });
1780
- if (res.status === "error") {
1781
- throw new Error(res.error);
1782
- }
1783
- if (res.signature == null) {
1784
- throw new Error("Failed to sign message");
1785
- }
1786
- return _bs582.default.decode(res.signature);
1787
- }),
1788
- signTransaction: (transaction) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1789
- var _a;
1790
- console.log("Signing transaction...", transaction);
1791
- const res = yield (_a = iframeWindow.current) == null ? void 0 : _a.sendAction({
1792
- event: "request:sign-transaction",
1793
- responseEvent: "response:sign-transaction",
1794
- data: {
1795
- authData: {
1796
- jwt,
1797
- apiKey
1798
- },
1799
- data: {
1800
- transaction: _bs582.default.encode(transaction.serialize()),
1801
- chainLayer: "solana",
1802
- encoding: "base58"
1803
- }
1804
- },
1805
- options: DEFAULT_EVENT_OPTIONS
1806
- });
1807
- if ((res == null ? void 0 : res.status) === "error") {
1808
- throw new Error(res.error);
1809
- }
1810
- if ((res == null ? void 0 : res.signature) == null) {
1811
- throw new Error("Failed to sign transaction");
1812
- }
1813
- transaction.addSignature(new (0, _web3js.PublicKey)(publicSignerAddress), _bs582.default.decode(res.signature));
1814
- return transaction;
1815
- })
1816
- }
1817
- }
1818
- });
1819
- setWalletState({ status: "loaded", wallet, type: "solana-smart-wallet" });
1820
- } catch (error) {
1821
- console.error("Error creating wallet with signer:", error);
1822
- setWalletState(_chunkHIU3FK4Mcjs.deriveWalletErrorState.call(void 0, error));
1823
- throw error;
1824
- }
1825
- });
1826
- }
1827
- _react.useEffect.call(void 0, () => {
1828
- document.body.style.overflow = dialogOpen ? "hidden" : "";
1829
- }, [dialogOpen]);
1830
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CrossmintSignerContext.Provider, { value: { experimental_getOrCreateWalletWithRecoveryKey }, children: [
1831
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1832
- _chunkUYMSOJYKcjs.EmailSignersDialog,
1833
- {
1834
- open: dialogOpen,
1835
- setOpen: setDialogOpen,
1836
- step,
1837
- setStep,
1838
- onSubmitOTP: handleOTPSubmit,
1839
- onResendOTPCode: (email) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1840
- yield handleOnGetOrCreateRecoveryKey(email);
1841
- setStep("otp");
1842
- }),
1843
- onSubmitEmail: handleEmailSubmit,
1844
- appearance
1845
- }
1846
- ),
1847
- children
1848
- ] });
1849
- }
1850
- function useCrossmintSigner({ enabled = true } = {}) {
1851
- const context = _react.useContext.call(void 0, CrossmintSignerContext);
1852
- if (!enabled) {
1853
- return {
1854
- experimental_getOrCreateWalletWithRecoveryKey: () => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
1855
- yield Promise.reject(
1856
- new Error("useCrossmintSigner is disabled, please set 'experimental_enableRecoveryKeys' to true")
1857
- );
1858
- })
1859
- };
1860
- }
1861
- if (context === null) {
1862
- throw new Error("useCrossmintSigner must be used within a CrossmintSignerProvider");
1863
- }
1864
- return context;
1865
- }
1866
-
1867
-
1868
-
1869
-
1870
-
1871
-
1872
-
1873
-
1874
-
1875
-
1876
-
1877
-
1878
-
1879
-
1880
-
1881
-
1882
-
1883
-
1884
-
1885
-
1886
-
1887
-
1888
-
1889
-
1890
-
1891
-
1892
-
1893
-
1894
-
1895
-
1896
-
1897
- exports.CrossmintSignerContext = CrossmintSignerContext; exports.CrossmintSignerProvider = CrossmintSignerProvider; exports.useCrossmintSigner = useCrossmintSigner; exports.WalletContext = WalletContext; exports.CrossmintWalletProvider = CrossmintWalletProvider; exports.useWallet = useWallet; exports.useCrossmintAuth = useCrossmintAuth; exports.useAuthForm = useAuthForm; exports.AuthFormProvider = AuthFormProvider; exports.AuthFormBackButton = AuthFormBackButton; exports.EMAIL_VERIFICATION_TOKEN_LENGTH = EMAIL_VERIFICATION_TOKEN_LENGTH; exports.EmailOTPInput = EmailOTPInput; exports.useOAuthWindowListener = useOAuthWindowListener; exports.ContinueWithGoogle = ContinueWithGoogle; exports.EmailSignIn = EmailSignIn; exports.EmailAuthFlow = EmailAuthFlow; exports.Divider = Divider; exports.GoogleSignIn = GoogleSignIn; exports.FarcasterSignIn = FarcasterSignIn; exports.TwitterSignIn = TwitterSignIn; exports.Web3AuthFlowButton = Web3AuthFlowButton; exports.Web3Connectors = Web3Connectors; exports.Web3AuthFlow = Web3AuthFlow; exports.AuthForm = AuthForm; exports.AuthFormDialog = AuthFormDialog; exports.DynamicWeb3WalletConnect = DynamicWeb3WalletConnect; exports.AuthContext = AuthContext; exports.CrossmintAuthProvider = CrossmintAuthProvider; exports.useAuth = useAuth;
1898
- //# sourceMappingURL=chunk-QUZAE6AP.cjs.map