@getpara/react-sdk-lite 2.0.0-alpha.39 → 2.0.0-alpha.41
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/css/modal.css +14 -1
- package/dist/modal/ParaModal.js +29 -6
- package/dist/modal/components/Account/Account.d.ts +1 -5
- package/dist/modal/components/Account/Account.js +53 -71
- package/dist/modal/components/Account/AccountHeader.d.ts +3 -0
- package/dist/modal/components/Account/AccountHeader.js +64 -0
- package/dist/modal/components/Account/AccountProfile.d.ts +4 -1
- package/dist/modal/components/Account/AccountProfile.js +114 -27
- package/dist/modal/components/AddFunds/AddFunds.js +11 -6
- package/dist/modal/components/AddFunds/AddFundsAsset.js +5 -32
- package/dist/modal/components/AddFunds/AddFundsDone.js +1 -1
- package/dist/modal/components/AddFunds/AddFundsProvider.js +1 -1
- package/dist/modal/components/AddFunds/AddFundsReceive.js +8 -53
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +3 -5
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +4 -3
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +4 -1
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +7 -5
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +4 -4
- package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +1 -0
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +2 -2
- package/dist/modal/components/Body/Body.d.ts +3 -1
- package/dist/modal/components/Body/Body.js +40 -47
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +13 -21
- package/dist/modal/components/Controls/{Selects.d.ts → ChainSelect.d.ts} +0 -1
- package/dist/modal/components/Controls/ChainSelect.js +88 -0
- package/dist/modal/components/Controls/Controls.js +10 -20
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +1 -1
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +17 -12
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +1 -1
- package/dist/modal/components/Footer/Footer.js +26 -57
- package/dist/modal/components/Header/Header.js +46 -8
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +4 -0
- package/dist/modal/components/Header/hooks/useStepTitle.js +48 -15
- package/dist/modal/components/IFrameStep/IFrameStep.js +22 -10
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +16 -10
- package/dist/modal/components/ModalContent/ModalContent.d.ts +4 -3
- package/dist/modal/components/ModalContent/ModalContent.js +5 -1
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +1 -1
- package/dist/modal/components/OAuth/OAuth.js +1 -1
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +2 -2
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +3 -3
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +1 -1
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +1 -1
- package/dist/modal/components/Waiting/Waiting.js +1 -1
- package/dist/modal/components/WalletCard/WalletCard.d.ts +6 -3
- package/dist/modal/components/WalletCard/WalletCard.js +41 -15
- package/dist/modal/components/WalletSelect/WalletSelect.d.ts +11 -0
- package/dist/modal/components/WalletSelect/WalletSelect.js +153 -0
- package/dist/modal/components/common.d.ts +9 -4
- package/dist/modal/components/common.js +67 -13
- package/dist/modal/constants/constants.d.ts +7 -12
- package/dist/modal/constants/constants.js +7 -1
- package/dist/modal/constants/oAuthLogos.d.ts +2 -6
- package/dist/modal/constants/oAuthLogos.js +45 -43
- package/dist/modal/hooks/useGoBack.js +9 -0
- package/dist/modal/types/commonTypes.d.ts +9 -0
- package/dist/modal/utils/getWalletDisplayName.js +3 -6
- package/dist/modal/utils/icons.d.ts +5 -0
- package/dist/modal/utils/icons.js +17 -0
- package/dist/provider/ParaProvider.js +24 -129
- package/dist/provider/ParaProviderMin.d.ts +4 -0
- package/dist/provider/ParaProviderMin.js +140 -0
- package/dist/provider/components/CosmosWalletWrapper.d.ts +1 -1
- package/dist/provider/components/EvmWalletWrapper.d.ts +1 -1
- package/dist/provider/components/ExternalWalletWrapper.js +3 -36
- package/dist/provider/components/SolanaWalletWrapper.d.ts +1 -1
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +3 -3
- package/dist/provider/hooks/mutations/useCreateWallet.js +1 -1
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +3 -3
- package/dist/provider/hooks/mutations/useCreateWalletPerType.js +1 -1
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +3 -3
- package/dist/provider/hooks/mutations/useIssueJwt.js +1 -1
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +6 -6
- package/dist/provider/hooks/mutations/useResendVerificationCode.js +1 -1
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +4 -42
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +3 -3
- package/dist/provider/hooks/mutations/useVerifyFarcaster.js +1 -1
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +6 -0
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +3 -3
- package/dist/provider/hooks/mutations/useWaitForLogin.js +1 -1
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +3 -3
- package/dist/provider/hooks/mutations/useWaitForSignup.js +1 -1
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +3 -3
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.js +1 -1
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/index.js +3 -1
- package/dist/provider/providers/AccountLinkProvider.js +8 -4
- package/dist/provider/providers/AuthProvider.js +28 -14
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +1 -1
- package/dist/provider/providers/CosmosExternalWalletProvider.js +3 -0
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +1 -1
- package/dist/provider/providers/EvmExternalWalletProvider.js +3 -0
- package/dist/provider/providers/ExternalWalletProvider.js +1 -1
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +1 -1
- package/dist/provider/providers/SolanaExternalWalletProvider.js +3 -0
- package/dist/provider/stores/slices/modal.js +16 -12
- package/dist/provider/utils/constants.d.ts +5 -0
- package/dist/provider/utils/constants.js +64 -1
- package/dist/public/PPMori-Regular.woff2 +0 -0
- package/dist/public/PPMori-SemiBold.woff2 +0 -0
- package/package.json +8 -8
- package/dist/modal/components/Controls/Selects.js +0 -173
- package/dist/provider/utils/externalWalletDefaults.d.ts +0 -6
- package/dist/provider/utils/externalWalletDefaults.js +0 -33
|
@@ -1,138 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
+
__objRest,
|
|
3
4
|
__spreadProps,
|
|
4
5
|
__spreadValues
|
|
5
6
|
} from "../chunk-MMUBH76A.js";
|
|
6
|
-
import { jsx
|
|
7
|
-
import { forwardRef
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { isConfigType, isParaWeb } from "./utils/paraConfigTypeGuards.js";
|
|
14
|
-
import ParaWeb from "@getpara/web-sdk";
|
|
15
|
-
import { EXTERNAL_WALLET_TYPES } from "@getpara/web-sdk";
|
|
16
|
-
import { AuthProvider } from "./providers/AuthProvider.js";
|
|
17
|
-
import { AccountLinkProvider } from "./providers/AccountLinkProvider.js";
|
|
18
|
-
const ParaProvider = forwardRef(({ children, paraClientConfig, callbacks, config, externalWalletConfig, paraModalConfig }, ref) => {
|
|
19
|
-
useEventListeners(callbacks);
|
|
20
|
-
useAutoSessionKeepAlive({ disabled: config.disableAutoSessionKeepAlive });
|
|
21
|
-
const setClient = useStore((state) => state.setClient);
|
|
22
|
-
const client = useStore((state) => state.client);
|
|
23
|
-
const setExternalWallets = useStore((state) => state.setExternalWallets);
|
|
24
|
-
const externalWallets = useStore((state) => state.externalWallets);
|
|
25
|
-
const setExternalWalletsWithFullAuth = useStore((state) => state.setExternalWalletsWithFullAuth);
|
|
26
|
-
const externalWalletsWithFullAuth = useStore((state) => state.externalWalletsWithFullAuth);
|
|
27
|
-
const setIncludeWalletVerification = useStore((state) => state.setIncludeWalletVerification);
|
|
28
|
-
const includeWalletVerification = useStore((state) => state.includeWalletVerification);
|
|
29
|
-
const setConnectionOnly = useStore((state) => state.setConnectionOnly);
|
|
30
|
-
const connectionOnly = useStore((state) => state.connectionOnly);
|
|
31
|
-
const setModalConfig = useStore((state) => state.setModalConfig);
|
|
32
|
-
const modalConfig = useStore((state) => state.modalConfig);
|
|
33
|
-
const setAppName = useStore((state) => state.setAppName);
|
|
34
|
-
const appName = useStore((state) => state.appName);
|
|
35
|
-
const setFarcasterMiniAppConfig = useStore((state) => state.setFarcasterMiniAppConfig);
|
|
36
|
-
const farcasterMiniAppConfig = useStore((state) => state.farcasterMiniAppConfig);
|
|
37
|
-
const rpcUrl = useStore((state) => state.rpcUrl);
|
|
38
|
-
const setRpcUrl = useStore((state) => state.setRpcUrl);
|
|
39
|
-
const setProviderProps = useStore((state) => state.setProviderProps);
|
|
40
|
-
const [isClientReady, setIsClientReady] = useState(client == null ? void 0 : client.isReady);
|
|
41
|
-
useEffect(() => {
|
|
42
|
-
setProviderProps(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, config), externalWalletConfig), paraModalConfig), {
|
|
43
|
-
// Redacting walletConnect to avoid exposing project id
|
|
44
|
-
walletConnect: void 0
|
|
45
|
-
}));
|
|
46
|
-
}, [config, externalWalletConfig, paraModalConfig]);
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
if (rpcUrl !== config.rpcUrl) setRpcUrl(config.rpcUrl);
|
|
49
|
-
}, [config.rpcUrl]);
|
|
50
|
-
useEffect(() => {
|
|
51
|
-
if (appName !== config.appName) setAppName(config.appName);
|
|
52
|
-
}, [config.appName]);
|
|
53
|
-
useEffect(() => {
|
|
54
|
-
if (farcasterMiniAppConfig !== config.farcasterMiniAppConfig) {
|
|
55
|
-
setFarcasterMiniAppConfig(config.farcasterMiniAppConfig);
|
|
56
|
-
}
|
|
57
|
-
}, [config.farcasterMiniAppConfig]);
|
|
58
|
-
useEffect(() => {
|
|
59
|
-
if (modalConfig !== paraModalConfig) setModalConfig(paraModalConfig);
|
|
60
|
-
}, [paraModalConfig]);
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
var _a;
|
|
63
|
-
if (connectionOnly !== (externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly)) {
|
|
64
|
-
setConnectionOnly((_a = externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly) != null ? _a : false);
|
|
65
|
-
}
|
|
66
|
-
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly]);
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
var _a, _b;
|
|
69
|
-
if (includeWalletVerification !== (externalWalletConfig == null ? void 0 : externalWalletConfig.includeWalletVerification)) {
|
|
70
|
-
if ((externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly) || (isConfigType(paraClientConfig) ? (_a = paraClientConfig.opts) == null ? void 0 : _a.externalWalletConnectionOnly : paraClientConfig.externalWalletConnectionOnly)) {
|
|
71
|
-
console.warn("includeWalletVerification has no effect when using connection only external wallets");
|
|
72
|
-
setIncludeWalletVerification(false);
|
|
73
|
-
} else {
|
|
74
|
-
setIncludeWalletVerification((_b = externalWalletConfig == null ? void 0 : externalWalletConfig.includeWalletVerification) != null ? _b : false);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.includeWalletVerification]);
|
|
78
|
-
useEffect(() => {
|
|
79
|
-
var _a;
|
|
80
|
-
if (externalWallets !== (externalWalletConfig == null ? void 0 : externalWalletConfig.wallets)) {
|
|
81
|
-
setExternalWallets((_a = externalWalletConfig == null ? void 0 : externalWalletConfig.wallets) != null ? _a : [...EXTERNAL_WALLET_TYPES]);
|
|
82
|
-
}
|
|
83
|
-
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.wallets]);
|
|
84
|
-
useEffect(() => {
|
|
85
|
-
var _a, _b;
|
|
86
|
-
if (externalWalletsWithFullAuth !== (externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets)) {
|
|
87
|
-
if ((externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly) || (isConfigType(paraClientConfig) ? (_a = paraClientConfig.opts) == null ? void 0 : _a.externalWalletConnectionOnly : paraClientConfig.externalWalletConnectionOnly)) {
|
|
88
|
-
console.warn("createLinkedEmbeddedForExternalWallets has no effect when using connection only external wallets");
|
|
89
|
-
setExternalWalletsWithFullAuth([]);
|
|
90
|
-
} else {
|
|
91
|
-
setExternalWalletsWithFullAuth(
|
|
92
|
-
(externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets) === "ALL" ? [...EXTERNAL_WALLET_TYPES] : (_b = externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets) != null ? _b : []
|
|
93
|
-
);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets]);
|
|
97
|
-
useEffect(() => {
|
|
98
|
-
if (!isConfigType(paraClientConfig) && !isParaWeb(paraClientConfig)) {
|
|
99
|
-
throw new Error("Invalid Para config");
|
|
100
|
-
}
|
|
101
|
-
const newClient = isConfigType(paraClientConfig) ? new ParaWeb(paraClientConfig.env, paraClientConfig.apiKey, paraClientConfig.opts) : paraClientConfig;
|
|
102
|
-
if (newClient.isReady) {
|
|
103
|
-
setIsClientReady(true);
|
|
104
|
-
} else {
|
|
105
|
-
setIsClientReady(false);
|
|
106
|
-
}
|
|
107
|
-
setClient(newClient);
|
|
108
|
-
}, [paraClientConfig]);
|
|
109
|
-
useEffect(() => {
|
|
110
|
-
if (client && !client.isReady) {
|
|
111
|
-
client.ready().then(() => {
|
|
112
|
-
setIsClientReady(true);
|
|
113
|
-
}).catch((err) => {
|
|
114
|
-
setIsClientReady(false);
|
|
115
|
-
console.error("Error initializing Para client:", err);
|
|
116
|
-
});
|
|
117
|
-
}
|
|
118
|
-
}, [client]);
|
|
119
|
-
if (!client || !isClientReady) {
|
|
120
|
-
return null;
|
|
121
|
-
}
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
import { forwardRef } from "react";
|
|
9
|
+
import { ParaProviderMin } from "./ParaProviderMin.js";
|
|
10
|
+
import { COSMOS_CONFIG_DEFAULT, EVM_CONFIG_DEFAULT, SOLANA_CONFIG_DEFAULT } from "./utils/constants.js";
|
|
11
|
+
const ParaProvider = forwardRef((_a, ref) => {
|
|
12
|
+
var _b = _a, { externalWalletConfig } = _b, config = __objRest(_b, ["externalWalletConfig"]);
|
|
13
|
+
var _a2, _b2, _c;
|
|
122
14
|
return /* @__PURE__ */ jsx(
|
|
123
|
-
|
|
124
|
-
{
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
15
|
+
ParaProviderMin,
|
|
16
|
+
__spreadProps(__spreadValues({
|
|
17
|
+
ref
|
|
18
|
+
}, config), {
|
|
19
|
+
externalWalletConfig: __spreadProps(__spreadValues({}, externalWalletConfig), {
|
|
20
|
+
evmConnector: __spreadProps(__spreadValues({}, externalWalletConfig == null ? void 0 : externalWalletConfig.evmConnector), {
|
|
21
|
+
config: ((_a2 = externalWalletConfig == null ? void 0 : externalWalletConfig.evmConnector) == null ? void 0 : _a2.config) || EVM_CONFIG_DEFAULT
|
|
22
|
+
}),
|
|
23
|
+
cosmosConnector: __spreadProps(__spreadValues({}, externalWalletConfig == null ? void 0 : externalWalletConfig.cosmosConnector), {
|
|
24
|
+
config: ((_b2 = externalWalletConfig == null ? void 0 : externalWalletConfig.cosmosConnector) == null ? void 0 : _b2.config) || COSMOS_CONFIG_DEFAULT
|
|
25
|
+
}),
|
|
26
|
+
solanaConnector: __spreadProps(__spreadValues({}, externalWalletConfig == null ? void 0 : externalWalletConfig.solanaConnector), {
|
|
27
|
+
config: ((_c = externalWalletConfig == null ? void 0 : externalWalletConfig.solanaConnector) == null ? void 0 : _c.config) || SOLANA_CONFIG_DEFAULT
|
|
28
|
+
})
|
|
29
|
+
})
|
|
30
|
+
})
|
|
136
31
|
);
|
|
137
32
|
});
|
|
138
33
|
export {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ParaProviderProps } from './types/provider.js';
|
|
2
|
+
import { Chain, Transport } from 'viem';
|
|
3
|
+
import { ParaModalHandle } from '../modal/index.js';
|
|
4
|
+
export declare const ParaProviderMin: import("react").ForwardRefExoticComponent<ParaProviderProps<readonly [Chain, ...Chain[]], Record<number, Transport>> & import("react").RefAttributes<ParaModalHandle>>;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__spreadProps,
|
|
4
|
+
__spreadValues
|
|
5
|
+
} from "../chunk-MMUBH76A.js";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { forwardRef, useEffect, useState } from "react";
|
|
8
|
+
import { useStore } from "./stores/useStore.js";
|
|
9
|
+
import { useAutoSessionKeepAlive } from "./hooks/utils/useAutoSessionKeepAlive.js";
|
|
10
|
+
import { useEventListeners } from "./hooks/utils/useEventListeners.js";
|
|
11
|
+
import { ExternalWalletWrapper } from "./components/ExternalWalletWrapper.js";
|
|
12
|
+
import { ParaModal } from "../modal/ParaModal.js";
|
|
13
|
+
import { isConfigType, isParaWeb } from "./utils/paraConfigTypeGuards.js";
|
|
14
|
+
import ParaWeb from "@getpara/web-sdk";
|
|
15
|
+
import { EXTERNAL_WALLET_TYPES } from "@getpara/web-sdk";
|
|
16
|
+
import { AuthProvider } from "./providers/AuthProvider.js";
|
|
17
|
+
import { AccountLinkProvider } from "./providers/AccountLinkProvider.js";
|
|
18
|
+
const ParaProviderMin = forwardRef(({ children, paraClientConfig, callbacks, config, externalWalletConfig, paraModalConfig }, ref) => {
|
|
19
|
+
useEventListeners(callbacks);
|
|
20
|
+
useAutoSessionKeepAlive({ disabled: config.disableAutoSessionKeepAlive });
|
|
21
|
+
const setClient = useStore((state) => state.setClient);
|
|
22
|
+
const client = useStore((state) => state.client);
|
|
23
|
+
const setExternalWallets = useStore((state) => state.setExternalWallets);
|
|
24
|
+
const externalWallets = useStore((state) => state.externalWallets);
|
|
25
|
+
const setExternalWalletsWithFullAuth = useStore((state) => state.setExternalWalletsWithFullAuth);
|
|
26
|
+
const externalWalletsWithFullAuth = useStore((state) => state.externalWalletsWithFullAuth);
|
|
27
|
+
const setIncludeWalletVerification = useStore((state) => state.setIncludeWalletVerification);
|
|
28
|
+
const includeWalletVerification = useStore((state) => state.includeWalletVerification);
|
|
29
|
+
const setConnectionOnly = useStore((state) => state.setConnectionOnly);
|
|
30
|
+
const connectionOnly = useStore((state) => state.connectionOnly);
|
|
31
|
+
const setModalConfig = useStore((state) => state.setModalConfig);
|
|
32
|
+
const modalConfig = useStore((state) => state.modalConfig);
|
|
33
|
+
const setAppName = useStore((state) => state.setAppName);
|
|
34
|
+
const appName = useStore((state) => state.appName);
|
|
35
|
+
const setFarcasterMiniAppConfig = useStore((state) => state.setFarcasterMiniAppConfig);
|
|
36
|
+
const farcasterMiniAppConfig = useStore((state) => state.farcasterMiniAppConfig);
|
|
37
|
+
const rpcUrl = useStore((state) => state.rpcUrl);
|
|
38
|
+
const setRpcUrl = useStore((state) => state.setRpcUrl);
|
|
39
|
+
const setProviderProps = useStore((state) => state.setProviderProps);
|
|
40
|
+
const [isClientReady, setIsClientReady] = useState(client == null ? void 0 : client.isReady);
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
setProviderProps(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, config), externalWalletConfig), paraModalConfig), {
|
|
43
|
+
// Redacting walletConnect to avoid exposing project id
|
|
44
|
+
walletConnect: void 0
|
|
45
|
+
}));
|
|
46
|
+
}, [config, externalWalletConfig, paraModalConfig]);
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
if (rpcUrl !== config.rpcUrl) setRpcUrl(config.rpcUrl);
|
|
49
|
+
}, [config.rpcUrl]);
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
if (appName !== config.appName) setAppName(config.appName);
|
|
52
|
+
}, [config.appName]);
|
|
53
|
+
useEffect(() => {
|
|
54
|
+
if (farcasterMiniAppConfig !== config.farcasterMiniAppConfig) {
|
|
55
|
+
setFarcasterMiniAppConfig(config.farcasterMiniAppConfig);
|
|
56
|
+
}
|
|
57
|
+
}, [config.farcasterMiniAppConfig]);
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (modalConfig !== paraModalConfig) setModalConfig(paraModalConfig);
|
|
60
|
+
}, [paraModalConfig]);
|
|
61
|
+
useEffect(() => {
|
|
62
|
+
var _a;
|
|
63
|
+
if (connectionOnly !== (externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly)) {
|
|
64
|
+
setConnectionOnly((_a = externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly) != null ? _a : false);
|
|
65
|
+
}
|
|
66
|
+
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly]);
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
var _a, _b;
|
|
69
|
+
if (includeWalletVerification !== (externalWalletConfig == null ? void 0 : externalWalletConfig.includeWalletVerification)) {
|
|
70
|
+
if ((externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly) || (isConfigType(paraClientConfig) ? (_a = paraClientConfig.opts) == null ? void 0 : _a.externalWalletConnectionOnly : paraClientConfig.externalWalletConnectionOnly)) {
|
|
71
|
+
console.warn("includeWalletVerification has no effect when using connection only external wallets");
|
|
72
|
+
setIncludeWalletVerification(false);
|
|
73
|
+
} else {
|
|
74
|
+
setIncludeWalletVerification((_b = externalWalletConfig == null ? void 0 : externalWalletConfig.includeWalletVerification) != null ? _b : false);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.includeWalletVerification]);
|
|
78
|
+
useEffect(() => {
|
|
79
|
+
var _a;
|
|
80
|
+
if (externalWallets !== (externalWalletConfig == null ? void 0 : externalWalletConfig.wallets)) {
|
|
81
|
+
setExternalWallets((_a = externalWalletConfig == null ? void 0 : externalWalletConfig.wallets) != null ? _a : [...EXTERNAL_WALLET_TYPES]);
|
|
82
|
+
}
|
|
83
|
+
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.wallets]);
|
|
84
|
+
useEffect(() => {
|
|
85
|
+
var _a, _b;
|
|
86
|
+
if (externalWalletsWithFullAuth !== (externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets)) {
|
|
87
|
+
if ((externalWalletConfig == null ? void 0 : externalWalletConfig.connectionOnly) || (isConfigType(paraClientConfig) ? (_a = paraClientConfig.opts) == null ? void 0 : _a.externalWalletConnectionOnly : paraClientConfig.externalWalletConnectionOnly)) {
|
|
88
|
+
console.warn("createLinkedEmbeddedForExternalWallets has no effect when using connection only external wallets");
|
|
89
|
+
setExternalWalletsWithFullAuth([]);
|
|
90
|
+
} else {
|
|
91
|
+
setExternalWalletsWithFullAuth(
|
|
92
|
+
(externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets) === "ALL" ? [...EXTERNAL_WALLET_TYPES] : (_b = externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets) != null ? _b : []
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}, [externalWalletConfig == null ? void 0 : externalWalletConfig.createLinkedEmbeddedForExternalWallets]);
|
|
97
|
+
useEffect(() => {
|
|
98
|
+
if (!isConfigType(paraClientConfig) && !isParaWeb(paraClientConfig)) {
|
|
99
|
+
throw new Error("Invalid Para config");
|
|
100
|
+
}
|
|
101
|
+
const newClient = isConfigType(paraClientConfig) ? new ParaWeb(paraClientConfig.env, paraClientConfig.apiKey, paraClientConfig.opts) : paraClientConfig;
|
|
102
|
+
if (newClient.isReady) {
|
|
103
|
+
setIsClientReady(true);
|
|
104
|
+
} else {
|
|
105
|
+
setIsClientReady(false);
|
|
106
|
+
}
|
|
107
|
+
setClient(newClient);
|
|
108
|
+
}, [paraClientConfig]);
|
|
109
|
+
useEffect(() => {
|
|
110
|
+
if (client && !client.isReady) {
|
|
111
|
+
client.ready().then(() => {
|
|
112
|
+
setIsClientReady(true);
|
|
113
|
+
}).catch((err) => {
|
|
114
|
+
setIsClientReady(false);
|
|
115
|
+
console.error("Error initializing Para client:", err);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
}, [client]);
|
|
119
|
+
if (!client || !isClientReady) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
return /* @__PURE__ */ jsx(
|
|
123
|
+
AuthProvider,
|
|
124
|
+
{
|
|
125
|
+
is2faEnabled: paraModalConfig == null ? void 0 : paraModalConfig.twoFactorAuthEnabled,
|
|
126
|
+
isRecoverySecretStepEnabled: paraModalConfig == null ? void 0 : paraModalConfig.recoverySecretStepEnabled,
|
|
127
|
+
overrides: {
|
|
128
|
+
login: paraModalConfig == null ? void 0 : paraModalConfig.loginTransitionOverride,
|
|
129
|
+
createWallets: paraModalConfig == null ? void 0 : paraModalConfig.createWalletOverride
|
|
130
|
+
},
|
|
131
|
+
children: /* @__PURE__ */ jsx(ExternalWalletWrapper, { config: externalWalletConfig, children: /* @__PURE__ */ jsxs(AccountLinkProvider, { children: [
|
|
132
|
+
children,
|
|
133
|
+
!config.disableEmbeddedModal && client.isReady && /* @__PURE__ */ jsx(ParaModal, { ref })
|
|
134
|
+
] }) })
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
});
|
|
138
|
+
export {
|
|
139
|
+
ParaProviderMin
|
|
140
|
+
};
|
|
@@ -2,7 +2,7 @@ import { PropsWithChildren } from 'react';
|
|
|
2
2
|
import { ParaCosmosProviderConfigNoWallets } from '../types/externalWalletProviders.js';
|
|
3
3
|
import { ParaGrazProviderProps } from '@getpara/cosmos-wallet-connectors';
|
|
4
4
|
export declare const CosmosWalletWrapper: ({ children, cosmosConnectorConfig, grazProviderProps, onSwitchWallet, }: {
|
|
5
|
-
cosmosConnectorConfig: ParaCosmosProviderConfigNoWallets;
|
|
5
|
+
cosmosConnectorConfig: ParaCosmosProviderConfigNoWallets | undefined;
|
|
6
6
|
grazProviderProps: ParaGrazProviderProps;
|
|
7
7
|
onSwitchWallet: ({ address, error }: {
|
|
8
8
|
address?: string;
|
|
@@ -3,7 +3,7 @@ import { Chain, Transport } from 'viem';
|
|
|
3
3
|
import { ParaEvmProviderConfigNoWallets } from '../types/externalWalletProviders.js';
|
|
4
4
|
import { ParaWagmiProviderProps } from '@getpara/evm-wallet-connectors';
|
|
5
5
|
export declare const EvmWalletWrapper: <chains extends readonly [Chain, ...Chain[]], transports extends Record<chains[number]["id"], Transport>>({ children, evmProviderConfig, wagmiProviderProps, onSwitchWallet, }: {
|
|
6
|
-
evmProviderConfig: ParaEvmProviderConfigNoWallets<chains, transports
|
|
6
|
+
evmProviderConfig: ParaEvmProviderConfigNoWallets<chains, transports> | undefined;
|
|
7
7
|
wagmiProviderProps: ParaWagmiProviderProps;
|
|
8
8
|
onSwitchWallet: ({ address, error }: {
|
|
9
9
|
address?: string;
|
|
@@ -11,7 +11,6 @@ import { EvmWalletWrapper } from "./EvmWalletWrapper.js";
|
|
|
11
11
|
import { CosmosWalletWrapper } from "./CosmosWalletWrapper.js";
|
|
12
12
|
import { SolanaWalletWrapper } from "./SolanaWalletWrapper.js";
|
|
13
13
|
import { useStore } from "../stores/useStore.js";
|
|
14
|
-
import { getEVMExternalWalletConfigDefault } from "../utils/externalWalletDefaults.js";
|
|
15
14
|
const ExternalWalletWrapper = ({
|
|
16
15
|
children,
|
|
17
16
|
config
|
|
@@ -31,7 +30,7 @@ const ExternalWalletWrapper = ({
|
|
|
31
30
|
const evmProviderConfig = useMemo(
|
|
32
31
|
() => {
|
|
33
32
|
var _a2;
|
|
34
|
-
return
|
|
33
|
+
return evmConnector ? __spreadValues({ appName, appDescription, appIcon, appUrl, projectId: (_a2 = walletConnect == null ? void 0 : walletConnect.projectId) != null ? _a2 : "" }, evmConnector == null ? void 0 : evmConnector.config) : void 0;
|
|
35
34
|
},
|
|
36
35
|
[appName, appDescription, appIcon, appUrl, walletConnect == null ? void 0 : walletConnect.projectId, evmConnector]
|
|
37
36
|
);
|
|
@@ -42,42 +41,10 @@ const ExternalWalletWrapper = ({
|
|
|
42
41
|
uri: (_d = (_c = solanaConnector == null ? void 0 : solanaConnector.config.appIdentity) == null ? void 0 : _c.uri) != null ? _d : appUrl,
|
|
43
42
|
icon: (_f = (_e = solanaConnector == null ? void 0 : solanaConnector.config.appIdentity) == null ? void 0 : _e.icon) != null ? _f : appIcon
|
|
44
43
|
};
|
|
45
|
-
return
|
|
44
|
+
return solanaConnector ? __spreadValues({ appIdentity }, solanaConnector == null ? void 0 : solanaConnector.config) : void 0;
|
|
46
45
|
}, [solanaConnector]);
|
|
47
46
|
const cosmosProviderConfig = useMemo(
|
|
48
|
-
() =>
|
|
49
|
-
chains: [
|
|
50
|
-
{
|
|
51
|
-
chainId: "theta-testnet-001",
|
|
52
|
-
currencies: [{ coinDenom: "atom", coinMinimalDenom: "uatom", coinDecimals: 6 }],
|
|
53
|
-
rest: "https://cosmoshubt.lava.build",
|
|
54
|
-
rpc: "https://cosmoshubt.tendermintrpc.lava.build:443",
|
|
55
|
-
bech32Config: {
|
|
56
|
-
bech32PrefixAccAddr: "cosmos",
|
|
57
|
-
bech32PrefixAccPub: "cosmospub",
|
|
58
|
-
bech32PrefixValAddr: "cosmosvaloper",
|
|
59
|
-
bech32PrefixValPub: "cosmosvaloperpub",
|
|
60
|
-
bech32PrefixConsAddr: "cosmosvalcons",
|
|
61
|
-
bech32PrefixConsPub: "cosmosvalconspub"
|
|
62
|
-
},
|
|
63
|
-
chainName: "cosmoshubtestnet",
|
|
64
|
-
feeCurrencies: [
|
|
65
|
-
{
|
|
66
|
-
coinDenom: "atom",
|
|
67
|
-
coinMinimalDenom: "uatom",
|
|
68
|
-
coinDecimals: 6,
|
|
69
|
-
coinGeckoId: "",
|
|
70
|
-
gasPriceStep: { low: 0.01, average: 0.025, high: 0.03 }
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
stakeCurrency: { coinDenom: "atom", coinMinimalDenom: "uatom", coinDecimals: 6 },
|
|
74
|
-
bip44: { coinType: 118 }
|
|
75
|
-
}
|
|
76
|
-
],
|
|
77
|
-
onSwitchChain: () => {
|
|
78
|
-
},
|
|
79
|
-
selectedChainId: "theta-testnet-001"
|
|
80
|
-
} : cosmosConnector.config,
|
|
47
|
+
() => cosmosConnector ? cosmosConnector.config : void 0,
|
|
81
48
|
[cosmosConnector]
|
|
82
49
|
);
|
|
83
50
|
const grazProviderProps = useMemo(() => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { ParaSolanaProviderConfigNoWallets } from '../types/externalWalletProviders.js';
|
|
3
3
|
export declare const SolanaWalletWrapper: ({ children, solanaProviderConfig, onSwitchWallet, }: {
|
|
4
|
-
solanaProviderConfig: ParaSolanaProviderConfigNoWallets;
|
|
4
|
+
solanaProviderConfig: ParaSolanaProviderConfigNoWallets | undefined;
|
|
5
5
|
onSwitchWallet: ({ address, error }: {
|
|
6
6
|
address?: string;
|
|
7
7
|
error?: string;
|
|
@@ -17,7 +17,7 @@ export declare const useCreateWallet: () => {
|
|
|
17
17
|
status: "error" | "idle" | "pending" | "success";
|
|
18
18
|
data: [import("@getpara/web-sdk").Wallet, string | undefined] | undefined;
|
|
19
19
|
isSuccess: boolean;
|
|
20
|
-
variables: {
|
|
20
|
+
variables: void | {
|
|
21
21
|
type?: Uppercase<import("@getpara/web-sdk").TWalletType> | undefined;
|
|
22
22
|
skipDistribute?: boolean | undefined;
|
|
23
23
|
} | undefined;
|
|
@@ -31,11 +31,11 @@ export declare const useCreateWallet: () => {
|
|
|
31
31
|
failureReason: Error | null;
|
|
32
32
|
isPaused: boolean;
|
|
33
33
|
submittedAt: number;
|
|
34
|
-
createWallet: import("@tanstack/react-query").UseMutateFunction<[import("@getpara/web-sdk").Wallet, string | undefined], Error, {
|
|
34
|
+
createWallet: import("@tanstack/react-query").UseMutateFunction<[import("@getpara/web-sdk").Wallet, string | undefined], Error, void | {
|
|
35
35
|
type?: Uppercase<import("@getpara/web-sdk").TWalletType> | undefined;
|
|
36
36
|
skipDistribute?: boolean | undefined;
|
|
37
37
|
}, unknown>;
|
|
38
|
-
createWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<[import("@getpara/web-sdk").Wallet, string | undefined], Error, {
|
|
38
|
+
createWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<[import("@getpara/web-sdk").Wallet, string | undefined], Error, void | {
|
|
39
39
|
type?: Uppercase<import("@getpara/web-sdk").TWalletType> | undefined;
|
|
40
40
|
skipDistribute?: boolean | undefined;
|
|
41
41
|
}, unknown>;
|
|
@@ -11,7 +11,7 @@ const useCreateWallet = () => {
|
|
|
11
11
|
const para = useClient();
|
|
12
12
|
const mutation = useMutation({
|
|
13
13
|
mutationKey: [CREATE_WALLET_KEY],
|
|
14
|
-
mutationFn: (
|
|
14
|
+
mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
|
|
15
15
|
try {
|
|
16
16
|
const result = yield createWallet(para, args);
|
|
17
17
|
return result;
|
|
@@ -21,7 +21,7 @@ export declare const useCreateWalletPerType: () => {
|
|
|
21
21
|
recoverySecret?: string | undefined;
|
|
22
22
|
} | undefined;
|
|
23
23
|
isSuccess: boolean;
|
|
24
|
-
variables: {
|
|
24
|
+
variables: void | {
|
|
25
25
|
types?: Uppercase<import("@getpara/web-sdk").TWalletType>[] | undefined;
|
|
26
26
|
skipDistribute?: boolean | undefined;
|
|
27
27
|
} | undefined;
|
|
@@ -39,7 +39,7 @@ export declare const useCreateWalletPerType: () => {
|
|
|
39
39
|
wallets: import("@getpara/web-sdk").Wallet[];
|
|
40
40
|
walletIds: import("@getpara/web-sdk").CurrentWalletIds;
|
|
41
41
|
recoverySecret?: string | undefined;
|
|
42
|
-
}, Error, {
|
|
42
|
+
}, Error, void | {
|
|
43
43
|
types?: Uppercase<import("@getpara/web-sdk").TWalletType>[] | undefined;
|
|
44
44
|
skipDistribute?: boolean | undefined;
|
|
45
45
|
}, unknown>;
|
|
@@ -47,7 +47,7 @@ export declare const useCreateWalletPerType: () => {
|
|
|
47
47
|
wallets: import("@getpara/web-sdk").Wallet[];
|
|
48
48
|
walletIds: import("@getpara/web-sdk").CurrentWalletIds;
|
|
49
49
|
recoverySecret?: string | undefined;
|
|
50
|
-
}, Error, {
|
|
50
|
+
}, Error, void | {
|
|
51
51
|
types?: Uppercase<import("@getpara/web-sdk").TWalletType>[] | undefined;
|
|
52
52
|
skipDistribute?: boolean | undefined;
|
|
53
53
|
}, unknown>;
|
|
@@ -11,7 +11,7 @@ const useCreateWalletPerType = () => {
|
|
|
11
11
|
const para = useClient();
|
|
12
12
|
const mutation = useMutation({
|
|
13
13
|
mutationKey: [CREATE_WALLET_PER_TYPE_KEY],
|
|
14
|
-
mutationFn: (
|
|
14
|
+
mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
|
|
15
15
|
try {
|
|
16
16
|
const result = yield createWalletPerType(para, args);
|
|
17
17
|
return result;
|
|
@@ -20,7 +20,7 @@ export declare const useIssueJwt: () => {
|
|
|
20
20
|
keyId: string;
|
|
21
21
|
} | undefined;
|
|
22
22
|
isSuccess: boolean;
|
|
23
|
-
variables: {
|
|
23
|
+
variables: void | {
|
|
24
24
|
keyIndex?: number | undefined;
|
|
25
25
|
} | undefined;
|
|
26
26
|
error: Error | null;
|
|
@@ -36,13 +36,13 @@ export declare const useIssueJwt: () => {
|
|
|
36
36
|
issueJwt: import("@tanstack/react-query").UseMutateFunction<{
|
|
37
37
|
token: string;
|
|
38
38
|
keyId: string;
|
|
39
|
-
}, Error, {
|
|
39
|
+
}, Error, void | {
|
|
40
40
|
keyIndex?: number | undefined;
|
|
41
41
|
}, unknown>;
|
|
42
42
|
issueJwtAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
43
43
|
token: string;
|
|
44
44
|
keyId: string;
|
|
45
|
-
}, Error, {
|
|
45
|
+
}, Error, void | {
|
|
46
46
|
keyIndex?: number | undefined;
|
|
47
47
|
}, unknown>;
|
|
48
48
|
};
|
|
@@ -11,7 +11,7 @@ const useIssueJwt = () => {
|
|
|
11
11
|
const para = useClient();
|
|
12
12
|
const mutation = useMutation({
|
|
13
13
|
mutationKey: [ISSUE_JWT_KEY],
|
|
14
|
-
mutationFn: (
|
|
14
|
+
mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
|
|
15
15
|
try {
|
|
16
16
|
const result = yield issueJwt(para, args);
|
|
17
17
|
return result;
|
|
@@ -18,8 +18,8 @@ export declare const useResendVerificationCode: () => {
|
|
|
18
18
|
status: "error" | "idle" | "pending" | "success";
|
|
19
19
|
data: void | undefined;
|
|
20
20
|
isSuccess: boolean;
|
|
21
|
-
variables: Compute<{
|
|
22
|
-
type?: "SIGNUP" | "LINK_ACCOUNT";
|
|
21
|
+
variables: void | Compute<{
|
|
22
|
+
type?: "SIGNUP" | "LINK_ACCOUNT" | "LOGIN";
|
|
23
23
|
} | undefined>;
|
|
24
24
|
error: Error | null;
|
|
25
25
|
isError: boolean;
|
|
@@ -31,10 +31,10 @@ export declare const useResendVerificationCode: () => {
|
|
|
31
31
|
failureReason: Error | null;
|
|
32
32
|
isPaused: boolean;
|
|
33
33
|
submittedAt: number;
|
|
34
|
-
resendVerificationCode: import("@tanstack/react-query").UseMutateFunction<void, Error, Compute<{
|
|
35
|
-
type?: "SIGNUP" | "LINK_ACCOUNT";
|
|
34
|
+
resendVerificationCode: import("@tanstack/react-query").UseMutateFunction<void, Error, void | Compute<{
|
|
35
|
+
type?: "SIGNUP" | "LINK_ACCOUNT" | "LOGIN";
|
|
36
36
|
} | undefined>, unknown>;
|
|
37
|
-
resendVerificationCodeAsync: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, Compute<{
|
|
38
|
-
type?: "SIGNUP" | "LINK_ACCOUNT";
|
|
37
|
+
resendVerificationCodeAsync: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, void | Compute<{
|
|
38
|
+
type?: "SIGNUP" | "LINK_ACCOUNT" | "LOGIN";
|
|
39
39
|
} | undefined>, unknown>;
|
|
40
40
|
};
|
|
@@ -11,7 +11,7 @@ const useResendVerificationCode = () => {
|
|
|
11
11
|
const para = useClient();
|
|
12
12
|
const mutation = useMutation({
|
|
13
13
|
mutationKey: [RESEND_VERIFICATION_CODE_KEY],
|
|
14
|
-
mutationFn: (
|
|
14
|
+
mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
|
|
15
15
|
try {
|
|
16
16
|
const result = yield resendVerificationCode(para, args);
|
|
17
17
|
return result;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Compute } from '../../types/utils.js';
|
|
1
2
|
export declare const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
|
|
2
3
|
/**
|
|
3
4
|
* React hook for the `verifyExternalWallet` mutation.
|
|
@@ -15,20 +16,7 @@ export declare const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
|
|
|
15
16
|
*/
|
|
16
17
|
export declare const useVerifyExternalWallet: () => {
|
|
17
18
|
status: "error" | "idle" | "pending" | "success";
|
|
18
|
-
data:
|
|
19
|
-
username?: string | undefined;
|
|
20
|
-
displayName?: string | undefined;
|
|
21
|
-
pfpUrl?: string | undefined;
|
|
22
|
-
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
23
|
-
auth: import("@getpara/user-management-client").PrimaryAuth;
|
|
24
|
-
userId: string;
|
|
25
|
-
stage: "signup";
|
|
26
|
-
isPasskeySupported: boolean;
|
|
27
|
-
passkeyUrl?: string | undefined;
|
|
28
|
-
passwordUrl?: string | undefined;
|
|
29
|
-
passkeyId?: string | undefined;
|
|
30
|
-
passwordId?: string | undefined;
|
|
31
|
-
} | undefined;
|
|
19
|
+
data: Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin> | undefined;
|
|
32
20
|
isSuccess: boolean;
|
|
33
21
|
variables: {
|
|
34
22
|
portalTheme?: import("@getpara/web-sdk").Theme | undefined;
|
|
@@ -48,20 +36,7 @@ export declare const useVerifyExternalWallet: () => {
|
|
|
48
36
|
failureReason: Error | null;
|
|
49
37
|
isPaused: boolean;
|
|
50
38
|
submittedAt: number;
|
|
51
|
-
verifyExternalWallet: import("@tanstack/react-query").UseMutateFunction<{
|
|
52
|
-
username?: string | undefined;
|
|
53
|
-
displayName?: string | undefined;
|
|
54
|
-
pfpUrl?: string | undefined;
|
|
55
|
-
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
56
|
-
auth: import("@getpara/user-management-client").PrimaryAuth;
|
|
57
|
-
userId: string;
|
|
58
|
-
stage: "signup";
|
|
59
|
-
isPasskeySupported: boolean;
|
|
60
|
-
passkeyUrl?: string | undefined;
|
|
61
|
-
passwordUrl?: string | undefined;
|
|
62
|
-
passkeyId?: string | undefined;
|
|
63
|
-
passwordId?: string | undefined;
|
|
64
|
-
}, Error, {
|
|
39
|
+
verifyExternalWallet: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin>, Error, {
|
|
65
40
|
portalTheme?: import("@getpara/web-sdk").Theme | undefined;
|
|
66
41
|
useShortUrls?: boolean | undefined;
|
|
67
42
|
externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
|
|
@@ -69,20 +44,7 @@ export declare const useVerifyExternalWallet: () => {
|
|
|
69
44
|
cosmosPublicKeyHex?: string | undefined;
|
|
70
45
|
cosmosSigner?: string | undefined;
|
|
71
46
|
}, unknown>;
|
|
72
|
-
verifyExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
73
|
-
username?: string | undefined;
|
|
74
|
-
displayName?: string | undefined;
|
|
75
|
-
pfpUrl?: string | undefined;
|
|
76
|
-
externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
|
|
77
|
-
auth: import("@getpara/user-management-client").PrimaryAuth;
|
|
78
|
-
userId: string;
|
|
79
|
-
stage: "signup";
|
|
80
|
-
isPasskeySupported: boolean;
|
|
81
|
-
passkeyUrl?: string | undefined;
|
|
82
|
-
passwordUrl?: string | undefined;
|
|
83
|
-
passkeyId?: string | undefined;
|
|
84
|
-
passwordId?: string | undefined;
|
|
85
|
-
}, Error, {
|
|
47
|
+
verifyExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin>, Error, {
|
|
86
48
|
portalTheme?: import("@getpara/web-sdk").Theme | undefined;
|
|
87
49
|
useShortUrls?: boolean | undefined;
|
|
88
50
|
externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
|
|
@@ -18,7 +18,7 @@ export declare const useVerifyFarcaster: () => {
|
|
|
18
18
|
status: "error" | "idle" | "pending" | "success";
|
|
19
19
|
data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin> | undefined;
|
|
20
20
|
isSuccess: boolean;
|
|
21
|
-
variables: {
|
|
21
|
+
variables: void | {
|
|
22
22
|
portalTheme?: import("@getpara/web-sdk").Theme | undefined;
|
|
23
23
|
useShortUrls?: boolean | undefined;
|
|
24
24
|
onPoll?: (() => void) | undefined;
|
|
@@ -36,7 +36,7 @@ export declare const useVerifyFarcaster: () => {
|
|
|
36
36
|
failureReason: Error | null;
|
|
37
37
|
isPaused: boolean;
|
|
38
38
|
submittedAt: number;
|
|
39
|
-
verifyFarcaster: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, {
|
|
39
|
+
verifyFarcaster: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, void | {
|
|
40
40
|
portalTheme?: import("@getpara/web-sdk").Theme | undefined;
|
|
41
41
|
useShortUrls?: boolean | undefined;
|
|
42
42
|
onPoll?: (() => void) | undefined;
|
|
@@ -44,7 +44,7 @@ export declare const useVerifyFarcaster: () => {
|
|
|
44
44
|
isCanceled?: (() => boolean) | undefined;
|
|
45
45
|
onConnectUri?: ((uri: string) => void) | undefined;
|
|
46
46
|
}, unknown>;
|
|
47
|
-
verifyFarcasterAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, {
|
|
47
|
+
verifyFarcasterAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, void | {
|
|
48
48
|
portalTheme?: import("@getpara/web-sdk").Theme | undefined;
|
|
49
49
|
useShortUrls?: boolean | undefined;
|
|
50
50
|
onPoll?: (() => void) | undefined;
|