@getpara/react-sdk-lite 2.0.0-alpha.66 → 2.0.0-alpha.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/dist/modal/components/Account/AccountProfile.js +12 -172
  2. package/dist/modal/components/Account/AccountProfileEntry.d.ts +12 -0
  3. package/dist/modal/components/Account/AccountProfileEntry.js +220 -0
  4. package/dist/modal/components/Account/AccountWallet.d.ts +1 -0
  5. package/dist/modal/components/Account/AccountWallet.js +133 -0
  6. package/dist/modal/components/Body/Body.js +4 -0
  7. package/dist/modal/components/Header/hooks/useStepTitle.js +50 -45
  8. package/dist/modal/stores/modal/actions.js +2 -1
  9. package/dist/modal/stores/modal/useModalStore.d.ts +3 -0
  10. package/dist/modal/stores/modal/useModalStore.js +2 -1
  11. package/dist/modal/utils/steps.d.ts +3 -1
  12. package/dist/modal/utils/steps.js +4 -0
  13. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +3 -1
  14. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +3 -1
  15. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +3 -1
  16. package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +2 -2
  17. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +2 -2
  18. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +2 -2
  19. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +2 -2
  20. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +2 -2
  21. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +2 -2
  22. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +2 -2
  23. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +2 -2
  24. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +2 -2
  25. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +2 -2
  26. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +2 -2
  27. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +2 -2
  28. package/dist/provider/hooks/mutations/useLogout.d.ts +2 -2
  29. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +2 -2
  30. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +2 -2
  31. package/dist/provider/hooks/mutations/useSignMessage.d.ts +2 -2
  32. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +2 -2
  33. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +2 -2
  34. package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +2 -2
  35. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +2 -2
  36. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +2 -2
  37. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +2 -2
  38. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +2 -2
  39. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +8 -8
  40. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +2 -2
  41. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +2 -2
  42. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +2 -2
  43. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +2 -2
  44. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +2 -2
  45. package/dist/provider/hooks/utils/useWalletState.d.ts +1 -1
  46. package/dist/provider/providers/AccountLinkProvider.js +3 -2
  47. package/dist/provider/providers/ExternalWalletProvider.d.ts +10 -4
  48. package/dist/provider/providers/ExternalWalletProvider.js +35 -11
  49. package/dist/provider/stores/getters.d.ts +1 -1
  50. package/package.json +8 -8
