@getpara/react-sdk-lite 2.0.0-alpha.33 → 2.0.0-alpha.35
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/modal/components/Account/AccountProfile.js +22 -4
- package/dist/modal/components/Account/AccountProfileLink.js +10 -5
- package/dist/modal/components/Account/AccountProfileLinkOptions.js +21 -13
- package/dist/modal/components/Account/AccountProfileUnlink.js +6 -4
- package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +1 -1
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +3 -54
- package/dist/modal/components/AddFunds/AddFundsProvider.js +2 -6
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +2 -2
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +6 -6
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +5 -5
- package/dist/modal/components/OAuth/OAuth.js +3 -5
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +2 -2
- package/dist/modal/components/common.d.ts +7 -5
- package/dist/modal/components/common.js +5 -4
- package/dist/modal/constants/constants.js +1 -1
- package/dist/modal/constants/oAuthLogos.d.ts +2 -3
- package/dist/modal/constants/oAuthLogos.js +28 -28
- package/dist/modal/stores/modal/actions.js +2 -2
- package/dist/modal/stores/modal/useModalStore.d.ts +8 -2
- package/dist/modal/stores/modal/useModalStore.js +1 -1
- package/dist/provider/components/ExternalWalletWrapper.js +3 -26
- package/dist/provider/hooks/mutations/index.d.ts +28 -2
- package/dist/provider/hooks/mutations/index.js +57 -3
- package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +40 -0
- package/dist/provider/hooks/mutations/useClaimPregenWallets.js +28 -0
- package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +33 -0
- package/dist/provider/hooks/mutations/useCreateGuestWallets.js +28 -0
- package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +120 -0
- package/dist/provider/hooks/mutations/useCreatePregenWallet.js +28 -0
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +42 -0
- package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.js +28 -0
- package/dist/provider/hooks/mutations/useCreateWallet.d.ts +42 -0
- package/dist/provider/hooks/mutations/useCreateWallet.js +28 -0
- package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +54 -0
- package/dist/provider/hooks/mutations/useCreateWalletPerType.js +28 -0
- package/dist/provider/hooks/mutations/useEnable2fa.d.ts +39 -0
- package/dist/provider/hooks/mutations/useEnable2fa.js +28 -0
- package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +40 -0
- package/dist/provider/hooks/mutations/useHasPregenWallet.js +28 -0
- package/dist/provider/hooks/mutations/useIssueJwt.d.ts +48 -0
- package/dist/provider/hooks/mutations/useIssueJwt.js +28 -0
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +34 -0
- package/dist/provider/hooks/mutations/useKeepSessionAlive.js +28 -0
- package/dist/provider/hooks/mutations/useLinkAccount.d.ts +30 -1
- package/dist/provider/hooks/mutations/useLinkAccount.js +3 -1
- package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +46 -0
- package/dist/provider/hooks/mutations/useLoginExternalWallet.js +28 -0
- package/dist/provider/hooks/mutations/useLogout.d.ts +39 -0
- package/dist/provider/hooks/mutations/useLogout.js +28 -0
- package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +40 -0
- package/dist/provider/hooks/mutations/useResendVerificationCode.js +28 -0
- package/dist/provider/hooks/mutations/useSetup2fa.d.ts +34 -0
- package/dist/provider/hooks/mutations/useSetup2fa.js +28 -0
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +58 -0
- package/dist/provider/hooks/mutations/useSignMessage.js +28 -0
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +58 -0
- package/dist/provider/hooks/mutations/useSignTransaction.js +28 -0
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +46 -0
- package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +28 -0
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +42 -0
- package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +28 -0
- package/dist/provider/hooks/mutations/useVerify2fa.d.ts +57 -0
- package/dist/provider/hooks/mutations/useVerify2fa.js +28 -0
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +93 -0
- package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +28 -0
- package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +55 -0
- package/dist/provider/hooks/mutations/useVerifyFarcaster.js +28 -0
- package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +84 -0
- package/dist/provider/hooks/mutations/useVerifyNewAccount.js +28 -0
- package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +64 -0
- package/dist/provider/hooks/mutations/useVerifyOAuth.js +28 -0
- package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +46 -0
- package/dist/provider/hooks/mutations/useVerifyTelegram.js +28 -0
- package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +57 -0
- package/dist/provider/hooks/mutations/useWaitForLogin.js +28 -0
- package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +45 -0
- package/dist/provider/hooks/mutations/useWaitForSignup.js +28 -0
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +54 -0
- package/dist/provider/hooks/mutations/useWaitForWalletCreation.js +28 -0
- package/dist/provider/hooks/mutations/utils.d.ts +2 -7
- package/dist/provider/hooks/mutations/utils.js +0 -24
- package/dist/provider/hooks/queries/index.d.ts +2 -1
- package/dist/provider/hooks/queries/index.js +4 -1
- package/dist/provider/hooks/queries/useAccountLinkInProgress.d.ts +6 -0
- package/dist/provider/hooks/queries/useAccountLinkInProgress.js +24 -0
- package/dist/provider/hooks/queries/useLinkedAccounts.d.ts +11 -0
- package/dist/provider/hooks/queries/useLinkedAccounts.js +24 -0
- package/dist/provider/providers/AccountLinkProvider.d.ts +4 -4
- package/dist/provider/providers/AccountLinkProvider.js +17 -13
- package/dist/provider/providers/AuthProvider.d.ts +0 -1
- package/dist/provider/providers/AuthProvider.js +18 -45
- package/dist/provider/providers/ExternalWalletProvider.d.ts +6 -5
- package/dist/provider/providers/ExternalWalletProvider.js +21 -26
- package/dist/provider/utils/externalWalletDefaults.d.ts +6 -0
- package/dist/provider/utils/externalWalletDefaults.js +33 -0
- package/dist/provider/utils/renameMutations.d.ts +9 -5
- package/dist/provider/utils/renameMutations.js +3 -5
- package/package.json +8 -8
- package/dist/provider/hooks/mutations/core.d.ts +0 -27
- package/dist/provider/hooks/mutations/core.js +0 -66
- package/dist/provider/hooks/queries/core.d.ts +0 -4
- package/dist/provider/hooks/queries/core.js +0 -16
- package/dist/provider/hooks/queries/utils.d.ts +0 -7
- package/dist/provider/hooks/queries/utils.js +0 -25
|
@@ -1,143 +1,143 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../chunk-MMUBH76A.js";
|
|
3
3
|
const ACCOUNT_TYPES = {
|
|
4
|
-
EMAIL: {
|
|
4
|
+
"EMAIL": {
|
|
5
5
|
logo: "mail",
|
|
6
6
|
name: "Email",
|
|
7
7
|
inline: "email address",
|
|
8
8
|
isDark: true
|
|
9
9
|
},
|
|
10
|
-
PHONE: {
|
|
10
|
+
"PHONE": {
|
|
11
11
|
logo: "phone",
|
|
12
12
|
name: "Phone",
|
|
13
13
|
inline: "phone number",
|
|
14
14
|
isDark: true
|
|
15
15
|
},
|
|
16
|
-
EXTERNAL_WALLET: {
|
|
16
|
+
"EXTERNAL_WALLET": {
|
|
17
17
|
logo: "wallet",
|
|
18
18
|
name: "External Wallet",
|
|
19
19
|
inline: "external wallet",
|
|
20
20
|
isDark: true
|
|
21
21
|
},
|
|
22
|
-
GOOGLE: {
|
|
22
|
+
"GOOGLE": {
|
|
23
23
|
logo: "google",
|
|
24
24
|
logoBranded: "googleBrand",
|
|
25
25
|
name: "Google"
|
|
26
26
|
},
|
|
27
|
-
TWITTER: {
|
|
27
|
+
"TWITTER": {
|
|
28
28
|
logo: "twitter",
|
|
29
29
|
logoBranded: "twitterBrand",
|
|
30
30
|
name: "X / Twitter",
|
|
31
31
|
inline: "X account",
|
|
32
32
|
isDark: true
|
|
33
33
|
},
|
|
34
|
-
APPLE: {
|
|
34
|
+
"APPLE": {
|
|
35
35
|
logo: "apple",
|
|
36
36
|
logoBranded: "appleBrand",
|
|
37
37
|
name: "Apple",
|
|
38
38
|
isDark: true
|
|
39
39
|
},
|
|
40
|
-
DISCORD: {
|
|
40
|
+
"DISCORD": {
|
|
41
41
|
logo: "discord",
|
|
42
42
|
logoBranded: "discordBrand",
|
|
43
43
|
name: "Discord"
|
|
44
44
|
},
|
|
45
|
-
FACEBOOK: {
|
|
45
|
+
"FACEBOOK": {
|
|
46
46
|
logo: "facebook",
|
|
47
47
|
logoBranded: "facebookBrand",
|
|
48
48
|
name: "Facebook"
|
|
49
49
|
},
|
|
50
|
-
FARCASTER: {
|
|
50
|
+
"FARCASTER": {
|
|
51
51
|
logo: "farcaster",
|
|
52
52
|
logoBranded: "farcasterBrand",
|
|
53
53
|
name: "Farcaster"
|
|
54
54
|
},
|
|
55
|
-
TELEGRAM: {
|
|
55
|
+
"TELEGRAM": {
|
|
56
56
|
logo: "telegram",
|
|
57
57
|
logoBranded: "telegramBrand",
|
|
58
58
|
name: "Telegram"
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
"MetaMask": {
|
|
61
61
|
logo: "metamask",
|
|
62
62
|
name: "MetaMask",
|
|
63
63
|
isExternalWallet: true
|
|
64
64
|
},
|
|
65
|
-
|
|
65
|
+
"Rainbow": {
|
|
66
66
|
logo: "rainbow",
|
|
67
67
|
name: "Rainbow",
|
|
68
68
|
isExternalWallet: true
|
|
69
69
|
},
|
|
70
|
-
|
|
70
|
+
"Coinbase Wallet": {
|
|
71
71
|
logo: "coinbase",
|
|
72
72
|
name: "Coinbase Wallet",
|
|
73
73
|
isExternalWallet: true
|
|
74
74
|
},
|
|
75
|
-
|
|
75
|
+
"WalletConnect": {
|
|
76
76
|
logo: "walletConnect",
|
|
77
77
|
name: "WalletConnect",
|
|
78
78
|
isExternalWallet: true
|
|
79
79
|
},
|
|
80
|
-
|
|
80
|
+
"Zerion": {
|
|
81
81
|
logo: "zerion",
|
|
82
82
|
name: "Zerion",
|
|
83
83
|
isExternalWallet: true
|
|
84
84
|
},
|
|
85
|
-
|
|
85
|
+
"Safe": {
|
|
86
86
|
logo: "safe",
|
|
87
87
|
name: "Safe",
|
|
88
88
|
isExternalWallet: true
|
|
89
89
|
},
|
|
90
|
-
|
|
90
|
+
"Rabby": {
|
|
91
91
|
logo: "rabby",
|
|
92
92
|
name: "Rabby",
|
|
93
93
|
isExternalWallet: true
|
|
94
94
|
},
|
|
95
|
-
OKX: {
|
|
95
|
+
"OKX Wallet": {
|
|
96
96
|
logo: "okx",
|
|
97
|
-
name: "OKX",
|
|
97
|
+
name: "OKX Wallet",
|
|
98
98
|
isExternalWallet: true
|
|
99
99
|
},
|
|
100
|
-
|
|
100
|
+
"Phantom": {
|
|
101
101
|
logo: "phantom",
|
|
102
102
|
name: "Phantom",
|
|
103
103
|
isExternalWallet: true
|
|
104
104
|
},
|
|
105
|
-
|
|
105
|
+
"Glow": {
|
|
106
106
|
logo: "glow",
|
|
107
107
|
name: "Glow",
|
|
108
108
|
isExternalWallet: true
|
|
109
109
|
},
|
|
110
|
-
|
|
110
|
+
"Backpack": {
|
|
111
111
|
logo: "backpack",
|
|
112
112
|
name: "Backpack",
|
|
113
113
|
isExternalWallet: true
|
|
114
114
|
},
|
|
115
|
-
|
|
115
|
+
"Keplr": {
|
|
116
116
|
logo: "keplr",
|
|
117
117
|
name: "Keplr",
|
|
118
118
|
isExternalWallet: true
|
|
119
119
|
},
|
|
120
|
-
|
|
120
|
+
"Leap": {
|
|
121
121
|
logo: "leap",
|
|
122
122
|
name: "Leap",
|
|
123
123
|
isExternalWallet: true
|
|
124
124
|
},
|
|
125
|
-
|
|
125
|
+
"HaHa": {
|
|
126
126
|
logo: "haha",
|
|
127
127
|
name: "HaHa",
|
|
128
128
|
isExternalWallet: true
|
|
129
129
|
},
|
|
130
|
-
|
|
130
|
+
"Cosmostation": {
|
|
131
131
|
logo: "cosmostation",
|
|
132
132
|
name: "Cosmostation",
|
|
133
133
|
isExternalWallet: true
|
|
134
134
|
},
|
|
135
|
-
|
|
135
|
+
"Solflare": {
|
|
136
136
|
logo: "solflare",
|
|
137
137
|
name: "Solflare",
|
|
138
138
|
isExternalWallet: true
|
|
139
139
|
},
|
|
140
|
-
|
|
140
|
+
"Valora": {
|
|
141
141
|
logo: "valora",
|
|
142
142
|
name: "Valora",
|
|
143
143
|
isExternalWallet: true
|
|
@@ -49,7 +49,7 @@ const getActions = (set, get) => ({
|
|
|
49
49
|
prevStep = ModalStep.AUTH_MAIN;
|
|
50
50
|
}
|
|
51
51
|
if (currentStep === ModalStep.EX_WALLET_SELECTED) {
|
|
52
|
-
set({
|
|
52
|
+
set({ selectedExternalWallet: void 0, isExternalWalletConnecting: false, externalWalletError: void 0 });
|
|
53
53
|
}
|
|
54
54
|
if (prevStep) {
|
|
55
55
|
set(__spreadValues({
|
|
@@ -107,7 +107,7 @@ const getActions = (set, get) => ({
|
|
|
107
107
|
setIsFullyLoggedIn: (isFullyLoggedIn) => set({ isFullyLoggedIn }),
|
|
108
108
|
setAccountAddFundTab: (accountAddFundTab) => set({ accountAddFundTab }),
|
|
109
109
|
setGuestAddFundsTab: (guestAddFundsTab) => set({ guestAddFundsTab }),
|
|
110
|
-
|
|
110
|
+
setSelectedExternalWallet: (selectedExternalWallet) => set({ selectedExternalWallet }),
|
|
111
111
|
setIsExternalWalletConnecting: (isExternalWalletConnecting) => set({ isExternalWalletConnecting }),
|
|
112
112
|
setExternalWalletError: (externalWalletError) => set({ externalWalletError }),
|
|
113
113
|
setIsUsingMobileConnector: (isUsingMobileConnector) => set({ isUsingMobileConnector }),
|
|
@@ -30,7 +30,10 @@ interface ModalState {
|
|
|
30
30
|
isFullyLoggedIn: boolean;
|
|
31
31
|
accountAddFundTab?: AddFundsTabType;
|
|
32
32
|
guestAddFundsTab?: AddFundsTabType;
|
|
33
|
-
|
|
33
|
+
selectedExternalWallet?: {
|
|
34
|
+
id: string;
|
|
35
|
+
type: TWalletType;
|
|
36
|
+
};
|
|
34
37
|
isUsingMobileConnector?: boolean;
|
|
35
38
|
isExternalWalletConnecting?: boolean;
|
|
36
39
|
externalWalletError?: string[];
|
|
@@ -75,7 +78,10 @@ export interface ModalActions {
|
|
|
75
78
|
setOnRampStep: (_: OnRampStep) => void;
|
|
76
79
|
setIsFullyLoggedIn: (isFullyLoggedIn: boolean) => void;
|
|
77
80
|
setAccountAddFundTab: (accountAddFundTab?: AddFundsTabType) => void;
|
|
78
|
-
|
|
81
|
+
setSelectedExternalWallet: (_?: {
|
|
82
|
+
id: string;
|
|
83
|
+
type: TWalletType;
|
|
84
|
+
}) => void;
|
|
79
85
|
setIsUsingMobileConnector: (isUsingMobileConnector?: boolean) => void;
|
|
80
86
|
setIsExternalWalletConnecting: (isExternalWalletConnecting: boolean) => void;
|
|
81
87
|
setExternalWalletError: (externalWalletError?: string[]) => void;
|
|
@@ -61,7 +61,7 @@ const useModalStore = create()(
|
|
|
61
61
|
step: state.step,
|
|
62
62
|
authState: state.authState,
|
|
63
63
|
onRampPurchase: state.onRampPurchase,
|
|
64
|
-
|
|
64
|
+
selectedExternalWallet: state.selectedExternalWallet,
|
|
65
65
|
isUsingMobileConnector: state.isUsingMobileConnector,
|
|
66
66
|
isPasskeySupported: state.isPasskeySupported
|
|
67
67
|
})
|
|
@@ -11,6 +11,7 @@ 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";
|
|
14
15
|
const ExternalWalletWrapper = ({
|
|
15
16
|
children,
|
|
16
17
|
config
|
|
@@ -29,32 +30,8 @@ const ExternalWalletWrapper = ({
|
|
|
29
30
|
}, [wallets, walletConnect]);
|
|
30
31
|
const evmProviderConfig = useMemo(
|
|
31
32
|
() => {
|
|
32
|
-
var _a2
|
|
33
|
-
return !evmConnector ? {
|
|
34
|
-
appName,
|
|
35
|
-
chains: [
|
|
36
|
-
{
|
|
37
|
-
id: 11155111,
|
|
38
|
-
name: "Sepolia",
|
|
39
|
-
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
40
|
-
rpcUrls: { default: { http: ["https://rpc.sepolia.org"] } },
|
|
41
|
-
blockExplorers: {
|
|
42
|
-
default: {
|
|
43
|
-
name: "Etherscan",
|
|
44
|
-
url: "https://sepolia.etherscan.io",
|
|
45
|
-
apiUrl: "https://api-sepolia.etherscan.io/api"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
contracts: {
|
|
49
|
-
multicall3: { address: "0xca11bde05977b3631167028862be2a173976ca11", blockCreated: 751532 },
|
|
50
|
-
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
51
|
-
ensUniversalResolver: { address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC", blockCreated: 5317080 }
|
|
52
|
-
},
|
|
53
|
-
testnet: true
|
|
54
|
-
}
|
|
55
|
-
],
|
|
56
|
-
projectId: (_a2 = walletConnect == null ? void 0 : walletConnect.projectId) != null ? _a2 : ""
|
|
57
|
-
} : __spreadValues({ appName, appDescription, appIcon, appUrl, projectId: (_b = walletConnect == null ? void 0 : walletConnect.projectId) != null ? _b : "" }, evmConnector == null ? void 0 : evmConnector.config);
|
|
33
|
+
var _a2;
|
|
34
|
+
return !evmConnector ? getEVMExternalWalletConfigDefault({ appName, projectId: walletConnect == null ? void 0 : walletConnect.projectId }) : __spreadValues({ appName, appDescription, appIcon, appUrl, projectId: (_a2 = walletConnect == null ? void 0 : walletConnect.projectId) != null ? _a2 : "" }, evmConnector == null ? void 0 : evmConnector.config);
|
|
58
35
|
},
|
|
59
36
|
[appName, appDescription, appIcon, appUrl, walletConnect == null ? void 0 : walletConnect.projectId, evmConnector]
|
|
60
37
|
);
|
|
@@ -1,3 +1,29 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export { useLinkAccount } from './useLinkAccount.js';
|
|
2
|
+
export { useSignUpOrLogIn } from './useSignUpOrLogIn.js';
|
|
3
|
+
export { useVerifyNewAccount } from './useVerifyNewAccount.js';
|
|
4
|
+
export { useWaitForLogin } from './useWaitForLogin.js';
|
|
5
|
+
export { useWaitForSignup } from './useWaitForSignup.js';
|
|
6
|
+
export { useWaitForWalletCreation } from './useWaitForWalletCreation.js';
|
|
7
|
+
export { useVerifyOAuth } from './useVerifyOAuth.js';
|
|
8
|
+
export { useVerifyFarcaster } from './useVerifyFarcaster.js';
|
|
9
|
+
export { useVerifyTelegram } from './useVerifyTelegram.js';
|
|
10
|
+
export { useLoginExternalWallet } from './useLoginExternalWallet.js';
|
|
11
|
+
export { useVerifyExternalWallet } from './useVerifyExternalWallet.js';
|
|
12
|
+
export { useSetup2fa } from './useSetup2fa.js';
|
|
13
|
+
export { useEnable2fa } from './useEnable2fa.js';
|
|
14
|
+
export { useVerify2fa } from './useVerify2fa.js';
|
|
15
|
+
export { useKeepSessionAlive } from './useKeepSessionAlive.js';
|
|
16
|
+
export { useLogout } from './useLogout.js';
|
|
17
|
+
export { useResendVerificationCode } from './useResendVerificationCode.js';
|
|
18
|
+
export { useCreateWallet } from './useCreateWallet.js';
|
|
19
|
+
export { useCreateWalletPerType } from './useCreateWalletPerType.js';
|
|
20
|
+
export { useCreatePregenWallet } from './useCreatePregenWallet.js';
|
|
21
|
+
export { useCreatePregenWalletPerType } from './useCreatePregenWalletPerType.js';
|
|
22
|
+
export { useClaimPregenWallets } from './useClaimPregenWallets.js';
|
|
23
|
+
export { useHasPregenWallet } from './useHasPregenWallet.js';
|
|
24
|
+
export { useUpdatePregenWalletIdentifier } from './useUpdatePregenWalletIdentifier.js';
|
|
25
|
+
export { useCreateGuestWallets } from './useCreateGuestWallets.js';
|
|
26
|
+
export { useSignMessage } from './useSignMessage.js';
|
|
27
|
+
export { useSignTransaction } from './useSignTransaction.js';
|
|
28
|
+
export { useIssueJwt } from './useIssueJwt.js';
|
|
3
29
|
export declare const useCreateGuestWalletsState: import("../../types/utils.js").CoreMethodMutationStateHook<"createGuestWallets">;
|
|
@@ -1,9 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "../../../chunk-MMUBH76A.js";
|
|
3
3
|
import { generateStateHook } from "./utils.js";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { useLinkAccount } from "./useLinkAccount.js";
|
|
5
|
+
import { useSignUpOrLogIn } from "./useSignUpOrLogIn.js";
|
|
6
|
+
import { useVerifyNewAccount } from "./useVerifyNewAccount.js";
|
|
7
|
+
import { useWaitForLogin } from "./useWaitForLogin.js";
|
|
8
|
+
import { useWaitForSignup } from "./useWaitForSignup.js";
|
|
9
|
+
import { useWaitForWalletCreation } from "./useWaitForWalletCreation.js";
|
|
10
|
+
import { useVerifyOAuth } from "./useVerifyOAuth.js";
|
|
11
|
+
import { useVerifyFarcaster } from "./useVerifyFarcaster.js";
|
|
12
|
+
import { useVerifyTelegram } from "./useVerifyTelegram.js";
|
|
13
|
+
import { useLoginExternalWallet } from "./useLoginExternalWallet.js";
|
|
14
|
+
import { useVerifyExternalWallet } from "./useVerifyExternalWallet.js";
|
|
15
|
+
import { useSetup2fa } from "./useSetup2fa.js";
|
|
16
|
+
import { useEnable2fa } from "./useEnable2fa.js";
|
|
17
|
+
import { useVerify2fa } from "./useVerify2fa.js";
|
|
18
|
+
import { useKeepSessionAlive } from "./useKeepSessionAlive.js";
|
|
19
|
+
import { useLogout } from "./useLogout.js";
|
|
20
|
+
import { useResendVerificationCode } from "./useResendVerificationCode.js";
|
|
21
|
+
import { useCreateWallet } from "./useCreateWallet.js";
|
|
22
|
+
import { useCreateWalletPerType } from "./useCreateWalletPerType.js";
|
|
23
|
+
import { useCreatePregenWallet } from "./useCreatePregenWallet.js";
|
|
24
|
+
import { useCreatePregenWalletPerType } from "./useCreatePregenWalletPerType.js";
|
|
25
|
+
import { useClaimPregenWallets } from "./useClaimPregenWallets.js";
|
|
26
|
+
import { useHasPregenWallet } from "./useHasPregenWallet.js";
|
|
27
|
+
import { useUpdatePregenWalletIdentifier } from "./useUpdatePregenWalletIdentifier.js";
|
|
28
|
+
import { useCreateGuestWallets } from "./useCreateGuestWallets.js";
|
|
29
|
+
import { useSignMessage } from "./useSignMessage.js";
|
|
30
|
+
import { useSignTransaction } from "./useSignTransaction.js";
|
|
31
|
+
import { useIssueJwt } from "./useIssueJwt.js";
|
|
6
32
|
const useCreateGuestWalletsState = generateStateHook("createGuestWallets");
|
|
7
33
|
export {
|
|
8
|
-
|
|
34
|
+
useClaimPregenWallets,
|
|
35
|
+
useCreateGuestWallets,
|
|
36
|
+
useCreateGuestWalletsState,
|
|
37
|
+
useCreatePregenWallet,
|
|
38
|
+
useCreatePregenWalletPerType,
|
|
39
|
+
useCreateWallet,
|
|
40
|
+
useCreateWalletPerType,
|
|
41
|
+
useEnable2fa,
|
|
42
|
+
useHasPregenWallet,
|
|
43
|
+
useIssueJwt,
|
|
44
|
+
useKeepSessionAlive,
|
|
45
|
+
useLinkAccount,
|
|
46
|
+
useLoginExternalWallet,
|
|
47
|
+
useLogout,
|
|
48
|
+
useResendVerificationCode,
|
|
49
|
+
useSetup2fa,
|
|
50
|
+
useSignMessage,
|
|
51
|
+
useSignTransaction,
|
|
52
|
+
useSignUpOrLogIn,
|
|
53
|
+
useUpdatePregenWalletIdentifier,
|
|
54
|
+
useVerify2fa,
|
|
55
|
+
useVerifyExternalWallet,
|
|
56
|
+
useVerifyFarcaster,
|
|
57
|
+
useVerifyNewAccount,
|
|
58
|
+
useVerifyOAuth,
|
|
59
|
+
useVerifyTelegram,
|
|
60
|
+
useWaitForLogin,
|
|
61
|
+
useWaitForSignup,
|
|
62
|
+
useWaitForWalletCreation
|
|
9
63
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Compute } from '../../types/utils.js';
|
|
2
|
+
export declare const CLAIM_PREGEN_WALLETS_KEY = "CLAIM_PREGEN_WALLETS";
|
|
3
|
+
/**
|
|
4
|
+
* React hook for the `claimPregenWallets` mutation.
|
|
5
|
+
*
|
|
6
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
7
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
8
|
+
* - `claimPregenWallets`: function to trigger the mutation (same as `mutate`)
|
|
9
|
+
* - `claimPregenWalletsAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* const { claimPregenWallets, claimPregenWalletsAsync } = useClaimPregenWallets();
|
|
13
|
+
* claimPregenWallets({ ...params });
|
|
14
|
+
* // or
|
|
15
|
+
* await claimPregenWalletsAsync({ ...params });
|
|
16
|
+
*/
|
|
17
|
+
export declare const useClaimPregenWallets: () => {
|
|
18
|
+
status: "error" | "idle" | "pending" | "success";
|
|
19
|
+
data: Compute<string | undefined>;
|
|
20
|
+
isSuccess: boolean;
|
|
21
|
+
variables: {
|
|
22
|
+
pregenId?: import("@getpara/web-sdk").PregenAuth | undefined;
|
|
23
|
+
} | undefined;
|
|
24
|
+
error: Error | null;
|
|
25
|
+
isError: boolean;
|
|
26
|
+
isIdle: boolean;
|
|
27
|
+
isPending: boolean;
|
|
28
|
+
reset: () => void;
|
|
29
|
+
context: unknown;
|
|
30
|
+
failureCount: number;
|
|
31
|
+
failureReason: Error | null;
|
|
32
|
+
isPaused: boolean;
|
|
33
|
+
submittedAt: number;
|
|
34
|
+
claimPregenWallets: import("@tanstack/react-query").UseMutateFunction<Compute<string | undefined>, Error, {
|
|
35
|
+
pregenId?: import("@getpara/web-sdk").PregenAuth | undefined;
|
|
36
|
+
}, unknown>;
|
|
37
|
+
claimPregenWalletsAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<string | undefined>, Error, {
|
|
38
|
+
pregenId?: import("@getpara/web-sdk").PregenAuth | undefined;
|
|
39
|
+
}, unknown>;
|
|
40
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
+
import { useMutation } from "@tanstack/react-query";
|
|
6
|
+
import { useClient } from "../utils/index.js";
|
|
7
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
8
|
+
import { claimPregenWallets } from "../../actions/index.js";
|
|
9
|
+
const CLAIM_PREGEN_WALLETS_KEY = "CLAIM_PREGEN_WALLETS";
|
|
10
|
+
const useClaimPregenWallets = () => {
|
|
11
|
+
const para = useClient();
|
|
12
|
+
const mutation = useMutation({
|
|
13
|
+
mutationKey: [CLAIM_PREGEN_WALLETS_KEY],
|
|
14
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const result = yield claimPregenWallets(para, args);
|
|
17
|
+
return result;
|
|
18
|
+
} catch (error) {
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
return renameMutations(mutation, "claimPregenWallets");
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
CLAIM_PREGEN_WALLETS_KEY,
|
|
27
|
+
useClaimPregenWallets
|
|
28
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export declare const CREATE_GUEST_WALLETS_KEY = "CREATE_GUEST_WALLETS";
|
|
2
|
+
/**
|
|
3
|
+
* React hook for the `createGuestWallets` mutation.
|
|
4
|
+
*
|
|
5
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
6
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
7
|
+
* - `createGuestWallets`: function to trigger the mutation (same as `mutate`)
|
|
8
|
+
* - `createGuestWalletsAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const { createGuestWallets, createGuestWalletsAsync } = useCCreateGuestWallets();
|
|
12
|
+
* createGuestWallets({ ...params });
|
|
13
|
+
* // or
|
|
14
|
+
* await createGuestWalletsAsync({ ...params });
|
|
15
|
+
*/
|
|
16
|
+
export declare const useCreateGuestWallets: () => {
|
|
17
|
+
status: "error" | "idle" | "pending" | "success";
|
|
18
|
+
data: import("@getpara/web-sdk").Wallet[] | undefined;
|
|
19
|
+
isSuccess: boolean;
|
|
20
|
+
variables: void | undefined;
|
|
21
|
+
error: Error | null;
|
|
22
|
+
isError: boolean;
|
|
23
|
+
isIdle: boolean;
|
|
24
|
+
isPending: boolean;
|
|
25
|
+
reset: () => void;
|
|
26
|
+
context: unknown;
|
|
27
|
+
failureCount: number;
|
|
28
|
+
failureReason: Error | null;
|
|
29
|
+
isPaused: boolean;
|
|
30
|
+
submittedAt: number;
|
|
31
|
+
createGuestWallets: import("@tanstack/react-query").UseMutateFunction<import("@getpara/web-sdk").Wallet[], Error, void, unknown>;
|
|
32
|
+
createGuestWalletsAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@getpara/web-sdk").Wallet[], Error, void, unknown>;
|
|
33
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
+
import { useMutation } from "@tanstack/react-query";
|
|
6
|
+
import { useClient } from "../utils/index.js";
|
|
7
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
8
|
+
import { createGuestWallets } from "../../actions/index.js";
|
|
9
|
+
const CREATE_GUEST_WALLETS_KEY = "CREATE_GUEST_WALLETS";
|
|
10
|
+
const useCreateGuestWallets = () => {
|
|
11
|
+
const para = useClient();
|
|
12
|
+
const mutation = useMutation({
|
|
13
|
+
mutationKey: [CREATE_GUEST_WALLETS_KEY],
|
|
14
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const result = yield createGuestWallets(para, args);
|
|
17
|
+
return result;
|
|
18
|
+
} catch (error) {
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
return renameMutations(mutation, "createGuestWallets");
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
CREATE_GUEST_WALLETS_KEY,
|
|
27
|
+
useCreateGuestWallets
|
|
28
|
+
};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
export declare const CREATE_PREGEN_WALLET_KEY = "CREATE_PREGEN_WALLET";
|
|
2
|
+
/**
|
|
3
|
+
* React hook for the `createPregenWallet` mutation.
|
|
4
|
+
*
|
|
5
|
+
* Returns a mutation result object with all standard fields from `useMutation`, except:
|
|
6
|
+
* - `mutate` and `mutateAsync` are replaced by:
|
|
7
|
+
* - `createPregenWallet`: function to trigger the mutation (same as `mutate`)
|
|
8
|
+
* - `createPregenWalletAsync`: async function to trigger the mutation (same as `mutateAsync`)
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* const { createPregenWallet, createPregenWalletAsync } = useCreatePregenWallet();
|
|
12
|
+
* createPregenWallet({ ...params });
|
|
13
|
+
* // or
|
|
14
|
+
* await createPregenWalletAsync({ ...params });
|
|
15
|
+
*/
|
|
16
|
+
export declare const useCreatePregenWallet: () => {
|
|
17
|
+
status: "error" | "idle" | "pending" | "success";
|
|
18
|
+
data: {
|
|
19
|
+
createdAt?: string | undefined;
|
|
20
|
+
id: string;
|
|
21
|
+
name?: string | undefined;
|
|
22
|
+
signer: string;
|
|
23
|
+
address?: string | undefined;
|
|
24
|
+
addressSecondary?: string | undefined;
|
|
25
|
+
publicKey?: string | undefined;
|
|
26
|
+
scheme?: import("@getpara/web-sdk").TWalletScheme | undefined;
|
|
27
|
+
type?: (import("@getpara/user-management-client").EmbeddedWalletType | import("@getpara/user-management-client").ExternalWalletType) | undefined;
|
|
28
|
+
isPregen?: boolean | undefined;
|
|
29
|
+
pregenIdentifier?: string | undefined;
|
|
30
|
+
pregenIdentifierType?: import("@getpara/web-sdk").TPregenIdentifierType | undefined;
|
|
31
|
+
userId?: string | undefined;
|
|
32
|
+
partnerId?: string | undefined;
|
|
33
|
+
partner?: import("@getpara/web-sdk").PartnerEntity | undefined;
|
|
34
|
+
lastUsedAt?: string | undefined;
|
|
35
|
+
lastUsedPartner?: import("@getpara/web-sdk").PartnerEntity | undefined;
|
|
36
|
+
lastUsedPartnerId?: string | undefined;
|
|
37
|
+
isExternal?: boolean | undefined;
|
|
38
|
+
isExternalWithParaAuth?: boolean | undefined;
|
|
39
|
+
externalProviderId?: string | undefined;
|
|
40
|
+
isExternalWithVerification?: boolean | undefined;
|
|
41
|
+
isExternalConnectionOnly?: boolean | undefined;
|
|
42
|
+
ensName?: string | null | undefined;
|
|
43
|
+
ensAvatar?: string | null | undefined;
|
|
44
|
+
} | undefined;
|
|
45
|
+
isSuccess: boolean;
|
|
46
|
+
variables: {
|
|
47
|
+
type: import("@getpara/web-sdk").TWalletType;
|
|
48
|
+
pregenId: import("@getpara/web-sdk").PregenAuth;
|
|
49
|
+
} | undefined;
|
|
50
|
+
error: Error | null;
|
|
51
|
+
isError: boolean;
|
|
52
|
+
isIdle: boolean;
|
|
53
|
+
isPending: boolean;
|
|
54
|
+
reset: () => void;
|
|
55
|
+
context: unknown;
|
|
56
|
+
failureCount: number;
|
|
57
|
+
failureReason: Error | null;
|
|
58
|
+
isPaused: boolean;
|
|
59
|
+
submittedAt: number;
|
|
60
|
+
createPregenWallet: import("@tanstack/react-query").UseMutateFunction<{
|
|
61
|
+
createdAt?: string | undefined;
|
|
62
|
+
id: string;
|
|
63
|
+
name?: string | undefined;
|
|
64
|
+
signer: string;
|
|
65
|
+
address?: string | undefined;
|
|
66
|
+
addressSecondary?: string | undefined;
|
|
67
|
+
publicKey?: string | undefined;
|
|
68
|
+
scheme?: import("@getpara/web-sdk").TWalletScheme | undefined;
|
|
69
|
+
type?: (import("@getpara/user-management-client").EmbeddedWalletType | import("@getpara/user-management-client").ExternalWalletType) | undefined;
|
|
70
|
+
isPregen?: boolean | undefined;
|
|
71
|
+
pregenIdentifier?: string | undefined;
|
|
72
|
+
pregenIdentifierType?: import("@getpara/web-sdk").TPregenIdentifierType | undefined;
|
|
73
|
+
userId?: string | undefined;
|
|
74
|
+
partnerId?: string | undefined;
|
|
75
|
+
partner?: import("@getpara/web-sdk").PartnerEntity | undefined;
|
|
76
|
+
lastUsedAt?: string | undefined;
|
|
77
|
+
lastUsedPartner?: import("@getpara/web-sdk").PartnerEntity | undefined;
|
|
78
|
+
lastUsedPartnerId?: string | undefined;
|
|
79
|
+
isExternal?: boolean | undefined;
|
|
80
|
+
isExternalWithParaAuth?: boolean | undefined;
|
|
81
|
+
externalProviderId?: string | undefined;
|
|
82
|
+
isExternalWithVerification?: boolean | undefined;
|
|
83
|
+
isExternalConnectionOnly?: boolean | undefined;
|
|
84
|
+
ensName?: string | null | undefined;
|
|
85
|
+
ensAvatar?: string | null | undefined;
|
|
86
|
+
}, Error, {
|
|
87
|
+
type: import("@getpara/web-sdk").TWalletType;
|
|
88
|
+
pregenId: import("@getpara/web-sdk").PregenAuth;
|
|
89
|
+
}, unknown>;
|
|
90
|
+
createPregenWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
|
|
91
|
+
createdAt?: string | undefined;
|
|
92
|
+
id: string;
|
|
93
|
+
name?: string | undefined;
|
|
94
|
+
signer: string;
|
|
95
|
+
address?: string | undefined;
|
|
96
|
+
addressSecondary?: string | undefined;
|
|
97
|
+
publicKey?: string | undefined;
|
|
98
|
+
scheme?: import("@getpara/web-sdk").TWalletScheme | undefined;
|
|
99
|
+
type?: (import("@getpara/user-management-client").EmbeddedWalletType | import("@getpara/user-management-client").ExternalWalletType) | undefined;
|
|
100
|
+
isPregen?: boolean | undefined;
|
|
101
|
+
pregenIdentifier?: string | undefined;
|
|
102
|
+
pregenIdentifierType?: import("@getpara/web-sdk").TPregenIdentifierType | undefined;
|
|
103
|
+
userId?: string | undefined;
|
|
104
|
+
partnerId?: string | undefined;
|
|
105
|
+
partner?: import("@getpara/web-sdk").PartnerEntity | undefined;
|
|
106
|
+
lastUsedAt?: string | undefined;
|
|
107
|
+
lastUsedPartner?: import("@getpara/web-sdk").PartnerEntity | undefined;
|
|
108
|
+
lastUsedPartnerId?: string | undefined;
|
|
109
|
+
isExternal?: boolean | undefined;
|
|
110
|
+
isExternalWithParaAuth?: boolean | undefined;
|
|
111
|
+
externalProviderId?: string | undefined;
|
|
112
|
+
isExternalWithVerification?: boolean | undefined;
|
|
113
|
+
isExternalConnectionOnly?: boolean | undefined;
|
|
114
|
+
ensName?: string | null | undefined;
|
|
115
|
+
ensAvatar?: string | null | undefined;
|
|
116
|
+
}, Error, {
|
|
117
|
+
type: import("@getpara/web-sdk").TWalletType;
|
|
118
|
+
pregenId: import("@getpara/web-sdk").PregenAuth;
|
|
119
|
+
}, unknown>;
|
|
120
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import {
|
|
3
|
+
__async
|
|
4
|
+
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
+
import { useMutation } from "@tanstack/react-query";
|
|
6
|
+
import { useClient } from "../utils/index.js";
|
|
7
|
+
import { renameMutations } from "../../utils/renameMutations.js";
|
|
8
|
+
import { createPregenWallet } from "../../actions/index.js";
|
|
9
|
+
const CREATE_PREGEN_WALLET_KEY = "CREATE_PREGEN_WALLET";
|
|
10
|
+
const useCreatePregenWallet = () => {
|
|
11
|
+
const para = useClient();
|
|
12
|
+
const mutation = useMutation({
|
|
13
|
+
mutationKey: [CREATE_PREGEN_WALLET_KEY],
|
|
14
|
+
mutationFn: (args) => __async(void 0, null, function* () {
|
|
15
|
+
try {
|
|
16
|
+
const result = yield createPregenWallet(para, args);
|
|
17
|
+
return result;
|
|
18
|
+
} catch (error) {
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
return renameMutations(mutation, "createPregenWallet");
|
|
24
|
+
};
|
|
25
|
+
export {
|
|
26
|
+
CREATE_PREGEN_WALLET_KEY,
|
|
27
|
+
useCreatePregenWallet
|
|
28
|
+
};
|