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

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 (71) 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/Account/AccountWalletSelect.js +15 -2
  7. package/dist/modal/components/Body/Body.js +4 -0
  8. package/dist/modal/components/ChainSwitch/ChainSwitch.js +8 -3
  9. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +2 -2
  10. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +2 -1
  11. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +36 -29
  12. package/dist/modal/components/ExternalWallets/ExternalWallets.js +2 -2
  13. package/dist/modal/components/Header/hooks/useStepTitle.js +50 -45
  14. package/dist/modal/components/IFrameStep/IFrameStep.js +8 -6
  15. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +6 -5
  16. package/dist/modal/components/OAuth/TelegramOAuthStep.js +6 -5
  17. package/dist/modal/components/WalletSelectOld/WalletSelectOld.js +17 -4
  18. package/dist/modal/hooks/useFarcasterLogin.js +8 -1
  19. package/dist/modal/hooks/useTelegramLogin.js +4 -0
  20. package/dist/modal/stores/modal/actions.js +2 -1
  21. package/dist/modal/stores/modal/useModalStore.d.ts +4 -0
  22. package/dist/modal/stores/modal/useModalStore.js +4 -2
  23. package/dist/modal/utils/openPopup.d.ts +1 -1
  24. package/dist/modal/utils/openPopup.js +3 -1
  25. package/dist/modal/utils/steps.d.ts +3 -1
  26. package/dist/modal/utils/steps.js +4 -0
  27. package/dist/modal/utils/stringFormatters.js +10 -1
  28. package/dist/modal/utils/validatePortalOrigin.d.ts +2 -0
  29. package/dist/modal/utils/validatePortalOrigin.js +14 -0
  30. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +3 -1
  31. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +3 -1
  32. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +3 -1
  33. package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +5 -5
  34. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +2 -2
  35. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +2 -2
  36. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +2 -2
  37. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +2 -2
  38. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +2 -2
  39. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +2 -2
  40. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +2 -2
  41. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +2 -2
  42. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +2 -2
  43. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +2 -2
  44. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +8 -2
  45. package/dist/provider/hooks/mutations/useLogout.d.ts +2 -2
  46. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +2 -2
  47. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +2 -2
  48. package/dist/provider/hooks/mutations/useSignMessage.d.ts +2 -2
  49. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +2 -2
  50. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +2 -2
  51. package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +2 -2
  52. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +2 -2
  53. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +2 -2
  54. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +18 -30
  55. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +2 -2
  56. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +8 -8
  57. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +2 -2
  58. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +2 -2
  59. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +2 -2
  60. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +2 -2
  61. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +2 -2
  62. package/dist/provider/hooks/utils/useEventListeners.js +2 -0
  63. package/dist/provider/hooks/utils/useWalletState.d.ts +1 -1
  64. package/dist/provider/providers/AccountLinkProvider.js +3 -2
  65. package/dist/provider/providers/AuthProvider.js +73 -34
  66. package/dist/provider/providers/ExternalWalletProvider.d.ts +17 -5
  67. package/dist/provider/providers/ExternalWalletProvider.js +275 -38
  68. package/dist/provider/stores/getters.d.ts +1 -1
  69. package/package.json +8 -8
  70. package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
  71. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
@@ -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 */,
@@ -3,7 +3,16 @@ import "../../chunk-MMUBH76A.js";
3
3
  import { getNetworkName } from "@getpara/react-common";
4
4
  import { format } from "date-fns";
5
5
  const formatNetworkList = (networks) => {
6
- return networks.length === 1 ? getNetworkName(networks[0]) : `${networks.map((id) => getNetworkName(id)).slice(0, -1).join(", ")}${networks.length > 2 ? "," : ""} and ${getNetworkName(networks[networks.length - 1])}`;
6
+ if (networks.length === 0) {
7
+ return "";
8
+ }
9
+ if (networks.length === 1) {
10
+ return getNetworkName(networks[0]);
11
+ }
12
+ const networkNames = networks.map((id) => getNetworkName(id));
13
+ const allButLast = networkNames.slice(0, -1);
14
+ const last = networkNames[networkNames.length - 1];
15
+ return `${allButLast.join(", ")}${networks.length > 2 ? "," : ""} and ${last}`;
7
16
  };
8
17
  const formatWalletCreatedDate = (date) => `${format(new Date(date), "M/d/y")}`;
9
18
  const camelToSnakeCase = (str) => str.replace(/[A-Z]/g, (letter) => `_${letter.toLowerCase()}`);
