@crossmint/client-sdk-react-ui 1.9.3 → 1.10.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.
- package/dist/chunk-2T2VCED7.js +17 -0
- package/dist/chunk-2T2VCED7.js.map +1 -0
- package/dist/chunk-33WZFL2D.js +80 -0
- package/dist/chunk-33WZFL2D.js.map +1 -0
- package/dist/chunk-35RV5AOT.cjs +70 -0
- package/dist/chunk-35RV5AOT.cjs.map +1 -0
- package/dist/chunk-3C5IQSUX.cjs +50 -0
- package/dist/chunk-3C5IQSUX.cjs.map +1 -0
- package/dist/chunk-3J6CUUWT.js +50 -0
- package/dist/chunk-3J6CUUWT.js.map +1 -0
- package/dist/chunk-3KR4GYLF.js +26 -0
- package/dist/chunk-3KR4GYLF.js.map +1 -0
- package/dist/chunk-3RXUFZTR.cjs +14 -0
- package/dist/chunk-3RXUFZTR.cjs.map +1 -0
- package/dist/chunk-43P7QWBK.cjs +17 -0
- package/dist/chunk-43P7QWBK.cjs.map +1 -0
- package/dist/chunk-4DAZAO6Y.cjs +59 -0
- package/dist/chunk-4DAZAO6Y.cjs.map +1 -0
- package/dist/chunk-5IX763AW.js +10 -0
- package/dist/chunk-5IX763AW.js.map +1 -0
- package/dist/chunk-5KK3YQWD.cjs +1 -0
- package/dist/chunk-5KK3YQWD.cjs.map +1 -0
- package/dist/chunk-5RX5WFEW.cjs +11 -0
- package/dist/chunk-5RX5WFEW.cjs.map +1 -0
- package/dist/chunk-5S4VO6RB.cjs +55 -0
- package/dist/chunk-5S4VO6RB.cjs.map +1 -0
- package/dist/chunk-6DNBJVR5.js +64 -0
- package/dist/chunk-6DNBJVR5.js.map +1 -0
- package/dist/chunk-6LO4NSRH.cjs +21 -0
- package/dist/chunk-6LO4NSRH.cjs.map +1 -0
- package/dist/chunk-7KIY6DLW.js +28 -0
- package/dist/chunk-7KIY6DLW.js.map +1 -0
- package/dist/chunk-7SBZ6OIH.js +1 -0
- package/dist/chunk-7SBZ6OIH.js.map +1 -0
- package/dist/chunk-A2JCJ2OV.cjs +119 -0
- package/dist/chunk-A2JCJ2OV.cjs.map +1 -0
- package/dist/chunk-A7J4DAE7.js +16 -0
- package/dist/chunk-A7J4DAE7.js.map +1 -0
- package/dist/chunk-ATHR4S2P.js +48 -0
- package/dist/chunk-ATHR4S2P.js.map +1 -0
- package/dist/chunk-AUEQQ4D3.js +119 -0
- package/dist/chunk-AUEQQ4D3.js.map +1 -0
- package/dist/chunk-AXZLLRBU.cjs +26 -0
- package/dist/chunk-AXZLLRBU.cjs.map +1 -0
- package/dist/chunk-B7LYPQ4K.cjs +38 -0
- package/dist/chunk-B7LYPQ4K.cjs.map +1 -0
- package/dist/chunk-BE2ZLB3L.cjs +19 -0
- package/dist/chunk-BE2ZLB3L.cjs.map +1 -0
- package/dist/chunk-BKVDVDKX.cjs +1 -0
- package/dist/chunk-BKVDVDKX.cjs.map +1 -0
- package/dist/chunk-C2VARNXL.js +70 -0
- package/dist/chunk-C2VARNXL.js.map +1 -0
- package/dist/chunk-CPYPI45H.js +98 -0
- package/dist/chunk-CPYPI45H.js.map +1 -0
- package/dist/chunk-CRTRMMJ7.js +59 -0
- package/dist/chunk-CRTRMMJ7.js.map +1 -0
- package/dist/chunk-CUODMU27.js +1265 -0
- package/dist/chunk-CUODMU27.js.map +1 -0
- package/dist/chunk-DJ32OEWG.cjs +54 -0
- package/dist/chunk-DJ32OEWG.cjs.map +1 -0
- package/dist/chunk-DZ5MGN25.js +147 -0
- package/dist/chunk-DZ5MGN25.js.map +1 -0
- package/dist/chunk-ENCR5SUW.cjs +51 -0
- package/dist/chunk-ENCR5SUW.cjs.map +1 -0
- package/dist/chunk-EOWJ7775.js +18 -0
- package/dist/chunk-EOWJ7775.js.map +1 -0
- package/dist/chunk-EVL7VEPX.js +14 -0
- package/dist/chunk-EVL7VEPX.js.map +1 -0
- package/dist/chunk-FKIMKZ4Y.js +17 -0
- package/dist/chunk-FKIMKZ4Y.js.map +1 -0
- package/dist/chunk-FOCUIKYH.cjs +1265 -0
- package/dist/chunk-FOCUIKYH.cjs.map +1 -0
- package/dist/chunk-GGE3H4XP.cjs +33 -0
- package/dist/chunk-GGE3H4XP.cjs.map +1 -0
- package/dist/chunk-GY6G3ZC2.cjs +41 -0
- package/dist/chunk-GY6G3ZC2.cjs.map +1 -0
- package/dist/chunk-H4F7UVPT.js +34 -0
- package/dist/chunk-H4F7UVPT.js.map +1 -0
- package/dist/chunk-HATQVB6H.js +19 -0
- package/dist/chunk-HATQVB6H.js.map +1 -0
- package/dist/chunk-HCW4RO2O.cjs +29 -0
- package/dist/chunk-HCW4RO2O.cjs.map +1 -0
- package/dist/chunk-HENBZUED.cjs +10 -0
- package/dist/chunk-HENBZUED.cjs.map +1 -0
- package/dist/chunk-HG57BLPT.js +31 -0
- package/dist/chunk-HG57BLPT.js.map +1 -0
- package/dist/chunk-HPOZ6I54.cjs +44 -0
- package/dist/chunk-HPOZ6I54.cjs.map +1 -0
- package/dist/chunk-HYGCZCR2.js +33 -0
- package/dist/chunk-HYGCZCR2.js.map +1 -0
- package/dist/chunk-I63FQCIV.js +189 -0
- package/dist/chunk-I63FQCIV.js.map +1 -0
- package/dist/chunk-IP4HQL5I.cjs +147 -0
- package/dist/chunk-IP4HQL5I.cjs.map +1 -0
- package/dist/chunk-IQPA3QOV.js +27 -0
- package/dist/chunk-IQPA3QOV.js.map +1 -0
- package/dist/chunk-KAXBBO66.cjs +30 -0
- package/dist/chunk-KAXBBO66.cjs.map +1 -0
- package/dist/chunk-KEKBOJCF.cjs +50 -0
- package/dist/chunk-KEKBOJCF.cjs.map +1 -0
- package/dist/chunk-KLWDDALZ.cjs +14 -0
- package/dist/chunk-KLWDDALZ.cjs.map +1 -0
- package/dist/chunk-KNOUJZN5.cjs +32 -0
- package/dist/chunk-KNOUJZN5.cjs.map +1 -0
- package/dist/chunk-L3FKENHU.js +14 -0
- package/dist/chunk-L3FKENHU.js.map +1 -0
- package/dist/chunk-L3L7YEW3.js +22 -0
- package/dist/chunk-L3L7YEW3.js.map +1 -0
- package/dist/chunk-MH37OJT2.cjs +80 -0
- package/dist/chunk-MH37OJT2.cjs.map +1 -0
- package/dist/chunk-MJHLKJ6X.cjs +212 -0
- package/dist/chunk-MJHLKJ6X.cjs.map +1 -0
- package/dist/chunk-MUS7DUPS.cjs +98 -0
- package/dist/chunk-MUS7DUPS.cjs.map +1 -0
- package/dist/chunk-NMXFWIFA.js +133 -0
- package/dist/chunk-NMXFWIFA.js.map +1 -0
- package/dist/chunk-OZS4WEKF.js +55 -0
- package/dist/chunk-OZS4WEKF.js.map +1 -0
- package/dist/chunk-PBSL6JOF.cjs +17 -0
- package/dist/chunk-PBSL6JOF.cjs.map +1 -0
- package/dist/chunk-PHCGCJSA.js +107 -0
- package/dist/chunk-PHCGCJSA.js.map +1 -0
- package/dist/chunk-Q3M4UH5U.cjs +48 -0
- package/dist/chunk-Q3M4UH5U.cjs.map +1 -0
- package/dist/chunk-QDKAU3H2.js +31 -0
- package/dist/chunk-QDKAU3H2.js.map +1 -0
- package/dist/chunk-QFQWKKVU.js +11 -0
- package/dist/chunk-QFQWKKVU.js.map +1 -0
- package/dist/chunk-QIPMBCAV.js +86 -0
- package/dist/chunk-QIPMBCAV.js.map +1 -0
- package/dist/chunk-QJ44PL7L.js +41 -0
- package/dist/chunk-QJ44PL7L.js.map +1 -0
- package/dist/chunk-QK5J7FD3.cjs +11 -0
- package/dist/chunk-QK5J7FD3.cjs.map +1 -0
- package/dist/chunk-QKALEGXY.js +153 -0
- package/dist/chunk-QKALEGXY.js.map +1 -0
- package/dist/chunk-QQXBYOKA.cjs +16 -0
- package/dist/chunk-QQXBYOKA.cjs.map +1 -0
- package/dist/chunk-QT7UEJZG.cjs +133 -0
- package/dist/chunk-QT7UEJZG.cjs.map +1 -0
- package/dist/chunk-QTGK3RB5.js +31 -0
- package/dist/chunk-QTGK3RB5.js.map +1 -0
- package/dist/chunk-QTL5I5C2.js +38 -0
- package/dist/chunk-QTL5I5C2.js.map +1 -0
- package/dist/chunk-R6IL3WOE.cjs +31 -0
- package/dist/chunk-R6IL3WOE.cjs.map +1 -0
- package/dist/chunk-RZPQIRIY.js +11 -0
- package/dist/chunk-RZPQIRIY.js.map +1 -0
- package/dist/chunk-RZT2J42J.js +29 -0
- package/dist/chunk-RZT2J42J.js.map +1 -0
- package/dist/chunk-SBA6FMFT.cjs +18 -0
- package/dist/chunk-SBA6FMFT.cjs.map +1 -0
- package/dist/chunk-SVI3L5G5.cjs +86 -0
- package/dist/chunk-SVI3L5G5.cjs.map +1 -0
- package/dist/chunk-SZA3XDJ5.cjs +1 -0
- package/dist/chunk-SZA3XDJ5.cjs.map +1 -0
- package/dist/chunk-TIQPIPH5.cjs +31 -0
- package/dist/chunk-TIQPIPH5.cjs.map +1 -0
- package/dist/chunk-U5EONMPH.js +30 -0
- package/dist/chunk-U5EONMPH.js.map +1 -0
- package/dist/chunk-UASNCH3A.cjs +27 -0
- package/dist/chunk-UASNCH3A.cjs.map +1 -0
- package/dist/chunk-UQAKJ4T7.cjs +29 -0
- package/dist/chunk-UQAKJ4T7.cjs.map +1 -0
- package/dist/chunk-URKPLEPV.cjs +189 -0
- package/dist/chunk-URKPLEPV.cjs.map +1 -0
- package/dist/chunk-VZIXXIU5.js +32 -0
- package/dist/chunk-VZIXXIU5.js.map +1 -0
- package/dist/chunk-W2Q46OO4.js +17 -0
- package/dist/chunk-W2Q46OO4.js.map +1 -0
- package/dist/chunk-W3SNJ5XS.cjs +153 -0
- package/dist/chunk-W3SNJ5XS.cjs.map +1 -0
- package/dist/chunk-WK5RAFJ3.js +54 -0
- package/dist/chunk-WK5RAFJ3.js.map +1 -0
- package/dist/chunk-WQ7WULBW.cjs +31 -0
- package/dist/chunk-WQ7WULBW.cjs.map +1 -0
- package/dist/chunk-XDJ6F7N4.cjs +107 -0
- package/dist/chunk-XDJ6F7N4.cjs.map +1 -0
- package/dist/chunk-XEZF7G64.js +212 -0
- package/dist/chunk-XEZF7G64.js.map +1 -0
- package/dist/chunk-XRFRY2LN.js +50 -0
- package/dist/chunk-XRFRY2LN.js.map +1 -0
- package/dist/chunk-XXJ7LQ44.js +1 -0
- package/dist/chunk-XXJ7LQ44.js.map +1 -0
- package/dist/chunk-XYMYRPVT.js +1 -0
- package/dist/chunk-XYMYRPVT.js.map +1 -0
- package/dist/chunk-Y7PF2Z3W.cjs +22 -0
- package/dist/chunk-Y7PF2Z3W.cjs.map +1 -0
- package/dist/chunk-YE55IKBP.cjs +34 -0
- package/dist/chunk-YE55IKBP.cjs.map +1 -0
- package/dist/chunk-YNJPYSO4.cjs +17 -0
- package/dist/chunk-YNJPYSO4.cjs.map +1 -0
- package/dist/chunk-YWVQCHQF.js +51 -0
- package/dist/chunk-YWVQCHQF.js.map +1 -0
- package/dist/chunk-ZCYU7QA6.cjs +64 -0
- package/dist/chunk-ZCYU7QA6.cjs.map +1 -0
- package/dist/chunk-ZDQGQY7Z.js +29 -0
- package/dist/chunk-ZDQGQY7Z.js.map +1 -0
- package/dist/chunk-ZIHCLVCD.js +44 -0
- package/dist/chunk-ZIHCLVCD.js.map +1 -0
- package/dist/chunk-ZMSST6ZZ.cjs +28 -0
- package/dist/chunk-ZMSST6ZZ.cjs.map +1 -0
- package/dist/chunk-ZUIS3FET.js +21 -0
- package/dist/chunk-ZUIS3FET.js.map +1 -0
- package/dist/components/CrossmintNFTCollectionView.cjs +9 -1
- package/dist/components/CrossmintNFTCollectionView.cjs.map +1 -0
- package/dist/components/CrossmintNFTCollectionView.js +9 -1
- package/dist/components/CrossmintNFTCollectionView.js.map +1 -0
- package/dist/components/CrossmintNFTDetail.cjs +9 -1
- package/dist/components/CrossmintNFTDetail.cjs.map +1 -0
- package/dist/components/CrossmintNFTDetail.js +9 -1
- package/dist/components/CrossmintNFTDetail.js.map +1 -0
- package/dist/components/auth/AuthForm.cjs +37 -1
- package/dist/components/auth/AuthForm.cjs.map +1 -0
- package/dist/components/auth/AuthForm.js +37 -1
- package/dist/components/auth/AuthForm.js.map +1 -0
- package/dist/components/auth/AuthFormBackButton.cjs +10 -1
- package/dist/components/auth/AuthFormBackButton.cjs.map +1 -0
- package/dist/components/auth/AuthFormBackButton.js +10 -1
- package/dist/components/auth/AuthFormBackButton.js.map +1 -0
- package/dist/components/auth/AuthFormDialog.cjs +37 -1
- package/dist/components/auth/AuthFormDialog.cjs.map +1 -0
- package/dist/components/auth/AuthFormDialog.js +37 -1
- package/dist/components/auth/AuthFormDialog.js.map +1 -0
- package/dist/components/auth/EmbeddedAuthForm.cjs +38 -1
- package/dist/components/auth/EmbeddedAuthForm.cjs.map +1 -0
- package/dist/components/auth/EmbeddedAuthForm.js +38 -1
- package/dist/components/auth/EmbeddedAuthForm.js.map +1 -0
- package/dist/components/auth/PasskeyPrompt.cjs +14 -1
- package/dist/components/auth/PasskeyPrompt.cjs.map +1 -0
- package/dist/components/auth/PasskeyPrompt.js +14 -1
- package/dist/components/auth/PasskeyPrompt.js.map +1 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +37 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailAuthFlow.js +37 -1
- package/dist/components/auth/methods/email/EmailAuthFlow.js.map +1 -0
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +39 -1
- package/dist/components/auth/methods/email/EmailOTPInput.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailOTPInput.js +39 -1
- package/dist/components/auth/methods/email/EmailOTPInput.js.map +1 -0
- package/dist/components/auth/methods/email/EmailSignIn.cjs +37 -1
- package/dist/components/auth/methods/email/EmailSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/email/EmailSignIn.js +37 -1
- package/dist/components/auth/methods/email/EmailSignIn.js.map +1 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +37 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +37 -1
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js.map +1 -0
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +37 -1
- package/dist/components/auth/methods/google/GoogleSignIn.cjs.map +1 -0
- package/dist/components/auth/methods/google/GoogleSignIn.js +37 -1
- package/dist/components/auth/methods/google/GoogleSignIn.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +37 -0
- package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.d.cts +10 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.d.ts +10 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.js +37 -0
- package/dist/components/auth/methods/web3/Web3AuthWrapper.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.cjs +11 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.d.cts +13 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.d.ts +13 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.js +11 -0
- package/dist/components/auth/methods/web3/Web3ConnectButton.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3Connectors.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3Connectors.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3Connectors.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3Connectors.js +37 -0
- package/dist/components/auth/methods/web3/Web3Connectors.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.cjs +9 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.d.cts +11 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.d.ts +11 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.js +9 -0
- package/dist/components/auth/methods/web3/Web3ProviderButton.js.map +1 -0
- package/dist/components/auth/methods/web3/Web3SignIn.cjs +37 -0
- package/dist/components/auth/methods/web3/Web3SignIn.cjs.map +1 -0
- package/dist/components/auth/methods/web3/Web3SignIn.d.cts +5 -0
- package/dist/components/auth/methods/web3/Web3SignIn.d.ts +5 -0
- package/dist/components/auth/methods/web3/Web3SignIn.js +37 -0
- package/dist/components/auth/methods/web3/Web3SignIn.js.map +1 -0
- package/dist/components/common/Dialog.cjs +26 -1
- package/dist/components/common/Dialog.cjs.map +1 -0
- package/dist/components/common/Dialog.d.cts +1 -2
- package/dist/components/common/Dialog.d.ts +1 -2
- package/dist/components/common/Dialog.js +26 -1
- package/dist/components/common/Dialog.js.map +1 -0
- package/dist/components/common/Divider.cjs +37 -1
- package/dist/components/common/Divider.cjs.map +1 -0
- package/dist/components/common/Divider.js +37 -1
- package/dist/components/common/Divider.js.map +1 -0
- package/dist/components/common/InputOTP.cjs +14 -1
- package/dist/components/common/InputOTP.cjs.map +1 -0
- package/dist/components/common/InputOTP.d.cts +5 -27
- package/dist/components/common/InputOTP.d.ts +5 -27
- package/dist/components/common/InputOTP.js +14 -1
- package/dist/components/common/InputOTP.js.map +1 -0
- package/dist/components/common/PoweredByCrossmint.cjs +10 -1
- package/dist/components/common/PoweredByCrossmint.cjs.map +1 -0
- package/dist/components/common/PoweredByCrossmint.js +10 -1
- package/dist/components/common/PoweredByCrossmint.js.map +1 -0
- package/dist/components/common/Spinner.cjs +9 -1
- package/dist/components/common/Spinner.cjs.map +1 -0
- package/dist/components/common/Spinner.js +9 -1
- package/dist/components/common/Spinner.js.map +1 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs +8 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.cjs.map +1 -0
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js +8 -1
- package/dist/components/dynamic-xyz/DynamicContextProviderWrapper.js.map +1 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs +8 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/EmbeddedCheckoutIFrame.js +8 -1
- package/dist/components/embed/EmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs +11 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.cjs.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js +11 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckout.js.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs +10 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js +10 -1
- package/dist/components/embed/crypto/CryptoEmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs +11 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js +11 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckout.js.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs +10 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js +10 -1
- package/dist/components/embed/fiat/FiatEmbeddedCheckoutIFrame.js.map +1 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs +75 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.cjs.map +1 -0
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js +75 -1
- package/dist/components/embed/fiat/FiatPaymentElement_OLD.js.map +1 -0
- package/dist/components/embed/index.cjs +14 -1
- package/dist/components/embed/index.cjs.map +1 -0
- package/dist/components/embed/index.js +14 -1
- package/dist/components/embed/index.js.map +1 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +39 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs.map +1 -0
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +39 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js.map +1 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +38 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs.map +1 -0
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +38 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js.map +1 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +135 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +135 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs +63 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js +63 -1
- package/dist/components/embed/v3/crypto/utils/handleEvmTransaction.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +8 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +8 -1
- package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs +51 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.cjs.map +1 -0
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js +51 -1
- package/dist/components/embed/v3/crypto/utils/handleSolanaTransaction.js.map +1 -0
- package/dist/components/embed/v3/index.cjs +40 -1
- package/dist/components/embed/v3/index.cjs.map +1 -0
- package/dist/components/embed/v3/index.js +40 -1
- package/dist/components/embed/v3/index.js.map +1 -0
- package/dist/components/hosted/CrossmintPayButton.cjs +11 -1
- package/dist/components/hosted/CrossmintPayButton.cjs.map +1 -0
- package/dist/components/hosted/CrossmintPayButton.js +11 -1
- package/dist/components/hosted/CrossmintPayButton.js.map +1 -0
- package/dist/components/hosted/index.cjs +12 -1
- package/dist/components/hosted/index.cjs.map +1 -0
- package/dist/components/hosted/index.js +12 -1
- package/dist/components/hosted/index.js.map +1 -0
- package/dist/components/hosted/styles.cjs +10 -1
- package/dist/components/hosted/styles.cjs.map +1 -0
- package/dist/components/hosted/styles.js +10 -1
- package/dist/components/hosted/styles.js.map +1 -0
- package/dist/components/index.cjs +70 -1
- package/dist/components/index.cjs.map +1 -0
- package/dist/components/index.js +70 -1
- package/dist/components/index.js.map +1 -0
- package/dist/consts/version.cjs +8 -1
- package/dist/consts/version.cjs.map +1 -0
- package/dist/consts/version.js +8 -1
- package/dist/consts/version.js.map +1 -0
- package/dist/hooks/index.cjs +49 -1
- package/dist/hooks/index.cjs.map +1 -0
- package/dist/hooks/index.d.cts +3 -2
- package/dist/hooks/index.d.ts +3 -2
- package/dist/hooks/index.js +49 -1
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/useAuth.cjs +37 -1
- package/dist/hooks/useAuth.cjs.map +1 -0
- package/dist/hooks/useAuth.d.cts +8 -10
- package/dist/hooks/useAuth.d.ts +8 -10
- package/dist/hooks/useAuth.js +37 -1
- package/dist/hooks/useAuth.js.map +1 -0
- package/dist/hooks/useCrossmint.cjs +10 -1
- package/dist/hooks/useCrossmint.cjs.map +1 -0
- package/dist/hooks/useCrossmint.d.cts +0 -1
- package/dist/hooks/useCrossmint.d.ts +0 -1
- package/dist/hooks/useCrossmint.js +10 -1
- package/dist/hooks/useCrossmint.js.map +1 -0
- package/dist/hooks/useCrossmintAuth.cjs +37 -0
- package/dist/hooks/useCrossmintAuth.cjs.map +1 -0
- package/dist/hooks/useCrossmintAuth.d.cts +11 -0
- package/dist/hooks/useCrossmintAuth.d.ts +11 -0
- package/dist/hooks/useCrossmintAuth.js +37 -0
- package/dist/hooks/useCrossmintAuth.js.map +1 -0
- package/dist/hooks/useCrossmintCheckout.cjs +13 -1
- package/dist/hooks/useCrossmintCheckout.cjs.map +1 -0
- package/dist/hooks/useCrossmintCheckout.d.cts +2 -1
- package/dist/hooks/useCrossmintCheckout.d.ts +2 -1
- package/dist/hooks/useCrossmintCheckout.js +13 -1
- package/dist/hooks/useCrossmintCheckout.js.map +1 -0
- package/dist/hooks/useDeepEffect.cjs +8 -1
- package/dist/hooks/useDeepEffect.cjs.map +1 -0
- package/dist/hooks/useDeepEffect.js +8 -1
- package/dist/hooks/useDeepEffect.js.map +1 -0
- package/dist/hooks/useEnvironment.cjs +8 -1
- package/dist/hooks/useEnvironment.cjs.map +1 -0
- package/dist/hooks/useEnvironment.js +8 -1
- package/dist/hooks/useEnvironment.js.map +1 -0
- package/dist/hooks/useOAuthWindowListener.cjs +37 -1
- package/dist/hooks/useOAuthWindowListener.cjs.map +1 -0
- package/dist/hooks/useOAuthWindowListener.d.cts +2 -6
- package/dist/hooks/useOAuthWindowListener.d.ts +2 -6
- package/dist/hooks/useOAuthWindowListener.js +37 -1
- package/dist/hooks/useOAuthWindowListener.js.map +1 -0
- package/dist/hooks/useWallet.cjs +37 -1
- package/dist/hooks/useWallet.cjs.map +1 -0
- package/dist/hooks/useWallet.js +37 -1
- package/dist/hooks/useWallet.js.map +1 -0
- package/dist/icons/alert.cjs +8 -1
- package/dist/icons/alert.cjs.map +1 -0
- package/dist/icons/alert.js +8 -1
- package/dist/icons/alert.js.map +1 -0
- package/dist/icons/base64Icons.cjs +12 -0
- package/dist/icons/base64Icons.cjs.map +1 -0
- package/dist/icons/base64Icons.d.cts +5 -0
- package/dist/icons/base64Icons.d.ts +5 -0
- package/dist/icons/base64Icons.js +12 -0
- package/dist/icons/base64Icons.js.map +1 -0
- package/dist/icons/chevronRight.cjs +8 -0
- package/dist/icons/chevronRight.cjs.map +1 -0
- package/dist/icons/chevronRight.d.cts +9 -0
- package/dist/icons/chevronRight.d.ts +9 -0
- package/dist/icons/chevronRight.js +8 -0
- package/dist/icons/chevronRight.js.map +1 -0
- package/dist/icons/discord.cjs +29 -1
- package/dist/icons/discord.cjs.map +1 -0
- package/dist/icons/discord.js +29 -1
- package/dist/icons/discord.js.map +1 -0
- package/dist/icons/emailOTP.cjs +8 -1
- package/dist/icons/emailOTP.cjs.map +1 -0
- package/dist/icons/emailOTP.js +8 -1
- package/dist/icons/emailOTP.js.map +1 -0
- package/dist/icons/farcaster.cjs +8 -1
- package/dist/icons/farcaster.cjs.map +1 -0
- package/dist/icons/farcaster.js +8 -1
- package/dist/icons/farcaster.js.map +1 -0
- package/dist/icons/fingerprint.cjs +8 -1
- package/dist/icons/fingerprint.cjs.map +1 -0
- package/dist/icons/fingerprint.js +8 -1
- package/dist/icons/fingerprint.js.map +1 -0
- package/dist/icons/google.cjs +8 -1
- package/dist/icons/google.cjs.map +1 -0
- package/dist/icons/google.js +8 -1
- package/dist/icons/google.js.map +1 -0
- package/dist/icons/leftArrow.cjs +8 -1
- package/dist/icons/leftArrow.cjs.map +1 -0
- package/dist/icons/leftArrow.js +8 -1
- package/dist/icons/leftArrow.js.map +1 -0
- package/dist/icons/passkey.cjs +8 -1
- package/dist/icons/passkey.cjs.map +1 -0
- package/dist/icons/passkey.js +8 -1
- package/dist/icons/passkey.js.map +1 -0
- package/dist/icons/passkeyPromptLogo.cjs +8 -1
- package/dist/icons/passkeyPromptLogo.cjs.map +1 -0
- package/dist/icons/passkeyPromptLogo.js +8 -1
- package/dist/icons/passkeyPromptLogo.js.map +1 -0
- package/dist/icons/poweredByLeaf.cjs +8 -1
- package/dist/icons/poweredByLeaf.cjs.map +1 -0
- package/dist/icons/poweredByLeaf.d.cts +1 -2
- package/dist/icons/poweredByLeaf.d.ts +1 -2
- package/dist/icons/poweredByLeaf.js +8 -1
- package/dist/icons/poweredByLeaf.js.map +1 -0
- package/dist/icons/wallet.cjs +8 -0
- package/dist/icons/wallet.cjs.map +1 -0
- package/dist/icons/wallet.d.cts +9 -0
- package/dist/icons/wallet.d.ts +9 -0
- package/dist/icons/wallet.js +8 -0
- package/dist/icons/wallet.js.map +1 -0
- package/dist/icons/x.cjs +29 -1
- package/dist/icons/x.cjs.map +1 -0
- package/dist/icons/x.js +29 -1
- package/dist/icons/x.js.map +1 -0
- package/dist/index.cjs +126 -1
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +126 -1
- package/dist/index.js.map +1 -0
- package/dist/providers/CrossmintAuthProvider.cjs +39 -1
- package/dist/providers/CrossmintAuthProvider.cjs.map +1 -0
- package/dist/providers/CrossmintAuthProvider.d.cts +9 -6
- package/dist/providers/CrossmintAuthProvider.d.ts +9 -6
- package/dist/providers/CrossmintAuthProvider.js +39 -1
- package/dist/providers/CrossmintAuthProvider.js.map +1 -0
- package/dist/providers/CrossmintWalletProvider.cjs +39 -1
- package/dist/providers/CrossmintWalletProvider.cjs.map +1 -0
- package/dist/providers/CrossmintWalletProvider.js +39 -1
- package/dist/providers/CrossmintWalletProvider.js.map +1 -0
- package/dist/providers/TwindProvider.cjs +9 -1
- package/dist/providers/TwindProvider.cjs.map +1 -0
- package/dist/providers/TwindProvider.js +9 -1
- package/dist/providers/TwindProvider.js.map +1 -0
- package/dist/providers/auth/AuthFormProvider.cjs +39 -1
- package/dist/providers/auth/AuthFormProvider.cjs.map +1 -0
- package/dist/providers/auth/AuthFormProvider.d.cts +7 -9
- package/dist/providers/auth/AuthFormProvider.d.ts +7 -9
- package/dist/providers/auth/AuthFormProvider.js +39 -1
- package/dist/providers/auth/AuthFormProvider.js.map +1 -0
- package/dist/providers/auth/FarcasterProvider.cjs +8 -1
- package/dist/providers/auth/FarcasterProvider.cjs.map +1 -0
- package/dist/providers/auth/FarcasterProvider.js +8 -1
- package/dist/providers/auth/FarcasterProvider.js.map +1 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs.map +1 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.d.cts +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.d.ts +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.js +8 -0
- package/dist/providers/auth/web3/WagmiAuthProvider.js.map +1 -0
- package/dist/providers/index.cjs +43 -1
- package/dist/providers/index.cjs.map +1 -0
- package/dist/providers/index.d.cts +2 -1
- package/dist/providers/index.d.ts +2 -1
- package/dist/providers/index.js +43 -1
- package/dist/providers/index.js.map +1 -0
- package/dist/testUtils.cjs +8 -1
- package/dist/testUtils.cjs.map +1 -0
- package/dist/testUtils.d.cts +1 -2
- package/dist/testUtils.d.ts +1 -2
- package/dist/testUtils.js +8 -1
- package/dist/testUtils.js.map +1 -0
- package/dist/twind.config.cjs +8 -1
- package/dist/twind.config.cjs.map +1 -0
- package/dist/twind.config.d.cts +0 -3
- package/dist/twind.config.d.ts +0 -3
- package/dist/twind.config.js +8 -1
- package/dist/twind.config.js.map +1 -0
- package/dist/types/auth.cjs +1 -1
- package/dist/types/auth.cjs.map +1 -0
- package/dist/types/auth.js +1 -0
- package/dist/types/auth.js.map +1 -0
- package/dist/utils/classNames.cjs +8 -1
- package/dist/utils/classNames.cjs.map +1 -0
- package/dist/utils/classNames.js +8 -1
- package/dist/utils/classNames.js.map +1 -0
- package/dist/utils/createCrossmintApiClient.cjs +9 -1
- package/dist/utils/createCrossmintApiClient.cjs.map +1 -0
- package/dist/utils/createCrossmintApiClient.js +9 -1
- package/dist/utils/createCrossmintApiClient.js.map +1 -0
- package/package.json +21 -15
- package/src/components/auth/AuthForm.tsx +10 -5
- package/src/components/auth/AuthFormBackButton.tsx +1 -5
- package/src/components/auth/AuthFormDialog.tsx +7 -2
- package/src/components/auth/methods/email/EmailOTPInput.tsx +13 -14
- package/src/components/auth/methods/email/EmailSignIn.tsx +15 -19
- package/src/components/auth/methods/farcaster/FarcasterSignIn.tsx +10 -14
- package/src/components/auth/methods/google/GoogleSignIn.tsx +7 -16
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +17 -0
- package/src/components/auth/methods/web3/Web3AuthWrapper.tsx +87 -0
- package/src/components/auth/methods/web3/Web3ConnectButton.tsx +62 -0
- package/src/components/auth/methods/web3/Web3Connectors.tsx +91 -0
- package/src/components/auth/methods/web3/Web3ProviderButton.tsx +38 -0
- package/src/components/auth/methods/web3/Web3SignIn.tsx +41 -0
- package/src/components/common/Dialog.tsx +10 -29
- package/src/components/common/Divider.tsx +1 -1
- package/src/components/common/InputOTP.tsx +9 -4
- package/src/components/common/PoweredByCrossmint.tsx +3 -10
- package/src/components/embed/v3/EmbeddedCheckoutV3IFrame.tsx +11 -3
- package/src/components/embed/v3/crypto/utils/handleSendTransaction.ts +12 -6
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useAuth.ts +2 -2
- package/src/hooks/useCrossmint.test.tsx +4 -33
- package/src/hooks/useCrossmint.tsx +1 -12
- package/src/hooks/useCrossmintAuth.ts +12 -0
- package/src/hooks/useCrossmintCheckout.tsx +7 -5
- package/src/hooks/useOAuthWindowListener.ts +4 -10
- package/src/icons/base64Icons.ts +8 -0
- package/src/icons/chevronRight.tsx +21 -0
- package/src/icons/poweredByLeaf.tsx +81 -80
- package/src/icons/wallet.tsx +23 -0
- package/src/providers/CrossmintAuthProvider.test.tsx +72 -87
- package/src/providers/CrossmintAuthProvider.tsx +52 -49
- package/src/providers/CrossmintWalletProvider.test.tsx +15 -9
- package/src/providers/auth/AuthFormProvider.test.tsx +61 -19
- package/src/providers/auth/AuthFormProvider.tsx +52 -60
- package/src/providers/auth/web3/WagmiAuthProvider.tsx +56 -0
- package/src/testUtils.ts +0 -4
- package/src/twind.config.ts +12 -5
- package/dist/chunk-22TFOKGT.js +0 -1
- package/dist/chunk-265BME7Y.cjs +0 -1
- package/dist/chunk-2POV64LQ.js +0 -1
- package/dist/chunk-2TVTJ6GV.js +0 -1
- package/dist/chunk-2VQLMU5A.cjs +0 -1
- package/dist/chunk-2WSEHVNP.cjs +0 -1
- package/dist/chunk-3BUVHV54.js +0 -0
- package/dist/chunk-3JUSQ2QE.cjs +0 -1
- package/dist/chunk-47YB6ECI.cjs +0 -1
- package/dist/chunk-4IHRWQWT.js +0 -1
- package/dist/chunk-4ITU7JF2.js +0 -1
- package/dist/chunk-5DCSVXPM.js +0 -1
- package/dist/chunk-5IFQJPBE.cjs +0 -1
- package/dist/chunk-63OMZNLN.js +0 -1
- package/dist/chunk-6GZGVNLH.cjs +0 -1
- package/dist/chunk-6IWCD2YY.cjs +0 -1
- package/dist/chunk-72MMCJ2E.js +0 -0
- package/dist/chunk-72P3JMXX.js +0 -1
- package/dist/chunk-77PBG2JJ.js +0 -1
- package/dist/chunk-7CPFUVAV.js +0 -1
- package/dist/chunk-7HSC6Q3U.js +0 -1
- package/dist/chunk-7M23WP3P.js +0 -1
- package/dist/chunk-7MUBJ5DE.cjs +0 -1
- package/dist/chunk-7MYTZUEK.js +0 -1
- package/dist/chunk-7WTGDAJW.js +0 -1
- package/dist/chunk-7YJMOHOO.js +0 -1
- package/dist/chunk-7Z2T6P5L.cjs +0 -1
- package/dist/chunk-A3QHXPHD.js +0 -1
- package/dist/chunk-AMP2ZDXD.cjs +0 -1
- package/dist/chunk-ASU2E6GU.js +0 -1
- package/dist/chunk-B7GHWWM6.cjs +0 -1
- package/dist/chunk-BHJ5JTA2.js +0 -1
- package/dist/chunk-BR77Q3PK.cjs +0 -1
- package/dist/chunk-C3JRTLQP.js +0 -1
- package/dist/chunk-D3255LVM.cjs +0 -1
- package/dist/chunk-DCG56C7R.cjs +0 -1
- package/dist/chunk-DGZQUCSD.js +0 -1
- package/dist/chunk-E4TBJMOO.js +0 -1
- package/dist/chunk-E75QRQ6Q.js +0 -1
- package/dist/chunk-E7T2NBUP.cjs +0 -1
- package/dist/chunk-EK4Y233O.js +0 -1
- package/dist/chunk-EUXGP4IN.cjs +0 -1
- package/dist/chunk-EVADF7QA.js +0 -1
- package/dist/chunk-FFIN4TCT.cjs +0 -1
- package/dist/chunk-FON43I6G.cjs +0 -1
- package/dist/chunk-FYYNH6VT.js +0 -1
- package/dist/chunk-G6WJLBM7.js +0 -1
- package/dist/chunk-GJTS3VOX.cjs +0 -1
- package/dist/chunk-HFIIBQLK.js +0 -1
- package/dist/chunk-HHQZJJKE.js +0 -1
- package/dist/chunk-HWGRWJUT.cjs +0 -1
- package/dist/chunk-HYI4R74V.cjs +0 -1
- package/dist/chunk-I4GMMHQR.cjs +0 -1
- package/dist/chunk-IAJBYU5C.js +0 -1
- package/dist/chunk-IKY4YQDO.js +0 -1
- package/dist/chunk-IMV35JZB.cjs +0 -1
- package/dist/chunk-JGM3G5E2.js +0 -1
- package/dist/chunk-JSNLFGET.js +0 -1
- package/dist/chunk-JSNUJJQJ.js +0 -1
- package/dist/chunk-KY4UBKAO.cjs +0 -1
- package/dist/chunk-LF6WLVWL.js +0 -1
- package/dist/chunk-LZ5XEFKY.cjs +0 -1
- package/dist/chunk-MC3WZMO2.cjs +0 -1
- package/dist/chunk-MJMMQJVO.cjs +0 -1
- package/dist/chunk-N4QVZLJB.js +0 -1
- package/dist/chunk-NBJIJZGO.js +0 -1
- package/dist/chunk-NETRNZFY.js +0 -1
- package/dist/chunk-NFLGT52C.cjs +0 -1
- package/dist/chunk-NRN4WNQL.cjs +0 -1
- package/dist/chunk-NTIINLZM.cjs +0 -1
- package/dist/chunk-NY7SDPXG.js +0 -1
- package/dist/chunk-NZQIZ4ZY.cjs +0 -1
- package/dist/chunk-O5J2ZIJ6.cjs +0 -1
- package/dist/chunk-OEAPYLBR.cjs +0 -1
- package/dist/chunk-OOLXYAO7.js +0 -1
- package/dist/chunk-OVBCANGC.cjs +0 -1
- package/dist/chunk-PNUQCT4M.cjs +0 -1
- package/dist/chunk-PXDN3KFO.js +0 -1
- package/dist/chunk-QASKWI5Y.js +0 -1
- package/dist/chunk-QDOP7HRG.js +0 -1
- package/dist/chunk-QP4CMLMG.cjs +0 -1
- package/dist/chunk-QYQERFYL.cjs +0 -1
- package/dist/chunk-QZZXNJMU.js +0 -1
- package/dist/chunk-RGOIGFPQ.cjs +0 -1
- package/dist/chunk-RJGOALQ6.cjs +0 -1
- package/dist/chunk-RUQHINLO.js +0 -1
- package/dist/chunk-RYQRCUKB.js +0 -1
- package/dist/chunk-S73E6EBO.cjs +0 -1
- package/dist/chunk-SC5LQJBG.cjs +0 -1
- package/dist/chunk-SFDQPSSP.js +0 -1
- package/dist/chunk-SJFJI2OT.cjs +0 -1
- package/dist/chunk-SKRQKK2T.cjs +0 -1
- package/dist/chunk-SRQAQHYK.cjs +0 -1
- package/dist/chunk-SSWWXH5O.cjs +0 -1
- package/dist/chunk-SYDMK3TQ.js +0 -1
- package/dist/chunk-T422SK4C.cjs +0 -1
- package/dist/chunk-T5PSAJ3R.cjs +0 -1
- package/dist/chunk-TM7WDKYR.cjs +0 -1
- package/dist/chunk-TNCETEEL.js +0 -1
- package/dist/chunk-U6FTIAJO.js +0 -1
- package/dist/chunk-U7JNW7VQ.js +0 -1
- package/dist/chunk-UAFW3OWA.js +0 -1
- package/dist/chunk-UI2RH2CP.js +0 -1
- package/dist/chunk-UOHM5SBY.cjs +0 -1
- package/dist/chunk-UX6T7EAP.js +0 -1
- package/dist/chunk-V2YSOSYZ.cjs +0 -1
- package/dist/chunk-V4LKDMLV.js +0 -1
- package/dist/chunk-VI6TW7JT.cjs +0 -1
- package/dist/chunk-VIJFGMUH.js +0 -1
- package/dist/chunk-VWBAHXIO.cjs +0 -1
- package/dist/chunk-W4UPIFFS.cjs +0 -1
- package/dist/chunk-WABJHG6B.cjs +0 -1
- package/dist/chunk-WARJE3L2.cjs +0 -1
- package/dist/chunk-WF3RK7VH.js +0 -1
- package/dist/chunk-X5BBXO27.cjs +0 -1
- package/dist/chunk-XIVIIEY5.js +0 -1
- package/dist/chunk-XMNGTV3F.cjs +0 -1
- package/dist/chunk-Y5RJUIQB.cjs +0 -1
- package/dist/chunk-YKC4ST2J.js +0 -1
- package/dist/chunk-YLAJFXWZ.js +0 -0
- package/dist/chunk-YVTAV6EU.cjs +0 -1
- package/dist/chunk-Z2FGFHRQ.cjs +0 -1
- package/dist/hooks/useAuthSignIn.cjs +0 -1
- package/dist/hooks/useAuthSignIn.d.cts +0 -21
- package/dist/hooks/useAuthSignIn.d.ts +0 -21
- package/dist/hooks/useAuthSignIn.js +0 -1
- package/dist/hooks/useRefreshToken.cjs +0 -1
- package/dist/hooks/useRefreshToken.d.cts +0 -11
- package/dist/hooks/useRefreshToken.d.ts +0 -11
- package/dist/hooks/useRefreshToken.js +0 -1
- package/dist/utils/authCookies.cjs +0 -1
- package/dist/utils/authCookies.d.cts +0 -5
- package/dist/utils/authCookies.d.ts +0 -5
- package/dist/utils/authCookies.js +0 -1
- package/src/hooks/useAuthSignIn.ts +0 -117
- package/src/hooks/useRefreshToken.test.ts +0 -155
- package/src/hooks/useRefreshToken.ts +0 -68
- package/src/utils/authCookies.test.ts +0 -41
- package/src/utils/authCookies.ts +0 -13
|
@@ -1 +1,75 @@
|
|
|
1
|
-
import"../../../chunk-
|
|
1
|
+
import "../../../chunk-CRTRMMJ7.js";
|
|
2
|
+
|
|
3
|
+
// src/components/embed/fiat/FiatPaymentElement_OLD.tsx
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { crossmintPaymentService_OLD, crossmintUiService_OLD } from "@crossmint/client-sdk-base";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
function CrossmintFiatPaymentElement_OLD(props) {
|
|
8
|
+
const [height, setHeight] = useState(0);
|
|
9
|
+
const { getIframeUrl, listenToEvents, emitQueryParams } = crossmintPaymentService_OLD(props);
|
|
10
|
+
const { listenToEvents: listenToUiEvents } = crossmintUiService_OLD({ environment: props.environment });
|
|
11
|
+
const [url] = useState(getIframeUrl());
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
const clearListener = listenToEvents((event) => {
|
|
14
|
+
var _a;
|
|
15
|
+
return (_a = props.onEvent) == null ? void 0 : _a.call(props, event.data);
|
|
16
|
+
});
|
|
17
|
+
return () => {
|
|
18
|
+
if (clearListener) {
|
|
19
|
+
clearListener();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
}, []);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
const clearListener = listenToUiEvents((event) => {
|
|
25
|
+
const { type, payload } = event.data;
|
|
26
|
+
switch (type) {
|
|
27
|
+
case "ui:height.changed":
|
|
28
|
+
setHeight(payload.height);
|
|
29
|
+
break;
|
|
30
|
+
default:
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
return () => {
|
|
35
|
+
if (clearListener) {
|
|
36
|
+
clearListener();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}, []);
|
|
40
|
+
useEffect(() => {
|
|
41
|
+
emitQueryParams({
|
|
42
|
+
recipient: props.recipient,
|
|
43
|
+
mintConfig: props.mintConfig,
|
|
44
|
+
locale: props.locale,
|
|
45
|
+
currency: props.currency,
|
|
46
|
+
whPassThroughArgs: props.whPassThroughArgs
|
|
47
|
+
});
|
|
48
|
+
}, [props.recipient, props.mintConfig, props.locale, props.currency, props.whPassThroughArgs]);
|
|
49
|
+
return /* @__PURE__ */ jsx(
|
|
50
|
+
"iframe",
|
|
51
|
+
{
|
|
52
|
+
src: url,
|
|
53
|
+
id: "crossmint-embedded-checkout.iframe",
|
|
54
|
+
role: "crossmint-embedded-checkout.iframe",
|
|
55
|
+
allow: "payment *",
|
|
56
|
+
style: {
|
|
57
|
+
border: "none !important",
|
|
58
|
+
padding: "0px !important",
|
|
59
|
+
width: "100% !important",
|
|
60
|
+
minWidth: "100% !important",
|
|
61
|
+
overflow: "hidden !important",
|
|
62
|
+
display: "block !important",
|
|
63
|
+
userSelect: "none",
|
|
64
|
+
transform: "translate(0px) !important",
|
|
65
|
+
opacity: "1",
|
|
66
|
+
transition: "ease 0s, opacity 0.4s ease 0.1s",
|
|
67
|
+
height: `${height}px`
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
export {
|
|
73
|
+
CrossmintFiatPaymentElement_OLD
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=FiatPaymentElement_OLD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/embed/fiat/FiatPaymentElement_OLD.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\n\nimport type { FiatEmbeddedCheckoutProps } from \"@crossmint/client-sdk-base\";\nimport { crossmintPaymentService_OLD, crossmintUiService_OLD } from \"@crossmint/client-sdk-base\";\n\nexport function CrossmintFiatPaymentElement_OLD(props: FiatEmbeddedCheckoutProps) {\n const [height, setHeight] = useState(0);\n const { getIframeUrl, listenToEvents, emitQueryParams } = crossmintPaymentService_OLD(props);\n const { listenToEvents: listenToUiEvents } = crossmintUiService_OLD({ environment: props.environment });\n const [url] = useState(getIframeUrl());\n\n useEffect(() => {\n const clearListener = listenToEvents((event) => props.onEvent?.(event.data));\n\n return () => {\n if (clearListener) {\n clearListener();\n }\n };\n }, []);\n\n useEffect(() => {\n const clearListener = listenToUiEvents((event: MessageEvent<any>) => {\n const { type, payload } = event.data;\n\n switch (type) {\n case \"ui:height.changed\":\n setHeight(payload.height);\n break;\n default:\n return;\n }\n });\n\n return () => {\n if (clearListener) {\n clearListener();\n }\n };\n }, []);\n\n useEffect(() => {\n emitQueryParams({\n recipient: props.recipient,\n mintConfig: props.mintConfig,\n locale: props.locale,\n currency: props.currency,\n whPassThroughArgs: props.whPassThroughArgs,\n });\n }, [props.recipient, props.mintConfig, props.locale, props.currency, props.whPassThroughArgs]);\n\n return (\n <iframe\n src={url}\n id=\"crossmint-embedded-checkout.iframe\"\n role=\"crossmint-embedded-checkout.iframe\"\n allow=\"payment *\"\n style={{\n border: \"none !important\",\n padding: \"0px !important\",\n width: \"100% !important\",\n minWidth: \"100% !important\",\n overflow: \"hidden !important\",\n display: \"block !important\",\n userSelect: \"none\",\n transform: \"translate(0px) !important\",\n opacity: \"1\",\n transition: \"ease 0s, opacity 0.4s ease 0.1s\",\n height: `${height}px`,\n }}\n ></iframe>\n );\n}\n"],"mappings":";;;AAAA,SAAS,WAAW,gBAAgB;AAGpC,SAAS,6BAA6B,8BAA8B;AAiD5D;AA/CD,SAAS,gCAAgC,OAAkC;AAC9E,QAAM,CAAC,QAAQ,SAAS,IAAI,SAAS,CAAC;AACtC,QAAM,EAAE,cAAc,gBAAgB,gBAAgB,IAAI,4BAA4B,KAAK;AAC3F,QAAM,EAAE,gBAAgB,iBAAiB,IAAI,uBAAuB,EAAE,aAAa,MAAM,YAAY,CAAC;AACtG,QAAM,CAAC,GAAG,IAAI,SAAS,aAAa,CAAC;AAErC,YAAU,MAAM;AACZ,UAAM,gBAAgB,eAAe,CAAC,UAAO;AAZrD;AAYwD,yBAAM,YAAN,+BAAgB,MAAM;AAAA,KAAK;AAE3E,WAAO,MAAM;AACT,UAAI,eAAe;AACf,sBAAc;AAAA,MAClB;AAAA,IACJ;AAAA,EACJ,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AACZ,UAAM,gBAAgB,iBAAiB,CAAC,UAA6B;AACjE,YAAM,EAAE,MAAM,QAAQ,IAAI,MAAM;AAEhC,cAAQ,MAAM;AAAA,QACV,KAAK;AACD,oBAAU,QAAQ,MAAM;AACxB;AAAA,QACJ;AACI;AAAA,MACR;AAAA,IACJ,CAAC;AAED,WAAO,MAAM;AACT,UAAI,eAAe;AACf,sBAAc;AAAA,MAClB;AAAA,IACJ;AAAA,EACJ,GAAG,CAAC,CAAC;AAEL,YAAU,MAAM;AACZ,oBAAgB;AAAA,MACZ,WAAW,MAAM;AAAA,MACjB,YAAY,MAAM;AAAA,MAClB,QAAQ,MAAM;AAAA,MACd,UAAU,MAAM;AAAA,MAChB,mBAAmB,MAAM;AAAA,IAC7B,CAAC;AAAA,EACL,GAAG,CAAC,MAAM,WAAW,MAAM,YAAY,MAAM,QAAQ,MAAM,UAAU,MAAM,iBAAiB,CAAC;AAE7F,SACI;AAAA,IAAC;AAAA;AAAA,MACG,KAAK;AAAA,MACL,IAAG;AAAA,MACH,MAAK;AAAA,MACL,OAAM;AAAA,MACN,OAAO;AAAA,QACH,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,OAAO;AAAA,QACP,UAAU;AAAA,QACV,UAAU;AAAA,QACV,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,WAAW;AAAA,QACX,SAAS;AAAA,QACT,YAAY;AAAA,QACZ,QAAQ,GAAG,MAAM;AAAA,MACrB;AAAA;AAAA,EACH;AAET;","names":[]}
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkKAXBBO66cjs = require('../../chunk-KAXBBO66.cjs');
|
|
4
|
+
require('../../chunk-43P7QWBK.cjs');
|
|
5
|
+
require('../../chunk-R6IL3WOE.cjs');
|
|
6
|
+
require('../../chunk-6LO4NSRH.cjs');
|
|
7
|
+
require('../../chunk-XDJ6F7N4.cjs');
|
|
8
|
+
require('../../chunk-35RV5AOT.cjs');
|
|
9
|
+
require('../../chunk-SBA6FMFT.cjs');
|
|
10
|
+
require('../../chunk-4DAZAO6Y.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
exports.CrossmintPaymentElement = _chunkKAXBBO66cjs.CrossmintPaymentElement;
|
|
14
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1 +1,14 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
CrossmintPaymentElement
|
|
3
|
+
} from "../../chunk-U5EONMPH.js";
|
|
4
|
+
import "../../chunk-2T2VCED7.js";
|
|
5
|
+
import "../../chunk-QDKAU3H2.js";
|
|
6
|
+
import "../../chunk-ZUIS3FET.js";
|
|
7
|
+
import "../../chunk-PHCGCJSA.js";
|
|
8
|
+
import "../../chunk-C2VARNXL.js";
|
|
9
|
+
import "../../chunk-EOWJ7775.js";
|
|
10
|
+
import "../../chunk-CRTRMMJ7.js";
|
|
11
|
+
export {
|
|
12
|
+
CrossmintPaymentElement
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkYNJPYSO4cjs = require('../../../chunk-YNJPYSO4.cjs');
|
|
4
|
+
require('../../../chunk-SVI3L5G5.cjs');
|
|
5
|
+
require('../../../chunk-FOCUIKYH.cjs');
|
|
6
|
+
require('../../../chunk-DJ32OEWG.cjs');
|
|
7
|
+
require('../../../chunk-ZCYU7QA6.cjs');
|
|
8
|
+
require('../../../chunk-5S4VO6RB.cjs');
|
|
9
|
+
require('../../../chunk-QQXBYOKA.cjs');
|
|
10
|
+
require('../../../chunk-MJHLKJ6X.cjs');
|
|
11
|
+
require('../../../chunk-QT7UEJZG.cjs');
|
|
12
|
+
require('../../../chunk-MH37OJT2.cjs');
|
|
13
|
+
require('../../../chunk-PBSL6JOF.cjs');
|
|
14
|
+
require('../../../chunk-B7LYPQ4K.cjs');
|
|
15
|
+
require('../../../chunk-BE2ZLB3L.cjs');
|
|
16
|
+
require('../../../chunk-GY6G3ZC2.cjs');
|
|
17
|
+
require('../../../chunk-5RX5WFEW.cjs');
|
|
18
|
+
require('../../../chunk-HCW4RO2O.cjs');
|
|
19
|
+
require('../../../chunk-UASNCH3A.cjs');
|
|
20
|
+
require('../../../chunk-MUS7DUPS.cjs');
|
|
21
|
+
require('../../../chunk-IP4HQL5I.cjs');
|
|
22
|
+
require('../../../chunk-KNOUJZN5.cjs');
|
|
23
|
+
require('../../../chunk-ZMSST6ZZ.cjs');
|
|
24
|
+
require('../../../chunk-QK5J7FD3.cjs');
|
|
25
|
+
require('../../../chunk-AXZLLRBU.cjs');
|
|
26
|
+
require('../../../chunk-URKPLEPV.cjs');
|
|
27
|
+
require('../../../chunk-HPOZ6I54.cjs');
|
|
28
|
+
require('../../../chunk-YE55IKBP.cjs');
|
|
29
|
+
require('../../../chunk-ENCR5SUW.cjs');
|
|
30
|
+
require('../../../chunk-3C5IQSUX.cjs');
|
|
31
|
+
require('../../../chunk-Y7PF2Z3W.cjs');
|
|
32
|
+
require('../../../chunk-KEKBOJCF.cjs');
|
|
33
|
+
require('../../../chunk-A2JCJ2OV.cjs');
|
|
34
|
+
require('../../../chunk-HENBZUED.cjs');
|
|
35
|
+
require('../../../chunk-4DAZAO6Y.cjs');
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
exports.CrossmintEmbeddedCheckout_Alpha = _chunkYNJPYSO4cjs.CrossmintEmbeddedCheckout_Alpha;
|
|
39
|
+
//# sourceMappingURL=CrossmintEmbeddedCheckoutV3.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1 +1,39 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
CrossmintEmbeddedCheckout_Alpha
|
|
3
|
+
} from "../../../chunk-W2Q46OO4.js";
|
|
4
|
+
import "../../../chunk-QIPMBCAV.js";
|
|
5
|
+
import "../../../chunk-CUODMU27.js";
|
|
6
|
+
import "../../../chunk-WK5RAFJ3.js";
|
|
7
|
+
import "../../../chunk-6DNBJVR5.js";
|
|
8
|
+
import "../../../chunk-OZS4WEKF.js";
|
|
9
|
+
import "../../../chunk-A7J4DAE7.js";
|
|
10
|
+
import "../../../chunk-XEZF7G64.js";
|
|
11
|
+
import "../../../chunk-NMXFWIFA.js";
|
|
12
|
+
import "../../../chunk-33WZFL2D.js";
|
|
13
|
+
import "../../../chunk-FKIMKZ4Y.js";
|
|
14
|
+
import "../../../chunk-QTL5I5C2.js";
|
|
15
|
+
import "../../../chunk-HATQVB6H.js";
|
|
16
|
+
import "../../../chunk-QJ44PL7L.js";
|
|
17
|
+
import "../../../chunk-RZPQIRIY.js";
|
|
18
|
+
import "../../../chunk-ZDQGQY7Z.js";
|
|
19
|
+
import "../../../chunk-IQPA3QOV.js";
|
|
20
|
+
import "../../../chunk-CPYPI45H.js";
|
|
21
|
+
import "../../../chunk-DZ5MGN25.js";
|
|
22
|
+
import "../../../chunk-VZIXXIU5.js";
|
|
23
|
+
import "../../../chunk-7KIY6DLW.js";
|
|
24
|
+
import "../../../chunk-QFQWKKVU.js";
|
|
25
|
+
import "../../../chunk-3KR4GYLF.js";
|
|
26
|
+
import "../../../chunk-I63FQCIV.js";
|
|
27
|
+
import "../../../chunk-ZIHCLVCD.js";
|
|
28
|
+
import "../../../chunk-H4F7UVPT.js";
|
|
29
|
+
import "../../../chunk-YWVQCHQF.js";
|
|
30
|
+
import "../../../chunk-XRFRY2LN.js";
|
|
31
|
+
import "../../../chunk-L3L7YEW3.js";
|
|
32
|
+
import "../../../chunk-3J6CUUWT.js";
|
|
33
|
+
import "../../../chunk-AUEQQ4D3.js";
|
|
34
|
+
import "../../../chunk-5IX763AW.js";
|
|
35
|
+
import "../../../chunk-CRTRMMJ7.js";
|
|
36
|
+
export {
|
|
37
|
+
CrossmintEmbeddedCheckout_Alpha
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=CrossmintEmbeddedCheckoutV3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkSVI3L5G5cjs = require('../../../chunk-SVI3L5G5.cjs');
|
|
4
|
+
require('../../../chunk-FOCUIKYH.cjs');
|
|
5
|
+
require('../../../chunk-DJ32OEWG.cjs');
|
|
6
|
+
require('../../../chunk-ZCYU7QA6.cjs');
|
|
7
|
+
require('../../../chunk-5S4VO6RB.cjs');
|
|
8
|
+
require('../../../chunk-QQXBYOKA.cjs');
|
|
9
|
+
require('../../../chunk-MJHLKJ6X.cjs');
|
|
10
|
+
require('../../../chunk-QT7UEJZG.cjs');
|
|
11
|
+
require('../../../chunk-MH37OJT2.cjs');
|
|
12
|
+
require('../../../chunk-PBSL6JOF.cjs');
|
|
13
|
+
require('../../../chunk-B7LYPQ4K.cjs');
|
|
14
|
+
require('../../../chunk-BE2ZLB3L.cjs');
|
|
15
|
+
require('../../../chunk-GY6G3ZC2.cjs');
|
|
16
|
+
require('../../../chunk-5RX5WFEW.cjs');
|
|
17
|
+
require('../../../chunk-HCW4RO2O.cjs');
|
|
18
|
+
require('../../../chunk-UASNCH3A.cjs');
|
|
19
|
+
require('../../../chunk-MUS7DUPS.cjs');
|
|
20
|
+
require('../../../chunk-IP4HQL5I.cjs');
|
|
21
|
+
require('../../../chunk-KNOUJZN5.cjs');
|
|
22
|
+
require('../../../chunk-ZMSST6ZZ.cjs');
|
|
23
|
+
require('../../../chunk-QK5J7FD3.cjs');
|
|
24
|
+
require('../../../chunk-AXZLLRBU.cjs');
|
|
25
|
+
require('../../../chunk-URKPLEPV.cjs');
|
|
26
|
+
require('../../../chunk-HPOZ6I54.cjs');
|
|
27
|
+
require('../../../chunk-YE55IKBP.cjs');
|
|
28
|
+
require('../../../chunk-ENCR5SUW.cjs');
|
|
29
|
+
require('../../../chunk-3C5IQSUX.cjs');
|
|
30
|
+
require('../../../chunk-Y7PF2Z3W.cjs');
|
|
31
|
+
require('../../../chunk-KEKBOJCF.cjs');
|
|
32
|
+
require('../../../chunk-A2JCJ2OV.cjs');
|
|
33
|
+
require('../../../chunk-HENBZUED.cjs');
|
|
34
|
+
require('../../../chunk-4DAZAO6Y.cjs');
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
exports.EmbeddedCheckoutV3IFrame = _chunkSVI3L5G5cjs.EmbeddedCheckoutV3IFrame;
|
|
38
|
+
//# sourceMappingURL=EmbeddedCheckoutV3IFrame.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":""}
|
|
@@ -1 +1,38 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
EmbeddedCheckoutV3IFrame
|
|
3
|
+
} from "../../../chunk-QIPMBCAV.js";
|
|
4
|
+
import "../../../chunk-CUODMU27.js";
|
|
5
|
+
import "../../../chunk-WK5RAFJ3.js";
|
|
6
|
+
import "../../../chunk-6DNBJVR5.js";
|
|
7
|
+
import "../../../chunk-OZS4WEKF.js";
|
|
8
|
+
import "../../../chunk-A7J4DAE7.js";
|
|
9
|
+
import "../../../chunk-XEZF7G64.js";
|
|
10
|
+
import "../../../chunk-NMXFWIFA.js";
|
|
11
|
+
import "../../../chunk-33WZFL2D.js";
|
|
12
|
+
import "../../../chunk-FKIMKZ4Y.js";
|
|
13
|
+
import "../../../chunk-QTL5I5C2.js";
|
|
14
|
+
import "../../../chunk-HATQVB6H.js";
|
|
15
|
+
import "../../../chunk-QJ44PL7L.js";
|
|
16
|
+
import "../../../chunk-RZPQIRIY.js";
|
|
17
|
+
import "../../../chunk-ZDQGQY7Z.js";
|
|
18
|
+
import "../../../chunk-IQPA3QOV.js";
|
|
19
|
+
import "../../../chunk-CPYPI45H.js";
|
|
20
|
+
import "../../../chunk-DZ5MGN25.js";
|
|
21
|
+
import "../../../chunk-VZIXXIU5.js";
|
|
22
|
+
import "../../../chunk-7KIY6DLW.js";
|
|
23
|
+
import "../../../chunk-QFQWKKVU.js";
|
|
24
|
+
import "../../../chunk-3KR4GYLF.js";
|
|
25
|
+
import "../../../chunk-I63FQCIV.js";
|
|
26
|
+
import "../../../chunk-ZIHCLVCD.js";
|
|
27
|
+
import "../../../chunk-H4F7UVPT.js";
|
|
28
|
+
import "../../../chunk-YWVQCHQF.js";
|
|
29
|
+
import "../../../chunk-XRFRY2LN.js";
|
|
30
|
+
import "../../../chunk-L3L7YEW3.js";
|
|
31
|
+
import "../../../chunk-3J6CUUWT.js";
|
|
32
|
+
import "../../../chunk-AUEQQ4D3.js";
|
|
33
|
+
import "../../../chunk-5IX763AW.js";
|
|
34
|
+
import "../../../chunk-CRTRMMJ7.js";
|
|
35
|
+
export {
|
|
36
|
+
EmbeddedCheckoutV3IFrame
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=EmbeddedCheckoutV3IFrame.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1 +1,135 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkGGE3H4XPcjs = require('../../../../chunk-GGE3H4XP.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkUQAKJ4T7cjs = require('../../../../chunk-UQAKJ4T7.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunk4DAZAO6Ycjs = require('../../../../chunk-4DAZAO6Y.cjs');
|
|
11
|
+
|
|
12
|
+
// src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
16
|
+
var _ethereum = require('@dynamic-labs/ethereum');
|
|
17
|
+
var _sdkreactcore = require('@dynamic-labs/sdk-react-core');
|
|
18
|
+
var _solana = require('@dynamic-labs/solana');
|
|
19
|
+
var _react = require('react');
|
|
20
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
21
|
+
function CryptoWalletConnectionHandler(props) {
|
|
22
|
+
const { iframeClient, apiKeyEnvironment } = props;
|
|
23
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
24
|
+
_chunkUQAKJ4T7cjs.DynamicContextProviderWrapper,
|
|
25
|
+
{
|
|
26
|
+
apiKeyEnvironment,
|
|
27
|
+
settings: {
|
|
28
|
+
walletConnectors: [_ethereum.EthereumWalletConnectors, _solana.SolanaWalletConnectors],
|
|
29
|
+
events: {
|
|
30
|
+
onAuthFlowCancel() {
|
|
31
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowCancel");
|
|
32
|
+
iframeClient == null ? void 0 : iframeClient.send("crypto:connect-wallet.failed", {
|
|
33
|
+
error: "cancelled"
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
onAuthFlowClose() {
|
|
37
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowClose");
|
|
38
|
+
},
|
|
39
|
+
onAuthFailure(data, reason) {
|
|
40
|
+
console.error("[CryptoWalletConnectionHandler] onAuthFailure", data, reason);
|
|
41
|
+
},
|
|
42
|
+
onAuthSuccess(data) {
|
|
43
|
+
console.log("[CryptoWalletConnectionHandler] onAuthSuccess", data);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
handlers: {
|
|
47
|
+
handleConnectedWallet: (wallet) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
|
|
48
|
+
var _a;
|
|
49
|
+
console.log("[CryptoWalletConnectionHandler] handleConnectedWallet", wallet);
|
|
50
|
+
const address = wallet.address;
|
|
51
|
+
if (!address) {
|
|
52
|
+
console.error("[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing");
|
|
53
|
+
iframeClient == null ? void 0 : iframeClient.send("crypto:connect-wallet.failed", {
|
|
54
|
+
error: "address is missing"
|
|
55
|
+
});
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const chain = yield dynamicChainToCrossmintChain(wallet);
|
|
59
|
+
iframeClient == null ? void 0 : iframeClient.send("crypto:connect-wallet.success", {
|
|
60
|
+
address,
|
|
61
|
+
chain,
|
|
62
|
+
walletProviderKey: (_a = wallet.connector) == null ? void 0 : _a.key
|
|
63
|
+
});
|
|
64
|
+
return true;
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _CryptoWalletConnectionHandler, _chunk4DAZAO6Ycjs.__spreadValues.call(void 0, {}, props))
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function _CryptoWalletConnectionHandler({ iframeClient }) {
|
|
73
|
+
const { setShowAuthFlow, primaryWallet, handleLogOut } = _sdkreactcore.useDynamicContext.call(void 0, );
|
|
74
|
+
_react.useEffect.call(void 0, () => {
|
|
75
|
+
if (iframeClient == null) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const showAuthFlowListener = iframeClient.on("crypto:connect-wallet.show", (_0) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, [_0], function* ({ show }) {
|
|
79
|
+
yield handleLogOut();
|
|
80
|
+
setShowAuthFlow(show);
|
|
81
|
+
}));
|
|
82
|
+
return () => {
|
|
83
|
+
iframeClient.off(showAuthFlowListener);
|
|
84
|
+
};
|
|
85
|
+
}, [iframeClient, handleLogOut, setShowAuthFlow]);
|
|
86
|
+
_react.useEffect.call(void 0, () => {
|
|
87
|
+
if (iframeClient == null) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const signTransactionListener = iframeClient.on(
|
|
91
|
+
"crypto:send-transaction",
|
|
92
|
+
(_0) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, [_0], function* ({ chain, serializedTransaction }) {
|
|
93
|
+
if (primaryWallet == null) {
|
|
94
|
+
console.error("[CryptoWalletConnectionHandler] signTransaction: primaryWallet is missing");
|
|
95
|
+
iframeClient.send("crypto:send-transaction:failed", {
|
|
96
|
+
error: "primaryWallet is missing"
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
yield _chunkGGE3H4XPcjs.handleSendTransaction.call(void 0,
|
|
101
|
+
primaryWallet,
|
|
102
|
+
chain,
|
|
103
|
+
serializedTransaction,
|
|
104
|
+
iframeClient
|
|
105
|
+
);
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
return () => {
|
|
109
|
+
iframeClient.off(signTransactionListener);
|
|
110
|
+
};
|
|
111
|
+
}, [iframeClient, primaryWallet]);
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
function dynamicChainToCrossmintChain(wallet) {
|
|
115
|
+
return _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
|
|
116
|
+
var _a;
|
|
117
|
+
const chain = wallet.chain;
|
|
118
|
+
if (chain === "SOL") {
|
|
119
|
+
return "solana";
|
|
120
|
+
}
|
|
121
|
+
const chainId = yield (_a = wallet.connector) == null ? void 0 : _a.getNetwork();
|
|
122
|
+
if (typeof chainId !== "number") {
|
|
123
|
+
throw new Error("chainId is not a number");
|
|
124
|
+
}
|
|
125
|
+
const chainFromChainId = _commonsdkbase.chainIdToBlockchain.call(void 0, chainId);
|
|
126
|
+
if (!chainFromChainId) {
|
|
127
|
+
throw new Error(`ChainId ${chainId} is not supported`);
|
|
128
|
+
}
|
|
129
|
+
return chainFromChainId;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
exports.CryptoWalletConnectionHandler = CryptoWalletConnectionHandler;
|
|
135
|
+
//# sourceMappingURL=CryptoWalletConnectionHandler.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx"],"names":[],"mappings":"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","sourcesContent":["import DynamicContextProviderWrapper from \"@/components/dynamic-xyz/DynamicContextProviderWrapper\";\nimport type { EmbeddedCheckoutV3IFrameEmitter } from \"@crossmint/client-sdk-base\";\nimport {\n type APIKeyEnvironmentPrefix,\n type BlockchainIncludingTestnet,\n chainIdToBlockchain,\n} from \"@crossmint/common-sdk-base\";\nimport { EthereumWalletConnectors } from \"@dynamic-labs/ethereum\";\nimport { type HandleConnectedWallet, useDynamicContext } from \"@dynamic-labs/sdk-react-core\";\nimport { SolanaWalletConnectors } from \"@dynamic-labs/solana\";\nimport { useEffect } from \"react\";\nimport { handleSendTransaction } from \"./utils/handleSendTransaction\";\n\nexport function CryptoWalletConnectionHandler(props: {\n iframeClient: EmbeddedCheckoutV3IFrameEmitter | null;\n apiKeyEnvironment: APIKeyEnvironmentPrefix;\n}) {\n const { iframeClient, apiKeyEnvironment } = props;\n\n return (\n <DynamicContextProviderWrapper\n apiKeyEnvironment={apiKeyEnvironment}\n settings={{\n walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],\n events: {\n onAuthFlowCancel() {\n console.log(\"[CryptoWalletConnectionHandler] onAuthFlowCancel\");\n iframeClient?.send(\"crypto:connect-wallet.failed\", {\n error: \"cancelled\",\n });\n },\n onAuthFlowClose() {\n console.log(\"[CryptoWalletConnectionHandler] onAuthFlowClose\");\n },\n onAuthFailure(data, reason) {\n console.error(\"[CryptoWalletConnectionHandler] onAuthFailure\", data, reason);\n },\n onAuthSuccess(data) {\n console.log(\"[CryptoWalletConnectionHandler] onAuthSuccess\", data);\n },\n },\n handlers: {\n handleConnectedWallet: async (wallet) => {\n console.log(\"[CryptoWalletConnectionHandler] handleConnectedWallet\", wallet);\n\n const address = wallet.address;\n if (!address) {\n console.error(\"[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing\");\n iframeClient?.send(\"crypto:connect-wallet.failed\", {\n error: \"address is missing\",\n });\n return false;\n }\n\n const chain = await dynamicChainToCrossmintChain(wallet);\n\n iframeClient?.send(\"crypto:connect-wallet.success\", {\n address,\n chain,\n walletProviderKey: wallet.connector?.key,\n });\n\n return true;\n },\n },\n }}\n >\n <_CryptoWalletConnectionHandler {...props} />\n </DynamicContextProviderWrapper>\n );\n}\n\nfunction _CryptoWalletConnectionHandler({ iframeClient }: Parameters<typeof CryptoWalletConnectionHandler>[0]) {\n const { setShowAuthFlow, primaryWallet, handleLogOut } = useDynamicContext();\n\n useEffect(() => {\n if (iframeClient == null) {\n return;\n }\n const showAuthFlowListener = iframeClient.on(\"crypto:connect-wallet.show\", async ({ show }) => {\n await handleLogOut();\n setShowAuthFlow(show);\n });\n\n return () => {\n iframeClient.off(showAuthFlowListener);\n };\n }, [iframeClient, handleLogOut, setShowAuthFlow]);\n\n useEffect(() => {\n if (iframeClient == null) {\n return;\n }\n const signTransactionListener = iframeClient.on(\n \"crypto:send-transaction\",\n async ({ chain, serializedTransaction }) => {\n if (primaryWallet == null) {\n console.error(\"[CryptoWalletConnectionHandler] signTransaction: primaryWallet is missing\");\n iframeClient.send(\"crypto:send-transaction:failed\", {\n error: \"primaryWallet is missing\",\n });\n return;\n }\n\n await handleSendTransaction(\n primaryWallet,\n chain as BlockchainIncludingTestnet,\n serializedTransaction,\n iframeClient\n );\n }\n );\n\n return () => {\n iframeClient.off(signTransactionListener);\n };\n }, [iframeClient, primaryWallet]);\n\n return null;\n}\n\nasync function dynamicChainToCrossmintChain(\n wallet: Parameters<HandleConnectedWallet>[0]\n): Promise<BlockchainIncludingTestnet> {\n const chain = wallet.chain;\n if (chain === \"SOL\") {\n return \"solana\";\n }\n const chainId = await wallet.connector?.getNetwork();\n if (typeof chainId !== \"number\") {\n throw new Error(\"chainId is not a number\");\n }\n const chainFromChainId = chainIdToBlockchain(chainId);\n if (!chainFromChainId) {\n throw new Error(`ChainId ${chainId} is not supported`);\n }\n return chainFromChainId as BlockchainIncludingTestnet;\n}\n"]}
|
|
@@ -1 +1,135 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import {
|
|
2
|
+
handleSendTransaction
|
|
3
|
+
} from "../../../../chunk-HYGCZCR2.js";
|
|
4
|
+
import {
|
|
5
|
+
DynamicContextProviderWrapper
|
|
6
|
+
} from "../../../../chunk-RZT2J42J.js";
|
|
7
|
+
import {
|
|
8
|
+
__async,
|
|
9
|
+
__spreadValues
|
|
10
|
+
} from "../../../../chunk-CRTRMMJ7.js";
|
|
11
|
+
|
|
12
|
+
// src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx
|
|
13
|
+
import {
|
|
14
|
+
chainIdToBlockchain
|
|
15
|
+
} from "@crossmint/common-sdk-base";
|
|
16
|
+
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
|
|
17
|
+
import { useDynamicContext } from "@dynamic-labs/sdk-react-core";
|
|
18
|
+
import { SolanaWalletConnectors } from "@dynamic-labs/solana";
|
|
19
|
+
import { useEffect } from "react";
|
|
20
|
+
import { jsx } from "react/jsx-runtime";
|
|
21
|
+
function CryptoWalletConnectionHandler(props) {
|
|
22
|
+
const { iframeClient, apiKeyEnvironment } = props;
|
|
23
|
+
return /* @__PURE__ */ jsx(
|
|
24
|
+
DynamicContextProviderWrapper,
|
|
25
|
+
{
|
|
26
|
+
apiKeyEnvironment,
|
|
27
|
+
settings: {
|
|
28
|
+
walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],
|
|
29
|
+
events: {
|
|
30
|
+
onAuthFlowCancel() {
|
|
31
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowCancel");
|
|
32
|
+
iframeClient == null ? void 0 : iframeClient.send("crypto:connect-wallet.failed", {
|
|
33
|
+
error: "cancelled"
|
|
34
|
+
});
|
|
35
|
+
},
|
|
36
|
+
onAuthFlowClose() {
|
|
37
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowClose");
|
|
38
|
+
},
|
|
39
|
+
onAuthFailure(data, reason) {
|
|
40
|
+
console.error("[CryptoWalletConnectionHandler] onAuthFailure", data, reason);
|
|
41
|
+
},
|
|
42
|
+
onAuthSuccess(data) {
|
|
43
|
+
console.log("[CryptoWalletConnectionHandler] onAuthSuccess", data);
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
handlers: {
|
|
47
|
+
handleConnectedWallet: (wallet) => __async(this, null, function* () {
|
|
48
|
+
var _a;
|
|
49
|
+
console.log("[CryptoWalletConnectionHandler] handleConnectedWallet", wallet);
|
|
50
|
+
const address = wallet.address;
|
|
51
|
+
if (!address) {
|
|
52
|
+
console.error("[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing");
|
|
53
|
+
iframeClient == null ? void 0 : iframeClient.send("crypto:connect-wallet.failed", {
|
|
54
|
+
error: "address is missing"
|
|
55
|
+
});
|
|
56
|
+
return false;
|
|
57
|
+
}
|
|
58
|
+
const chain = yield dynamicChainToCrossmintChain(wallet);
|
|
59
|
+
iframeClient == null ? void 0 : iframeClient.send("crypto:connect-wallet.success", {
|
|
60
|
+
address,
|
|
61
|
+
chain,
|
|
62
|
+
walletProviderKey: (_a = wallet.connector) == null ? void 0 : _a.key
|
|
63
|
+
});
|
|
64
|
+
return true;
|
|
65
|
+
})
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
children: /* @__PURE__ */ jsx(_CryptoWalletConnectionHandler, __spreadValues({}, props))
|
|
69
|
+
}
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
function _CryptoWalletConnectionHandler({ iframeClient }) {
|
|
73
|
+
const { setShowAuthFlow, primaryWallet, handleLogOut } = useDynamicContext();
|
|
74
|
+
useEffect(() => {
|
|
75
|
+
if (iframeClient == null) {
|
|
76
|
+
return;
|
|
77
|
+
}
|
|
78
|
+
const showAuthFlowListener = iframeClient.on("crypto:connect-wallet.show", (_0) => __async(this, [_0], function* ({ show }) {
|
|
79
|
+
yield handleLogOut();
|
|
80
|
+
setShowAuthFlow(show);
|
|
81
|
+
}));
|
|
82
|
+
return () => {
|
|
83
|
+
iframeClient.off(showAuthFlowListener);
|
|
84
|
+
};
|
|
85
|
+
}, [iframeClient, handleLogOut, setShowAuthFlow]);
|
|
86
|
+
useEffect(() => {
|
|
87
|
+
if (iframeClient == null) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
const signTransactionListener = iframeClient.on(
|
|
91
|
+
"crypto:send-transaction",
|
|
92
|
+
(_0) => __async(this, [_0], function* ({ chain, serializedTransaction }) {
|
|
93
|
+
if (primaryWallet == null) {
|
|
94
|
+
console.error("[CryptoWalletConnectionHandler] signTransaction: primaryWallet is missing");
|
|
95
|
+
iframeClient.send("crypto:send-transaction:failed", {
|
|
96
|
+
error: "primaryWallet is missing"
|
|
97
|
+
});
|
|
98
|
+
return;
|
|
99
|
+
}
|
|
100
|
+
yield handleSendTransaction(
|
|
101
|
+
primaryWallet,
|
|
102
|
+
chain,
|
|
103
|
+
serializedTransaction,
|
|
104
|
+
iframeClient
|
|
105
|
+
);
|
|
106
|
+
})
|
|
107
|
+
);
|
|
108
|
+
return () => {
|
|
109
|
+
iframeClient.off(signTransactionListener);
|
|
110
|
+
};
|
|
111
|
+
}, [iframeClient, primaryWallet]);
|
|
112
|
+
return null;
|
|
113
|
+
}
|
|
114
|
+
function dynamicChainToCrossmintChain(wallet) {
|
|
115
|
+
return __async(this, null, function* () {
|
|
116
|
+
var _a;
|
|
117
|
+
const chain = wallet.chain;
|
|
118
|
+
if (chain === "SOL") {
|
|
119
|
+
return "solana";
|
|
120
|
+
}
|
|
121
|
+
const chainId = yield (_a = wallet.connector) == null ? void 0 : _a.getNetwork();
|
|
122
|
+
if (typeof chainId !== "number") {
|
|
123
|
+
throw new Error("chainId is not a number");
|
|
124
|
+
}
|
|
125
|
+
const chainFromChainId = chainIdToBlockchain(chainId);
|
|
126
|
+
if (!chainFromChainId) {
|
|
127
|
+
throw new Error(`ChainId ${chainId} is not supported`);
|
|
128
|
+
}
|
|
129
|
+
return chainFromChainId;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
export {
|
|
133
|
+
CryptoWalletConnectionHandler
|
|
134
|
+
};
|
|
135
|
+
//# sourceMappingURL=CryptoWalletConnectionHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx"],"sourcesContent":["import DynamicContextProviderWrapper from \"@/components/dynamic-xyz/DynamicContextProviderWrapper\";\nimport type { EmbeddedCheckoutV3IFrameEmitter } from \"@crossmint/client-sdk-base\";\nimport {\n type APIKeyEnvironmentPrefix,\n type BlockchainIncludingTestnet,\n chainIdToBlockchain,\n} from \"@crossmint/common-sdk-base\";\nimport { EthereumWalletConnectors } from \"@dynamic-labs/ethereum\";\nimport { type HandleConnectedWallet, useDynamicContext } from \"@dynamic-labs/sdk-react-core\";\nimport { SolanaWalletConnectors } from \"@dynamic-labs/solana\";\nimport { useEffect } from \"react\";\nimport { handleSendTransaction } from \"./utils/handleSendTransaction\";\n\nexport function CryptoWalletConnectionHandler(props: {\n iframeClient: EmbeddedCheckoutV3IFrameEmitter | null;\n apiKeyEnvironment: APIKeyEnvironmentPrefix;\n}) {\n const { iframeClient, apiKeyEnvironment } = props;\n\n return (\n <DynamicContextProviderWrapper\n apiKeyEnvironment={apiKeyEnvironment}\n settings={{\n walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],\n events: {\n onAuthFlowCancel() {\n console.log(\"[CryptoWalletConnectionHandler] onAuthFlowCancel\");\n iframeClient?.send(\"crypto:connect-wallet.failed\", {\n error: \"cancelled\",\n });\n },\n onAuthFlowClose() {\n console.log(\"[CryptoWalletConnectionHandler] onAuthFlowClose\");\n },\n onAuthFailure(data, reason) {\n console.error(\"[CryptoWalletConnectionHandler] onAuthFailure\", data, reason);\n },\n onAuthSuccess(data) {\n console.log(\"[CryptoWalletConnectionHandler] onAuthSuccess\", data);\n },\n },\n handlers: {\n handleConnectedWallet: async (wallet) => {\n console.log(\"[CryptoWalletConnectionHandler] handleConnectedWallet\", wallet);\n\n const address = wallet.address;\n if (!address) {\n console.error(\"[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing\");\n iframeClient?.send(\"crypto:connect-wallet.failed\", {\n error: \"address is missing\",\n });\n return false;\n }\n\n const chain = await dynamicChainToCrossmintChain(wallet);\n\n iframeClient?.send(\"crypto:connect-wallet.success\", {\n address,\n chain,\n walletProviderKey: wallet.connector?.key,\n });\n\n return true;\n },\n },\n }}\n >\n <_CryptoWalletConnectionHandler {...props} />\n </DynamicContextProviderWrapper>\n );\n}\n\nfunction _CryptoWalletConnectionHandler({ iframeClient }: Parameters<typeof CryptoWalletConnectionHandler>[0]) {\n const { setShowAuthFlow, primaryWallet, handleLogOut } = useDynamicContext();\n\n useEffect(() => {\n if (iframeClient == null) {\n return;\n }\n const showAuthFlowListener = iframeClient.on(\"crypto:connect-wallet.show\", async ({ show }) => {\n await handleLogOut();\n setShowAuthFlow(show);\n });\n\n return () => {\n iframeClient.off(showAuthFlowListener);\n };\n }, [iframeClient, handleLogOut, setShowAuthFlow]);\n\n useEffect(() => {\n if (iframeClient == null) {\n return;\n }\n const signTransactionListener = iframeClient.on(\n \"crypto:send-transaction\",\n async ({ chain, serializedTransaction }) => {\n if (primaryWallet == null) {\n console.error(\"[CryptoWalletConnectionHandler] signTransaction: primaryWallet is missing\");\n iframeClient.send(\"crypto:send-transaction:failed\", {\n error: \"primaryWallet is missing\",\n });\n return;\n }\n\n await handleSendTransaction(\n primaryWallet,\n chain as BlockchainIncludingTestnet,\n serializedTransaction,\n iframeClient\n );\n }\n );\n\n return () => {\n iframeClient.off(signTransactionListener);\n };\n }, [iframeClient, primaryWallet]);\n\n return null;\n}\n\nasync function dynamicChainToCrossmintChain(\n wallet: Parameters<HandleConnectedWallet>[0]\n): Promise<BlockchainIncludingTestnet> {\n const chain = wallet.chain;\n if (chain === \"SOL\") {\n return \"solana\";\n }\n const chainId = await wallet.connector?.getNetwork();\n if (typeof chainId !== \"number\") {\n throw new Error(\"chainId is not a number\");\n }\n const chainFromChainId = chainIdToBlockchain(chainId);\n if (!chainFromChainId) {\n throw new Error(`ChainId ${chainId} is not supported`);\n }\n return chainFromChainId as BlockchainIncludingTestnet;\n}\n"],"mappings":"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","names":[]}
|