@crossmint/client-sdk-react-ui 1.15.3 → 1.16.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 (160) hide show
  1. package/dist/{chunk-POMSMF4H.cjs → chunk-2O3RW5UM.cjs} +1 -1
  2. package/dist/{chunk-WMDN55HV.js → chunk-2ZIM34DD.js} +1 -1
  3. package/dist/chunk-5UD5UP6V.js +6 -0
  4. package/dist/{chunk-AY74MJ22.js → chunk-66G7PMPB.js} +1 -1
  5. package/dist/{chunk-ZUIYDHMO.js → chunk-AMHBLNQ5.js} +1 -1
  6. package/dist/chunk-BFHQZOV3.js +1 -0
  7. package/dist/chunk-BQ7TYNXY.cjs +6 -0
  8. package/dist/{chunk-FBVK5EJU.js → chunk-CEAGCEOP.js} +1 -1
  9. package/dist/{chunk-KDO6EARN.js → chunk-DCEOHYT3.js} +1 -1
  10. package/dist/{chunk-GBFVGLIF.cjs → chunk-DMKP6OCN.cjs} +1 -1
  11. package/dist/{chunk-6FS7UPZR.cjs → chunk-DQD3L5EO.cjs} +1 -1
  12. package/dist/{chunk-RMKZPMG4.js → chunk-DTDUYE6I.js} +1 -1
  13. package/dist/{chunk-K234KSKD.js → chunk-EGCUDGRN.js} +1 -1
  14. package/dist/chunk-FASRTACD.cjs +1 -0
  15. package/dist/{chunk-MLWP3AIU.cjs → chunk-H7UEH2Z3.cjs} +1 -1
  16. package/dist/{chunk-MA6EIA6R.cjs → chunk-HYWV45DD.cjs} +1 -1
  17. package/dist/{chunk-RHDO47ZJ.js → chunk-JTS4ZMUI.js} +1 -1
  18. package/dist/{chunk-KAE54Z2V.js → chunk-K2RIX5SW.js} +1 -1
  19. package/dist/{chunk-K7J6AFXX.cjs → chunk-KP4BELIY.cjs} +1 -1
  20. package/dist/chunk-KUS5WCV7.js +1 -0
  21. package/dist/{chunk-5PWWZ6G2.js → chunk-MMW7DYOT.js} +1 -1
  22. package/dist/{chunk-RAE6YQXJ.cjs → chunk-NAJHXPGR.cjs} +1 -1
  23. package/dist/{chunk-O5MOGOZ7.cjs → chunk-PTFGPW7K.cjs} +1 -1
  24. package/dist/{chunk-S5JQWCJF.cjs → chunk-RMGQ6A6A.cjs} +1 -1
  25. package/dist/{chunk-SVL5ZY2A.js → chunk-RWKPB47N.js} +1 -1
  26. package/dist/{chunk-OHB3Q4GB.cjs → chunk-TMVAJY2S.cjs} +1 -1
  27. package/dist/{chunk-CHUW22SL.js → chunk-UG3RCR3Y.js} +1 -1
  28. package/dist/{chunk-3UKEW6E7.js → chunk-VPXVAZ67.js} +1 -1
  29. package/dist/{chunk-4C7JXNIA.cjs → chunk-WLXUOO7V.cjs} +1 -1
  30. package/dist/{chunk-RINPTJXB.cjs → chunk-Y2NIOWGT.cjs} +1 -1
  31. package/dist/{chunk-GIR2JCNB.cjs → chunk-YXDRYHCD.cjs} +1 -1
  32. package/dist/{chunk-UY3BBSYQ.cjs → chunk-ZYAD5USE.cjs} +1 -1
  33. package/dist/components/CrossmintNFTCollectionView.cjs +1 -1
  34. package/dist/components/CrossmintNFTCollectionView.js +1 -1
  35. package/dist/components/CrossmintNFTDetail.cjs +1 -1
  36. package/dist/components/CrossmintNFTDetail.js +1 -1
  37. package/dist/components/auth/AuthForm.cjs +1 -1
  38. package/dist/components/auth/AuthForm.js +1 -1
  39. package/dist/components/auth/AuthFormBackButton.cjs +1 -1
  40. package/dist/components/auth/AuthFormBackButton.js +1 -1
  41. package/dist/components/auth/AuthFormDialog.cjs +1 -1
  42. package/dist/components/auth/AuthFormDialog.js +1 -1
  43. package/dist/components/auth/EmbeddedAuthForm.cjs +1 -1
  44. package/dist/components/auth/EmbeddedAuthForm.js +1 -1
  45. package/dist/components/auth/methods/email/EmailAuthFlow.cjs +1 -1
  46. package/dist/components/auth/methods/email/EmailAuthFlow.js +1 -1
  47. package/dist/components/auth/methods/email/EmailOTPInput.cjs +1 -1
  48. package/dist/components/auth/methods/email/EmailOTPInput.js +1 -1
  49. package/dist/components/auth/methods/email/EmailSignIn.cjs +1 -1
  50. package/dist/components/auth/methods/email/EmailSignIn.js +1 -1
  51. package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +1 -1
  52. package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +1 -1
  53. package/dist/components/auth/methods/google/ContinueWithGoogle.cjs +1 -1
  54. package/dist/components/auth/methods/google/ContinueWithGoogle.js +1 -1
  55. package/dist/components/auth/methods/google/GoogleSignIn.cjs +1 -1
  56. package/dist/components/auth/methods/google/GoogleSignIn.js +1 -1
  57. package/dist/components/auth/methods/twitter/TwitterSignIn.cjs +1 -1
  58. package/dist/components/auth/methods/twitter/TwitterSignIn.js +1 -1
  59. package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +1 -1
  60. package/dist/components/auth/methods/web3/Web3AuthFlow.js +1 -1
  61. package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +1 -1
  62. package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +1 -1
  63. package/dist/components/auth/methods/web3/Web3Connectors.cjs +1 -1
  64. package/dist/components/auth/methods/web3/Web3Connectors.js +1 -1
  65. package/dist/components/common/Divider.cjs +1 -1
  66. package/dist/components/common/Divider.js +1 -1
  67. package/dist/components/embed/index.cjs +1 -1
  68. package/dist/components/embed/index.js +1 -1
  69. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +1 -1
  70. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
  71. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +1 -1
  72. package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +1 -1
  73. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +1 -1
  74. package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +1 -1
  75. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.cjs +1 -1
  76. package/dist/components/embed/v3/crypto/utils/handleSendTransaction.js +1 -1
  77. package/dist/components/embed/v3/index.cjs +1 -1
  78. package/dist/components/embed/v3/index.js +1 -1
  79. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.cjs +1 -1
  80. package/dist/components/hosted/CrossmintPayButton_DEPRECATED.js +1 -1
  81. package/dist/components/hosted/index.cjs +1 -1
  82. package/dist/components/hosted/index.js +1 -1
  83. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.cjs +1 -1
  84. package/dist/components/hosted/v3/CrossmintHostedCheckoutV3.js +1 -1
  85. package/dist/components/hosted/v3/index.cjs +1 -1
  86. package/dist/components/hosted/v3/index.js +1 -1
  87. package/dist/components/index.cjs +1 -1
  88. package/dist/components/index.js +1 -1
  89. package/dist/consts/version.cjs +1 -1
  90. package/dist/consts/version.js +1 -1
  91. package/dist/hooks/index.cjs +1 -1
  92. package/dist/hooks/index.d.cts +6 -6
  93. package/dist/hooks/index.d.ts +6 -6
  94. package/dist/hooks/index.js +1 -1
  95. package/dist/hooks/useAuth.cjs +1 -1
  96. package/dist/hooks/useAuth.d.cts +13 -8
  97. package/dist/hooks/useAuth.d.ts +13 -8
  98. package/dist/hooks/useAuth.js +1 -1
  99. package/dist/hooks/useCrossmintAuth.cjs +1 -1
  100. package/dist/hooks/useCrossmintAuth.d.cts +13 -8
  101. package/dist/hooks/useCrossmintAuth.d.ts +13 -8
  102. package/dist/hooks/useCrossmintAuth.js +1 -1
  103. package/dist/hooks/useCrossmintCheckout.cjs +1 -1
  104. package/dist/hooks/useCrossmintCheckout.js +1 -1
  105. package/dist/hooks/useOAuthWindowListener.cjs +1 -1
  106. package/dist/hooks/useOAuthWindowListener.js +1 -1
  107. package/dist/hooks/useWallet.cjs +1 -1
  108. package/dist/hooks/useWallet.d.cts +53 -13
  109. package/dist/hooks/useWallet.d.ts +53 -13
  110. package/dist/hooks/useWallet.js +1 -1
  111. package/dist/index.cjs +1 -1
  112. package/dist/index.d.cts +8 -6
  113. package/dist/index.d.ts +8 -6
  114. package/dist/index.js +1 -1
  115. package/dist/providers/CrossmintAuthProvider.cjs +1 -1
  116. package/dist/providers/CrossmintAuthProvider.d.cts +7 -13
  117. package/dist/providers/CrossmintAuthProvider.d.ts +7 -13
  118. package/dist/providers/CrossmintAuthProvider.js +1 -1
  119. package/dist/providers/CrossmintWalletProvider.cjs +1 -1
  120. package/dist/providers/CrossmintWalletProvider.d.cts +32 -15
  121. package/dist/providers/CrossmintWalletProvider.d.ts +32 -15
  122. package/dist/providers/CrossmintWalletProvider.js +1 -1
  123. package/dist/providers/auth/AuthFormProvider.cjs +1 -1
  124. package/dist/providers/auth/AuthFormProvider.d.cts +4 -4
  125. package/dist/providers/auth/AuthFormProvider.d.ts +4 -4
  126. package/dist/providers/auth/AuthFormProvider.js +1 -1
  127. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs +1 -1
  128. package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js +1 -1
  129. package/dist/providers/index.cjs +1 -1
  130. package/dist/providers/index.d.cts +7 -3
  131. package/dist/providers/index.d.ts +7 -3
  132. package/dist/providers/index.js +1 -1
  133. package/dist/types/auth.d.cts +3 -1
  134. package/dist/types/auth.d.ts +3 -1
  135. package/dist/types/passkey.cjs +1 -0
  136. package/dist/types/passkey.d.cts +8 -0
  137. package/dist/types/passkey.d.ts +8 -0
  138. package/dist/types/passkey.js +0 -0
  139. package/dist/types/wallet.cjs +1 -0
  140. package/dist/types/wallet.d.cts +34 -0
  141. package/dist/types/wallet.d.ts +34 -0
  142. package/dist/types/wallet.js +0 -0
  143. package/dist/utils/createCrossmintApiClient.cjs +1 -1
  144. package/dist/utils/createCrossmintApiClient.js +1 -1
  145. package/dist/utils/createPasskeySigner.cjs +1 -0
  146. package/dist/utils/createPasskeySigner.d.cts +6 -0
  147. package/dist/utils/createPasskeySigner.d.ts +6 -0
  148. package/dist/utils/createPasskeySigner.js +1 -0
  149. package/package.json +5 -5
  150. package/dist/chunk-52IEZFDH.js +0 -1
  151. package/dist/chunk-7G3VO3NN.js +0 -1
  152. package/dist/chunk-DF2BOO4Y.js +0 -6
  153. package/dist/chunk-OLFE6RRH.cjs +0 -6
  154. package/dist/chunk-WCDR3KSE.cjs +0 -1
  155. package/dist/hooks/useWalletCache.cjs +0 -1
  156. package/dist/hooks/useWalletCache.d.cts +0 -12
  157. package/dist/hooks/useWalletCache.d.ts +0 -12
  158. package/dist/hooks/useWalletCache.js +0 -1
  159. /package/dist/{chunk-KW64DYKQ.js → chunk-Q7J4KIEO.js} +0 -0
  160. /package/dist/{chunk-AX4G34FE.cjs → chunk-QN5Y5AHL.cjs} +0 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOLFE6RRHcjs = require('../chunk-OLFE6RRH.cjs');require('../chunk-BR77Q3PK.cjs');require('../chunk-Z2FGFHRQ.cjs');require('../chunk-62JYTT2Y.cjs');require('../chunk-2BOQSASO.cjs');require('../chunk-HLGNSXEQ.cjs');require('../chunk-FSG3MT7C.cjs');require('../chunk-HG5ML6KX.cjs');require('../chunk-E5PPNNTL.cjs');require('../chunk-WABJHG6B.cjs');require('../chunk-E65EGG73.cjs');require('../chunk-TM7WDKYR.cjs');require('../chunk-VI6TW7JT.cjs');require('../chunk-VWBAHXIO.cjs');require('../chunk-FQ246XXN.cjs');require('../chunk-ZBQCXWMD.cjs');require('../chunk-WCDR3KSE.cjs');require('../chunk-NRN4WNQL.cjs');require('../chunk-I4GMMHQR.cjs');require('../chunk-SRQAQHYK.cjs');require('../chunk-QYQERFYL.cjs');require('../chunk-MLWP3AIU.cjs');require('../chunk-MA6EIA6R.cjs');require('../chunk-GPQZG7HC.cjs');require('../chunk-BMLVCKVF.cjs');require('../chunk-RAE6YQXJ.cjs');require('../chunk-2WSEHVNP.cjs');exports.CrossmintWalletProvider = _chunkOLFE6RRHcjs.b; exports.WalletContext = _chunkOLFE6RRHcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBQ7TYNXYcjs = require('../chunk-BQ7TYNXY.cjs');require('../chunk-BR77Q3PK.cjs');require('../chunk-HG5ML6KX.cjs');require('../chunk-Z2FGFHRQ.cjs');require('../chunk-FASRTACD.cjs');require('../chunk-62JYTT2Y.cjs');require('../chunk-2BOQSASO.cjs');require('../chunk-HLGNSXEQ.cjs');require('../chunk-FSG3MT7C.cjs');require('../chunk-E5PPNNTL.cjs');require('../chunk-WABJHG6B.cjs');require('../chunk-TM7WDKYR.cjs');require('../chunk-VI6TW7JT.cjs');require('../chunk-VWBAHXIO.cjs');require('../chunk-FQ246XXN.cjs');require('../chunk-ZBQCXWMD.cjs');require('../chunk-NRN4WNQL.cjs');require('../chunk-I4GMMHQR.cjs');require('../chunk-SRQAQHYK.cjs');require('../chunk-QYQERFYL.cjs');require('../chunk-E65EGG73.cjs');require('../chunk-H7UEH2Z3.cjs');require('../chunk-HYWV45DD.cjs');require('../chunk-GPQZG7HC.cjs');require('../chunk-BMLVCKVF.cjs');require('../chunk-NAJHXPGR.cjs');require('../chunk-2WSEHVNP.cjs');exports.CrossmintWalletProvider = _chunkBQ7TYNXYcjs.b; exports.WalletContext = _chunkBQ7TYNXYcjs.a;