@@ -0,0 +1,2 @@
1
+ import { Ctx } from '@getpara/web-sdk';
2
+ export declare const validatePortalOrigin: (event: MessageEvent, paraCtx: Ctx) => boolean;
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import "../../chunk-MMUBH76A.js";
3
+ import { getPortalBaseURL } from "@getpara/web-sdk";
4
+ const validatePortalOrigin = (event, paraCtx) => {
5
+ const portalBase = getPortalBaseURL(paraCtx);
6
+ const portalLocalBase = getPortalBaseURL(paraCtx, true);
7
+ if (event.origin !== portalBase && event.origin !== portalLocalBase) {
8
+ return false;
9
+ }
10
+ return true;
11
+ };
12
+ export {
13
+ validatePortalOrigin
14
+ };
@@ -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
- authMethod?: Exclude<import("@getpara/web-sdk").TAuthMethod, "BASIC_LOGIN"> | undefined;
25
+ authMethod?: import("@getpara/web-sdk").TAuthMethod | undefined;
25
26
  } | undefined;
26
- error: Error | null;
27
27
  isError: boolean;
28
28
  isIdle: boolean;
29
29
  isPending: boolean;
@@ -34,9 +34,9 @@ export declare const useAddAuthMethod: ({ openPopup }?: {
34
34
  isPaused: boolean;
35
35
  submittedAt: number;
36
36
  addAuthMethod: import("@tanstack/react-query").UseMutateFunction<string, Error, void | {
37
- authMethod?: Exclude<import("@getpara/web-sdk").TAuthMethod, "BASIC_LOGIN"> | undefined;
37
+ authMethod?: import("@getpara/web-sdk").TAuthMethod | undefined;
38
38
  }, unknown>;
39
39
  addAuthMethodAsync: import("@tanstack/react-query").UseMutateAsyncFunction<string, Error, void | {
40
- authMethod?: Exclude<import("@getpara/web-sdk").TAuthMethod, "BASIC_LOGIN"> | undefined;
40
+ authMethod?: import("@getpara/web-sdk").TAuthMethod | undefined;
41
41
  }, unknown>;
42
42
  };
@@ -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,15 +15,17 @@ 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: {
22
23
  portalTheme?: import("@getpara/web-sdk").Theme | undefined;
23
24
  useShortUrls?: boolean | undefined;
24
25
  externalWallet: import("@getpara/web-sdk").ExternalWalletInfo | import("@getpara/web-sdk").ExternalWalletInfo[];
26
+ chainId?: string | undefined;
27
+ uri?: string | undefined;
25
28
  } | undefined;
26
- error: Error | null;
27
29
  isError: boolean;
28
30
  isIdle: boolean;
29
31
  isPending: boolean;
@@ -37,10 +39,14 @@ export declare const useLoginExternalWallet: () => {
37
39
  portalTheme?: import("@getpara/web-sdk").Theme | undefined;
38
40
  useShortUrls?: boolean | undefined;
39
41
  externalWallet: import("@getpara/web-sdk").ExternalWalletInfo | import("@getpara/web-sdk").ExternalWalletInfo[];
42
+ chainId?: string | undefined;
43
+ uri?: string | undefined;
40
44
  }, unknown>;
41
45
  loginExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateVerifyOrLogin>, Error, {
42
46
  portalTheme?: import("@getpara/web-sdk").Theme | undefined;
43
47
  useShortUrls?: boolean | undefined;
44
48
  externalWallet: import("@getpara/web-sdk").ExternalWalletInfo | import("@getpara/web-sdk").ExternalWalletInfo[];
49
+ chainId?: string | undefined;
50
+ uri?: string | undefined;
45
51
  }, unknown>;
46
52
  };
@@ -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,19 +15,15 @@ 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";
19
- data: Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin> | undefined;
20
- isSuccess: boolean;
21
- variables: {
22
- portalTheme?: import("@getpara/web-sdk").Theme | undefined;
23
- useShortUrls?: boolean | undefined;
24
- externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
25
- signedMessage: string;
26
- cosmosPublicKeyHex?: string | undefined;
27
- cosmosSigner?: string | undefined;
28
- sessionLookupId?: string | undefined;
29
- } | undefined;
18
+ status: "idle" | "pending" | "error" | "success";
30
19
  error: Error | null;