@@ -22,6 +22,7 @@ const useStepTitle = () => {
22
22
  const isLogin = useModalStore((state) => state.isLogin());
23
23
  const currentStep = useModalStore((state) => state.step);
24
24
  const authLayout = useModalStore((state) => state.authLayout) || [];
25
+ const profileWallet = useModalStore((state) => state.profileWallet);
25
26
  const { data: activeWallet } = useWallet();
26
27
  const [isAuthFirst, isAuthCondensed, isExternalFirst, isExternalCondensed, isBothCondensed] = [
27
28
  (_a = authLayout[0]) == null ? void 0 : _a.includes("AUTH"),
@@ -34,51 +35,55 @@ const useStepTitle = () => {
34
35
  const { chainId } = useExternalWallets();
35
36
  const { isEnabled: isAccountLinkingEnabled } = useAccountLinking();
36
37
  const titles = useMemo(
37
- () => ({
38
- [ModalStep.AUTH_MAIN]: authStepTitle,
39
- [ModalStep.AUTH_MORE]: signUpOrLogInTitle,
40
- [ModalStep.AUTH_GUEST_SIGNUP]: "Complete Account Setup",
41
- [ModalStep.EX_WALLET_MORE]: connectWalletTitle,
42
- [ModalStep.ADD_EX_WALLET_MORE]: "Add Wallet",
43
- [ModalStep.VERIFICATIONS]: "Sign Up",
44
- [ModalStep.AWAITING_OAUTH]: signUpOrLogInTitle,
45
- [ModalStep.FARCASTER_OAUTH]: signUpOrLogInTitle,
46
- [ModalStep.TELEGRAM_OAUTH]: signUpOrLogInTitle,
47
- [ModalStep.BIOMETRIC_CREATION]: "Sign Up",
48
- [ModalStep.PASSWORD_CREATION]: "Sign Up",
49
- [ModalStep.AWAITING_BIOMETRIC_CREATION]: "Sign Up",
50
- [ModalStep.AWAITING_WALLET_CREATION]: isLogin ? "Login" : "Sign Up",
51
- [ModalStep.AWAITING_PASSWORD_CREATION]: "Sign Up",
52
- [ModalStep.WALLET_CREATION_DONE]: hideWallets ? "Account Created" : "Wallet Created",
53
- [ModalStep.SECRET]: isLogin ? "Login" : "Sign Up",
54
- [ModalStep.BIOMETRIC_LOGIN]: "Login",
55
- [ModalStep.EMBEDDED_PASSWORD_LOGIN]: "Login",
56
- [ModalStep.AWAITING_PASSWORD_LOGIN]: "Login",
57
- [ModalStep.AWAITING_BIOMETRIC_LOGIN]: "Login",
58
- [ModalStep.LOGIN_DONE]: "",
59
- [ModalStep.SETUP_2FA]: "2FA",
60
- [ModalStep.VERIFY_2FA]: "2FA",
61
- [ModalStep.TWO_FACTOR_DONE]: "2FA",
62
- [ModalStep.ADD_FUNDS_BUY]: "Add Funds",
63
- [ModalStep.ADD_FUNDS_RECEIVE]: "Add Funds",
64
- [ModalStep.ADD_FUNDS_WITHDRAW]: "Withdraw",
65
- [ModalStep.ADD_FUNDS_AWAITING]: "Add Funds",
66
- [ModalStep.ADD_FUNDS_SUCCESS]: "Add Funds",
67
- [ModalStep.ADD_FUNDS_FAILURE]: "Add Funds",
68
- [ModalStep.ACCOUNT_MAIN]: "",
69
- [ModalStep.CHAIN_SWITCH]: "",
70
- [ModalStep.ACCOUNT_PROFILE]: isAccountLinkingEnabled ? "Profile" : "Settings",
71
- [ModalStep.ACCOUNT_PROFILE_LIST]: "Link Account",
72
- [ModalStep.ACCOUNT_PROFILE_ADD]: "Link Account",
73
- [ModalStep.ACCOUNT_PROFILE_REMOVE]: "Unlink Account",
74
- [ModalStep.EX_WALLET_SELECTED]: "Connect Wallet",
75
- [ModalStep.EX_WALLET_NETWORK_SELECT]: "Select Network",
76
- [ModalStep.ADD_EX_WALLET_NETWORK_SELECT]: "Select Network",
77
- [ModalStep.LINK_EX_WALLET_NETWORK_SELECT]: "Select Network",
78
- [ModalStep.ADD_EX_WALLET_SELECTED]: "Add Wallet",
79
- [ModalStep.EXTERNAL_WALLET_VERIFICATION]: "Verify Wallet",
80
- [ModalStep.AWAITING_ACCOUNT]: isLogin ? "Login" : "Sign Up"
81
- }),
38
+ () => {
39
+ var _a2;
40
+ return {
41
+ [ModalStep.AUTH_MAIN]: authStepTitle,
42
+ [ModalStep.AUTH_MORE]: signUpOrLogInTitle,
43
+ [ModalStep.AUTH_GUEST_SIGNUP]: "Complete Account Setup",
44
+ [ModalStep.EX_WALLET_MORE]: connectWalletTitle,
45
+ [ModalStep.ADD_EX_WALLET_MORE]: "Add Wallet",
46
+ [ModalStep.VERIFICATIONS]: "Sign Up",
47
+ [ModalStep.AWAITING_OAUTH]: signUpOrLogInTitle,
48
+ [ModalStep.FARCASTER_OAUTH]: signUpOrLogInTitle,
49
+ [ModalStep.TELEGRAM_OAUTH]: signUpOrLogInTitle,
50
+ [ModalStep.BIOMETRIC_CREATION]: "Sign Up",
51
+ [ModalStep.PASSWORD_CREATION]: "Sign Up",
52
+ [ModalStep.AWAITING_BIOMETRIC_CREATION]: "Sign Up",
53
+ [ModalStep.AWAITING_WALLET_CREATION]: isLogin ? "Login" : "Sign Up",
54
+ [ModalStep.AWAITING_PASSWORD_CREATION]: "Sign Up",
55
+ [ModalStep.WALLET_CREATION_DONE]: hideWallets ? "Account Created" : "Wallet Created",
56
+ [ModalStep.SECRET]: isLogin ? "Login" : "Sign Up",
57
+ [ModalStep.BIOMETRIC_LOGIN]: "Login",
58
+ [ModalStep.EMBEDDED_PASSWORD_LOGIN]: "Login",
59
+ [ModalStep.AWAITING_PASSWORD_LOGIN]: "Login",
60
+ [ModalStep.AWAITING_BIOMETRIC_LOGIN]: "Login",
61
+ [ModalStep.LOGIN_DONE]: "",
62
+ [ModalStep.SETUP_2FA]: "2FA",
63
+ [ModalStep.VERIFY_2FA]: "2FA",
64
+ [ModalStep.TWO_FACTOR_DONE]: "2FA",
65
+ [ModalStep.ADD_FUNDS_BUY]: "Add Funds",
66
+ [ModalStep.ADD_FUNDS_RECEIVE]: "Add Funds",
67
+ [ModalStep.ADD_FUNDS_WITHDRAW]: "Withdraw",
68
+ [ModalStep.ADD_FUNDS_AWAITING]: "Add Funds",
69
+ [ModalStep.ADD_FUNDS_SUCCESS]: "Add Funds",
70
+ [ModalStep.ADD_FUNDS_FAILURE]: "Add Funds",
71
+ [ModalStep.ACCOUNT_MAIN]: "",
72
+ [ModalStep.CHAIN_SWITCH]: "",
73
+ [ModalStep.ACCOUNT_PROFILE]: isAccountLinkingEnabled ? "Profile" : "Settings",
74
+ [ModalStep.ACCOUNT_PROFILE_LIST]: "Link Account",
75
+ [ModalStep.ACCOUNT_PROFILE_ADD]: "Link Account",
76
+ [ModalStep.ACCOUNT_PROFILE_REMOVE]: "Unlink Account",
77
+ [ModalStep.EX_WALLET_SELECTED]: "Connect Wallet",
78
+ [ModalStep.EX_WALLET_NETWORK_SELECT]: "Select Network",
79
+ [ModalStep.ADD_EX_WALLET_NETWORK_SELECT]: "Select Network",
80
+ [ModalStep.LINK_EX_WALLET_NETWORK_SELECT]: "Select Network",
81
+ [ModalStep.ADD_EX_WALLET_SELECTED]: "Add Wallet",
82
+ [ModalStep.EXTERNAL_WALLET_VERIFICATION]: "Verify Wallet",
83
+ [ModalStep.AWAITING_ACCOUNT]: isLogin ? "Login" : "Sign Up",
84
+ [ModalStep.ACCOUNT_WALLET]: (_a2 = profileWallet == null ? void 0 : profileWallet.displayName) != null ? _a2 : "Wallet Settings"
85
+ };
86
+ },
82
87
  [isLogin, chainId, hideWallets, authStepTitle]
83
88
  );
84
89
  const title = useMemo(() => {
@@ -137,7 +137,8 @@ const getActions = (set, get) => ({
137
137
  },
138
138
  setAuthStepRoute: (authStepRoute) => set({ authStepRoute }),
139
139
  setIsPasskeySupported: (isPasskeySupported) => set({ isPasskeySupported }),
140
- setAccountLinkOptions: (accountLinkOptions) => set({ accountLinkOptions })
140
+ setAccountLinkOptions: (accountLinkOptions) => set({ accountLinkOptions }),
141
+ setProfileWallet: (profileWallet) => set({ profileWallet })
141
142
  });
142
143
  export {
143
144
  getActions
@@ -1,3 +1,4 @@
1
+ import { AvailableWallet } from '@getpara/core-sdk';
1
2
  import { ModalStep } from '../../utils/steps.js';
2
3
  import { AuthStateLogin, AuthStateSignup, AuthState, AuthStateVerify, OnRampConfig as OnRampConfigBase, OnRampPurchase, TWalletType, Setup2faResponse, SupportedAccountLinks } from '@getpara/web-sdk';
3
4
  import { Tab as AddFundsTabType } from '../../components/AddFunds/AddFundsContext.js';
@@ -58,6 +59,7 @@ interface ModalState {
58
59
  };
59
60
  isPasskeySupported: boolean;
60
61
  accountLinkOptions: SupportedAccountLinks;
62
+ profileWallet?: AvailableWallet;
61
63
  }
62
64
  export interface ModalActions {
63
65
  resetState: () => void;
@@ -96,6 +98,7 @@ export interface ModalActions {
96
98
  setAuthStepRoute: (_?: ModalStep) => void;
97
99
  setIsPasskeySupported: (_: boolean) => void;
98
100
  setAccountLinkOptions: (_: SupportedAccountLinks) => void;
101
+ setProfileWallet: (_?: AvailableWallet) => void;
99
102
  }
100
103
  export type ModalStore = ModalState & ModalActions;
101
104
  export declare const DEFAULT_MODAL_STATE: Omit<ModalState, 'step' | 'onRampConfig'>;
@@ -47,7 +47,8 @@ const DEFAULT_MODAL_STATE = {
47
47
  initialFarcasterConnected: createRef()
48
48
  },
49
49
  isPasskeySupported: true,
50
- accountLinkOptions: [...LINKED_ACCOUNT_TYPES]
50
+ accountLinkOptions: [...LINKED_ACCOUNT_TYPES],
51
+ profileWallet: void 0
51
52
  };
52
53
  const useModalStore = create()(
53
54
  persist(
@@ -1,4 +1,4 @@
1
- import { EnabledFlow } from '@getpara/web-sdk';
1
+ import { EnabledFlow } from '@getpara/core-sdk/src/types/config.js';
2
2
  export declare enum ModalStep {
3
3
  AUTH_MAIN = "AUTH_MAIN",
4
4
  AUTH_MORE = "AUTH_MORE",
@@ -39,6 +39,7 @@ export declare enum ModalStep {
39
39
  ACCOUNT_PROFILE_ADD = "ACCOUNT_PROFILE_ADD",
40
40
  ACCOUNT_PROFILE_LIST = "ACCOUNT_PROFILE_LIST",
41
41
  ACCOUNT_PROFILE_REMOVE = "ACCOUNT_PROFILE_REMOVE",
42
+ ACCOUNT_WALLET = "ACCOUNT_WALLET",
42
43
  AWAITING_ACCOUNT = "AWAITING_ACCOUNT",
43
44
  SWITCH_WALLETS = "SWITCH_WALLETS",
44
45
  SWITCH_WALLETS_IFRAME = "SWITCH_WALLETS_IFRAME",
@@ -65,6 +66,7 @@ declare enum AccountStep {
65
66
  ACCOUNT_PROFILE_ADD = "ACCOUNT_PROFILE_ADD",
66
67
  ACCOUNT_PROFILE_LIST = "ACCOUNT_PROFILE_LIST",
67
68
  ACCOUNT_PROFILE_REMOVE = "ACCOUNT_PROFILE_REMOVE",
69
+ ACCOUNT_WALLET = "ACCOUNT_WALLET",
68
70
  SWITCH_WALLETS = "SWITCH_WALLETS",
69
71
  SWITCH_WALLETS_IFRAME = "SWITCH_WALLETS_IFRAME",
70
72
  EXTERNAL_WALLET_VERIFICATION = "EXTERNAL_WALLET_VERIFICATION",
@@ -40,6 +40,7 @@ var ModalStep = /* @__PURE__ */ ((ModalStep2) => {
40
40
  ModalStep2["ACCOUNT_PROFILE_ADD"] = "ACCOUNT_PROFILE_ADD";
41
41
  ModalStep2["ACCOUNT_PROFILE_LIST"] = "ACCOUNT_PROFILE_LIST";
42
42
  ModalStep2["ACCOUNT_PROFILE_REMOVE"] = "ACCOUNT_PROFILE_REMOVE";
43
+ ModalStep2["ACCOUNT_WALLET"] = "ACCOUNT_WALLET";
43
44
  ModalStep2["AWAITING_ACCOUNT"] = "AWAITING_ACCOUNT";
44
45
  ModalStep2["SWITCH_WALLETS"] = "SWITCH_WALLETS";
45
46
  ModalStep2["SWITCH_WALLETS_IFRAME"] = "SWITCH_WALLETS_IFRAME";
@@ -64,6 +65,7 @@ var AccountStep = /* @__PURE__ */ ((AccountStep2) => {
64
65
  AccountStep2["ACCOUNT_PROFILE_ADD"] = "ACCOUNT_PROFILE_ADD";
65
66
  AccountStep2["ACCOUNT_PROFILE_LIST"] = "ACCOUNT_PROFILE_LIST";
66
67
  AccountStep2["ACCOUNT_PROFILE_REMOVE"] = "ACCOUNT_PROFILE_REMOVE";
68
+ AccountStep2["ACCOUNT_WALLET"] = "ACCOUNT_WALLET";
67
69
  AccountStep2["SWITCH_WALLETS"] = "SWITCH_WALLETS";
68
70
  AccountStep2["SWITCH_WALLETS_IFRAME"] = "SWITCH_WALLETS_IFRAME";
69
71
  AccountStep2["EXTERNAL_WALLET_VERIFICATION"] = "EXTERNAL_WALLET_VERIFICATION";
@@ -111,6 +113,7 @@ const RESET_TO_ACCOUNT_STEPS = [
111
113
  "ACCOUNT_PROFILE_ADD" /* ACCOUNT_PROFILE_ADD */,
112
114
  "ACCOUNT_PROFILE_LIST" /* ACCOUNT_PROFILE_LIST */,
113
115
  "ACCOUNT_PROFILE_REMOVE" /* ACCOUNT_PROFILE_REMOVE */,
116
+ "ACCOUNT_WALLET" /* ACCOUNT_WALLET */,
114
117
  "SWITCH_WALLETS" /* SWITCH_WALLETS */,
115
118
  "SWITCH_WALLETS_IFRAME" /* SWITCH_WALLETS_IFRAME */,
116
119
  "ADD_EX_WALLET_MORE" /* ADD_EX_WALLET_MORE */,
@@ -133,6 +136,7 @@ const AccountPreviousStep = {
133
136
  ["ACCOUNT_PROFILE_LIST" /* ACCOUNT_PROFILE_LIST */]: "ACCOUNT_PROFILE" /* ACCOUNT_PROFILE */,
134
137
  ["ACCOUNT_PROFILE_ADD" /* ACCOUNT_PROFILE_ADD */]: "ACCOUNT_PROFILE_LIST" /* ACCOUNT_PROFILE_LIST */,
135
138
  ["ACCOUNT_PROFILE_REMOVE" /* ACCOUNT_PROFILE_REMOVE */]: "ACCOUNT_PROFILE" /* ACCOUNT_PROFILE */,
139
+ ["ACCOUNT_WALLET" /* ACCOUNT_WALLET */]: "ACCOUNT_PROFILE" /* ACCOUNT_PROFILE */,
136
140
  ["SWITCH_WALLETS" /* SWITCH_WALLETS */]: "ACCOUNT_PROFILE" /* ACCOUNT_PROFILE */,
137
141
  ["SWITCH_WALLETS_IFRAME" /* SWITCH_WALLETS_IFRAME */]: "ACCOUNT_PROFILE" /* ACCOUNT_PROFILE */,
138
142
  ["EXTERNAL_WALLET_VERIFICATION" /* EXTERNAL_WALLET_VERIFICATION */]: "EX_WALLET_SELECTED" /* EX_WALLET_SELECTED */,
@@ -2,7 +2,9 @@
2
2
  import "../../../chunk-MMUBH76A.js";
3
3
  import { defaultCosmosExternalWallet } from "@getpara/react-common";
4
4
  import { createContext } from "react";
5
- const CosmosExternalWalletContext = createContext(defaultCosmosExternalWallet);
5
+ const CosmosExternalWalletContext = createContext(
6
+ defaultCosmosExternalWallet
7
+ );
6
8
  export {
7
9
  CosmosExternalWalletContext
8
10
  };
@@ -2,7 +2,9 @@
2
2
  import "../../../chunk-MMUBH76A.js";
3
3
  import { createContext } from "react";
4
4
  import { defaultEvmExternalWallet } from "@getpara/react-common";
5
- const EvmExternalWalletContext = createContext(defaultEvmExternalWallet);
5
+ const EvmExternalWalletContext = createContext(
6
+ defaultEvmExternalWallet
7
+ );
6
8
  export {
7
9
  EvmExternalWalletContext
8
10
  };
@@ -2,7 +2,9 @@
2
2
  import "../../../chunk-MMUBH76A.js";
3
3
  import { createContext } from "react";
4
4
  import { defaultSolanaExternalWallet } from "@getpara/react-common";
5
- const SolanaExternalWalletContext = createContext(defaultSolanaExternalWallet);
5
+ const SolanaExternalWalletContext = createContext(
6
+ defaultSolanaExternalWallet
7
+ );
6
8
  export {
7
9
  SolanaExternalWalletContext
8
10
  };
@@ -17,13 +17,13 @@ export declare const ADD_CREDENTIAL_KEY = "ADD_CREDENTIAL";
17
17
  export declare const useAddAuthMethod: ({ openPopup }?: {
18
18
  openPopup: boolean;
19
19
  }) => {
20
- status: "error" | "idle" | "pending" | "success";
20
+ status: "idle" | "pending" | "error" | "success";
21
+ error: Error | null;
21
22
  data: string | undefined;
22
23
  isSuccess: boolean;
23
24
  variables: void | {
24
25
  authMethod?: Exclude<import("@getpara/web-sdk").TAuthMethod, "BASIC_LOGIN"> | undefined;
25
26
  } | undefined;
26
- error: Error | null;
27
27
  isError: boolean;
28
28
  isIdle: boolean;
29
29
  isPending: boolean;
@@ -15,13 +15,13 @@ export declare const CLAIM_PREGEN_WALLETS_KEY = "CLAIM_PREGEN_WALLETS";
15
15
  * await claimPregenWalletsAsync({ ...params });
16
16
  */
17
17
  export declare const useClaimPregenWallets: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<string | undefined>;
20
21
  isSuccess: boolean;
21
22
  variables: {
22
23
  pregenId?: import("@getpara/web-sdk").PregenAuth | undefined;
23
24
  } | undefined;
24
- error: Error | null;
25
25
  isError: boolean;
26
26
  isIdle: boolean;
27
27
  isPending: boolean;
@@ -14,11 +14,11 @@ export declare const CREATE_GUEST_WALLETS_KEY = "CREATE_GUEST_WALLETS";
14
14
  * await createGuestWalletsAsync({ ...params });
15
15
  */
16
16
  export declare const useCreateGuestWallets: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: import("@getpara/web-sdk").Wallet[] | undefined;
19
20
  isSuccess: boolean;
20
21
  variables: void | undefined;
21
- error: Error | null;
22
22
  isError: boolean;
23
23
  isIdle: boolean;
24
24
  isPending: boolean;
@@ -14,7 +14,8 @@ export declare const CREATE_PREGEN_WALLET_KEY = "CREATE_PREGEN_WALLET";
14
14
  * await createPregenWalletAsync({ ...params });
15
15
  */
16
16
  export declare const useCreatePregenWallet: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: {
19
20
  createdAt?: string | undefined;
20
21
  id: string;
@@ -47,7 +48,6 @@ export declare const useCreatePregenWallet: () => {
47
48
  type: import("@getpara/web-sdk").TWalletType;
48
49
  pregenId: import("@getpara/web-sdk").PregenAuth;
49
50
  } | undefined;
50
- error: Error | null;
51
51
  isError: boolean;
52
52
  isIdle: boolean;
53
53
  isPending: boolean;
@@ -14,14 +14,14 @@ export declare const CREATE_PREGEN_WALLET_PER_TYPE_KEY = "CREATE_PREGEN_WALLET_P
14
14
  * await createPregenWalletPerTypeAsync({ ...params });
15
15
  */
16
16
  export declare const useCreatePregenWalletPerType: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: import("@getpara/web-sdk").Wallet[] | undefined;
19
20
  isSuccess: boolean;
20
21
  variables: {
21
22
  types?: import("@getpara/web-sdk").TWalletType[] | undefined;
22
23
  pregenId: import("@getpara/web-sdk").PregenAuth;
23
24
  } | undefined;
24
- error: Error | null;
25
25
  isError: boolean;
26
26
  isIdle: boolean;
27
27
  isPending: boolean;
@@ -14,14 +14,14 @@ export declare const CREATE_WALLET_KEY = "CREATE_WALLET";
14
14
  * await createWalletAsync({ ...params });
15
15
  */
16
16
  export declare const useCreateWallet: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: [import("@getpara/web-sdk").Wallet, string | undefined] | undefined;
19
20
  isSuccess: boolean;
20
21
  variables: void | {
21
22
  type?: Uppercase<import("@getpara/web-sdk").TWalletType> | undefined;
22
23
  skipDistribute?: boolean | undefined;
23
24
  } | undefined;
24
- error: Error | null;
25
25
  isError: boolean;
26
26
  isIdle: boolean;
27
27
  isPending: boolean;
@@ -14,7 +14,8 @@ export declare const CREATE_WALLET_PER_TYPE_KEY = "CREATE_WALLET_PER_TYPE";
14
14
  * await createWalletPerTypeAsync({ ...params });
15
15
  */
16
16
  export declare const useCreateWalletPerType: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: {
19
20
  wallets: import("@getpara/web-sdk").Wallet[];
20
21
  walletIds: import("@getpara/web-sdk").CurrentWalletIds;
@@ -25,7 +26,6 @@ export declare const useCreateWalletPerType: () => {
25
26
  types?: Uppercase<import("@getpara/web-sdk").TWalletType>[] | undefined;
26
27
  skipDistribute?: boolean | undefined;
27
28
  } | undefined;
28
- error: Error | null;
29
29
  isError: boolean;
30
30
  isIdle: boolean;
31
31
  isPending: boolean;
@@ -14,13 +14,13 @@ export declare const ENABLE_2FA_KEY = "ENABLE_2FA";
14
14
  * await enable2faAsync({ ...params });
15
15
  */
16
16
  export declare const useEnable2fa: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: void | undefined;
19
20
  isSuccess: boolean;
20
21
  variables: {
21
22
  verificationCode: string;
22
23
  } | undefined;
23
- error: Error | null;
24
24
  isError: boolean;
25
25
  isIdle: boolean;
26
26
  isPending: boolean;
@@ -15,13 +15,13 @@ export declare const HAS_PREGEN_WALLET_KEY = "HAS_PREGEN_WALLET";
15
15
  * await hasPregenWalletAsync({ ...params });
16
16
  */
17
17
  export declare const useHasPregenWallet: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<boolean> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: {
22
23
  pregenId: import("@getpara/web-sdk").PregenAuth;
23
24
  } | undefined;
24
- error: Error | null;
25
25
  isError: boolean;
26
26
  isIdle: boolean;
27
27
  isPending: boolean;
@@ -14,7 +14,8 @@ export declare const ISSUE_JWT_KEY = "ISSUE_JWT";
14
14
  * await issueJwtAsync({ ...params });
15
15
  */
16
16
  export declare const useIssueJwt: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: {
19
20
  token: string;
20
21
  keyId: string;
@@ -23,7 +24,6 @@ export declare const useIssueJwt: () => {
23
24
  variables: void | {
24
25
  keyIndex?: number | undefined;
25
26
  } | undefined;
26
- error: Error | null;
27
27
  isError: boolean;
28
28
  isIdle: boolean;
29
29
  isPending: boolean;
@@ -15,11 +15,11 @@ export declare const KEEP_SESSION_ALIVE_KEY = "KEEP_SESSION_ALIVE";
15
15
  * await keepSessionAliveAsync({ ...params });
16
16
  */
17
17
  export declare const useKeepSessionAlive: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<boolean> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: void | undefined;
22
- error: Error | null;
23
23
  isError: boolean;
24
24
  isIdle: boolean;
25
25
  isPending: boolean;
@@ -15,7 +15,8 @@ export declare const LOGIN_EXTERNAL_WALLET_KEY = "LOGIN_EXTERNAL_WALLET";
15
15
  * await loginExternalWalletAsync({ ...params });
16
16
  */
17
17
  export declare const useLoginExternalWallet: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateVerifyOrLogin> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: {
@@ -23,7 +24,6 @@ export declare const useLoginExternalWallet: () => {
23
24
  useShortUrls?: boolean | undefined;
24
25
  externalWallet: import("@getpara/web-sdk").ExternalWalletInfo | import("@getpara/web-sdk").ExternalWalletInfo[];
25
26
  } | undefined;
26
- error: Error | null;
27
27
  isError: boolean;
28
28
  isIdle: boolean;
29
29
  isPending: boolean;
@@ -14,13 +14,13 @@ export declare const LOGOUT_KEY = "LOGOUT";
14
14
  * await logoutAsync({ ...params });
15
15
  */
16
16
  export declare const useLogout: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: void | undefined;
19
20
  isSuccess: boolean;
20
21
  variables: void | {
21
22
  clearPregenWallets?: boolean | undefined;
22
23
  } | undefined;
23
- error: Error | null;
24
24
  isError: boolean;
25
25
  isIdle: boolean;
26
26
  isPending: boolean;
@@ -15,13 +15,13 @@ export declare const RESEND_VERIFICATION_CODE_KEY = "RESEND_VERIFICATION_CODE";
15
15
  * await resendVerificationCodeAsync({ ...params });
16
16
  */
17
17
  export declare const useResendVerificationCode: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: void | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: void | Compute<{
22
23
  type?: "SIGNUP" | "LINK_ACCOUNT" | "LOGIN";
23
24
  } | undefined>;
24
- error: Error | null;
25
25
  isError: boolean;
26
26
  isIdle: boolean;
27
27
  isPending: boolean;
@@ -15,11 +15,11 @@ export declare const SETUP_2FA_KEY = "SETUP_2FA";
15
15
  * await setup2faAsync({ ...params });
16
16
  */
17
17
  export declare const useSetup2fa: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<import("@getpara/web-sdk").Setup2faResponse> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: void | undefined;
22
- error: Error | null;
23
23
  isError: boolean;
24
24
  isIdle: boolean;
25
25
  isPending: boolean;
@@ -15,7 +15,8 @@ export declare const SIGN_MESSAGE_KEY = "SIGN_MESSAGE";
15
15
  * await signMessageAsync({ ...params });
16
16
  */
17
17
  export declare const useSignMessage: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<import("@getpara/web-sdk").FullSignatureRes> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: {
@@ -27,7 +28,6 @@ export declare const useSignMessage: () => {
27
28
  cosmosSignDocBase64?: string | undefined;
28
29
  isCanceled?: (() => boolean) | undefined;
29
30
  } | undefined;
30
- error: Error | null;
31
31
  isError: boolean;
32
32
  isIdle: boolean;
33
33
  isPending: boolean;
@@ -15,7 +15,8 @@ export declare const SIGN_TRANSACTION_KEY = "SIGN_TRANSACTION";
15
15
  * await signTransactionAsync({ ...params });
16
16
  */
17
17
  export declare const useSignTransaction: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<import("@getpara/web-sdk").FullSignatureRes> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: {
@@ -27,7 +28,6 @@ export declare const useSignTransaction: () => {
27
28
  timeoutMs?: number | undefined;
28
29
  isCanceled?: (() => boolean) | undefined;
29
30
  } | undefined;
30
- error: Error | null;
31
31
  isError: boolean;
32
32
  isIdle: boolean;
33
33
  isPending: boolean;
@@ -15,7 +15,8 @@ export declare const SIGN_UP_LOG_IN_KEY = "SIGN_UP_LOG_IN";
15
15
  * await signUpOrLogInAsync({ ...params });
16
16
  */
17
17
  export declare const useSignUpOrLogIn: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<import("@getpara/web-sdk").AuthStateLogin | import("@getpara/web-sdk").AuthStateVerify> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: {
@@ -23,7 +24,6 @@ export declare const useSignUpOrLogIn: () => {
23
24
  useShortUrls?: boolean | undefined;
24
25
  auth: import("@getpara/web-sdk").VerifiedAuth;
25
26
  } | undefined;
26
- error: Error | null;
27
27
  isError: boolean;
28
28
  isIdle: boolean;
29
29
  isPending: boolean;
@@ -14,7 +14,8 @@ export declare const SWITCH_WALLETS_KEY = "SWITCH_WALLETS";
14
14
  * await switchWalletsAsync({ authMethod: 'PASSKEY' });
15
15
  */
16
16
  export declare const useSwitchWallets: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: {
19
20
  needsWallet?: boolean | undefined;
20
21
  partnerId?: string | undefined;
@@ -26,7 +27,6 @@ export declare const useSwitchWallets: () => {
26
27
  skipSessionRefresh?: boolean | undefined;
27
28
  isCanceled?: (() => boolean) | undefined;
28
29
  } | undefined;
29
- error: Error | null;
30
30
  isError: boolean;
31
31
  isIdle: boolean;
32
32
  isPending: boolean;
@@ -14,14 +14,14 @@ export declare const UPDATE_PREGEN_WALLET_IDENTIFIER_KEY = "UPDATE_PREGEN_WALLET
14
14
  * await updatePregenWalletIdentifierAsync({ ...params });
15
15
  */
16
16
  export declare const useUpdatePregenWalletIdentifier: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: void | undefined;
19
20
  isSuccess: boolean;
20
21
  variables: {
21
22
  walletId: string;
22
23
  newPregenId: import("@getpara/web-sdk").PregenAuth;
23
24
  } | undefined;
24
- error: Error | null;
25
25
  isError: boolean;
26
26
  isIdle: boolean;
27
27
  isPending: boolean;
@@ -14,7 +14,8 @@ export declare const VERIFY_2FA_KEY = "VERIFY_2FA";
14
14
  * await verify2faAsync({ ...params });
15
15
  */
16
16
  export declare const useVerify2fa: () => {
17
- status: "error" | "idle" | "pending" | "success";
17
+ status: "idle" | "pending" | "error" | "success";
18
+ error: Error | null;
18
19
  data: {
19
20
  initiatedAt?: Date | undefined;
20
21
  status?: import("@getpara/web-sdk").RecoveryStatus | undefined;
@@ -26,7 +27,6 @@ export declare const useVerify2fa: () => {
26
27
  auth: import("@getpara/web-sdk").VerifiedAuth;
27
28
  verificationCode: string;
28
29
  } | undefined;
29
- error: Error | null;
30
30
  isError: boolean;
31
31
  isIdle: boolean;
32
32
  isPending: boolean;
@@ -15,7 +15,8 @@ export declare const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
15
15
  * await verifyExternalWalletAsync({ ...params });
16
16
  */
17
17
  export declare const useVerifyExternalWallet: () => {
18
- status: "error" | "idle" | "pending" | "success";
18
+ status: "idle" | "pending" | "error" | "success";
19
+ error: Error | null;
19
20
  data: Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: {
@@ -27,7 +28,6 @@ export declare const useVerifyExternalWallet: () => {
27
28
  cosmosSigner?: string | undefined;
28
29
  sessionLookupId?: string | undefined;
29
30
  } | undefined;
30
- error: Error | null;
31
31
  isError: boolean;
32
32
  isIdle: boolean;
33
33
  isPending: boolean;