@crossmint/client-sdk-react-ui 1.10.5 → 1.10.7
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-GGVJALEH.cjs → chunk-2ROLE4XU.cjs} +3 -3
- package/dist/{chunk-HYP7ISWS.js → chunk-5EE2IAIP.js} +2 -2
- package/dist/{chunk-FKRBO2MK.js → chunk-5UXGDXPR.js} +2 -2
- package/dist/chunk-6CPZDD6Y.js +29 -0
- package/dist/chunk-6CPZDD6Y.js.map +1 -0
- package/dist/{chunk-NKOG6FTK.js → chunk-6EX2VR7S.js} +2 -2
- package/dist/{chunk-U5EONMPH.js → chunk-6FG6NL44.js} +4 -4
- package/dist/{chunk-E7KTAG6X.cjs → chunk-6PPUWTTF.cjs} +3 -3
- package/dist/{chunk-MBJBFR2H.js → chunk-7BZSIPWM.js} +2 -2
- package/dist/chunk-BFTVVPCU.js +81 -0
- package/dist/chunk-BFTVVPCU.js.map +1 -0
- package/dist/chunk-BURUD6IV.cjs +64 -0
- package/dist/chunk-BURUD6IV.cjs.map +1 -0
- package/dist/{chunk-LF3XEXLA.js → chunk-DCMLWFDK.js} +2 -2
- package/dist/chunk-DR67KSE7.js +31 -0
- package/dist/chunk-DR67KSE7.js.map +1 -0
- package/dist/{chunk-YP4CPG34.js → chunk-FGHABNQM.js} +2 -2
- package/dist/{chunk-YP4CPG34.js.map → chunk-FGHABNQM.js.map} +1 -1
- package/dist/{chunk-6AFXSTEN.cjs → chunk-GMKTZIU2.cjs} +3 -3
- package/dist/{chunk-4BGD6LSC.js → chunk-HOTEC5UH.js} +2 -2
- package/dist/chunk-HW2Q6J4R.js +64 -0
- package/dist/chunk-HW2Q6J4R.js.map +1 -0
- package/dist/chunk-HZ26XTTK.cjs +81 -0
- package/dist/chunk-HZ26XTTK.cjs.map +1 -0
- package/dist/{chunk-LD66M6G7.cjs → chunk-K5S6RUJ3.cjs} +3 -3
- package/dist/chunk-LGY5FQOZ.cjs +29 -0
- package/dist/chunk-LGY5FQOZ.cjs.map +1 -0
- package/dist/{chunk-HR57IU52.cjs → chunk-LJA62EVT.cjs} +3 -3
- package/dist/{chunk-EBMORHG3.cjs → chunk-MCINXS2Y.cjs} +17 -252
- package/dist/chunk-MCINXS2Y.cjs.map +1 -0
- package/dist/{chunk-T5WAVOPI.js → chunk-O53ZB544.js} +55 -290
- package/dist/chunk-O53ZB544.js.map +1 -0
- package/dist/{chunk-G526QBKQ.cjs → chunk-QFZ6GZZR.cjs} +3 -3
- package/dist/{chunk-KAXBBO66.cjs → chunk-SBTNHVSD.cjs} +3 -3
- package/dist/{chunk-7YHGZZ6G.js → chunk-TH42AO6J.js} +2 -2
- package/dist/{chunk-JZYMJ733.js → chunk-U7LXB3SM.js} +2 -2
- package/dist/chunk-UGHW5HMB.cjs +31 -0
- package/dist/chunk-UGHW5HMB.cjs.map +1 -0
- package/dist/{chunk-CPISBXIR.cjs → chunk-Y3SUMTUI.cjs} +2 -2
- package/dist/{chunk-CPISBXIR.cjs.map → chunk-Y3SUMTUI.cjs.map} +1 -1
- package/dist/{chunk-3LHIEADG.cjs → chunk-YNBGMNE6.cjs} +3 -3
- package/dist/{chunk-NTAMXW3Z.cjs → chunk-ZJC4OB5Z.cjs} +3 -3
- package/dist/components/CrossmintNFTCollectionView.cjs +3 -3
- package/dist/components/CrossmintNFTCollectionView.js +2 -2
- package/dist/components/CrossmintNFTDetail.cjs +3 -3
- package/dist/components/CrossmintNFTDetail.js +2 -2
- package/dist/components/auth/AuthForm.cjs +5 -11
- package/dist/components/auth/AuthForm.js +4 -10
- package/dist/components/auth/AuthFormBackButton.cjs +5 -11
- package/dist/components/auth/AuthFormBackButton.js +4 -10
- package/dist/components/auth/AuthFormDialog.cjs +5 -11
- package/dist/components/auth/AuthFormDialog.js +4 -10
- package/dist/components/auth/EmbeddedAuthForm.cjs +6 -12
- package/dist/components/auth/EmbeddedAuthForm.js +5 -11
- package/dist/components/auth/methods/email/EmailAuthFlow.cjs +5 -11
- package/dist/components/auth/methods/email/EmailAuthFlow.js +4 -10
- package/dist/components/auth/methods/email/EmailOTPInput.cjs +5 -11
- package/dist/components/auth/methods/email/EmailOTPInput.js +4 -10
- package/dist/components/auth/methods/email/EmailSignIn.cjs +5 -11
- package/dist/components/auth/methods/email/EmailSignIn.js +4 -10
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.cjs +5 -11
- package/dist/components/auth/methods/farcaster/FarcasterSignIn.js +4 -10
- package/dist/components/auth/methods/google/GoogleSignIn.cjs +5 -11
- package/dist/components/auth/methods/google/GoogleSignIn.js +4 -10
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs +43 -12
- package/dist/components/auth/methods/web3/Web3AuthFlow.cjs.map +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.cts +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.d.ts +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlow.js +43 -12
- package/dist/components/auth/methods/web3/Web3AuthFlow.js.map +1 -1
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.cjs +8 -11
- package/dist/components/auth/methods/web3/Web3AuthFlowButton.js +7 -10
- package/dist/components/auth/methods/web3/Web3Connector.cjs +58 -4
- package/dist/components/auth/methods/web3/Web3Connector.cjs.map +1 -1
- package/dist/components/auth/methods/web3/Web3Connector.js +58 -4
- package/dist/components/auth/methods/web3/Web3Connector.js.map +1 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs +48 -4
- package/dist/components/auth/methods/web3/Web3ConnectorButton.cjs.map +1 -1
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js +48 -4
- package/dist/components/auth/methods/web3/Web3ConnectorButton.js.map +1 -1
- package/dist/components/auth/methods/web3/Web3Connectors.cjs +6 -11
- package/dist/components/auth/methods/web3/Web3Connectors.js +5 -10
- package/dist/components/common/Divider.cjs +5 -11
- package/dist/components/common/Divider.js +4 -10
- package/dist/components/embed/index.cjs +4 -4
- package/dist/components/embed/index.js +3 -3
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.cjs +7 -13
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +6 -12
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.cjs +6 -12
- package/dist/components/embed/v3/EmbeddedCheckoutV3IFrame.js +5 -11
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs +4 -22
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.cjs.map +1 -1
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js +3 -21
- package/dist/components/embed/v3/crypto/CryptoWalletConnectionHandler.js.map +1 -1
- package/dist/components/embed/v3/index.cjs +7 -13
- package/dist/components/embed/v3/index.js +6 -12
- package/dist/components/hosted/CrossmintPayButton.cjs +3 -3
- package/dist/components/hosted/CrossmintPayButton.js +2 -2
- package/dist/components/hosted/index.cjs +3 -3
- package/dist/components/hosted/index.js +2 -2
- package/dist/components/index.cjs +15 -21
- package/dist/components/index.js +14 -20
- package/dist/consts/version.cjs +2 -2
- package/dist/consts/version.js +1 -1
- package/dist/hooks/index.cjs +5 -11
- package/dist/hooks/index.js +4 -10
- package/dist/hooks/useAuth.cjs +5 -11
- package/dist/hooks/useAuth.js +4 -10
- package/dist/hooks/useCrossmintAuth.cjs +5 -11
- package/dist/hooks/useCrossmintAuth.js +4 -10
- package/dist/hooks/useCrossmintCheckout.cjs +4 -4
- package/dist/hooks/useCrossmintCheckout.js +3 -3
- package/dist/hooks/useOAuthWindowListener.cjs +5 -11
- package/dist/hooks/useOAuthWindowListener.js +4 -10
- package/dist/hooks/useWallet.cjs +5 -11
- package/dist/hooks/useWallet.js +4 -10
- package/dist/icons/base64Icons.cjs +6 -6
- package/dist/icons/base64Icons.cjs.map +1 -1
- package/dist/icons/base64Icons.js +5 -5
- package/dist/icons/base64Icons.js.map +1 -1
- package/dist/index.cjs +15 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -20
- package/dist/index.js.map +1 -1
- package/dist/providers/CrossmintAuthProvider.cjs +5 -11
- package/dist/providers/CrossmintAuthProvider.js +4 -10
- package/dist/providers/CrossmintWalletProvider.cjs +5 -11
- package/dist/providers/CrossmintWalletProvider.js +4 -10
- package/dist/providers/auth/AuthFormProvider.cjs +5 -11
- package/dist/providers/auth/AuthFormProvider.js +4 -10
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.cjs +33 -0
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.d.cts +10 -0
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.d.ts +10 -0
- package/dist/providers/auth/web3/DynamicWeb3WalletConnect.js +33 -0
- package/dist/providers/index.cjs +5 -11
- package/dist/providers/index.js +4 -10
- package/dist/utils/createCrossmintApiClient.cjs +3 -3
- package/dist/utils/createCrossmintApiClient.js +2 -2
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.cjs +8 -0
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.d.cts +6 -0
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.d.ts +6 -0
- package/dist/utils/dynamic/dynamicChainToCrossmintChain.js +8 -0
- package/package.json +5 -8
- package/src/components/auth/AuthForm.tsx +9 -2
- package/src/components/auth/methods/web3/Web3AuthFlow.tsx +18 -0
- package/src/components/auth/methods/web3/Web3Connectors.tsx +5 -72
- package/src/components/embed/v3/crypto/CryptoWalletConnectionHandler.tsx +3 -24
- package/src/providers/CrossmintAuthProvider.test.tsx +0 -4
- package/src/providers/CrossmintWalletProvider.test.tsx +0 -6
- package/src/providers/auth/AuthFormProvider.test.tsx +0 -5
- package/src/providers/auth/AuthFormProvider.tsx +1 -6
- package/src/providers/auth/web3/DynamicWeb3WalletConnect.tsx +73 -0
- package/src/utils/dynamic/dynamicChainToCrossmintChain.ts +20 -0
- package/dist/chunk-5S4VO6RB.cjs +0 -55
- package/dist/chunk-5S4VO6RB.cjs.map +0 -1
- package/dist/chunk-EBMORHG3.cjs.map +0 -1
- package/dist/chunk-HSLAH2PN.cjs +0 -54
- package/dist/chunk-HSLAH2PN.cjs.map +0 -1
- package/dist/chunk-NFWMF6T7.js +0 -54
- package/dist/chunk-NFWMF6T7.js.map +0 -1
- package/dist/chunk-OZS4WEKF.js +0 -55
- package/dist/chunk-OZS4WEKF.js.map +0 -1
- package/dist/chunk-Q3UM7UCM.cjs +0 -64
- package/dist/chunk-Q3UM7UCM.cjs.map +0 -1
- package/dist/chunk-QFQWKKVU.js +0 -11
- package/dist/chunk-QFQWKKVU.js.map +0 -1
- package/dist/chunk-QK5J7FD3.cjs +0 -11
- package/dist/chunk-QK5J7FD3.cjs.map +0 -1
- package/dist/chunk-T5WAVOPI.js.map +0 -1
- package/dist/chunk-ZSWTJ6E7.js +0 -64
- package/dist/chunk-ZSWTJ6E7.js.map +0 -1
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.cjs +0 -36
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.d.cts +0 -10
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.d.ts +0 -10
- package/dist/components/auth/methods/web3/Web3ConnectorContainer.js +0 -36
- package/dist/providers/auth/web3/WagmiAuthProvider.cjs +0 -8
- package/dist/providers/auth/web3/WagmiAuthProvider.d.cts +0 -8
- package/dist/providers/auth/web3/WagmiAuthProvider.d.ts +0 -8
- package/dist/providers/auth/web3/WagmiAuthProvider.js +0 -8
- package/src/components/auth/methods/web3/Web3ConnectorContainer.tsx +0 -87
- package/src/providers/auth/web3/WagmiAuthProvider.tsx +0 -56
- /package/dist/{chunk-GGVJALEH.cjs.map → chunk-2ROLE4XU.cjs.map} +0 -0
- /package/dist/{chunk-HYP7ISWS.js.map → chunk-5EE2IAIP.js.map} +0 -0
- /package/dist/{chunk-FKRBO2MK.js.map → chunk-5UXGDXPR.js.map} +0 -0
- /package/dist/{chunk-NKOG6FTK.js.map → chunk-6EX2VR7S.js.map} +0 -0
- /package/dist/{chunk-U5EONMPH.js.map → chunk-6FG6NL44.js.map} +0 -0
- /package/dist/{chunk-E7KTAG6X.cjs.map → chunk-6PPUWTTF.cjs.map} +0 -0
- /package/dist/{chunk-MBJBFR2H.js.map → chunk-7BZSIPWM.js.map} +0 -0
- /package/dist/{chunk-LF3XEXLA.js.map → chunk-DCMLWFDK.js.map} +0 -0
- /package/dist/{chunk-6AFXSTEN.cjs.map → chunk-GMKTZIU2.cjs.map} +0 -0
- /package/dist/{chunk-4BGD6LSC.js.map → chunk-HOTEC5UH.js.map} +0 -0
- /package/dist/{chunk-LD66M6G7.cjs.map → chunk-K5S6RUJ3.cjs.map} +0 -0
- /package/dist/{chunk-HR57IU52.cjs.map → chunk-LJA62EVT.cjs.map} +0 -0
- /package/dist/{chunk-G526QBKQ.cjs.map → chunk-QFZ6GZZR.cjs.map} +0 -0
- /package/dist/{chunk-KAXBBO66.cjs.map → chunk-SBTNHVSD.cjs.map} +0 -0
- /package/dist/{chunk-7YHGZZ6G.js.map → chunk-TH42AO6J.js.map} +0 -0
- /package/dist/{chunk-JZYMJ733.js.map → chunk-U7LXB3SM.js.map} +0 -0
- /package/dist/{chunk-3LHIEADG.cjs.map → chunk-YNBGMNE6.cjs.map} +0 -0
- /package/dist/{chunk-NTAMXW3Z.cjs.map → chunk-ZJC4OB5Z.cjs.map} +0 -0
- /package/dist/{components/auth/methods/web3/Web3ConnectorContainer.cjs.map → providers/auth/web3/DynamicWeb3WalletConnect.cjs.map} +0 -0
- /package/dist/{components/auth/methods/web3/Web3ConnectorContainer.js.map → providers/auth/web3/DynamicWeb3WalletConnect.js.map} +0 -0
- /package/dist/{providers/auth/web3/WagmiAuthProvider.cjs.map → utils/dynamic/dynamicChainToCrossmintChain.cjs.map} +0 -0
- /package/dist/{providers/auth/web3/WagmiAuthProvider.js.map → utils/dynamic/dynamicChainToCrossmintChain.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkY3SUMTUIcjs = require('./chunk-Y3SUMTUI.cjs');
|
|
4
4
|
|
|
5
5
|
// src/components/CrossmintNFTCollectionView.tsx
|
|
6
6
|
var _clientsdkbase = require('@crossmint/client-sdk-base');
|
|
7
7
|
var _jsxruntime = require('react/jsx-runtime');
|
|
8
8
|
function CrossmintNFTCollectionView(props) {
|
|
9
9
|
_clientsdkbase.assertValidNFTCollectionViewProps.call(void 0, props);
|
|
10
|
-
const src = _clientsdkbase.getNFTCollectionViewSrc.call(void 0, props,
|
|
10
|
+
const src = _clientsdkbase.getNFTCollectionViewSrc.call(void 0, props, _chunkY3SUMTUIcjs.LIB_VERSION);
|
|
11
11
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12
12
|
"iframe",
|
|
13
13
|
{
|
|
@@ -28,4 +28,4 @@ function CrossmintNFTCollectionView(props) {
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
exports.CrossmintNFTCollectionView = CrossmintNFTCollectionView;
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-2ROLE4XU.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCrossmintApiClient
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HOTEC5UH.js";
|
|
4
4
|
import {
|
|
5
5
|
useCrossmint
|
|
6
6
|
} from "./chunk-3J6CUUWT.js";
|
|
@@ -84,4 +84,4 @@ function EmbeddedCheckoutV3IFrame(props) {
|
|
|
84
84
|
export {
|
|
85
85
|
EmbeddedCheckoutV3IFrame
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=chunk-
|
|
87
|
+
//# sourceMappingURL=chunk-5EE2IAIP.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
} from "./chunk-L3FKENHU.js";
|
|
8
8
|
import {
|
|
9
9
|
LIB_VERSION
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-FGHABNQM.js";
|
|
11
11
|
import {
|
|
12
12
|
__objRest,
|
|
13
13
|
__spreadValues
|
|
@@ -150,4 +150,4 @@ function CrossmintPayButton(buttonProps) {
|
|
|
150
150
|
export {
|
|
151
151
|
CrossmintPayButton
|
|
152
152
|
};
|
|
153
|
-
//# sourceMappingURL=chunk-
|
|
153
|
+
//# sourceMappingURL=chunk-5UXGDXPR.js.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__async
|
|
3
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/dynamic/dynamicChainToCrossmintChain.ts
|
|
6
|
+
import { chainIdToBlockchain } from "@crossmint/common-sdk-base";
|
|
7
|
+
function dynamicChainToCrossmintChain(wallet) {
|
|
8
|
+
return __async(this, null, function* () {
|
|
9
|
+
var _a;
|
|
10
|
+
const chain = wallet.chain;
|
|
11
|
+
if (chain === "SOL") {
|
|
12
|
+
return "solana";
|
|
13
|
+
}
|
|
14
|
+
const chainId = yield (_a = wallet.connector) == null ? void 0 : _a.getNetwork();
|
|
15
|
+
if (typeof chainId !== "number") {
|
|
16
|
+
throw new Error("chainId is not a number");
|
|
17
|
+
}
|
|
18
|
+
const chainFromChainId = chainIdToBlockchain(chainId);
|
|
19
|
+
if (!chainFromChainId) {
|
|
20
|
+
throw new Error(`ChainId ${chainId} is not supported`);
|
|
21
|
+
}
|
|
22
|
+
return chainFromChainId;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
dynamicChainToCrossmintChain
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=chunk-6CPZDD6Y.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/utils/dynamic/dynamicChainToCrossmintChain.ts"],"sourcesContent":["import { chainIdToBlockchain, type BlockchainIncludingTestnet } from \"@crossmint/common-sdk-base\";\nimport type { HandleConnectedWallet } from \"@dynamic-labs/sdk-react-core\";\n\nexport async 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":";;;;;AAAA,SAAS,2BAA4D;AAGrE,SAAsB,6BAClB,QACmC;AAAA;AALvC;AAMI,UAAM,QAAQ,OAAO;AACrB,QAAI,UAAU,OAAO;AACjB,aAAO;AAAA,IACX;AACA,UAAM,UAAU,OAAM,YAAO,cAAP,mBAAkB;AACxC,QAAI,OAAO,YAAY,UAAU;AAC7B,YAAM,IAAI,MAAM,yBAAyB;AAAA,IAC7C;AACA,UAAM,mBAAmB,oBAAoB,OAAO;AACpD,QAAI,CAAC,kBAAkB;AACnB,YAAM,IAAI,MAAM,WAAW,OAAO,mBAAmB;AAAA,IACzD;AACA,WAAO;AAAA,EACX;AAAA;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AuthForm
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-O53ZB544.js";
|
|
4
4
|
|
|
5
5
|
// src/components/auth/EmbeddedAuthForm.tsx
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -11,4 +11,4 @@ function EmbeddedAuthForm() {
|
|
|
11
11
|
export {
|
|
12
12
|
EmbeddedAuthForm
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=chunk-
|
|
14
|
+
//# sourceMappingURL=chunk-6EX2VR7S.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CrossmintFiatEmbeddedCheckout
|
|
3
|
-
} from "./chunk-2T2VCED7.js";
|
|
4
1
|
import {
|
|
5
2
|
CrossmintCryptoEmbeddedCheckout
|
|
6
3
|
} from "./chunk-ZUIS3FET.js";
|
|
4
|
+
import {
|
|
5
|
+
CrossmintFiatEmbeddedCheckout
|
|
6
|
+
} from "./chunk-2T2VCED7.js";
|
|
7
7
|
import {
|
|
8
8
|
__spreadValues
|
|
9
9
|
} from "./chunk-CRTRMMJ7.js";
|
|
@@ -27,4 +27,4 @@ function CrossmintPaymentElement(props) {
|
|
|
27
27
|
export {
|
|
28
28
|
CrossmintPaymentElement
|
|
29
29
|
};
|
|
30
|
-
//# sourceMappingURL=chunk-
|
|
30
|
+
//# sourceMappingURL=chunk-6FG6NL44.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkY3SUMTUIcjs = require('./chunk-Y3SUMTUI.cjs');
|
|
4
4
|
|
|
5
5
|
// src/components/CrossmintNFTDetail.tsx
|
|
6
6
|
var _clientsdkbase = require('@crossmint/client-sdk-base');
|
|
7
7
|
var _jsxruntime = require('react/jsx-runtime');
|
|
8
8
|
function CrossmintNFTDetail(props) {
|
|
9
9
|
_clientsdkbase.assertValidValidateNFTDetailProps.call(void 0, props);
|
|
10
|
-
const src = _clientsdkbase.getNFTDetailSrc.call(void 0, props,
|
|
10
|
+
const src = _clientsdkbase.getNFTDetailSrc.call(void 0, props, _chunkY3SUMTUIcjs.LIB_VERSION);
|
|
11
11
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
12
12
|
"iframe",
|
|
13
13
|
{
|
|
@@ -28,4 +28,4 @@ function CrossmintNFTDetail(props) {
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
exports.CrossmintNFTDetail = CrossmintNFTDetail;
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-6PPUWTTF.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LIB_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FGHABNQM.js";
|
|
4
4
|
|
|
5
5
|
// src/components/CrossmintNFTDetail.tsx
|
|
6
6
|
import { assertValidValidateNFTDetailProps, getNFTDetailSrc } from "@crossmint/client-sdk-base";
|
|
@@ -28,4 +28,4 @@ function CrossmintNFTDetail(props) {
|
|
|
28
28
|
export {
|
|
29
29
|
CrossmintNFTDetail
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-7BZSIPWM.js.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
dynamicChainToCrossmintChain
|
|
3
|
+
} from "./chunk-6CPZDD6Y.js";
|
|
4
|
+
import {
|
|
5
|
+
DynamicContextProviderWrapper
|
|
6
|
+
} from "./chunk-RZT2J42J.js";
|
|
7
|
+
import {
|
|
8
|
+
useAuthForm,
|
|
9
|
+
useCrossmintAuth
|
|
10
|
+
} from "./chunk-O53ZB544.js";
|
|
11
|
+
import {
|
|
12
|
+
__async
|
|
13
|
+
} from "./chunk-CRTRMMJ7.js";
|
|
14
|
+
|
|
15
|
+
// src/providers/auth/web3/DynamicWeb3WalletConnect.tsx
|
|
16
|
+
import { EthereumWalletConnectors } from "@dynamic-labs/ethereum";
|
|
17
|
+
import { SolanaWalletConnectors } from "@dynamic-labs/solana";
|
|
18
|
+
import { jsx } from "react/jsx-runtime";
|
|
19
|
+
function DynamicWeb3WalletConnect({
|
|
20
|
+
children,
|
|
21
|
+
apiKeyEnvironment
|
|
22
|
+
}) {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const { crossmintAuth } = useCrossmintAuth();
|
|
25
|
+
const { appearance } = useAuthForm();
|
|
26
|
+
const cssOverrides = `.powered-by-dynamic { display: none !important; } .wallet-list__scroll-container { padding: 0px !important; } .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; } .dynamic-footer { display: none !important; } h1 { color: ${(_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary} !important; } * { color: ${(_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary} !important; }`;
|
|
27
|
+
return /* @__PURE__ */ jsx(
|
|
28
|
+
DynamicContextProviderWrapper,
|
|
29
|
+
{
|
|
30
|
+
apiKeyEnvironment,
|
|
31
|
+
settings: {
|
|
32
|
+
cssOverrides,
|
|
33
|
+
walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],
|
|
34
|
+
events: {
|
|
35
|
+
onAuthFlowCancel() {
|
|
36
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowCancel");
|
|
37
|
+
},
|
|
38
|
+
onAuthFlowClose() {
|
|
39
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowClose");
|
|
40
|
+
},
|
|
41
|
+
onAuthFailure(data, reason) {
|
|
42
|
+
console.error("[CryptoWalletConnectionHandler] onAuthFailure", data, reason);
|
|
43
|
+
},
|
|
44
|
+
onAuthSuccess(data) {
|
|
45
|
+
console.log("[CryptoWalletConnectionHandler] onAuthSuccess", data);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
handlers: {
|
|
49
|
+
handleConnectedWallet: (wallet) => __async(this, null, function* () {
|
|
50
|
+
var _a2;
|
|
51
|
+
console.log("[CryptoWalletConnectionHandler] handleConnectedWallet", wallet);
|
|
52
|
+
const address = wallet.address;
|
|
53
|
+
if (!address) {
|
|
54
|
+
console.error("[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing");
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const chain = yield dynamicChainToCrossmintChain(wallet);
|
|
58
|
+
console.log({ chain });
|
|
59
|
+
try {
|
|
60
|
+
const res = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithSmartWallet(address);
|
|
61
|
+
const signature = yield (_a2 = wallet.connector) == null ? void 0 : _a2.signMessage(res.challenge);
|
|
62
|
+
const authResponse = yield crossmintAuth == null ? void 0 : crossmintAuth.authenticateSmartWallet(address, signature);
|
|
63
|
+
const oneTimeSecret = authResponse.oneTimeSecret;
|
|
64
|
+
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error("[CryptoWalletConnectionHandler] Error authenticating wallet:", error);
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
children
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export {
|
|
79
|
+
DynamicWeb3WalletConnect
|
|
80
|
+
};
|
|
81
|
+
//# sourceMappingURL=chunk-BFTVVPCU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/providers/auth/web3/DynamicWeb3WalletConnect.tsx"],"sourcesContent":["import type React from \"react\";\nimport { EthereumWalletConnectors } from \"@dynamic-labs/ethereum\";\nimport { SolanaWalletConnectors } from \"@dynamic-labs/solana\";\nimport type { APIKeyEnvironmentPrefix } from \"@crossmint/common-sdk-base\";\nimport DynamicContextProviderWrapper from \"@/components/dynamic-xyz/DynamicContextProviderWrapper\";\nimport { useCrossmintAuth } from \"@/hooks/useCrossmintAuth\";\nimport { useAuthForm } from \"../AuthFormProvider\";\nimport { dynamicChainToCrossmintChain } from \"@/utils/dynamic/dynamicChainToCrossmintChain\";\n\nexport function DynamicWeb3WalletConnect({\n children,\n apiKeyEnvironment,\n}: { children: React.ReactNode; apiKeyEnvironment: APIKeyEnvironmentPrefix }) {\n const { crossmintAuth } = useCrossmintAuth();\n const { appearance } = useAuthForm();\n\n const cssOverrides = `.powered-by-dynamic { display: none !important; } .wallet-list__scroll-container { padding: 0px !important; } .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; } .dynamic-footer { display: none !important; } h1 { color: ${appearance?.colors?.textPrimary} !important; } * { color: ${appearance?.colors?.textSecondary} !important; }`;\n\n return (\n <DynamicContextProviderWrapper\n apiKeyEnvironment={apiKeyEnvironment}\n settings={{\n cssOverrides,\n walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],\n events: {\n onAuthFlowCancel() {\n console.log(\"[CryptoWalletConnectionHandler] onAuthFlowCancel\");\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 return false;\n }\n\n const chain = await dynamicChainToCrossmintChain(wallet);\n console.log({ chain });\n\n try {\n const res = await crossmintAuth?.signInWithSmartWallet(address);\n const signature = (await wallet.connector?.signMessage(res.challenge)) as `0x${string}`;\n const authResponse = (await crossmintAuth?.authenticateSmartWallet(address, signature)) as {\n oneTimeSecret: string;\n };\n const oneTimeSecret = authResponse.oneTimeSecret;\n await crossmintAuth?.handleRefreshAuthMaterial(oneTimeSecret);\n } catch (error) {\n console.error(\"[CryptoWalletConnectionHandler] Error authenticating wallet:\", error);\n return false;\n }\n\n return true;\n },\n },\n }}\n >\n {children}\n </DynamicContextProviderWrapper>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;AACA,SAAS,gCAAgC;AACzC,SAAS,8BAA8B;AAiB/B;AAVD,SAAS,yBAAyB;AAAA,EACrC;AAAA,EACA;AACJ,GAA8E;AAZ9E;AAaI,QAAM,EAAE,cAAc,IAAI,iBAAiB;AAC3C,QAAM,EAAE,WAAW,IAAI,YAAY;AAEnC,QAAM,eAAe,4QAA2Q,8CAAY,WAAZ,mBAAoB,WAAW,8BAA6B,8CAAY,WAAZ,mBAAoB,aAAa;AAE7X,SACI;AAAA,IAAC;AAAA;AAAA,MACG;AAAA,MACA,UAAU;AAAA,QACN;AAAA,QACA,kBAAkB,CAAC,0BAA0B,sBAAsB;AAAA,QACnE,QAAQ;AAAA,UACJ,mBAAmB;AACf,oBAAQ,IAAI,kDAAkD;AAAA,UAClE;AAAA,UACA,kBAAkB;AACd,oBAAQ,IAAI,iDAAiD;AAAA,UACjE;AAAA,UACA,cAAc,MAAM,QAAQ;AACxB,oBAAQ,MAAM,iDAAiD,MAAM,MAAM;AAAA,UAC/E;AAAA,UACA,cAAc,MAAM;AAChB,oBAAQ,IAAI,iDAAiD,IAAI;AAAA,UACrE;AAAA,QACJ;AAAA,QACA,UAAU;AAAA,UACN,uBAAuB,CAAO,WAAW;AAvC7D,gBAAAA;AAwCwB,oBAAQ,IAAI,yDAAyD,MAAM;AAE3E,kBAAM,UAAU,OAAO;AACvB,gBAAI,CAAC,SAAS;AACV,sBAAQ,MAAM,2EAA2E;AACzF,qBAAO;AAAA,YACX;AAEA,kBAAM,QAAQ,MAAM,6BAA6B,MAAM;AACvD,oBAAQ,IAAI,EAAE,MAAM,CAAC;AAErB,gBAAI;AACA,oBAAM,MAAM,MAAM,+CAAe,sBAAsB;AACvD,oBAAM,YAAa,OAAMA,MAAA,OAAO,cAAP,gBAAAA,IAAkB,YAAY,IAAI;AAC3D,oBAAM,eAAgB,MAAM,+CAAe,wBAAwB,SAAS;AAG5E,oBAAM,gBAAgB,aAAa;AACnC,oBAAM,+CAAe,0BAA0B;AAAA,YACnD,SAAS,OAAO;AACZ,sBAAQ,MAAM,gEAAgE,KAAK;AACnF,qBAAO;AAAA,YACX;AAEA,mBAAO;AAAA,UACX;AAAA,QACJ;AAAA,MACJ;AAAA,MAEC;AAAA;AAAA,EACL;AAER;","names":["_a"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkKNOUJZN5cjs = require('./chunk-KNOUJZN5.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkAXZLLRBUcjs = require('./chunk-AXZLLRBU.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkMCINXS2Ycjs = require('./chunk-MCINXS2Y.cjs');
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
var _chunk5RX5WFEWcjs = require('./chunk-5RX5WFEW.cjs');
|
|
13
|
+
|
|
14
|
+
// src/components/auth/methods/web3/Web3AuthFlowButton.tsx
|
|
15
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
16
|
+
function Web3AuthFlowButton() {
|
|
17
|
+
var _a, _b, _c, _d, _e;
|
|
18
|
+
const { step, appearance, setStep, setError } = _chunkMCINXS2Ycjs.useAuthForm.call(void 0, );
|
|
19
|
+
if (step !== "initial") {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
className: _chunk5RX5WFEWcjs.classNames.call(void 0,
|
|
26
|
+
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
27
|
+
"transition-colors duration-200 ease-in-out",
|
|
28
|
+
"hover:bg-cm-hover focus:bg-cm-hover outline-none"
|
|
29
|
+
),
|
|
30
|
+
style: {
|
|
31
|
+
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
32
|
+
borderColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.border,
|
|
33
|
+
backgroundColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.buttonBackground
|
|
34
|
+
},
|
|
35
|
+
onClick: () => {
|
|
36
|
+
setStep("web3");
|
|
37
|
+
setError(null);
|
|
38
|
+
},
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
41
|
+
_chunkKNOUJZN5cjs.WalletIcon,
|
|
42
|
+
{
|
|
43
|
+
className: "h-[21px] w-[21px] absolute left-[20px]",
|
|
44
|
+
style: { color: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary }
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "font-medium", style: { margin: "0px 32px", color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary }, children: "Continue with a wallet" }),
|
|
48
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
49
|
+
_chunkAXZLLRBUcjs.ChevronRightIcon,
|
|
50
|
+
{
|
|
51
|
+
className: "h-[21px] w-[21px] absolute right-[20px]",
|
|
52
|
+
style: { color: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.textSecondary }
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Continue with a wallet" })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
exports.Web3AuthFlowButton = Web3AuthFlowButton;
|
|
64
|
+
//# sourceMappingURL=chunk-BURUD6IV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/auth/methods/web3/Web3AuthFlowButton.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;AAaQ,SAgBI,KAhBJ;AARD,SAAS,qBAAqB;AALrC;AAMI,QAAM,EAAE,MAAM,YAAY,SAAS,SAAS,IAAI,YAAY;AAE5D,MAAI,SAAS,WAAW;AACpB,WAAO;AAAA,EACX;AAEA,SACI;AAAA,IAAC;AAAA;AAAA,MACG,WAAW;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,QACH,cAAc,yCAAY;AAAA,QAC1B,cAAa,8CAAY,WAAZ,mBAAoB;AAAA,QACjC,kBAAiB,8CAAY,WAAZ,mBAAoB;AAAA,MACzC;AAAA,MACA,SAAS,MAAM;AACX,gBAAQ,MAAM;AACd,iBAAS,IAAI;AAAA,MACjB;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACG,WAAU;AAAA,YACV,OAAO,EAAE,QAAO,8CAAY,WAAZ,mBAAoB,YAAY;AAAA;AAAA,QACpD;AAAA,QACA,oBAAC,UAAK,WAAU,eAAc,OAAO,EAAE,QAAQ,YAAY,QAAO,8CAAY,WAAZ,mBAAoB,YAAY,GAAG,oCAErG;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACG,WAAU;AAAA,YACV,OAAO,EAAE,QAAO,8CAAY,WAAZ,mBAAoB,cAAc;AAAA;AAAA,QACtD;AAAA,QACA,oBAAC,UAAK,WAAU,WAAU,oCAAsB;AAAA;AAAA;AAAA,EACpD;AAER","sourcesContent":["import { ChevronRightIcon } from \"@/icons/chevronRight\";\nimport { WalletIcon } from \"@/icons/wallet\";\nimport { useAuthForm } from \"@/providers/auth/AuthFormProvider\";\nimport { classNames } from \"@/utils/classNames\";\n\nexport function Web3AuthFlowButton() {\n const { step, appearance, setStep, setError } = useAuthForm();\n\n if (step !== \"initial\") {\n return null;\n }\n\n return (\n <button\n className={classNames(\n \"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center\",\n \"transition-colors duration-200 ease-in-out\",\n \"hover:bg-cm-hover focus:bg-cm-hover outline-none\"\n )}\n style={{\n borderRadius: appearance?.borderRadius,\n borderColor: appearance?.colors?.border,\n backgroundColor: appearance?.colors?.buttonBackground,\n }}\n onClick={() => {\n setStep(\"web3\");\n setError(null);\n }}\n >\n <WalletIcon\n className=\"h-[21px] w-[21px] absolute left-[20px]\"\n style={{ color: appearance?.colors?.textPrimary }}\n />\n <span className=\"font-medium\" style={{ margin: \"0px 32px\", color: appearance?.colors?.textPrimary }}>\n Continue with a wallet\n </span>\n <ChevronRightIcon\n className=\"h-[21px] w-[21px] absolute right-[20px]\"\n style={{ color: appearance?.colors?.textSecondary }}\n />\n <span className=\"sr-only\">Continue with a wallet</span>\n </button>\n );\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LIB_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FGHABNQM.js";
|
|
4
4
|
|
|
5
5
|
// src/components/CrossmintNFTCollectionView.tsx
|
|
6
6
|
import { assertValidNFTCollectionViewProps, getNFTCollectionViewSrc } from "@crossmint/client-sdk-base";
|
|
@@ -28,4 +28,4 @@ function CrossmintNFTCollectionView(props) {
|
|
|
28
28
|
export {
|
|
29
29
|
CrossmintNFTCollectionView
|
|
30
30
|
};
|
|
31
|
-
//# sourceMappingURL=chunk-
|
|
31
|
+
//# sourceMappingURL=chunk-DCMLWFDK.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
AuthFormBackButton,
|
|
3
|
+
useAuthForm
|
|
4
|
+
} from "./chunk-O53ZB544.js";
|
|
5
|
+
|
|
6
|
+
// src/components/auth/methods/web3/Web3Connectors.tsx
|
|
7
|
+
import { DynamicEmbeddedWidget } from "@dynamic-labs/sdk-react-core";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
function Web3Connectors() {
|
|
10
|
+
var _a, _b;
|
|
11
|
+
const { appearance, step, setStep } = useAuthForm();
|
|
12
|
+
if (step === "web3") {
|
|
13
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
14
|
+
/* @__PURE__ */ jsx(
|
|
15
|
+
AuthFormBackButton,
|
|
16
|
+
{
|
|
17
|
+
onClick: () => setStep("initial"),
|
|
18
|
+
iconColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary,
|
|
19
|
+
ringColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.accent
|
|
20
|
+
}
|
|
21
|
+
),
|
|
22
|
+
/* @__PURE__ */ jsx("div", { className: "flex flex-col items-center", children: /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-[10px] w-full", children: /* @__PURE__ */ jsx("div", { className: "widget-container", children: /* @__PURE__ */ jsx(DynamicEmbeddedWidget, { background: "none" }) }) }) })
|
|
23
|
+
] });
|
|
24
|
+
}
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export {
|
|
29
|
+
Web3Connectors
|
|
30
|
+
};
|
|
31
|
+
//# sourceMappingURL=chunk-DR67KSE7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/auth/methods/web3/Web3Connectors.tsx"],"sourcesContent":["import { useAuthForm } from \"@/providers/auth/AuthFormProvider\";\nimport { AuthFormBackButton } from \"../../AuthFormBackButton\";\nimport { DynamicEmbeddedWidget } from \"@dynamic-labs/sdk-react-core\";\n\nexport function Web3Connectors() {\n const { appearance, step, setStep } = useAuthForm();\n\n if (step === \"web3\") {\n return (\n <>\n <AuthFormBackButton\n onClick={() => setStep(\"initial\")}\n iconColor={appearance?.colors?.textPrimary}\n ringColor={appearance?.colors?.accent}\n />\n <div className=\"flex flex-col items-center\">\n <div className=\"flex flex-col gap-[10px] w-full\">\n <div className=\"widget-container\">\n <DynamicEmbeddedWidget background=\"none\" />\n </div>\n </div>\n </div>\n </>\n );\n }\n\n return null;\n}\n"],"mappings":";;;;;;AAEA,SAAS,6BAA6B;AAO1B,mBACI,KADJ;AALL,SAAS,iBAAiB;AAJjC;AAKI,QAAM,EAAE,YAAY,MAAM,QAAQ,IAAI,YAAY;AAElD,MAAI,SAAS,QAAQ;AACjB,WACI,iCACI;AAAA;AAAA,QAAC;AAAA;AAAA,UACG,SAAS,MAAM,QAAQ,SAAS;AAAA,UAChC,YAAW,8CAAY,WAAZ,mBAAoB;AAAA,UAC/B,YAAW,8CAAY,WAAZ,mBAAoB;AAAA;AAAA,MACnC;AAAA,MACA,oBAAC,SAAI,WAAU,8BACX,8BAAC,SAAI,WAAU,mCACX,8BAAC,SAAI,WAAU,oBACX,8BAAC,yBAAsB,YAAW,QAAO,GAC7C,GACJ,GACJ;AAAA,OACJ;AAAA,EAER;AAEA,SAAO;AACX;","names":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// package.json
|
|
2
|
-
var version = "1.10.
|
|
2
|
+
var version = "1.10.7";
|
|
3
3
|
|
|
4
4
|
// src/consts/version.ts
|
|
5
5
|
var LIB_VERSION = version;
|
|
@@ -7,4 +7,4 @@ var LIB_VERSION = version;
|
|
|
7
7
|
export {
|
|
8
8
|
LIB_VERSION
|
|
9
9
|
};
|
|
10
|
-
//# sourceMappingURL=chunk-
|
|
10
|
+
//# sourceMappingURL=chunk-FGHABNQM.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../package.json","../src/consts/version.ts"],"sourcesContent":["{\n \"name\": \"@crossmint/client-sdk-react-ui\",\n \"version\": \"1.10.
|
|
1
|
+
{"version":3,"sources":["../package.json","../src/consts/version.ts"],"sourcesContent":["{\n \"name\": \"@crossmint/client-sdk-react-ui\",\n \"version\": \"1.10.7\",\n \"repository\": \"https://github.com/Crossmint/crossmint-sdk\",\n \"license\": \"Apache-2.0\",\n \"author\": \"Paella Labs Inc\",\n \"sideEffects\": false,\n \"type\": \"module\",\n \"exports\": {\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.ts\",\n \"files\": [\"dist\", \"src\", \"LICENSE\"],\n \"scripts\": {\n \"build\": \"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup\",\n \"dev\": \"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch\",\n \"test:vitest\": \"vitest run\"\n },\n \"dependencies\": {\n \"@crossmint/client-sdk-auth\": \"workspace:*\",\n \"@crossmint/client-sdk-base\": \"workspace:*\",\n \"@crossmint/client-sdk-smart-wallet\": \"workspace:*\",\n \"@crossmint/client-sdk-window\": \"workspace:*\",\n \"@crossmint/common-sdk-auth\": \"workspace:*\",\n \"@crossmint/common-sdk-base\": \"workspace:*\",\n \"@dynamic-labs/ethereum\": \"2.6.3\",\n \"@dynamic-labs/sdk-react-core\": \"2.6.3\",\n \"@dynamic-labs/solana\": \"2.6.3\",\n \"@ethersproject/transactions\": \"5.7.0\",\n \"@farcaster/auth-kit\": \"0.6.0\",\n \"@headlessui/react\": \"2.1.5\",\n \"@radix-ui/react-dialog\": \"1.1.2\",\n \"@radix-ui/react-visually-hidden\": \"1.1.0\",\n \"@solana/web3.js\": \"1.95.1\",\n \"@twind/core\": \"1.1.3\",\n \"@twind/preset-tailwind\": \"1.1.4\",\n \"bs58\": \"5.0.0\",\n \"clsx\": \"2.1.1\",\n \"color\": \"4.2.3\",\n \"input-otp\": \"1.2.4\",\n \"lodash.isequal\": \"4.5.0\",\n \"react-jss\": \"10.10.0\",\n \"tailwind-merge\": \"2.4.0\",\n \"tailwindcss\": \"3.4.10\",\n \"viem\": \"2.17.5\",\n \"zod\": \"3.22.4\"\n },\n \"devDependencies\": {\n \"@testing-library/react\": \"^16.0.1\",\n \"@types/color\": \"4.2.0\",\n \"@types/lodash.isequal\": \"4.5.6\",\n \"@types/react\": \"^18.3.0\",\n \"@types/react-dom\": \"^18.3.0\",\n \"react\": \"^18.3.0\",\n \"react-dom\": \"^18.3.0\"\n },\n \"peerDependencies\": {\n \"react\": \">=17.0.2\",\n \"react-dom\": \">=17.0.2\"\n }\n}\n","import { version } from \"../../package.json\";\n\nexport const LIB_VERSION = version;\n"],"mappings":";AAEI,cAAW;;;ACAR,IAAM,cAAc;","names":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkY3SUMTUIcjs = require('./chunk-Y3SUMTUI.cjs');
|
|
4
4
|
|
|
5
5
|
// src/utils/createCrossmintApiClient.ts
|
|
6
6
|
var _commonsdkbase = require('@crossmint/common-sdk-base');
|
|
@@ -9,7 +9,7 @@ function createCrossmintApiClient(crossmint, apiKeyExpectations) {
|
|
|
9
9
|
internalConfig: {
|
|
10
10
|
sdkMetadata: {
|
|
11
11
|
name: "@crossmint/client-sdk-react-ui",
|
|
12
|
-
version:
|
|
12
|
+
version: _chunkY3SUMTUIcjs.LIB_VERSION
|
|
13
13
|
},
|
|
14
14
|
apiKeyExpectations
|
|
15
15
|
}
|
|
@@ -19,4 +19,4 @@ function createCrossmintApiClient(crossmint, apiKeyExpectations) {
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
exports.createCrossmintApiClient = createCrossmintApiClient;
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-GMKTZIU2.cjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LIB_VERSION
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-FGHABNQM.js";
|
|
4
4
|
|
|
5
5
|
// src/utils/createCrossmintApiClient.ts
|
|
6
6
|
import { CrossmintApiClient } from "@crossmint/common-sdk-base";
|
|
@@ -19,4 +19,4 @@ function createCrossmintApiClient(crossmint, apiKeyExpectations) {
|
|
|
19
19
|
export {
|
|
20
20
|
createCrossmintApiClient
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-HOTEC5UH.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WalletIcon
|
|
3
|
+
} from "./chunk-VZIXXIU5.js";
|
|
4
|
+
import {
|
|
5
|
+
ChevronRightIcon
|
|
6
|
+
} from "./chunk-3KR4GYLF.js";
|
|
7
|
+
import {
|
|
8
|
+
useAuthForm
|
|
9
|
+
} from "./chunk-O53ZB544.js";
|
|
10
|
+
import {
|
|
11
|
+
classNames
|
|
12
|
+
} from "./chunk-RZPQIRIY.js";
|
|
13
|
+
|
|
14
|
+
// src/components/auth/methods/web3/Web3AuthFlowButton.tsx
|
|
15
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
16
|
+
function Web3AuthFlowButton() {
|
|
17
|
+
var _a, _b, _c, _d, _e;
|
|
18
|
+
const { step, appearance, setStep, setError } = useAuthForm();
|
|
19
|
+
if (step !== "initial") {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ jsxs(
|
|
23
|
+
"button",
|
|
24
|
+
{
|
|
25
|
+
className: classNames(
|
|
26
|
+
"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center",
|
|
27
|
+
"transition-colors duration-200 ease-in-out",
|
|
28
|
+
"hover:bg-cm-hover focus:bg-cm-hover outline-none"
|
|
29
|
+
),
|
|
30
|
+
style: {
|
|
31
|
+
borderRadius: appearance == null ? void 0 : appearance.borderRadius,
|
|
32
|
+
borderColor: (_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.border,
|
|
33
|
+
backgroundColor: (_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.buttonBackground
|
|
34
|
+
},
|
|
35
|
+
onClick: () => {
|
|
36
|
+
setStep("web3");
|
|
37
|
+
setError(null);
|
|
38
|
+
},
|
|
39
|
+
children: [
|
|
40
|
+
/* @__PURE__ */ jsx(
|
|
41
|
+
WalletIcon,
|
|
42
|
+
{
|
|
43
|
+
className: "h-[21px] w-[21px] absolute left-[20px]",
|
|
44
|
+
style: { color: (_c = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _c.textPrimary }
|
|
45
|
+
}
|
|
46
|
+
),
|
|
47
|
+
/* @__PURE__ */ jsx("span", { className: "font-medium", style: { margin: "0px 32px", color: (_d = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _d.textPrimary }, children: "Continue with a wallet" }),
|
|
48
|
+
/* @__PURE__ */ jsx(
|
|
49
|
+
ChevronRightIcon,
|
|
50
|
+
{
|
|
51
|
+
className: "h-[21px] w-[21px] absolute right-[20px]",
|
|
52
|
+
style: { color: (_e = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _e.textSecondary }
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Continue with a wallet" })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export {
|
|
62
|
+
Web3AuthFlowButton
|
|
63
|
+
};
|
|
64
|
+
//# sourceMappingURL=chunk-HW2Q6J4R.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/auth/methods/web3/Web3AuthFlowButton.tsx"],"sourcesContent":["import { ChevronRightIcon } from \"@/icons/chevronRight\";\nimport { WalletIcon } from \"@/icons/wallet\";\nimport { useAuthForm } from \"@/providers/auth/AuthFormProvider\";\nimport { classNames } from \"@/utils/classNames\";\n\nexport function Web3AuthFlowButton() {\n const { step, appearance, setStep, setError } = useAuthForm();\n\n if (step !== \"initial\") {\n return null;\n }\n\n return (\n <button\n className={classNames(\n \"relative flex text-base p-4 bg-cm-muted-primary text-cm-text-primary items-center w-full rounded-xl justify-center\",\n \"transition-colors duration-200 ease-in-out\",\n \"hover:bg-cm-hover focus:bg-cm-hover outline-none\"\n )}\n style={{\n borderRadius: appearance?.borderRadius,\n borderColor: appearance?.colors?.border,\n backgroundColor: appearance?.colors?.buttonBackground,\n }}\n onClick={() => {\n setStep(\"web3\");\n setError(null);\n }}\n >\n <WalletIcon\n className=\"h-[21px] w-[21px] absolute left-[20px]\"\n style={{ color: appearance?.colors?.textPrimary }}\n />\n <span className=\"font-medium\" style={{ margin: \"0px 32px\", color: appearance?.colors?.textPrimary }}>\n Continue with a wallet\n </span>\n <ChevronRightIcon\n className=\"h-[21px] w-[21px] absolute right-[20px]\"\n style={{ color: appearance?.colors?.textSecondary }}\n />\n <span className=\"sr-only\">Continue with a wallet</span>\n </button>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAaQ,SAgBI,KAhBJ;AARD,SAAS,qBAAqB;AALrC;AAMI,QAAM,EAAE,MAAM,YAAY,SAAS,SAAS,IAAI,YAAY;AAE5D,MAAI,SAAS,WAAW;AACpB,WAAO;AAAA,EACX;AAEA,SACI;AAAA,IAAC;AAAA;AAAA,MACG,WAAW;AAAA,QACP;AAAA,QACA;AAAA,QACA;AAAA,MACJ;AAAA,MACA,OAAO;AAAA,QACH,cAAc,yCAAY;AAAA,QAC1B,cAAa,8CAAY,WAAZ,mBAAoB;AAAA,QACjC,kBAAiB,8CAAY,WAAZ,mBAAoB;AAAA,MACzC;AAAA,MACA,SAAS,MAAM;AACX,gBAAQ,MAAM;AACd,iBAAS,IAAI;AAAA,MACjB;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACG,WAAU;AAAA,YACV,OAAO,EAAE,QAAO,8CAAY,WAAZ,mBAAoB,YAAY;AAAA;AAAA,QACpD;AAAA,QACA,oBAAC,UAAK,WAAU,eAAc,OAAO,EAAE,QAAQ,YAAY,QAAO,8CAAY,WAAZ,mBAAoB,YAAY,GAAG,oCAErG;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACG,WAAU;AAAA,YACV,OAAO,EAAE,QAAO,8CAAY,WAAZ,mBAAoB,cAAc;AAAA;AAAA,QACtD;AAAA,QACA,oBAAC,UAAK,WAAU,WAAU,oCAAsB;AAAA;AAAA;AAAA,EACpD;AAER;","names":[]}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkLGY5FQOZcjs = require('./chunk-LGY5FQOZ.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkUQAKJ4T7cjs = require('./chunk-UQAKJ4T7.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkMCINXS2Ycjs = require('./chunk-MCINXS2Y.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunk4DAZAO6Ycjs = require('./chunk-4DAZAO6Y.cjs');
|
|
14
|
+
|
|
15
|
+
// src/providers/auth/web3/DynamicWeb3WalletConnect.tsx
|
|
16
|
+
var _ethereum = require('@dynamic-labs/ethereum');
|
|
17
|
+
var _solana = require('@dynamic-labs/solana');
|
|
18
|
+
var _jsxruntime = require('react/jsx-runtime');
|
|
19
|
+
function DynamicWeb3WalletConnect({
|
|
20
|
+
children,
|
|
21
|
+
apiKeyEnvironment
|
|
22
|
+
}) {
|
|
23
|
+
var _a, _b;
|
|
24
|
+
const { crossmintAuth } = _chunkMCINXS2Ycjs.useCrossmintAuth.call(void 0, );
|
|
25
|
+
const { appearance } = _chunkMCINXS2Ycjs.useAuthForm.call(void 0, );
|
|
26
|
+
const cssOverrides = `.powered-by-dynamic { display: none !important; } .wallet-list__scroll-container { padding: 0px !important; } .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; } .dynamic-footer { display: none !important; } h1 { color: ${(_a = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _a.textPrimary} !important; } * { color: ${(_b = appearance == null ? void 0 : appearance.colors) == null ? void 0 : _b.textSecondary} !important; }`;
|
|
27
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
28
|
+
_chunkUQAKJ4T7cjs.DynamicContextProviderWrapper,
|
|
29
|
+
{
|
|
30
|
+
apiKeyEnvironment,
|
|
31
|
+
settings: {
|
|
32
|
+
cssOverrides,
|
|
33
|
+
walletConnectors: [_ethereum.EthereumWalletConnectors, _solana.SolanaWalletConnectors],
|
|
34
|
+
events: {
|
|
35
|
+
onAuthFlowCancel() {
|
|
36
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowCancel");
|
|
37
|
+
},
|
|
38
|
+
onAuthFlowClose() {
|
|
39
|
+
console.log("[CryptoWalletConnectionHandler] onAuthFlowClose");
|
|
40
|
+
},
|
|
41
|
+
onAuthFailure(data, reason) {
|
|
42
|
+
console.error("[CryptoWalletConnectionHandler] onAuthFailure", data, reason);
|
|
43
|
+
},
|
|
44
|
+
onAuthSuccess(data) {
|
|
45
|
+
console.log("[CryptoWalletConnectionHandler] onAuthSuccess", data);
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
handlers: {
|
|
49
|
+
handleConnectedWallet: (wallet) => _chunk4DAZAO6Ycjs.__async.call(void 0, this, null, function* () {
|
|
50
|
+
var _a2;
|
|
51
|
+
console.log("[CryptoWalletConnectionHandler] handleConnectedWallet", wallet);
|
|
52
|
+
const address = wallet.address;
|
|
53
|
+
if (!address) {
|
|
54
|
+
console.error("[CryptoWalletConnectionHandler] handleConnectedWallet: address is missing");
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
const chain = yield _chunkLGY5FQOZcjs.dynamicChainToCrossmintChain.call(void 0, wallet);
|
|
58
|
+
console.log({ chain });
|
|
59
|
+
try {
|
|
60
|
+
const res = yield crossmintAuth == null ? void 0 : crossmintAuth.signInWithSmartWallet(address);
|
|
61
|
+
const signature = yield (_a2 = wallet.connector) == null ? void 0 : _a2.signMessage(res.challenge);
|
|
62
|
+
const authResponse = yield crossmintAuth == null ? void 0 : crossmintAuth.authenticateSmartWallet(address, signature);
|
|
63
|
+
const oneTimeSecret = authResponse.oneTimeSecret;
|
|
64
|
+
yield crossmintAuth == null ? void 0 : crossmintAuth.handleRefreshAuthMaterial(oneTimeSecret);
|
|
65
|
+
} catch (error) {
|
|
66
|
+
console.error("[CryptoWalletConnectionHandler] Error authenticating wallet:", error);
|
|
67
|
+
return false;
|
|
68
|
+
}
|
|
69
|
+
return true;
|
|
70
|
+
})
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
children
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
exports.DynamicWeb3WalletConnect = DynamicWeb3WalletConnect;
|
|
81
|
+
//# sourceMappingURL=chunk-HZ26XTTK.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/providers/auth/web3/DynamicWeb3WalletConnect.tsx"],"names":["_a"],"mappings":";;;;;;;;;;;;;;;AACA,SAAS,gCAAgC;AACzC,SAAS,8BAA8B;AAiB/B;AAVD,SAAS,yBAAyB;AAAA,EACrC;AAAA,EACA;AACJ,GAA8E;AAZ9E;AAaI,QAAM,EAAE,cAAc,IAAI,iBAAiB;AAC3C,QAAM,EAAE,WAAW,IAAI,YAAY;AAEnC,QAAM,eAAe,4QAA2Q,8CAAY,WAAZ,mBAAoB,WAAW,8BAA6B,8CAAY,WAAZ,mBAAoB,aAAa;AAE7X,SACI;AAAA,IAAC;AAAA;AAAA,MACG;AAAA,MACA,UAAU;AAAA,QACN;AAAA,QACA,kBAAkB,CAAC,0BAA0B,sBAAsB;AAAA,QACnE,QAAQ;AAAA,UACJ,mBAAmB;AACf,oBAAQ,IAAI,kDAAkD;AAAA,UAClE;AAAA,UACA,kBAAkB;AACd,oBAAQ,IAAI,iDAAiD;AAAA,UACjE;AAAA,UACA,cAAc,MAAM,QAAQ;AACxB,oBAAQ,MAAM,iDAAiD,MAAM,MAAM;AAAA,UAC/E;AAAA,UACA,cAAc,MAAM;AAChB,oBAAQ,IAAI,iDAAiD,IAAI;AAAA,UACrE;AAAA,QACJ;AAAA,QACA,UAAU;AAAA,UACN,uBAAuB,CAAO,WAAW;AAvC7D,gBAAAA;AAwCwB,oBAAQ,IAAI,yDAAyD,MAAM;AAE3E,kBAAM,UAAU,OAAO;AACvB,gBAAI,CAAC,SAAS;AACV,sBAAQ,MAAM,2EAA2E;AACzF,qBAAO;AAAA,YACX;AAEA,kBAAM,QAAQ,MAAM,6BAA6B,MAAM;AACvD,oBAAQ,IAAI,EAAE,MAAM,CAAC;AAErB,gBAAI;AACA,oBAAM,MAAM,MAAM,+CAAe,sBAAsB;AACvD,oBAAM,YAAa,OAAMA,MAAA,OAAO,cAAP,gBAAAA,IAAkB,YAAY,IAAI;AAC3D,oBAAM,eAAgB,MAAM,+CAAe,wBAAwB,SAAS;AAG5E,oBAAM,gBAAgB,aAAa;AACnC,oBAAM,+CAAe,0BAA0B;AAAA,YACnD,SAAS,OAAO;AACZ,sBAAQ,MAAM,gEAAgE,KAAK;AACnF,qBAAO;AAAA,YACX;AAEA,mBAAO;AAAA,UACX;AAAA,QACJ;AAAA,MACJ;AAAA,MAEC;AAAA;AAAA,EACL;AAER","sourcesContent":["import type React from \"react\";\nimport { EthereumWalletConnectors } from \"@dynamic-labs/ethereum\";\nimport { SolanaWalletConnectors } from \"@dynamic-labs/solana\";\nimport type { APIKeyEnvironmentPrefix } from \"@crossmint/common-sdk-base\";\nimport DynamicContextProviderWrapper from \"@/components/dynamic-xyz/DynamicContextProviderWrapper\";\nimport { useCrossmintAuth } from \"@/hooks/useCrossmintAuth\";\nimport { useAuthForm } from \"../AuthFormProvider\";\nimport { dynamicChainToCrossmintChain } from \"@/utils/dynamic/dynamicChainToCrossmintChain\";\n\nexport function DynamicWeb3WalletConnect({\n children,\n apiKeyEnvironment,\n}: { children: React.ReactNode; apiKeyEnvironment: APIKeyEnvironmentPrefix }) {\n const { crossmintAuth } = useCrossmintAuth();\n const { appearance } = useAuthForm();\n\n const cssOverrides = `.powered-by-dynamic { display: none !important; } .wallet-list__scroll-container { padding: 0px !important; } .wallet-list__search-container { padding-left: 0px !important; padding-right: 0px !important; } .dynamic-footer { display: none !important; } h1 { color: ${appearance?.colors?.textPrimary} !important; } * { color: ${appearance?.colors?.textSecondary} !important; }`;\n\n return (\n <DynamicContextProviderWrapper\n apiKeyEnvironment={apiKeyEnvironment}\n settings={{\n cssOverrides,\n walletConnectors: [EthereumWalletConnectors, SolanaWalletConnectors],\n events: {\n onAuthFlowCancel() {\n console.log(\"[CryptoWalletConnectionHandler] onAuthFlowCancel\");\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 return false;\n }\n\n const chain = await dynamicChainToCrossmintChain(wallet);\n console.log({ chain });\n\n try {\n const res = await crossmintAuth?.signInWithSmartWallet(address);\n const signature = (await wallet.connector?.signMessage(res.challenge)) as `0x${string}`;\n const authResponse = (await crossmintAuth?.authenticateSmartWallet(address, signature)) as {\n oneTimeSecret: string;\n };\n const oneTimeSecret = authResponse.oneTimeSecret;\n await crossmintAuth?.handleRefreshAuthMaterial(oneTimeSecret);\n } catch (error) {\n console.error(\"[CryptoWalletConnectionHandler] Error authenticating wallet:\", error);\n return false;\n }\n\n return true;\n },\n },\n }}\n >\n {children}\n </DynamicContextProviderWrapper>\n );\n}\n"]}
|
|
@@ -7,7 +7,7 @@ var _chunkQ3M4UH5Ucjs = require('./chunk-Q3M4UH5U.cjs');
|
|
|
7
7
|
var _chunkKLWDDALZcjs = require('./chunk-KLWDDALZ.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkY3SUMTUIcjs = require('./chunk-Y3SUMTUI.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
13
|
|
|
@@ -91,7 +91,7 @@ function CrossmintPayButton(buttonProps) {
|
|
|
91
91
|
showOverlay,
|
|
92
92
|
dismissOverlayOnClick,
|
|
93
93
|
setConnecting,
|
|
94
|
-
libVersion:
|
|
94
|
+
libVersion: _chunkY3SUMTUIcjs.LIB_VERSION,
|
|
95
95
|
environment,
|
|
96
96
|
clientName: _clientsdkbase.clientNames.reactUi,
|
|
97
97
|
locale,
|
|
@@ -150,4 +150,4 @@ function CrossmintPayButton(buttonProps) {
|
|
|
150
150
|
|
|
151
151
|
|
|
152
152
|
exports.CrossmintPayButton = CrossmintPayButton;
|
|
153
|
-
//# sourceMappingURL=chunk-
|
|
153
|
+
//# sourceMappingURL=chunk-K5S6RUJ3.cjs.map
|