20
+ data: Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin | import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateDone> | undefined;
21
+ isSuccess: boolean;
22
+ variables: Compute<(import("@getpara/core-sdk/dist/types/types/methods.js").WithCustomTheme & import("@getpara/core-sdk/dist/types/types/methods.js").WithUseShortUrls & {
23
+ serverAuthState: import("@getpara/shared").ServerAuthStateSignup | import("@getpara/shared").ServerAuthStateLogin | import("@getpara/shared").ServerAuthStateDone;
24
+ }) | (import("@getpara/core-sdk/dist/types/types/methods.js").WithCustomTheme & import("@getpara/core-sdk/dist/types/types/methods.js").WithUseShortUrls & import("@getpara/web-sdk").VerifyExternalWalletParams & {
25
+ serverAuthState?: undefined;
26
+ })> | undefined;
31
27
  isError: boolean;
32
28
  isIdle: boolean;
33
29
  isPending: boolean;
@@ -37,22 +33,14 @@ export declare const useVerifyExternalWallet: () => {
37
33
  failureReason: Error | null;
38
34
  isPaused: boolean;
39
35
  submittedAt: number;
40
- verifyExternalWallet: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin>, Error, {
41
- portalTheme?: import("@getpara/web-sdk").Theme | undefined;
42
- useShortUrls?: boolean | undefined;
43
- externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
44
- signedMessage: string;
45
- cosmosPublicKeyHex?: string | undefined;
46
- cosmosSigner?: string | undefined;
47
- sessionLookupId?: string | undefined;
48
- }, unknown>;
49
- verifyExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin>, Error, {
50
- portalTheme?: import("@getpara/web-sdk").Theme | undefined;
51
- useShortUrls?: boolean | undefined;
52
- externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
53
- signedMessage: string;
54
- cosmosPublicKeyHex?: string | undefined;
55
- cosmosSigner?: string | undefined;
56
- sessionLookupId?: string | undefined;
57
- }, unknown>;
36
+ verifyExternalWallet: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin | import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateDone>, Error, Compute<(import("@getpara/core-sdk/dist/types/types/methods.js").WithCustomTheme & import("@getpara/core-sdk/dist/types/types/methods.js").WithUseShortUrls & {
37
+ serverAuthState: import("@getpara/shared").ServerAuthStateSignup | import("@getpara/shared").ServerAuthStateLogin | import("@getpara/shared").ServerAuthStateDone;
38
+ }) | (import("@getpara/core-sdk/dist/types/types/methods.js").WithCustomTheme & import("@getpara/core-sdk/dist/types/types/methods.js").WithUseShortUrls & import("@getpara/web-sdk").VerifyExternalWalletParams & {
39
+ serverAuthState?: undefined;
40
+ })>, unknown>;
41
+ verifyExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/web-sdk").AuthStateSignup | import("@getpara/web-sdk").AuthStateLogin | import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateDone>, Error, Compute<(import("@getpara/core-sdk/dist/types/types/methods.js").WithCustomTheme & import("@getpara/core-sdk/dist/types/types/methods.js").WithUseShortUrls & {
42
+ serverAuthState: import("@getpara/shared").ServerAuthStateSignup | import("@getpara/shared").ServerAuthStateLogin | import("@getpara/shared").ServerAuthStateDone;
43
+ }) | (import("@getpara/core-sdk/dist/types/types/methods.js").WithCustomTheme & import("@getpara/core-sdk/dist/types/types/methods.js").WithUseShortUrls & import("@getpara/web-sdk").VerifyExternalWalletParams & {
44
+ serverAuthState?: undefined;
45
+ })>, unknown>;
58
46
  };
@@ -15,7 +15,8 @@ export declare const VERIFY_FARCASTER_KEY = "VERIFY_FARCASTER";
15
15
  * await verifyFarcasterAsync({ ...params });
16
16
  */
17
17
  export declare const useVerifyFarcaster: () => {
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").AuthStateSignupOrLoginOrDone> | undefined;
20
21
  isSuccess: boolean;
21
22
  variables: void | {
@@ -27,7 +28,6 @@ export declare const useVerifyFarcaster: () => {
27
28
  onConnectUri?: ((uri: string) => void) | undefined;
28
29
  serverAuthState?: import("@getpara/shared").VerifyThirdPartyAuth | undefined;
29
30
  } | undefined;
30
- error: Error | null;
31
31
  isError: boolean;
32
32
  isIdle: boolean;
33
33
  isPending: boolean;