@@ -1,31 +1,48 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { EVMSmartWallet, PasskeySigner, SmartWalletError, WalletParams, EVMSmartWalletChain } from '@crossmint/client-sdk-smart-wallet';
4
+ import { EVMSmartWallet, SolanaSmartWallet } from '@crossmint/wallets-sdk';
5
5
  import { UIConfig } from '@crossmint/common-sdk-base';
6
+ import { PasskeySigner } from '../types/passkey.cjs';
7
+ import { GetOrCreateWalletProps } from '../types/wallet.cjs';
8
+ import 'ox';
6
9
 
7
- type WalletStatus = "not-loaded" | "in-progress" | "loaded" | "loading-error";
8
- type WalletContext = {
9
- status: WalletStatus;
10
- wallet?: EVMSmartWallet;
11
- passkeySigner?: PasskeySigner;
12
- error?: SmartWalletError;
13
- getOrCreateWallet: (config?: Pick<WalletConfig, "signer" | "type">) => Promise<{
10
+ type ValidPasskeyPromptType = "create-wallet" | "transaction" | "not-supported" | "create-wallet-error" | "transaction-error";
11
+ type WalletContextFunctions = {
12
+ getOrCreateWallet: (args: GetOrCreateWalletProps) => Promise<{
14
13
  startedCreation: boolean;
15
14
  reason?: string;
16
15
  }>;
17
- createPasskeySigner: (name: string) => Promise<PasskeySigner | null>;
16
+ createPasskeySigner: (name: string, promptType?: ValidPasskeyPromptType) => Promise<PasskeySigner | null>;
18
17
  clearWallet: () => void;
18
+ passkeySigner?: PasskeySigner;
19
19
  };
20
- declare const WalletContext: React.Context<WalletContext>;
21
- type WalletConfig = WalletParams & {
22
- type: "evm-smart-wallet";
20
+ type WalletType = {
21
+ "evm-smart-wallet": EVMSmartWallet;
22
+ "solana-smart-wallet": SolanaSmartWallet;
23
23
  };
24
- declare function CrossmintWalletProvider({ children, defaultChain, showPasskeyHelpers, appearance, }: {
24
+ type LoadedWalletState<T extends keyof WalletType> = {
25
+ status: "loaded";
26
+ wallet: WalletType[T];
27
+ type: T;
28
+ error?: undefined;
29
+ };
30
+ type WalletContext = ({
31
+ status: "not-loaded" | "in-progress";
32
+ wallet?: undefined;
33
+ type?: undefined;
34
+ error?: undefined;
35
+ } & WalletContextFunctions) | ({
36
+ status: "loading-error";
37
+ wallet?: undefined;
38
+ type?: undefined;
39
+ error: string;
40
+ } & WalletContextFunctions) | (LoadedWalletState<"evm-smart-wallet"> & WalletContextFunctions) | (LoadedWalletState<"solana-smart-wallet"> & WalletContextFunctions);
41
+ declare const WalletContext: React.Context<WalletContext>;
42
+ declare function CrossmintWalletProvider({ children, showPasskeyHelpers, appearance, }: {
25
43
  children: ReactNode;
26
- defaultChain: EVMSmartWalletChain;
27
44
  showPasskeyHelpers?: boolean;
28
45
  appearance?: UIConfig;
29
46
  }): react_jsx_runtime.JSX.Element;
30
47
 
31
- export { CrossmintWalletProvider, type WalletConfig, WalletContext };
48
+ export { CrossmintWalletProvider, WalletContext };
@@ -1,31 +1,48 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { ReactNode } from 'react';
4
- import { EVMSmartWallet, PasskeySigner, SmartWalletError, WalletParams, EVMSmartWalletChain } from '@crossmint/client-sdk-smart-wallet';
4
+ import { EVMSmartWallet, SolanaSmartWallet } from '@crossmint/wallets-sdk';
5
5
  import { UIConfig } from '@crossmint/common-sdk-base';
6
+ import { PasskeySigner } from '../types/passkey.js';
7
+ import { GetOrCreateWalletProps } from '../types/wallet.js';
8
+ import 'ox';
6
9
 
7
- type WalletStatus = "not-loaded" | "in-progress" | "loaded" | "loading-error";
8
- type WalletContext = {
9
- status: WalletStatus;
10
- wallet?: EVMSmartWallet;
11
- passkeySigner?: PasskeySigner;
12
- error?: SmartWalletError;
13
- getOrCreateWallet: (config?: Pick<WalletConfig, "signer" | "type">) => Promise<{
10
+ type ValidPasskeyPromptType = "create-wallet" | "transaction" | "not-supported" | "create-wallet-error" | "transaction-error";
11
+ type WalletContextFunctions = {
12
+ getOrCreateWallet: (args: GetOrCreateWalletProps) => Promise<{
14
13
  startedCreation: boolean;
15
14
  reason?: string;
16
15
  }>;
17
- createPasskeySigner: (name: string) => Promise<PasskeySigner | null>;
16
+ createPasskeySigner: (name: string, promptType?: ValidPasskeyPromptType) => Promise<PasskeySigner | null>;
18
17
  clearWallet: () => void;
18
+ passkeySigner?: PasskeySigner;
19
19
  };
20
- declare const WalletContext: React.Context<WalletContext>;
21
- type WalletConfig = WalletParams & {
22
- type: "evm-smart-wallet";
20
+ type WalletType = {
21
+ "evm-smart-wallet": EVMSmartWallet;
22
+ "solana-smart-wallet": SolanaSmartWallet;
23
23
  };
24
- declare function CrossmintWalletProvider({ children, defaultChain, showPasskeyHelpers, appearance, }: {
24
+ type LoadedWalletState<T extends keyof WalletType> = {
25
+ status: "loaded";
26
+ wallet: WalletType[T];
27
+ type: T;
28
+ error?: undefined;
29
+ };
30
+ type WalletContext = ({
31
+ status: "not-loaded" | "in-progress";
32
+ wallet?: undefined;
33
+ type?: undefined;
34
+ error?: undefined;
35
+ } & WalletContextFunctions) | ({
36
+ status: "loading-error";
37
+ wallet?: undefined;
38
+ type?: undefined;
39
+ error: string;
40
+ } & WalletContextFunctions) | (LoadedWalletState<"evm-smart-wallet"> & WalletContextFunctions) | (LoadedWalletState<"solana-smart-wallet"> & WalletContextFunctions);
41
+ declare const WalletContext: React.Context<WalletContext>;
42
+ declare function CrossmintWalletProvider({ children, showPasskeyHelpers, appearance, }: {
25
43
  children: ReactNode;
26
- defaultChain: EVMSmartWalletChain;
27
44
  showPasskeyHelpers?: boolean;
28
45
  appearance?: UIConfig;
29
46
  }): react_jsx_runtime.JSX.Element;
30
47
 
31
- export { CrossmintWalletProvider, type WalletConfig, WalletContext };
48
+ export { CrossmintWalletProvider, WalletContext };
@@ -1 +1 @@
1
- import{a,b}from"../chunk-DF2BOO4Y.js";import"../chunk-JSNUJJQJ.js";import"../chunk-TNCETEEL.js";import"../chunk-VRC3MYU6.js";import"../chunk-2VBA64WU.js";import"../chunk-EMXNIC4M.js";import"../chunk-NQ2WKZU6.js";import"../chunk-VHNBXIOC.js";import"../chunk-QRX6P4MW.js";import"../chunk-NBJIJZGO.js";import"../chunk-WW6GUXHG.js";import"../chunk-SFDQPSSP.js";import"../chunk-77PBG2JJ.js";import"../chunk-EVADF7QA.js";import"../chunk-H34D6PAN.js";import"../chunk-JPJKOERH.js";import"../chunk-7G3VO3NN.js";import"../chunk-UAFW3OWA.js";import"../chunk-C3JRTLQP.js";import"../chunk-E4TBJMOO.js";import"../chunk-OOLXYAO7.js";import"../chunk-ZUIYDHMO.js";import"../chunk-5PWWZ6G2.js";import"../chunk-ROJ6HFVK.js";import"../chunk-6LMKMBUO.js";import"../chunk-52IEZFDH.js";import"../chunk-PXDN3KFO.js";export{b as CrossmintWalletProvider,a as WalletContext};
1
+ import{a,b}from"../chunk-5UD5UP6V.js";import"../chunk-JSNUJJQJ.js";import"../chunk-VHNBXIOC.js";import"../chunk-TNCETEEL.js";import"../chunk-BFHQZOV3.js";import"../chunk-VRC3MYU6.js";import"../chunk-2VBA64WU.js";import"../chunk-EMXNIC4M.js";import"../chunk-NQ2WKZU6.js";import"../chunk-QRX6P4MW.js";import"../chunk-NBJIJZGO.js";import"../chunk-SFDQPSSP.js";import"../chunk-77PBG2JJ.js";import"../chunk-EVADF7QA.js";import"../chunk-H34D6PAN.js";import"../chunk-JPJKOERH.js";import"../chunk-UAFW3OWA.js";import"../chunk-C3JRTLQP.js";import"../chunk-E4TBJMOO.js";import"../chunk-OOLXYAO7.js";import"../chunk-WW6GUXHG.js";import"../chunk-AMHBLNQ5.js";import"../chunk-MMW7DYOT.js";import"../chunk-ROJ6HFVK.js";import"../chunk-6LMKMBUO.js";import"../chunk-KUS5WCV7.js";import"../chunk-PXDN3KFO.js";export{b as CrossmintWalletProvider,a as WalletContext};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOLFE6RRHcjs = require('../../chunk-OLFE6RRH.cjs');require('../../chunk-BR77Q3PK.cjs');require('../../chunk-Z2FGFHRQ.cjs');require('../../chunk-62JYTT2Y.cjs');require('../../chunk-2BOQSASO.cjs');require('../../chunk-HLGNSXEQ.cjs');require('../../chunk-FSG3MT7C.cjs');require('../../chunk-HG5ML6KX.cjs');require('../../chunk-E5PPNNTL.cjs');require('../../chunk-WABJHG6B.cjs');require('../../chunk-E65EGG73.cjs');require('../../chunk-TM7WDKYR.cjs');require('../../chunk-VI6TW7JT.cjs');require('../../chunk-VWBAHXIO.cjs');require('../../chunk-FQ246XXN.cjs');require('../../chunk-ZBQCXWMD.cjs');require('../../chunk-WCDR3KSE.cjs');require('../../chunk-NRN4WNQL.cjs');require('../../chunk-I4GMMHQR.cjs');require('../../chunk-SRQAQHYK.cjs');require('../../chunk-QYQERFYL.cjs');require('../../chunk-MLWP3AIU.cjs');require('../../chunk-MA6EIA6R.cjs');require('../../chunk-GPQZG7HC.cjs');require('../../chunk-BMLVCKVF.cjs');require('../../chunk-RAE6YQXJ.cjs');require('../../chunk-2WSEHVNP.cjs');exports.AuthFormProvider = _chunkOLFE6RRHcjs.f; exports.useAuthForm = _chunkOLFE6RRHcjs.e;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBQ7TYNXYcjs = require('../../chunk-BQ7TYNXY.cjs');require('../../chunk-BR77Q3PK.cjs');require('../../chunk-HG5ML6KX.cjs');require('../../chunk-Z2FGFHRQ.cjs');require('../../chunk-FASRTACD.cjs');require('../../chunk-62JYTT2Y.cjs');require('../../chunk-2BOQSASO.cjs');require('../../chunk-HLGNSXEQ.cjs');require('../../chunk-FSG3MT7C.cjs');require('../../chunk-E5PPNNTL.cjs');require('../../chunk-WABJHG6B.cjs');require('../../chunk-TM7WDKYR.cjs');require('../../chunk-VI6TW7JT.cjs');require('../../chunk-VWBAHXIO.cjs');require('../../chunk-FQ246XXN.cjs');require('../../chunk-ZBQCXWMD.cjs');require('../../chunk-NRN4WNQL.cjs');require('../../chunk-I4GMMHQR.cjs');require('../../chunk-SRQAQHYK.cjs');require('../../chunk-QYQERFYL.cjs');require('../../chunk-E65EGG73.cjs');require('../../chunk-H7UEH2Z3.cjs');require('../../chunk-HYWV45DD.cjs');require('../../chunk-GPQZG7HC.cjs');require('../../chunk-BMLVCKVF.cjs');require('../../chunk-NAJHXPGR.cjs');require('../../chunk-2WSEHVNP.cjs');exports.AuthFormProvider = _chunkBQ7TYNXYcjs.f; exports.useAuthForm = _chunkBQ7TYNXYcjs.e;
@@ -2,9 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
  import { OAuthProvider } from '@crossmint/common-sdk-auth';
4
4
  import { UIConfig } from '@crossmint/common-sdk-base';
5
- import { LoginMethod, CrossmintAuthWalletConfig } from '../CrossmintAuthProvider.cjs';
6
- import '@crossmint/client-sdk-auth';
7
- import '@crossmint/client-sdk-smart-wallet';
5
+ import { CrossmintAuthEmbeddedWallets } from '../../types/wallet.cjs';
6
+ import { LoginMethod } from '../../types/auth.cjs';
7
+ import '@crossmint/wallets-sdk';
8
8
 
9
9
  type AuthStep = "initial" | "otp" | "qrCode" | "web3" | "web3/metamask" | "web3/walletconnect";
10
10
  type OAuthUrlMap = Record<OAuthProvider, string>;
@@ -31,7 +31,7 @@ type ContextInitialStateProps = {
31
31
  defaultEmail?: string;
32
32
  baseUrl: string;
33
33
  setDialogOpen?: (open: boolean, successfulLogin?: boolean) => void;
34
- embeddedWallets: CrossmintAuthWalletConfig;
34
+ embeddedWallets: CrossmintAuthEmbeddedWallets;
35
35
  };
36
36
  type AuthFormProviderProps = {
37
37
  setDialogOpen?: (open: boolean, successfulLogin?: boolean) => void;
@@ -2,9 +2,9 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
3
  import { OAuthProvider } from '@crossmint/common-sdk-auth';
4
4
  import { UIConfig } from '@crossmint/common-sdk-base';
5
- import { LoginMethod, CrossmintAuthWalletConfig } from '../CrossmintAuthProvider.js';
6
- import '@crossmint/client-sdk-auth';
7
- import '@crossmint/client-sdk-smart-wallet';
5
+ import { CrossmintAuthEmbeddedWallets } from '../../types/wallet.js';
6
+ import { LoginMethod } from '../../types/auth.js';
7
+ import '@crossmint/wallets-sdk';
8
8
 
9
9
  type AuthStep = "initial" | "otp" | "qrCode" | "web3" | "web3/metamask" | "web3/walletconnect";
10
10
  type OAuthUrlMap = Record<OAuthProvider, string>;
@@ -31,7 +31,7 @@ type ContextInitialStateProps = {
31
31
  defaultEmail?: string;
32
32
  baseUrl: string;
33
33
  setDialogOpen?: (open: boolean, successfulLogin?: boolean) => void;
34
- embeddedWallets: CrossmintAuthWalletConfig;
34
+ embeddedWallets: CrossmintAuthEmbeddedWallets;
35
35
  };
36
36
  type AuthFormProviderProps = {
37
37
  setDialogOpen?: (open: boolean, successfulLogin?: boolean) => void;
@@ -1 +1 @@
1
- import{e as a,f as b}from"../../chunk-DF2BOO4Y.js";import"../../chunk-JSNUJJQJ.js";import"../../chunk-TNCETEEL.js";import"../../chunk-VRC3MYU6.js";import"../../chunk-2VBA64WU.js";import"../../chunk-EMXNIC4M.js";import"../../chunk-NQ2WKZU6.js";import"../../chunk-VHNBXIOC.js";import"../../chunk-QRX6P4MW.js";import"../../chunk-NBJIJZGO.js";import"../../chunk-WW6GUXHG.js";import"../../chunk-SFDQPSSP.js";import"../../chunk-77PBG2JJ.js";import"../../chunk-EVADF7QA.js";import"../../chunk-H34D6PAN.js";import"../../chunk-JPJKOERH.js";import"../../chunk-7G3VO3NN.js";import"../../chunk-UAFW3OWA.js";import"../../chunk-C3JRTLQP.js";import"../../chunk-E4TBJMOO.js";import"../../chunk-OOLXYAO7.js";import"../../chunk-ZUIYDHMO.js";import"../../chunk-5PWWZ6G2.js";import"../../chunk-ROJ6HFVK.js";import"../../chunk-6LMKMBUO.js";import"../../chunk-52IEZFDH.js";import"../../chunk-PXDN3KFO.js";export{b as AuthFormProvider,a as useAuthForm};
1
+ import{e as a,f as b}from"../../chunk-5UD5UP6V.js";import"../../chunk-JSNUJJQJ.js";import"../../chunk-VHNBXIOC.js";import"../../chunk-TNCETEEL.js";import"../../chunk-BFHQZOV3.js";import"../../chunk-VRC3MYU6.js";import"../../chunk-2VBA64WU.js";import"../../chunk-EMXNIC4M.js";import"../../chunk-NQ2WKZU6.js";import"../../chunk-QRX6P4MW.js";import"../../chunk-NBJIJZGO.js";import"../../chunk-SFDQPSSP.js";import"../../chunk-77PBG2JJ.js";import"../../chunk-EVADF7QA.js";import"../../chunk-H34D6PAN.js";import"../../chunk-JPJKOERH.js";import"../../chunk-UAFW3OWA.js";import"../../chunk-C3JRTLQP.js";import"../../chunk-E4TBJMOO.js";import"../../chunk-OOLXYAO7.js";import"../../chunk-WW6GUXHG.js";import"../../chunk-AMHBLNQ5.js";import"../../chunk-MMW7DYOT.js";import"../../chunk-ROJ6HFVK.js";import"../../chunk-6LMKMBUO.js";import"../../chunk-KUS5WCV7.js";import"../../chunk-PXDN3KFO.js";export{b as AuthFormProvider,a as useAuthForm};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO5MOGOZ7cjs = require('../../../chunk-O5MOGOZ7.cjs');require('../../../chunk-36BNPW66.cjs');require('../../../chunk-FON43I6G.cjs');require('../../../chunk-OLFE6RRH.cjs');require('../../../chunk-BR77Q3PK.cjs');require('../../../chunk-Z2FGFHRQ.cjs');require('../../../chunk-62JYTT2Y.cjs');require('../../../chunk-2BOQSASO.cjs');require('../../../chunk-HLGNSXEQ.cjs');require('../../../chunk-FSG3MT7C.cjs');require('../../../chunk-HG5ML6KX.cjs');require('../../../chunk-E5PPNNTL.cjs');require('../../../chunk-WABJHG6B.cjs');require('../../../chunk-E65EGG73.cjs');require('../../../chunk-TM7WDKYR.cjs');require('../../../chunk-VI6TW7JT.cjs');require('../../../chunk-VWBAHXIO.cjs');require('../../../chunk-FQ246XXN.cjs');require('../../../chunk-ZBQCXWMD.cjs');require('../../../chunk-WCDR3KSE.cjs');require('../../../chunk-NRN4WNQL.cjs');require('../../../chunk-I4GMMHQR.cjs');require('../../../chunk-SRQAQHYK.cjs');require('../../../chunk-QYQERFYL.cjs');require('../../../chunk-MLWP3AIU.cjs');require('../../../chunk-MA6EIA6R.cjs');require('../../../chunk-GPQZG7HC.cjs');require('../../../chunk-BMLVCKVF.cjs');require('../../../chunk-RAE6YQXJ.cjs');require('../../../chunk-2WSEHVNP.cjs');exports.DynamicWeb3WalletConnect = _chunkO5MOGOZ7cjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkPTFGPW7Kcjs = require('../../../chunk-PTFGPW7K.cjs');require('../../../chunk-36BNPW66.cjs');require('../../../chunk-FON43I6G.cjs');require('../../../chunk-BQ7TYNXY.cjs');require('../../../chunk-BR77Q3PK.cjs');require('../../../chunk-HG5ML6KX.cjs');require('../../../chunk-Z2FGFHRQ.cjs');require('../../../chunk-FASRTACD.cjs');require('../../../chunk-62JYTT2Y.cjs');require('../../../chunk-2BOQSASO.cjs');require('../../../chunk-HLGNSXEQ.cjs');require('../../../chunk-FSG3MT7C.cjs');require('../../../chunk-E5PPNNTL.cjs');require('../../../chunk-WABJHG6B.cjs');require('../../../chunk-TM7WDKYR.cjs');require('../../../chunk-VI6TW7JT.cjs');require('../../../chunk-VWBAHXIO.cjs');require('../../../chunk-FQ246XXN.cjs');require('../../../chunk-ZBQCXWMD.cjs');require('../../../chunk-NRN4WNQL.cjs');require('../../../chunk-I4GMMHQR.cjs');require('../../../chunk-SRQAQHYK.cjs');require('../../../chunk-QYQERFYL.cjs');require('../../../chunk-E65EGG73.cjs');require('../../../chunk-H7UEH2Z3.cjs');require('../../../chunk-HYWV45DD.cjs');require('../../../chunk-GPQZG7HC.cjs');require('../../../chunk-BMLVCKVF.cjs');require('../../../chunk-NAJHXPGR.cjs');require('../../../chunk-2WSEHVNP.cjs');exports.DynamicWeb3WalletConnect = _chunkPTFGPW7Kcjs.a;
@@ -1 +1 @@
1
- import{a}from"../../../chunk-RMKZPMG4.js";import"../../../chunk-3SJ74HLG.js";import"../../../chunk-XIVIIEY5.js";import"../../../chunk-DF2BOO4Y.js";import"../../../chunk-JSNUJJQJ.js";import"../../../chunk-TNCETEEL.js";import"../../../chunk-VRC3MYU6.js";import"../../../chunk-2VBA64WU.js";import"../../../chunk-EMXNIC4M.js";import"../../../chunk-NQ2WKZU6.js";import"../../../chunk-VHNBXIOC.js";import"../../../chunk-QRX6P4MW.js";import"../../../chunk-NBJIJZGO.js";import"../../../chunk-WW6GUXHG.js";import"../../../chunk-SFDQPSSP.js";import"../../../chunk-77PBG2JJ.js";import"../../../chunk-EVADF7QA.js";import"../../../chunk-H34D6PAN.js";import"../../../chunk-JPJKOERH.js";import"../../../chunk-7G3VO3NN.js";import"../../../chunk-UAFW3OWA.js";import"../../../chunk-C3JRTLQP.js";import"../../../chunk-E4TBJMOO.js";import"../../../chunk-OOLXYAO7.js";import"../../../chunk-ZUIYDHMO.js";import"../../../chunk-5PWWZ6G2.js";import"../../../chunk-ROJ6HFVK.js";import"../../../chunk-6LMKMBUO.js";import"../../../chunk-52IEZFDH.js";import"../../../chunk-PXDN3KFO.js";export{a as DynamicWeb3WalletConnect};
1
+ import{a}from"../../../chunk-DTDUYE6I.js";import"../../../chunk-3SJ74HLG.js";import"../../../chunk-XIVIIEY5.js";import"../../../chunk-5UD5UP6V.js";import"../../../chunk-JSNUJJQJ.js";import"../../../chunk-VHNBXIOC.js";import"../../../chunk-TNCETEEL.js";import"../../../chunk-BFHQZOV3.js";import"../../../chunk-VRC3MYU6.js";import"../../../chunk-2VBA64WU.js";import"../../../chunk-EMXNIC4M.js";import"../../../chunk-NQ2WKZU6.js";import"../../../chunk-QRX6P4MW.js";import"../../../chunk-NBJIJZGO.js";import"../../../chunk-SFDQPSSP.js";import"../../../chunk-77PBG2JJ.js";import"../../../chunk-EVADF7QA.js";import"../../../chunk-H34D6PAN.js";import"../../../chunk-JPJKOERH.js";import"../../../chunk-UAFW3OWA.js";import"../../../chunk-C3JRTLQP.js";import"../../../chunk-E4TBJMOO.js";import"../../../chunk-OOLXYAO7.js";import"../../../chunk-WW6GUXHG.js";import"../../../chunk-AMHBLNQ5.js";import"../../../chunk-MMW7DYOT.js";import"../../../chunk-ROJ6HFVK.js";import"../../../chunk-6LMKMBUO.js";import"../../../chunk-KUS5WCV7.js";import"../../../chunk-PXDN3KFO.js";export{a as DynamicWeb3WalletConnect};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOLFE6RRHcjs = require('../chunk-OLFE6RRH.cjs');require('../chunk-BR77Q3PK.cjs');require('../chunk-Z2FGFHRQ.cjs');require('../chunk-62JYTT2Y.cjs');require('../chunk-2BOQSASO.cjs');require('../chunk-HLGNSXEQ.cjs');require('../chunk-FSG3MT7C.cjs');require('../chunk-HG5ML6KX.cjs');require('../chunk-E5PPNNTL.cjs');require('../chunk-WABJHG6B.cjs');require('../chunk-E65EGG73.cjs');require('../chunk-TM7WDKYR.cjs');require('../chunk-VI6TW7JT.cjs');require('../chunk-VWBAHXIO.cjs');require('../chunk-FQ246XXN.cjs');require('../chunk-ZBQCXWMD.cjs');require('../chunk-WCDR3KSE.cjs');require('../chunk-NRN4WNQL.cjs');require('../chunk-I4GMMHQR.cjs');require('../chunk-SRQAQHYK.cjs');require('../chunk-QYQERFYL.cjs');require('../chunk-MLWP3AIU.cjs');require('../chunk-MA6EIA6R.cjs');require('../chunk-GPQZG7HC.cjs');require('../chunk-BMLVCKVF.cjs');require('../chunk-RAE6YQXJ.cjs');require('../chunk-2WSEHVNP.cjs');exports.AuthContext = _chunkOLFE6RRHcjs.t; exports.CrossmintAuthProvider = _chunkOLFE6RRHcjs.u; exports.CrossmintWalletProvider = _chunkOLFE6RRHcjs.b; exports.WalletContext = _chunkOLFE6RRHcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkBQ7TYNXYcjs = require('../chunk-BQ7TYNXY.cjs');require('../chunk-BR77Q3PK.cjs');require('../chunk-HG5ML6KX.cjs');require('../chunk-Z2FGFHRQ.cjs');require('../chunk-FASRTACD.cjs');require('../chunk-62JYTT2Y.cjs');require('../chunk-2BOQSASO.cjs');require('../chunk-HLGNSXEQ.cjs');require('../chunk-FSG3MT7C.cjs');require('../chunk-E5PPNNTL.cjs');require('../chunk-WABJHG6B.cjs');require('../chunk-TM7WDKYR.cjs');require('../chunk-VI6TW7JT.cjs');require('../chunk-VWBAHXIO.cjs');require('../chunk-FQ246XXN.cjs');require('../chunk-ZBQCXWMD.cjs');require('../chunk-NRN4WNQL.cjs');require('../chunk-I4GMMHQR.cjs');require('../chunk-SRQAQHYK.cjs');require('../chunk-QYQERFYL.cjs');require('../chunk-E65EGG73.cjs');require('../chunk-H7UEH2Z3.cjs');require('../chunk-HYWV45DD.cjs');require('../chunk-GPQZG7HC.cjs');require('../chunk-BMLVCKVF.cjs');require('../chunk-NAJHXPGR.cjs');require('../chunk-2WSEHVNP.cjs');exports.AuthContext = _chunkBQ7TYNXYcjs.t; exports.CrossmintAuthProvider = _chunkBQ7TYNXYcjs.u; exports.CrossmintWalletProvider = _chunkBQ7TYNXYcjs.b; exports.WalletContext = _chunkBQ7TYNXYcjs.a;
@@ -1,8 +1,12 @@
1
- export { AuthContext, AuthContextType, CrossmintAuthProvider, CrossmintAuthProviderProps, CrossmintAuthWalletConfig, LoginMethod } from './CrossmintAuthProvider.cjs';
2
- export { CrossmintWalletProvider, WalletConfig, WalletContext } from './CrossmintWalletProvider.cjs';
1
+ export { AuthContext, CrossmintAuthProvider } from './CrossmintAuthProvider.cjs';
2
+ export { CrossmintWalletProvider, WalletContext } from './CrossmintWalletProvider.cjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '@crossmint/client-sdk-auth';
6
- import '@crossmint/client-sdk-smart-wallet';
7
6
  import '@crossmint/common-sdk-base';
8
7
  import '@crossmint/common-sdk-auth';
8
+ import '../types/auth.cjs';
9
+ import '../types/wallet.cjs';
10
+ import '@crossmint/wallets-sdk';
11
+ import '../types/passkey.cjs';
12
+ import 'ox';
@@ -1,8 +1,12 @@
1
- export { AuthContext, AuthContextType, CrossmintAuthProvider, CrossmintAuthProviderProps, CrossmintAuthWalletConfig, LoginMethod } from './CrossmintAuthProvider.js';
2
- export { CrossmintWalletProvider, WalletConfig, WalletContext } from './CrossmintWalletProvider.js';
1
+ export { AuthContext, CrossmintAuthProvider } from './CrossmintAuthProvider.js';
2
+ export { CrossmintWalletProvider, WalletContext } from './CrossmintWalletProvider.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'react';
5
5
  import '@crossmint/client-sdk-auth';
6
- import '@crossmint/client-sdk-smart-wallet';
7
6
  import '@crossmint/common-sdk-base';
8
7
  import '@crossmint/common-sdk-auth';
8
+ import '../types/auth.js';
9
+ import '../types/wallet.js';
10
+ import '@crossmint/wallets-sdk';
11
+ import '../types/passkey.js';
12
+ import 'ox';
@@ -1 +1 @@
1
- import{a,b,t as c,u as d}from"../chunk-DF2BOO4Y.js";import"../chunk-JSNUJJQJ.js";import"../chunk-TNCETEEL.js";import"../chunk-VRC3MYU6.js";import"../chunk-2VBA64WU.js";import"../chunk-EMXNIC4M.js";import"../chunk-NQ2WKZU6.js";import"../chunk-VHNBXIOC.js";import"../chunk-QRX6P4MW.js";import"../chunk-NBJIJZGO.js";import"../chunk-WW6GUXHG.js";import"../chunk-SFDQPSSP.js";import"../chunk-77PBG2JJ.js";import"../chunk-EVADF7QA.js";import"../chunk-H34D6PAN.js";import"../chunk-JPJKOERH.js";import"../chunk-7G3VO3NN.js";import"../chunk-UAFW3OWA.js";import"../chunk-C3JRTLQP.js";import"../chunk-E4TBJMOO.js";import"../chunk-OOLXYAO7.js";import"../chunk-ZUIYDHMO.js";import"../chunk-5PWWZ6G2.js";import"../chunk-ROJ6HFVK.js";import"../chunk-6LMKMBUO.js";import"../chunk-52IEZFDH.js";import"../chunk-PXDN3KFO.js";export{c as AuthContext,d as CrossmintAuthProvider,b as CrossmintWalletProvider,a as WalletContext};
1
+ import{a,b,t as c,u as d}from"../chunk-5UD5UP6V.js";import"../chunk-JSNUJJQJ.js";import"../chunk-VHNBXIOC.js";import"../chunk-TNCETEEL.js";import"../chunk-BFHQZOV3.js";import"../chunk-VRC3MYU6.js";import"../chunk-2VBA64WU.js";import"../chunk-EMXNIC4M.js";import"../chunk-NQ2WKZU6.js";import"../chunk-QRX6P4MW.js";import"../chunk-NBJIJZGO.js";import"../chunk-SFDQPSSP.js";import"../chunk-77PBG2JJ.js";import"../chunk-EVADF7QA.js";import"../chunk-H34D6PAN.js";import"../chunk-JPJKOERH.js";import"../chunk-UAFW3OWA.js";import"../chunk-C3JRTLQP.js";import"../chunk-E4TBJMOO.js";import"../chunk-OOLXYAO7.js";import"../chunk-WW6GUXHG.js";import"../chunk-AMHBLNQ5.js";import"../chunk-MMW7DYOT.js";import"../chunk-ROJ6HFVK.js";import"../chunk-6LMKMBUO.js";import"../chunk-KUS5WCV7.js";import"../chunk-PXDN3KFO.js";export{c as AuthContext,d as CrossmintAuthProvider,b as CrossmintWalletProvider,a as WalletContext};
@@ -2,5 +2,7 @@ type OtpEmailPayload = {
2
2
  email: string;
3
3
  emailId: string;
4
4
  };
5
+ type LoginMethod = "email" | "google" | "farcaster" | "web3" | "twitter";
6
+ type AuthStatus = "logged-in" | "logged-out" | "in-progress" | "initializing";
5
7
 
6
- export type { OtpEmailPayload };
8
+ export type { AuthStatus, LoginMethod, OtpEmailPayload };
@@ -2,5 +2,7 @@ type OtpEmailPayload = {
2
2
  email: string;
3
3
  emailId: string;
4
4
  };
5
+ type LoginMethod = "email" | "google" | "farcaster" | "web3" | "twitter";
6
+ type AuthStatus = "logged-in" | "logged-out" | "in-progress" | "initializing";
5
7
 
6
- export type { OtpEmailPayload };
8
+ export type { AuthStatus, LoginMethod, OtpEmailPayload };
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,8 @@
1
+ import { WebAuthnP256 } from 'ox';
2
+
3
+ type PasskeySigner = {
4
+ type: "PASSKEY";
5
+ credential: WebAuthnP256.P256Credential;
6
+ };
7
+
8
+ export type { PasskeySigner };
@@ -0,0 +1,8 @@
1
+ import { WebAuthnP256 } from 'ox';
2
+
3
+ type PasskeySigner = {
4
+ type: "PASSKEY";
5
+ credential: WebAuthnP256.P256Credential;
6
+ };
7
+
8
+ export type { PasskeySigner };
File without changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,34 @@
1
+ import { EVMSmartWalletChain, EVMSignerInput, SolanaSignerInput } from '@crossmint/wallets-sdk';
2
+
3
+ type GetOrCreateWalletBaseProps = {
4
+ args: {
5
+ linkedUser?: string;
6
+ };
7
+ };
8
+ type GetOrCreateWalletProps = ({
9
+ type: "evm-smart-wallet";
10
+ args: {
11
+ chain: EVMSmartWalletChain;
12
+ adminSigner?: EVMSignerInput;
13
+ };
14
+ } & GetOrCreateWalletBaseProps) | ({
15
+ type: "solana-smart-wallet";
16
+ args: {
17
+ adminSigner?: SolanaSignerInput;
18
+ };
19
+ } & GetOrCreateWalletBaseProps);
20
+ type WalletBaseConfig = {
21
+ createOnLogin: "all-users" | "off";
22
+ showPasskeyHelpers?: boolean;
23
+ linkedUser?: string;
24
+ };
25
+ type CrossmintAuthEmbeddedWallets = ({
26
+ type: "evm-smart-wallet";
27
+ defaultChain: EVMSmartWalletChain;
28
+ adminSigner?: EVMSignerInput;
29
+ } & WalletBaseConfig) | ({
30
+ type: "solana-smart-wallet";
31
+ adminSigner?: SolanaSignerInput;
32
+ } & WalletBaseConfig);
33
+
34
+ export type { CrossmintAuthEmbeddedWallets, GetOrCreateWalletProps };
@@ -0,0 +1,34 @@
1
+ import { EVMSmartWalletChain, EVMSignerInput, SolanaSignerInput } from '@crossmint/wallets-sdk';
2
+
3
+ type GetOrCreateWalletBaseProps = {
4
+ args: {
5
+ linkedUser?: string;
6
+ };
7
+ };
8
+ type GetOrCreateWalletProps = ({
9
+ type: "evm-smart-wallet";
10
+ args: {
11
+ chain: EVMSmartWalletChain;
12
+ adminSigner?: EVMSignerInput;
13
+ };
14
+ } & GetOrCreateWalletBaseProps) | ({
15
+ type: "solana-smart-wallet";
16
+ args: {
17
+ adminSigner?: SolanaSignerInput;
18
+ };
19
+ } & GetOrCreateWalletBaseProps);
20
+ type WalletBaseConfig = {
21
+ createOnLogin: "all-users" | "off";
22
+ showPasskeyHelpers?: boolean;
23
+ linkedUser?: string;
24
+ };
25
+ type CrossmintAuthEmbeddedWallets = ({
26
+ type: "evm-smart-wallet";
27
+ defaultChain: EVMSmartWalletChain;
28
+ adminSigner?: EVMSignerInput;
29
+ } & WalletBaseConfig) | ({
30
+ type: "solana-smart-wallet";
31
+ adminSigner?: SolanaSignerInput;
32
+ } & WalletBaseConfig);
33
+
34
+ export type { CrossmintAuthEmbeddedWallets, GetOrCreateWalletProps };
File without changes
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMA6EIA6Rcjs = require('../chunk-MA6EIA6R.cjs');require('../chunk-RAE6YQXJ.cjs');require('../chunk-2WSEHVNP.cjs');exports.createCrossmintApiClient = _chunkMA6EIA6Rcjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkHYWV45DDcjs = require('../chunk-HYWV45DD.cjs');require('../chunk-NAJHXPGR.cjs');require('../chunk-2WSEHVNP.cjs');exports.createCrossmintApiClient = _chunkHYWV45DDcjs.a;
@@ -1 +1 @@
1
- import{a}from"../chunk-5PWWZ6G2.js";import"../chunk-52IEZFDH.js";import"../chunk-PXDN3KFO.js";export{a as createCrossmintApiClient};
1
+ import{a}from"../chunk-MMW7DYOT.js";import"../chunk-KUS5WCV7.js";import"../chunk-PXDN3KFO.js";export{a as createCrossmintApiClient};
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFASRTACDcjs = require('../chunk-FASRTACD.cjs');require('../chunk-2WSEHVNP.cjs');exports.createWebAuthnPasskeySigner = _chunkFASRTACDcjs.a;
@@ -0,0 +1,6 @@
1
+ import { PasskeySigner } from '../types/passkey.cjs';
2
+ import 'ox';
3
+
4
+ declare function createWebAuthnPasskeySigner(name: string): Promise<PasskeySigner>;
5
+
6
+ export { createWebAuthnPasskeySigner };
@@ -0,0 +1,6 @@
1
+ import { PasskeySigner } from '../types/passkey.js';
2
+ import 'ox';
3
+
4
+ declare function createWebAuthnPasskeySigner(name: string): Promise<PasskeySigner>;
5
+
6
+ export { createWebAuthnPasskeySigner };
@@ -0,0 +1 @@
1
+ import{a}from"../chunk-BFHQZOV3.js";import"../chunk-PXDN3KFO.js";export{a as createWebAuthnPasskeySigner};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossmint/client-sdk-react-ui",
3
- "version": "1.15.3",
3
+ "version": "1.16.1",
4
4
  "repository": "https://github.com/Crossmint/crossmint-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Paella Labs Inc",
@@ -40,12 +40,12 @@
40
40
  "tailwindcss": "3.4.10",
41
41
  "viem": "2.23.6",
42
42
  "zod": "3.22.4",
43
- "@crossmint/client-sdk-auth": "1.1.21",
44
- "@crossmint/client-sdk-base": "1.4.12",
45
- "@crossmint/client-sdk-smart-wallet": "0.3.1",
46
43
  "@crossmint/client-sdk-window": "0.2.3",
44
+ "@crossmint/client-sdk-base": "1.4.12",
45
+ "@crossmint/client-sdk-auth": "1.1.21",
46
+ "@crossmint/common-sdk-base": "0.3.2",
47
47
  "@crossmint/common-sdk-auth": "1.0.19",
48
- "@crossmint/common-sdk-base": "0.3.2"
48
+ "@crossmint/wallets-sdk": "0.2.2"
49
49
  },
50
50
  "devDependencies": {
51
51
  "@testing-library/react": "^16.0.1",
@@ -1 +0,0 @@
1
- var s="1.15.3";var r=s;export{r as a};
@@ -1 +0,0 @@
1
- import{a as s,b as i}from"./chunk-PXDN3KFO.js";import{useCallback as r,useMemo as o}from"react";function g(a){let n=r(()=>{if(a==null)return null;let e=`smart-wallet-${a}`,t=localStorage.getItem(e);return t==null?null:JSON.parse(t)},[a]),l=r(e=>{if(a==null)return;let t=`smart-wallet-${a}`;localStorage.setItem(t,JSON.stringify(e))},[a]),u=r(e=>{let t=n()||{};l(i(s({},t),{wallet:i(s({},t.wallet),{address:e})}))},[n,l]),d=o(()=>{var t,c;let e=n();return e==null?!1:(c=(t=e.wallet)==null?void 0:t.initialized)!=null?c:!1},[n]),y=r(e=>{let t=n();t===null||t.wallet===void 0||l(i(s({},t),{wallet:i(s({},t.wallet),{initialized:e})}))},[n,l]),p=o(()=>{let e=n();if(!(e===null||e.passkey===void 0))return{type:"PASSKEY",credential:{id:e.passkey.authenticatorId,publicKey:{prefix:e.passkey.pubKeyPrefix,x:BigInt(e.passkey.pubKeyX),y:BigInt(e.passkey.pubKeyY)}}}},[n]),f=r(e=>{let t=n()||{};l(i(s({},t),{passkey:{authenticatorId:e.credential.id,domain:"localhost",passkeyName:"Crossmint Wallet",pubKeyPrefix:e.credential.publicKey.prefix,pubKeyX:e.credential.publicKey.x.toString(),pubKeyY:e.credential.publicKey.y.toString()}}))},[n,l]);return{setWalletAddress:u,isWalletInitialized:d,setWalletInitialized:y,passkey:p,setPasskey:f}}export{g as a};
@@ -1,6 +0,0 @@
1
- import{a as Tt}from"./chunk-JSNUJJQJ.js";import{a as U}from"./chunk-TNCETEEL.js";import{a as Ot}from"./chunk-VRC3MYU6.js";import{a as kt}from"./chunk-2VBA64WU.js";import{a as It}from"./chunk-EMXNIC4M.js";import{a as Lt,e as Rt,h as Bt,i as Dt}from"./chunk-NQ2WKZU6.js";import{a as Et,b as Ft,c as z}from"./chunk-VHNBXIOC.js";import{a as Vt}from"./chunk-QRX6P4MW.js";import{a as E}from"./chunk-NBJIJZGO.js";import{a as et}from"./chunk-WW6GUXHG.js";import{a as Nt}from"./chunk-SFDQPSSP.js";import{a as Ut}from"./chunk-JPJKOERH.js";import{a as Ht}from"./chunk-7G3VO3NN.js";import{a as ot}from"./chunk-UAFW3OWA.js";import{a as Wt}from"./chunk-C3JRTLQP.js";import{a as Mt}from"./chunk-E4TBJMOO.js";import{b as tt}from"./chunk-ROJ6HFVK.js";import{a as j,b as G,c as K,d as S}from"./chunk-PXDN3KFO.js";import{createContext as se,useMemo as ne,useState as ao}from"react";import{createPortal as ie}from"react-dom";import{SmartWalletError as uo,SmartWalletSDK as le}from"@crossmint/client-sdk-smart-wallet";import{useContext as mo}from"react";function jt(){let r=mo(dt);if(!r)throw new Error("useWallet must be used within CrossmintAuthProvider or CrossmintWalletProvider");return r}import{useContext as re}from"react";import{createContext as zo,useEffect as bt,useMemo as Ko,useRef as _o,useState as ut,useCallback as qo}from"react";import{CrossmintAuth as Jo,getCookie as Xo}from"@crossmint/client-sdk-auth";import{validateApiKeyAndGetCrossmintBaseUrl as $o}from"@crossmint/common-sdk-base";import{SESSION_PREFIX as Qo}from"@crossmint/common-sdk-auth";import{VisuallyHidden as no}from"@radix-ui/react-visually-hidden";import{createContext as fo,useCallback as go,useContext as ho,useEffect as yo,useState as rt}from"react";import{CrossmintAuthenticationError as po}from"@crossmint/common-sdk-auth";import{useContext as co}from"react";function L(){let r=co(X);if(!r)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return r}import{jsx as xo}from"react/jsx-runtime";var Gt={google:"",twitter:""},zt=fo(void 0),x=()=>{let r=ho(zt);if(!r)throw new Error("useAuthForm must be used within an AuthFormProvider");return r},Kt=({setDialogOpen:r,preFetchOAuthUrls:e,initialState:o,children:t})=>{let{crossmintAuth:i}=L(),[n,s]=rt("initial"),[a,u]=rt(null),[l,d]=rt(Gt),[h,m]=rt(!0),{loginMethods:C,baseUrl:f,appearance:y,embeddedWallets:b,termsOfServiceText:c,authModalTitle:g,defaultEmail:w}=o;if(C.includes("web3")&&(b==null?void 0:b.createOnLogin)==="all-users")throw new Error("Creating wallets on login is not yet supported for web3 login method");let v=go(()=>S(void 0,null,function*(){m(!0);try{let O=C.filter(I=>I in Gt).map(I=>S(void 0,null,function*(){let D=yield i==null?void 0:i.getOAuthUrl(I);return{[I]:D}})),B=Object.assign({},...yield Promise.all(O));d(B)}catch(P){u(P instanceof po?P.message:"Unable to load oauth providers. Please try again later.")}finally{m(!1)}}),[C,i]);yo(()=>{e&&v()},[v,e]);let M={step:n,error:a,baseUrl:f,appearance:y,termsOfServiceText:c,authModalTitle:g,loginMethods:C,defaultEmail:w,oauthUrlMap:l,isLoadingOauthUrlMap:h,setDialogOpen:(P,O)=>{r==null||r(P,O),P||setTimeout(()=>s("initial"),250)},setError:u,setStep:s};return xo(zt.Provider,{value:M,children:t})};import{lazy as Do}from"react";import Vo from"color";import{useState as Fo}from"react";import{useState as ft}from"react";import{jsx as _t}from"react/jsx-runtime";var st=n=>{var s=n,{className:r,iconColor:e,ringColor:o,onClick:t}=s,i=K(s,["className","iconColor","ringColor","onClick"]);let{setError:a}=x();return _t("button",G(j({className:E("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",r),onClick:u=>{a(null),t==null||t(u)}},i),{children:_t(Nt,{className:"w-6 h-6",style:{color:e}})}))};import{jsx as F,jsxs as $}from"react/jsx-runtime";var Co=6;function qt({otpEmailData:r,setOtpEmailData:e}){var b,c,g,w,v,T,M,P,O,B,I,D,p,H,Z,wt,vt,Pt,St,At;let{crossmintAuth:o}=L(),{appearance:t,setDialogOpen:i,setStep:n,setError:s}=x(),[a,u]=ft(""),[l,d]=ft(!1),[h,m]=ft(!1),C=()=>S(this,null,function*(){var V,mt;m(!0);try{let ct=yield o==null?void 0:o.confirmEmailOtp((V=r==null?void 0:r.email)!=null?V:"",(mt=r==null?void 0:r.emailId)!=null?mt:"",a);yield o==null?void 0:o.handleRefreshAuthMaterial(ct),i(!1,!0),n("initial")}catch(ct){console.error("Error confirming email OTP",ct),s("Invalid code. Please try again."),d(!0)}finally{m(!1)}}),f=()=>S(this,null,function*(){var V;try{yield o==null?void 0:o.sendEmailOtp((V=r==null?void 0:r.email)!=null?V:"")}catch(mt){s("Failed to resend code. Please try again.")}});return $("div",{children:[F(st,{onClick:()=>{n("initial"),e(null)},iconColor:(b=t==null?void 0:t.colors)==null?void 0:b.textPrimary,ringColor:(c=t==null?void 0:t.colors)==null?void 0:c.accent}),$("div",{className:"flex flex-col items-center justify-start w-full",children:[F("div",{className:"relative left-3",children:F(Wt,{customAccentColor:(g=t==null?void 0:t.colors)==null?void 0:g.accent,customButtonBackgroundColor:(w=t==null?void 0:t.colors)==null?void 0:w.buttonBackground,customBackgroundColor:(v=t==null?void 0:t.colors)==null?void 0:v.background})}),F("p",{className:"text-base font-normal mt-4 mb-1 text-center text-cm-text-primary",style:{color:(T=t==null?void 0:t.colors)==null?void 0:T.textPrimary},children:"Check your email"}),$("p",{className:"text-center text-cm-text-secondary px-4",style:{color:(M=t==null?void 0:t.colors)==null?void 0:M.textSecondary},children:["A temporary login code has been sent to"," ",r!=null&&r.email?r.email:"your email address"]}),F("div",{className:"py-8",children:F(Et,{maxLength:Co,value:a,onChange:V=>{u(V),d(!1),s(null)},onComplete:C,disabled:h,customStyles:{accent:(O=(P=t==null?void 0:t.colors)==null?void 0:P.accent)!=null?O:"#04AA6D",danger:(I=(B=t==null?void 0:t.colors)==null?void 0:B.danger)!=null?I:"#f44336",border:(p=(D=t==null?void 0:t.colors)==null?void 0:D.border)!=null?p:"#E5E7EB",textPrimary:(Z=(H=t==null?void 0:t.colors)==null?void 0:H.textPrimary)!=null?Z:"#909ca3",buttonBackground:(vt=(wt=t==null?void 0:t.colors)==null?void 0:wt.buttonBackground)!=null?vt:"#eff6ff",inputBackground:(St=(Pt=t==null?void 0:t.colors)==null?void 0:Pt.inputBackground)!=null?St:"#FFFFFF",borderRadius:t==null?void 0:t.borderRadius},children:$(Ft,{children:[F(z,{index:0,hasError:l}),F(z,{index:1,hasError:l}),F(z,{index:2,hasError:l}),F(z,{index:3,hasError:l}),F(z,{index:4,hasError:l}),F(z,{index:5,hasError:l})]})})}),F("div",{className:"text-xs leading-tight text-cm-text-secondary text-center",children:$("span",{style:{color:(At=t==null?void 0:t.colors)==null?void 0:At.textSecondary},children:["Can't find the email? Check spam folder.",`
2
- `,"Some emails may take several minutes to arrive."]})}),F(It,{initialSeconds:60,appearance:t,countdownText:V=>`Re-send code in ${V}s`,countdownCompleteText:"Re-send code",handleOnClick:f})]})]})}import{useState as ht}from"react";import Oo from"color";import{isEmailValid as it}from"@crossmint/common-sdk-auth";import{ChildWindow as bo,PopupWindow as wo}from"@crossmint/client-sdk-window";import{useEffect as vo,useRef as Po,useState as So}from"react";import{z as nt}from"zod";var _=r=>{let{crossmintAuth:e}=L(),{oauthUrlMap:o,setError:t}=x(),[i,n]=So(!1),s=Po(null);return vo(()=>(s.current==null&&(s.current=new bo(window.opener||window.parent,"*",{incomingEvents:Ao})),()=>{s.current!=null&&s.current.off("authMaterialFromPopupCallback")}),[]),{createPopupAndSetupListeners:u=>S(void 0,null,function*(){if(s.current==null)throw new Error("Child window not initialized");n(!0),t(null);let l=new URL(o[r]);if(u!=null){let f=Array.from(l.searchParams.entries());l.search="",u&&l.searchParams.append("provider_login_hint",u),f.forEach(([y,b])=>{l.searchParams.append(y,b)})}let d=yield wo.init(l.toString(),{awaitToLoad:!1,crossOrigin:!0,width:400,height:700}),h=f=>S(void 0,null,function*(){var y;yield e==null?void 0:e.handleRefreshAuthMaterial(f.oneTimeSecret),(y=s.current)==null||y.off("authMaterialFromPopupCallback"),d.window.close(),n(!1)}),m=f=>{var y;t(f.error),(y=s.current)==null||y.off("errorFromPopupCallback"),d.window.close(),n(!1)};s.current.on("authMaterialFromPopupCallback",h),s.current.on("errorFromPopupCallback",m);let C=setInterval(()=>{var f;d.window.closed&&(clearInterval(C),n(!1),(f=s.current)==null||f.off("authMaterialFromPopupCallback"))},2500)}),isLoading:i}},Ao={authMaterialFromPopupCallback:nt.object({oneTimeSecret:nt.string()}),errorFromPopupCallback:nt.object({error:nt.string()})};import{jsx as gt,jsxs as ko}from"react/jsx-runtime";function Jt({emailInput:r,appearance:e}){var i,n,s,a;let{createPopupAndSetupListeners:o,isLoading:t}=_("google");return ko("button",{type:"button",className:E("flex items-center gap-2 justify-center h-[32px] px-2.5 border border-cm-border rounded-xl bg-cm-background-primary","hover:bg-cm-hover focus:bg-cm-hover outline-none",t?"cursor-not-allowed hover:bg-cm-muted-primary":""),onClick:t?void 0:()=>o(r.trim().toLowerCase()),style:{backgroundColor:(i=e==null?void 0:e.colors)==null?void 0:i.buttonBackground,borderRadius:e==null?void 0:e.borderRadius},children:[gt(et,{className:"max-h-[18px] max-w-[18px] h-[18px] w-[18px]"}),t?gt(U,{style:{color:(n=e==null?void 0:e.colors)==null?void 0:n.textSecondary,fill:(s=e==null?void 0:e.colors)==null?void 0:s.textPrimary,width:"18px",height:"18px"}}):gt("span",{className:"text-cm-accent",style:{color:(a=e==null?void 0:e.colors)==null?void 0:a.accent},children:"Continue"})]})}import{Fragment as Eo,jsx as R,jsxs as yt}from"react/jsx-runtime";function Xt({setOtpEmailData:r}){var f,y,b,c,g,w,v,T,M,P,O,B,I,D;let{crossmintAuth:e}=L(),{appearance:o,defaultEmail:t,setStep:i,setError:n}=x(),[s,a]=ht(t!=null?t:""),[u,l]=ht(""),[d,h]=ht(!1),m=s.toLowerCase().includes("@gmail.com")&&!s.toLowerCase().includes("+")&&it(s)&&!d;function C(p){return S(this,null,function*(){p.preventDefault(),h(!0);try{let H=s.trim().toLowerCase(),Z=yield e==null?void 0:e.sendEmailOtp(H);r({email:H,emailId:Z.emailId}),i("otp")}catch(H){h(!1),n("Failed to send email. Please try again or contact support.")}})}return R(Eo,{children:R("div",{className:"flex flex-col items-start justify-start w-full rounded-lg",children:yt("div",{className:"w-full",children:[R("label",{className:"text-cm-text-primary block mb-[5px]",style:{color:(f=o==null?void 0:o.colors)==null?void 0:f.textPrimary},children:"Email"}),yt("form",{role:"form",className:"relative",onSubmit:p=>{if(m){p.preventDefault();return}it(s)?C(p):p.preventDefault()},noValidate:!0,children:[R("label",{htmlFor:"emailInput",className:"sr-only",children:"Email"}),R("input",{className:E("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","transition-none duration-200 ease-in-out","focus:outline-none focus-ring-custom","placeholder:[color:var(--placeholder-color)]",u?"border-red-500":"",m?"pr-[132px]":"pr-[80px]"),style:{color:(y=o==null?void 0:o.colors)==null?void 0:y.textPrimary,borderRadius:o==null?void 0:o.borderRadius,borderColor:u?(b=o==null?void 0:o.colors)==null?void 0:b.danger:(c=o==null?void 0:o.colors)==null?void 0:c.border,backgroundColor:(g=o==null?void 0:o.colors)==null?void 0:g.inputBackground,"--placeholder-color":(v=(w=o==null?void 0:o.colors)==null?void 0:w.textSecondary)!=null?v:"#67797F","--focus-ring-color":new Oo((M=(T=o==null?void 0:o.colors)==null?void 0:T.accent)!=null?M:"#04AA6D").alpha(.18).toString()},type:"email",placeholder:"your@email.com",value:s,onChange:p=>{a(p.target.value),l(""),n(null)},readOnly:d,"aria-describedby":"emailError"}),yt("div",{className:"absolute inset-y-0 right-0 flex items-center pr-4",children:[u&&R(ot,{customColor:(P=o==null?void 0:o.colors)==null?void 0:P.danger}),d&&R(U,{style:{color:(O=o==null?void 0:o.colors)==null?void 0:O.textSecondary,fill:(B=o==null?void 0:o.colors)==null?void 0:B.textPrimary}}),m?R(Jt,{emailInput:s,appearance:o}):!u&&!d?R("button",{type:"submit",className:E("font-medium text-cm-accent text-nowrap bg-cm-background-primary",it(s)?"cursor-pointer":"!cursor-not-allowed opacity-60"),style:{color:(I=o==null?void 0:o.colors)==null?void 0:I.accent,backgroundColor:(D=o==null?void 0:o.colors)==null?void 0:D.inputBackground},disabled:!it(s)||d,children:"Submit"}):null]})]}),u&&R("p",{className:"text-xs text-red-500 mb-2 pt-2",children:u})]})})})}import{jsx as $t}from"react/jsx-runtime";function Qt(){let{step:r}=x(),[e,o]=Fo(null);return r==="otp"?$t(qt,{otpEmailData:e,setOtpEmailData:o}):r==="initial"?$t(Xt,{setOtpEmailData:o}):null}import{jsx as pt,jsxs as Wo}from"react/jsx-runtime";function Yt({appearance:r,text:e}){var t,i,n;let{step:o}=x();return o!=="initial"?null:Wo("div",{className:"flex items-center justify-center w-full pt-2 pb-3",children:[pt("span",{className:"w-full h-[1px] bg-cm-border",style:{backgroundColor:(t=r==null?void 0:r.colors)==null?void 0:t.border}}),e!=null?pt("p",{className:"flex-none px-2 text-sm text-cm-text-primary",style:{color:(i=r==null?void 0:r.colors)==null?void 0:i.textSecondary},children:e}):null,pt("span",{className:"w-full h-[1px] bg-cm-border",style:{backgroundColor:(n=r==null?void 0:r.colors)==null?void 0:n.border}})]})}import{Fragment as No,jsx as lt,jsxs as Zt}from"react/jsx-runtime";function to(e){var r=K(e,[]);var u,l,d,h;let{step:o,appearance:t,isLoadingOauthUrlMap:i}=x(),{createPopupAndSetupListeners:n,isLoading:s}=_("google"),a=i||s;return o!=="initial"?null:Zt("button",G(j({className:E("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none",a?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(u=t==null?void 0:t.colors)==null?void 0:u.buttonBackground},onClick:a?void 0:()=>n()},r),{children:[Zt(No,{children:[lt(et,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),a?lt(U,{style:{color:(l=t==null?void 0:t.colors)==null?void 0:l.textSecondary,fill:(d=t==null?void 0:t.colors)==null?void 0:d.textPrimary}}):lt("span",{className:"font-medium",style:{margin:"0px 32px",color:(h=t==null?void 0:t.colors)==null?void 0:h.textPrimary},children:"Sign in with Google"})]}),lt("span",{className:"sr-only",children:"Sign in with Google"})]}))}import{useEffect as xt,useMemo as Io,useState as Mo}from"react";import{useSignIn as To,QRCode as Uo}from"@farcaster/auth-kit";import{Fragment as Ro,jsx as W,jsxs as Q}from"react/jsx-runtime";function oo(){var i,n;let{step:r,appearance:e,setStep:o,setError:t}=x();return r==="initial"?W("div",{children:Q("button",{className:E("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none"),style:{borderRadius:e==null?void 0:e.borderRadius,backgroundColor:(i=e==null?void 0:e.colors)==null?void 0:i.buttonBackground},onClick:()=>{o("qrCode"),t(null)},children:[W(Mt,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),W("span",{className:"font-medium",style:{margin:"0px 32px",color:(n=e==null?void 0:e.colors)==null?void 0:n.textPrimary},children:"Sign in with Farcaster"}),W("span",{className:"sr-only",children:"Sign in with Farcaster"})]})}):r==="qrCode"?W(Lo,{}):null}function Lo(){var f,y,b,c,g,w,v,T,M;let{crossmintAuth:r}=L(),{appearance:e,setStep:o,setDialogOpen:t,setError:i}=x(),[n,s]=Mo(null),a=Io(()=>({onSuccess:P=>{s(P)}}),[]),{signIn:u,url:l,connect:d,signOut:h,isConnected:m}=To(a),C=P=>S(this,null,function*(){i(null);try{let O=yield r==null?void 0:r.signInWithFarcaster(P);yield r==null?void 0:r.handleRefreshAuthMaterial(O),t(!1),o("initial")}catch(O){console.error("Error during Farcaster sign-in:",O),i("Failed to sign in with Farcaster")}});return xt(()=>{n!=null&&C(n)},[n]),xt(()=>{m&&u()},[m]),xt(()=>{d()},[]),Q("div",{children:[W(st,{onClick:()=>{h(),o("initial")},iconColor:(f=e==null?void 0:e.colors)==null?void 0:f.textPrimary,ringColor:(y=e==null?void 0:e.colors)==null?void 0:y.accent}),Q("div",{className:"flex flex-col items-center gap-4",children:[Q("div",{className:"text-center",children:[W("h3",{className:"text-lg font-semibold text-cm-text-primary mb-2",style:{color:(b=e==null?void 0:e.colors)==null?void 0:b.textPrimary},children:"Sign in with Farcaster"}),W("p",{className:"text-base font-normal text-cm-text-secondary",style:{color:(c=e==null?void 0:e.colors)==null?void 0:c.textSecondary},children:"Scan with your phone's camera to continue."})]}),W("div",{className:"bg-white aspect-square rounded-lg p-4",style:{backgroundColor:(g=e==null?void 0:e.colors)==null?void 0:g.inputBackground,borderRadius:e==null?void 0:e.borderRadius},children:l!=null?W(Uo,{uri:l,size:280}):W("div",{className:"min-h-[246px] flex items-center justify-center",children:W(U,{style:{color:(w=e==null?void 0:e.colors)==null?void 0:w.textSecondary,fill:(v=e==null?void 0:e.colors)==null?void 0:v.textPrimary}})})}),l?Q(Ro,{children:[W("p",{className:"text-base text-center font-normal text-cm-text-secondary",style:{color:(T=e==null?void 0:e.colors)==null?void 0:T.textSecondary},children:"Alternatively, click on this link to open Warpcast."}),W("a",{href:l,rel:"noopener noreferrer",target:"_blank",className:"text-base font-normal text-cm-link",style:{color:(M=e==null?void 0:e.colors)==null?void 0:M.textLink},children:"Open Warpcast"})]}):null]})]})}import{Fragment as Bo,jsx as at,jsxs as eo}from"react/jsx-runtime";function ro(e){var r=K(e,[]);var u,l,d,h;let{step:o,appearance:t,isLoadingOauthUrlMap:i}=x(),{createPopupAndSetupListeners:n,isLoading:s}=_("twitter"),a=i||s;return o!=="initial"?null:eo("button",G(j({className:E("relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center","transition-colors duration-200 ease-in-out","hover:bg-cm-hover focus:bg-cm-hover outline-none",a?"cursor-not-allowed hover:bg-cm-muted-primary":""),style:{borderRadius:t==null?void 0:t.borderRadius,backgroundColor:(u=t==null?void 0:t.colors)==null?void 0:u.buttonBackground},onClick:a?void 0:()=>n()},r),{children:[eo(Bo,{children:[at(Ut,{className:"max-h-[25px] max-w-[25px] h-[25px] w-[25px] absolute left-[18px]"}),a?at(U,{style:{color:(l=t==null?void 0:t.colors)==null?void 0:l.textSecondary,fill:(d=t==null?void 0:t.colors)==null?void 0:d.textPrimary}}):at("span",{className:"font-medium",style:{margin:"0px 32px",color:(h=t==null?void 0:t.colors)==null?void 0:h.textPrimary},children:"Sign in with X"})]}),at("span",{className:"sr-only",children:"Sign in with X"})]}))}import{jsx as N,jsxs as Y}from"react/jsx-runtime";var Ho=Do(()=>import("./components/auth/methods/web3/Web3AuthFlow.js").then(r=>({default:r.Web3AuthFlow})));function so({className:r}){var u,l,d,h,m,C,f,y,b,c,g,w,v;let{step:e,appearance:o,loginMethods:t,baseUrl:i,error:n,termsOfServiceText:s,authModalTitle:a}=x();return Y("div",{className:E("relative pt-10 pb-[30px] px-6 !min-[480px]:px-10 flex flex-col gap-[10px] antialiased animate-none",r),children:[n!=null?Y("div",{className:"flex items-start justify-start w-full rounded-lg p-2 mt-4 bg-cm-danger-muted",style:{backgroundColor:new Vo((l=(u=o==null?void 0:o.colors)==null?void 0:u.danger)!=null?l:"#f44336").alpha(.12).toString()},children:[N("div",{className:"min-w-[20px]",children:N(ot,{customColor:(h=(d=o==null?void 0:o.colors)==null?void 0:d.danger)!=null?h:"#f44336"})}),N("p",{className:"ml-2 text-sm",style:{color:(C=(m=o==null?void 0:o.colors)==null?void 0:m.danger)!=null?C:"#f44336"},children:n})]}):null,e==="initial"?Y("div",{children:[N("h1",{className:"text-2xl font-bold text-cm-text-primary",style:{color:(f=o==null?void 0:o.colors)==null?void 0:f.textPrimary},children:a!=null?a:"Sign in to Crossmint"}),N("p",{className:"text-base font-normal mb-3 text-cm-text-secondary",style:{color:(y=o==null?void 0:o.colors)==null?void 0:y.textSecondary},children:"Access using one of the options below."})]}):null,t.includes("google")?N(to,{}):null,t.includes("farcaster")?N(Tt,{baseUrl:i,children:N(oo,{})}):null,t.includes("twitter")?N(ro,{}):null,t.includes("web3")?N(Ho,{}):null,t.includes("email")?Y("div",{children:[t.length>1?N(Yt,{appearance:o,text:"OR"}):null,N(Qt,{})]}):null,e==="initial"&&s!=null?Y("div",{className:"text-sm text-center text-cm-text-secondary mt-2",style:{color:(b=o==null?void 0:o.colors)==null?void 0:b.textSecondary},children:[N("style",{children:`
3
- p a {
4
- color: ${(g=(c=o==null?void 0:o.colors)==null?void 0:c.textLink)!=null?g:"#1A74E9"};
5
- }
6
- `}),s]}):null,e==="initial"||e==="otp"?N(kt,{className:"mt-1.5 md:mt-4 justify-center",color:(v=(w=o==null?void 0:o.colors)==null?void 0:w.textSecondary)!=null?v:"#67797F"}):null]})}import{useEffect as jo}from"react";import{jsx as q,jsxs as Go}from"react/jsx-runtime";function Ct({open:r}){var t,i,n;let{appearance:e,setDialogOpen:o}=x();return jo(()=>{document.body.style.overflow=r?"hidden":""},[r]),q(Lt,{modal:!1,open:r,onOpenChange:o,children:Go(Rt,{onInteractOutside:s=>s.preventDefault(),onOpenAutoFocus:s=>s.preventDefault(),closeButtonColor:(t=e==null?void 0:e.colors)==null?void 0:t.textPrimary,closeButtonRingColor:(i=e==null?void 0:e.colors)==null?void 0:i.accent,className:"!p-0 !min-[480px]:p-0",style:{borderRadius:e==null?void 0:e.borderRadius,backgroundColor:(n=e==null?void 0:e.colors)==null?void 0:n.background},children:[q(no,{asChild:!0,children:q(Bt,{children:"Crossmint Auth"})}),q(no,{asChild:!0,children:q(Dt,{children:"Sign in via Crossmint"})}),q(so,{className:"max-w-[448px]"})]})})}import{Fragment as ee,jsx as J,jsxs as oe}from"react/jsx-runtime";var Yo={crossmintAuth:void 0,login:()=>{},logout:()=>{},jwt:void 0,user:void 0,status:"initializing",getUser:()=>{}},X=zo(Yo),Zo={defaultChain:"base-sepolia",createOnLogin:"off",type:"evm-smart-wallet"};function Rs({embeddedWallets:r=Zo,children:e,appearance:o,termsOfServiceText:t,prefetchOAuthUrls:i=!0,authModalTitle:n,onLoginSuccess:s,loginMethods:a=["email","google"],refreshRoute:u,logoutRoute:l}){let[d,h]=ut(void 0),{crossmint:m,setJwt:C}=tt("CrossmintAuthProvider must be used within CrossmintProvider"),f=_o(null),y=Ko(()=>(f.current||(f.current=Jo.from(m,{callbacks:{onLogout:()=>{C(void 0),h(void 0)},onTokenRefresh:p=>{C(p.jwt),h(p.user)}},refreshRoute:u,logoutRoute:l})),f.current),[]),b=$o(m.apiKey),[c,g]=ut(!1),[w,v]=ut(!1),[T,M]=ut(void 0),P=qo(()=>{s==null||s()},[s]);bt(()=>{if(m.jwt==null){let p=Xo(Qo);C(p)}v(!0)},[]),bt(()=>{m.jwt!=null&&c&&(g(!1),P())},[m.jwt,c,s]);let O=p=>{if(m.jwt!=null){console.log("User already logged in");return}p!=null&&typeof p=="string"&&M(p),g(!0)},B=()=>{y.logout()},I=()=>w?m.jwt!=null?"logged-in":c?"in-progress":"logged-out":"initializing",D=()=>S(this,null,function*(){if(m.jwt==null){console.log("User not logged in");return}let p=yield y.getUser();h(p)});return J(Vt,{children:J(X.Provider,{value:{crossmintAuth:y,login:O,logout:B,jwt:m.jwt,user:d,status:I(),getUser:D},children:J(io,{defaultChain:r.defaultChain,showPasskeyHelpers:r.showPasskeyHelpers,appearance:o,children:oe(Kt,{setDialogOpen:(p,H)=>{g(p),H&&P()},preFetchOAuthUrls:I()==="logged-out"&&i,initialState:{appearance:o,loginMethods:a,termsOfServiceText:t,authModalTitle:n,embeddedWallets:r,baseUrl:b,defaultEmail:T},children:[J(te,{embeddedWallets:r,accessToken:m.jwt,children:e}),J(Ct,{open:c})]})},m.jwt)})})}function te({embeddedWallets:r,children:e,accessToken:o}){let{getOrCreateWallet:t,clearWallet:i,status:n}=jt();return bt(()=>{r.createOnLogin==="all-users"&&n==="not-loaded"&&o!=null&&t(),n==="loaded"&&o==null&&i()},[o,n]),J(ee,{children:e})}function lo(){let r=re(X);if(r===void 0)throw new Error("useAuth must be used within an AuthProvider");return r}import{jsx as ue,jsxs as me}from"react/jsx-runtime";var dt=se({status:"not-loaded",getOrCreateWallet:()=>Promise.resolve({startedCreation:!1}),createPasskeySigner:()=>Promise.resolve(null),clearWallet:()=>{}});function io({children:r,defaultChain:e,showPasskeyHelpers:o=!0,appearance:t}){let{user:i}=lo(),{crossmint:n}=tt("CrossmintWalletProvider must be used within CrossmintProvider"),s=ne(()=>le.init({clientApiKey:n.apiKey}),[n.apiKey]),a=Ht(i==null?void 0:i.id),[u,l]=ao({status:"not-loaded"}),[d,h]=ao({open:!1}),m=c=>S(this,null,function*(){yield f("create-wallet")();let g=yield s.createPasskeySigner(c);return a.setPasskey(g),g}),C=c=>S(this,null,function*(){var g;if(u.status=="in-progress")return console.log("Wallet already loading"),{startedCreation:!1,reason:"Wallet is already loading."};if(n.jwt==null)return{startedCreation:!1,reason:'Jwt not set in "CrossmintProvider".'};try{l({status:"in-progress"});let w=(g=c==null?void 0:c.signer)!=null?g:yield b(),v=yield s.getOrCreateWallet({jwt:n.jwt},e,c!=null?c:{signer:w},{onWalletCreationFailed:f("create-wallet-error"),onTransactionSigningStarted:()=>a.isWalletInitialized?Promise.resolve():f("transaction")(),onTransactionSigningFailed:f("transaction-error"),onTransactionCompleted:()=>(a.setWalletInitialized(!0),Promise.resolve())});a.setWalletAddress(v.address),l({status:"loaded",wallet:v})}catch(w){console.error("There was an error creating a wallet ",w),l(ae(w))}return{startedCreation:!0}}),f=c=>()=>new Promise(g=>{if(!o){g();return}h({type:c,open:!0,primaryActionOnClick:()=>{h({open:!1}),g()},secondaryActionOnClick:()=>{h({open:!1}),g()}})}),y=()=>{l({status:"not-loaded"})},b=()=>S(this,null,function*(){let c=a.passkey;return c===void 0?yield m("Crossmint Wallet"):c});return me(dt.Provider,{value:G(j({},u),{getOrCreateWallet:C,createPasskeySigner:m,clearWallet:y}),children:[r,d.open?ie(ue(Ot,{state:d,appearance:t}),document.body):null]})}function ae(r){if(r instanceof uo)return{status:"loading-error",error:r};let e=r instanceof Error?r.message:String(r),o=r instanceof Error?r.stack:void 0;return{status:"loading-error",error:new uo(`Unknown Wallet Error: ${e}`,o)}}export{dt as a,io as b,jt as c,L as d,x as e,Kt as f,st as g,Co as h,qt as i,_ as j,Jt as k,Xt as l,Qt as m,Yt as n,to as o,oo as p,ro as q,so as r,Ct as s,X as t,Rs as u,lo as v};