@getpara/react-sdk-lite 2.0.0-alpha.34 → 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.
Files changed (84) hide show
  1. package/dist/modal/components/Account/AccountProfileLink.js +1 -1
  2. package/dist/modal/components/OAuth/OAuth.js +3 -5
  3. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +2 -2
  4. package/dist/modal/constants/constants.js +1 -1
  5. package/dist/provider/components/ExternalWalletWrapper.js +3 -26
  6. package/dist/provider/hooks/mutations/index.d.ts +28 -2
  7. package/dist/provider/hooks/mutations/index.js +57 -3
  8. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +40 -0
  9. package/dist/provider/hooks/mutations/useClaimPregenWallets.js +28 -0
  10. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +33 -0
  11. package/dist/provider/hooks/mutations/useCreateGuestWallets.js +28 -0
  12. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +120 -0
  13. package/dist/provider/hooks/mutations/useCreatePregenWallet.js +28 -0
  14. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +42 -0
  15. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.js +28 -0
  16. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +42 -0
  17. package/dist/provider/hooks/mutations/useCreateWallet.js +28 -0
  18. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +54 -0
  19. package/dist/provider/hooks/mutations/useCreateWalletPerType.js +28 -0
  20. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +39 -0
  21. package/dist/provider/hooks/mutations/useEnable2fa.js +28 -0
  22. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +40 -0
  23. package/dist/provider/hooks/mutations/useHasPregenWallet.js +28 -0
  24. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +48 -0
  25. package/dist/provider/hooks/mutations/useIssueJwt.js +28 -0
  26. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +34 -0
  27. package/dist/provider/hooks/mutations/useKeepSessionAlive.js +28 -0
  28. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +46 -0
  29. package/dist/provider/hooks/mutations/useLoginExternalWallet.js +28 -0
  30. package/dist/provider/hooks/mutations/useLogout.d.ts +39 -0
  31. package/dist/provider/hooks/mutations/useLogout.js +28 -0
  32. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +40 -0
  33. package/dist/provider/hooks/mutations/useResendVerificationCode.js +28 -0
  34. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +34 -0
  35. package/dist/provider/hooks/mutations/useSetup2fa.js +28 -0
  36. package/dist/provider/hooks/mutations/useSignMessage.d.ts +58 -0
  37. package/dist/provider/hooks/mutations/useSignMessage.js +28 -0
  38. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +58 -0
  39. package/dist/provider/hooks/mutations/useSignTransaction.js +28 -0
  40. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +46 -0
  41. package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +28 -0
  42. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +42 -0
  43. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +28 -0
  44. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +57 -0
  45. package/dist/provider/hooks/mutations/useVerify2fa.js +28 -0
  46. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +93 -0
  47. package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +28 -0
  48. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +55 -0
  49. package/dist/provider/hooks/mutations/useVerifyFarcaster.js +28 -0
  50. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +84 -0
  51. package/dist/provider/hooks/mutations/useVerifyNewAccount.js +28 -0
  52. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +64 -0
  53. package/dist/provider/hooks/mutations/useVerifyOAuth.js +28 -0
  54. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +46 -0
  55. package/dist/provider/hooks/mutations/useVerifyTelegram.js +28 -0
  56. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +57 -0
  57. package/dist/provider/hooks/mutations/useWaitForLogin.js +28 -0
  58. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +45 -0
  59. package/dist/provider/hooks/mutations/useWaitForSignup.js +28 -0
  60. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +54 -0
  61. package/dist/provider/hooks/mutations/useWaitForWalletCreation.js +28 -0
  62. package/dist/provider/hooks/mutations/utils.d.ts +2 -7
  63. package/dist/provider/hooks/mutations/utils.js +0 -24
  64. package/dist/provider/hooks/queries/index.d.ts +2 -1
  65. package/dist/provider/hooks/queries/index.js +4 -1
  66. package/dist/provider/hooks/queries/useAccountLinkInProgress.d.ts +6 -0
  67. package/dist/provider/hooks/queries/useAccountLinkInProgress.js +24 -0
  68. package/dist/provider/hooks/queries/useLinkedAccounts.d.ts +11 -0
  69. package/dist/provider/hooks/queries/useLinkedAccounts.js +24 -0
  70. package/dist/provider/providers/AccountLinkProvider.js +3 -8
  71. package/dist/provider/providers/AuthProvider.d.ts +0 -1
  72. package/dist/provider/providers/AuthProvider.js +18 -45
  73. package/dist/provider/providers/ExternalWalletProvider.js +2 -2
  74. package/dist/provider/utils/externalWalletDefaults.d.ts +6 -0
  75. package/dist/provider/utils/externalWalletDefaults.js +33 -0
  76. package/dist/provider/utils/renameMutations.d.ts +9 -5
  77. package/dist/provider/utils/renameMutations.js +3 -5
  78. package/package.json +8 -8
  79. package/dist/provider/hooks/mutations/core.d.ts +0 -27
  80. package/dist/provider/hooks/mutations/core.js +0 -66
  81. package/dist/provider/hooks/queries/core.d.ts +0 -4
  82. package/dist/provider/hooks/queries/core.js +0 -16
  83. package/dist/provider/hooks/queries/utils.d.ts +0 -7
  84. package/dist/provider/hooks/queries/utils.js +0 -25
@@ -0,0 +1,58 @@
1
+ import { Compute } from '../../types/utils.js';
2
+ export declare const SIGN_MESSAGE_KEY = "SIGN_MESSAGE";
3
+ /**
4
+ * React hook for the `signMessage` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `signMessage`: function to trigger the mutation (same as `mutate`)
9
+ * - `signMessageAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { signMessage, signMessageAsync } = useSignMessage();
13
+ * signMessage({ ...params });
14
+ * // or
15
+ * await signMessageAsync({ ...params });
16
+ */
17
+ export declare const useSignMessage: () => {
18
+ status: "error" | "idle" | "pending" | "success";
19
+ data: Compute<import("@getpara/web-sdk").FullSignatureRes> | undefined;
20
+ isSuccess: boolean;
21
+ variables: {
22
+ onPoll?: (() => void) | undefined;
23
+ onCancel?: (() => void) | undefined;
24
+ walletId: string;
25
+ messageBase64: string;
26
+ timeoutMs?: number | undefined;
27
+ cosmosSignDocBase64?: string | undefined;
28
+ isCanceled?: (() => boolean) | undefined;
29
+ } | undefined;
30
+ error: Error | null;
31
+ isError: boolean;
32
+ isIdle: boolean;
33
+ isPending: boolean;
34
+ reset: () => void;
35
+ context: unknown;
36
+ failureCount: number;
37
+ failureReason: Error | null;
38
+ isPaused: boolean;
39
+ submittedAt: number;
40
+ signMessage: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/web-sdk").FullSignatureRes>, Error, {
41
+ onPoll?: (() => void) | undefined;
42
+ onCancel?: (() => void) | undefined;
43
+ walletId: string;
44
+ messageBase64: string;
45
+ timeoutMs?: number | undefined;
46
+ cosmosSignDocBase64?: string | undefined;
47
+ isCanceled?: (() => boolean) | undefined;
48
+ }, unknown>;
49
+ signMessageAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/web-sdk").FullSignatureRes>, Error, {
50
+ onPoll?: (() => void) | undefined;
51
+ onCancel?: (() => void) | undefined;
52
+ walletId: string;
53
+ messageBase64: string;
54
+ timeoutMs?: number | undefined;
55
+ cosmosSignDocBase64?: string | undefined;
56
+ isCanceled?: (() => boolean) | undefined;
57
+ }, unknown>;
58
+ };
@@ -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 { signMessage } from "../../actions/index.js";
9
+ const SIGN_MESSAGE_KEY = "SIGN_MESSAGE";
10
+ const useSignMessage = () => {
11
+ const para = useClient();
12
+ const mutation = useMutation({
13
+ mutationKey: [SIGN_MESSAGE_KEY],
14
+ mutationFn: (args) => __async(void 0, null, function* () {
15
+ try {
16
+ const result = yield signMessage(para, args);
17
+ return result;
18
+ } catch (error) {
19
+ throw error;
20
+ }
21
+ })
22
+ });
23
+ return renameMutations(mutation, "signMessage");
24
+ };
25
+ export {
26
+ SIGN_MESSAGE_KEY,
27
+ useSignMessage
28
+ };
@@ -0,0 +1,58 @@
1
+ import { Compute } from '../../types/utils.js';
2
+ export declare const SIGN_TRANSACTION_KEY = "SIGN_TRANSACTION";
3
+ /**
4
+ * React hook for the `signTransaction` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `signTransaction`: function to trigger the mutation (same as `mutate`)
9
+ * - `signTransactionAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { signTransaction, signTransactionAsync } = useSignTransaction();
13
+ * signTransaction({ ...params });
14
+ * // or
15
+ * await signTransactionAsync({ ...params });
16
+ */
17
+ export declare const useSignTransaction: () => {
18
+ status: "error" | "idle" | "pending" | "success";
19
+ data: Compute<import("@getpara/web-sdk").FullSignatureRes> | undefined;
20
+ isSuccess: boolean;
21
+ variables: {
22
+ onPoll?: (() => void) | undefined;
23
+ onCancel?: (() => void) | undefined;
24
+ walletId: string;
25
+ rlpEncodedTxBase64: string;
26
+ chainId: string;
27
+ timeoutMs?: number | undefined;
28
+ isCanceled?: (() => boolean) | undefined;
29
+ } | undefined;
30
+ error: Error | null;
31
+ isError: boolean;
32
+ isIdle: boolean;
33
+ isPending: boolean;
34
+ reset: () => void;
35
+ context: unknown;
36
+ failureCount: number;
37
+ failureReason: Error | null;
38
+ isPaused: boolean;
39
+ submittedAt: number;
40
+ signTransaction: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/web-sdk").FullSignatureRes>, Error, {
41
+ onPoll?: (() => void) | undefined;
42
+ onCancel?: (() => void) | undefined;
43
+ walletId: string;
44
+ rlpEncodedTxBase64: string;
45
+ chainId: string;
46
+ timeoutMs?: number | undefined;
47
+ isCanceled?: (() => boolean) | undefined;
48
+ }, unknown>;
49
+ signTransactionAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/web-sdk").FullSignatureRes>, Error, {
50
+ onPoll?: (() => void) | undefined;
51
+ onCancel?: (() => void) | undefined;
52
+ walletId: string;
53
+ rlpEncodedTxBase64: string;
54
+ chainId: string;
55
+ timeoutMs?: number | undefined;
56
+ isCanceled?: (() => boolean) | undefined;
57
+ }, unknown>;
58
+ };
@@ -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 { signTransaction } from "../../actions/index.js";
9
+ const SIGN_TRANSACTION_KEY = "SIGN_TRANSACTION";
10
+ const useSignTransaction = () => {
11
+ const para = useClient();
12
+ const mutation = useMutation({
13
+ mutationKey: [SIGN_TRANSACTION_KEY],
14
+ mutationFn: (args) => __async(void 0, null, function* () {
15
+ try {
16
+ const result = yield signTransaction(para, args);
17
+ return result;
18
+ } catch (error) {
19
+ throw error;
20
+ }
21
+ })
22
+ });
23
+ return renameMutations(mutation, "signTransaction");
24
+ };
25
+ export {
26
+ SIGN_TRANSACTION_KEY,
27
+ useSignTransaction
28
+ };
@@ -0,0 +1,46 @@
1
+ import { Compute } from '../../types/utils.js';
2
+ export declare const SIGN_UP_LOG_IN_KEY = "SIGN_UP_LOG_IN";
3
+ /**
4
+ * React hook for the `signUpOrLogIn` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `signUpOrLogIn`: function to trigger the mutation (same as `mutate`)
9
+ * - `signUpOrLogInAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { signUpOrLogIn, signUpOrLogInAsync } = useSignUpOrLogIn();
13
+ * signUpOrLogIn({ ...params });
14
+ * // or
15
+ * await signUpOrLogInAsync({ ...params });
16
+ */
17
+ export declare const useSignUpOrLogIn: () => {
18
+ status: "error" | "idle" | "pending" | "success";
19
+ data: Compute<import("@getpara/web-sdk").AuthStateLogin | import("@getpara/user-management-client").ServerAuthStateVerify> | undefined;
20
+ isSuccess: boolean;
21
+ variables: {
22
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
23
+ useShortUrls?: boolean | undefined;
24
+ auth: import("@getpara/web-sdk").VerifiedAuth;
25
+ } | undefined;
26
+ error: Error | null;
27
+ isError: boolean;
28
+ isIdle: boolean;
29
+ isPending: boolean;
30
+ reset: () => void;
31
+ context: unknown;
32
+ failureCount: number;
33
+ failureReason: Error | null;
34
+ isPaused: boolean;
35
+ submittedAt: number;
36
+ signUpOrLogIn: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/web-sdk").AuthStateLogin | import("@getpara/user-management-client").ServerAuthStateVerify>, Error, {
37
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
38
+ useShortUrls?: boolean | undefined;
39
+ auth: import("@getpara/web-sdk").VerifiedAuth;
40
+ }, unknown>;
41
+ signUpOrLogInAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/web-sdk").AuthStateLogin | import("@getpara/user-management-client").ServerAuthStateVerify>, Error, {
42
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
43
+ useShortUrls?: boolean | undefined;
44
+ auth: import("@getpara/web-sdk").VerifiedAuth;
45
+ }, unknown>;
46
+ };
@@ -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 { signUpOrLogIn } from "../../actions/index.js";
9
+ const SIGN_UP_LOG_IN_KEY = "SIGN_UP_LOG_IN";
10
+ const useSignUpOrLogIn = () => {
11
+ const para = useClient();
12
+ const mutation = useMutation({
13
+ mutationKey: [SIGN_UP_LOG_IN_KEY],
14
+ mutationFn: (args) => __async(void 0, null, function* () {
15
+ try {
16
+ const result = yield signUpOrLogIn(para, args);
17
+ return result;
18
+ } catch (error) {
19
+ throw error;
20
+ }
21
+ })
22
+ });
23
+ return renameMutations(mutation, "signUpOrLogIn");
24
+ };
25
+ export {
26
+ SIGN_UP_LOG_IN_KEY,
27
+ useSignUpOrLogIn
28
+ };
@@ -0,0 +1,42 @@
1
+ export declare const UPDATE_PREGEN_WALLET_IDENTIFIER_KEY = "UPDATE_PREGEN_WALLET_IDENTIFIER";
2
+ /**
3
+ * React hook for the `updatePregenWalletIdentifier` mutation.
4
+ *
5
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
6
+ * - `mutate` and `mutateAsync` are replaced by:
7
+ * - `updatePregenWalletIdentifier`: function to trigger the mutation (same as `mutate`)
8
+ * - `updatePregenWalletIdentifierAsync`: async function to trigger the mutation (same as `mutateAsync`)
9
+ *
10
+ * @example
11
+ * const { updatePregenWalletIdentifier, updatePregenWalletIdentifierAsync } = useUpdatePregenWalletIdentifier();
12
+ * updatePregenWalletIdentifier({ ...params });
13
+ * // or
14
+ * await updatePregenWalletIdentifierAsync({ ...params });
15
+ */
16
+ export declare const useUpdatePregenWalletIdentifier: () => {
17
+ status: "error" | "idle" | "pending" | "success";
18
+ data: void | undefined;
19
+ isSuccess: boolean;
20
+ variables: {
21
+ walletId: string;
22
+ newPregenId: import("@getpara/web-sdk").PregenAuth;
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
+ updatePregenWalletIdentifier: import("@tanstack/react-query").UseMutateFunction<void, Error, {
35
+ walletId: string;
36
+ newPregenId: import("@getpara/web-sdk").PregenAuth;
37
+ }, unknown>;
38
+ updatePregenWalletIdentifierAsync: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, {
39
+ walletId: string;
40
+ newPregenId: import("@getpara/web-sdk").PregenAuth;
41
+ }, unknown>;
42
+ };
@@ -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 { updatePregenWalletIdentifier } from "../../actions/index.js";
9
+ const UPDATE_PREGEN_WALLET_IDENTIFIER_KEY = "UPDATE_PREGEN_WALLET_IDENTIFIER";
10
+ const useUpdatePregenWalletIdentifier = () => {
11
+ const para = useClient();
12
+ const mutation = useMutation({
13
+ mutationKey: [UPDATE_PREGEN_WALLET_IDENTIFIER_KEY],
14
+ mutationFn: (args) => __async(void 0, null, function* () {
15
+ try {
16
+ const result = yield updatePregenWalletIdentifier(para, args);
17
+ return result;
18
+ } catch (error) {
19
+ throw error;
20
+ }
21
+ })
22
+ });
23
+ return renameMutations(mutation, "updatePregenWalletIdentifier");
24
+ };
25
+ export {
26
+ UPDATE_PREGEN_WALLET_IDENTIFIER_KEY,
27
+ useUpdatePregenWalletIdentifier
28
+ };
@@ -0,0 +1,57 @@
1
+ export declare const VERIFY_2FA_KEY = "VERIFY_2FA";
2
+ /**
3
+ * React hook for the `verify2fa` mutation.
4
+ *
5
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
6
+ * - `mutate` and `mutateAsync` are replaced by:
7
+ * - `verify2fa`: function to trigger the mutation (same as `mutate`)
8
+ * - `verify2faAsync`: async function to trigger the mutation (same as `mutateAsync`)
9
+ *
10
+ * @example
11
+ * const { verify2fa, verify2faAsync } = useVerify2fa();
12
+ * verify2fa({ ...params });
13
+ * // or
14
+ * await verify2faAsync({ ...params });
15
+ */
16
+ export declare const useVerify2fa: () => {
17
+ status: "error" | "idle" | "pending" | "success";
18
+ data: {
19
+ initiatedAt?: Date | undefined;
20
+ status?: import("@getpara/web-sdk").RecoveryStatus | undefined;
21
+ userId: string;
22
+ wallets: Pick<import("@getpara/web-sdk").Wallet, "address" | "id">[];
23
+ } | undefined;
24
+ isSuccess: boolean;
25
+ variables: {
26
+ auth: import("@getpara/web-sdk").VerifiedAuth;
27
+ verificationCode: string;
28
+ } | undefined;
29
+ error: Error | null;
30
+ isError: boolean;
31
+ isIdle: boolean;
32
+ isPending: boolean;
33
+ reset: () => void;
34
+ context: unknown;
35
+ failureCount: number;
36
+ failureReason: Error | null;
37
+ isPaused: boolean;
38
+ submittedAt: number;
39
+ verify2fa: import("@tanstack/react-query").UseMutateFunction<{
40
+ initiatedAt?: Date | undefined;
41
+ status?: import("@getpara/web-sdk").RecoveryStatus | undefined;
42
+ userId: string;
43
+ wallets: Pick<import("@getpara/web-sdk").Wallet, "address" | "id">[];
44
+ }, Error, {
45
+ auth: import("@getpara/web-sdk").VerifiedAuth;
46
+ verificationCode: string;
47
+ }, unknown>;
48
+ verify2faAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
49
+ initiatedAt?: Date | undefined;
50
+ status?: import("@getpara/web-sdk").RecoveryStatus | undefined;
51
+ userId: string;
52
+ wallets: Pick<import("@getpara/web-sdk").Wallet, "address" | "id">[];
53
+ }, Error, {
54
+ auth: import("@getpara/web-sdk").VerifiedAuth;
55
+ verificationCode: string;
56
+ }, unknown>;
57
+ };
@@ -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 { verify2fa } from "../../actions/index.js";
9
+ const VERIFY_2FA_KEY = "VERIFY_2FA";
10
+ const useVerify2fa = () => {
11
+ const para = useClient();
12
+ const mutation = useMutation({
13
+ mutationKey: [VERIFY_2FA_KEY],
14
+ mutationFn: (args) => __async(void 0, null, function* () {
15
+ try {
16
+ const result = yield verify2fa(para, args);
17
+ return result;
18
+ } catch (error) {
19
+ throw error;
20
+ }
21
+ })
22
+ });
23
+ return renameMutations(mutation, "verify2fa");
24
+ };
25
+ export {
26
+ VERIFY_2FA_KEY,
27
+ useVerify2fa
28
+ };
@@ -0,0 +1,93 @@
1
+ export declare const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
2
+ /**
3
+ * React hook for the `verifyExternalWallet` mutation.
4
+ *
5
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
6
+ * - `mutate` and `mutateAsync` are replaced by:
7
+ * - `verifyExternalWallet`: function to trigger the mutation (same as `mutate`)
8
+ * - `verifyExternalWalletAsync`: async function to trigger the mutation (same as `mutateAsync`)
9
+ *
10
+ * @example
11
+ * const { verifyExternalWallet, verifyExternalWalletAsync } = useVerifyExternalWallet();
12
+ * verifyExternalWallet({ ...params });
13
+ * // or
14
+ * await verifyExternalWalletAsync({ ...params });
15
+ */
16
+ export declare const useVerifyExternalWallet: () => {
17
+ status: "error" | "idle" | "pending" | "success";
18
+ data: {
19
+ username?: string | undefined;
20
+ displayName?: string | undefined;
21
+ pfpUrl?: string | undefined;
22
+ externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
23
+ auth: import("@getpara/user-management-client").PrimaryAuth;
24
+ userId: string;
25
+ stage: "signup";
26
+ isPasskeySupported: boolean;
27
+ passkeyUrl?: string | undefined;
28
+ passwordUrl?: string | undefined;
29
+ passkeyId?: string | undefined;
30
+ passwordId?: string | undefined;
31
+ } | undefined;
32
+ isSuccess: boolean;
33
+ variables: {
34
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
35
+ useShortUrls?: boolean | undefined;
36
+ externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
37
+ signedMessage: string;
38
+ cosmosPublicKeyHex?: string | undefined;
39
+ cosmosSigner?: string | undefined;
40
+ } | undefined;
41
+ error: Error | null;
42
+ isError: boolean;
43
+ isIdle: boolean;
44
+ isPending: boolean;
45
+ reset: () => void;
46
+ context: unknown;
47
+ failureCount: number;
48
+ failureReason: Error | null;
49
+ isPaused: boolean;
50
+ submittedAt: number;
51
+ verifyExternalWallet: import("@tanstack/react-query").UseMutateFunction<{
52
+ username?: string | undefined;
53
+ displayName?: string | undefined;
54
+ pfpUrl?: string | undefined;
55
+ externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
56
+ auth: import("@getpara/user-management-client").PrimaryAuth;
57
+ userId: string;
58
+ stage: "signup";
59
+ isPasskeySupported: boolean;
60
+ passkeyUrl?: string | undefined;
61
+ passwordUrl?: string | undefined;
62
+ passkeyId?: string | undefined;
63
+ passwordId?: string | undefined;
64
+ }, Error, {
65
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
66
+ useShortUrls?: boolean | undefined;
67
+ externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
68
+ signedMessage: string;
69
+ cosmosPublicKeyHex?: string | undefined;
70
+ cosmosSigner?: string | undefined;
71
+ }, unknown>;
72
+ verifyExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<{
73
+ username?: string | undefined;
74
+ displayName?: string | undefined;
75
+ pfpUrl?: string | undefined;
76
+ externalWallet?: import("@getpara/web-sdk").ExternalWalletInfo | undefined;
77
+ auth: import("@getpara/user-management-client").PrimaryAuth;
78
+ userId: string;
79
+ stage: "signup";
80
+ isPasskeySupported: boolean;
81
+ passkeyUrl?: string | undefined;
82
+ passwordUrl?: string | undefined;
83
+ passkeyId?: string | undefined;
84
+ passwordId?: string | undefined;
85
+ }, Error, {
86
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
87
+ useShortUrls?: boolean | undefined;
88
+ externalWallet: import("@getpara/web-sdk").ExternalWalletInfo;
89
+ signedMessage: string;
90
+ cosmosPublicKeyHex?: string | undefined;
91
+ cosmosSigner?: string | undefined;
92
+ }, unknown>;
93
+ };
@@ -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 { verifyExternalWallet } from "../../actions/index.js";
9
+ const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
10
+ const useVerifyExternalWallet = () => {
11
+ const para = useClient();
12
+ const mutation = useMutation({
13
+ mutationKey: [VERIFY_EXTERNAL_WALLET_KEY],
14
+ mutationFn: (args) => __async(void 0, null, function* () {
15
+ try {
16
+ const result = yield verifyExternalWallet(para, args);
17
+ return result;
18
+ } catch (error) {
19
+ throw error;
20
+ }
21
+ })
22
+ });
23
+ return renameMutations(mutation, "verifyExternalWallet");
24
+ };
25
+ export {
26
+ VERIFY_EXTERNAL_WALLET_KEY,
27
+ useVerifyExternalWallet
28
+ };
@@ -0,0 +1,55 @@
1
+ import { Compute } from '../../types/utils.js';
2
+ export declare const VERIFY_FARCASTER_KEY = "VERIFY_FARCASTER";
3
+ /**
4
+ * React hook for the `verifyFarcaster` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `verifyFarcaster`: function to trigger the mutation (same as `mutate`)
9
+ * - `verifyFarcasterAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { verifyFarcaster, verifyFarcasterAsync } = useVerifyFarcaster();
13
+ * verifyFarcaster({ ...params });
14
+ * // or
15
+ * await verifyFarcasterAsync({ ...params });
16
+ */
17
+ export declare const useVerifyFarcaster: () => {
18
+ status: "error" | "idle" | "pending" | "success";
19
+ data: Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin> | undefined;
20
+ isSuccess: boolean;
21
+ variables: {
22
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
23
+ useShortUrls?: boolean | undefined;
24
+ onPoll?: (() => void) | undefined;
25
+ onCancel?: (() => void) | undefined;
26
+ isCanceled?: (() => boolean) | undefined;
27
+ onConnectUri?: ((uri: string) => void) | undefined;
28
+ } | undefined;
29
+ error: Error | null;
30
+ isError: boolean;
31
+ isIdle: boolean;
32
+ isPending: boolean;
33
+ reset: () => void;
34
+ context: unknown;
35
+ failureCount: number;
36
+ failureReason: Error | null;
37
+ isPaused: boolean;
38
+ submittedAt: number;
39
+ verifyFarcaster: import("@tanstack/react-query").UseMutateFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, {
40
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
41
+ useShortUrls?: boolean | undefined;
42
+ onPoll?: (() => void) | undefined;
43
+ onCancel?: (() => void) | undefined;
44
+ isCanceled?: (() => boolean) | undefined;
45
+ onConnectUri?: ((uri: string) => void) | undefined;
46
+ }, unknown>;
47
+ verifyFarcasterAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Compute<import("@getpara/core-sdk/dist/types/types/methods.js").AuthStateSignupOrLogin>, Error, {
48
+ portalTheme?: import("@getpara/web-sdk").Theme | undefined;
49
+ useShortUrls?: boolean | undefined;
50
+ onPoll?: (() => void) | undefined;
51
+ onCancel?: (() => void) | undefined;
52
+ isCanceled?: (() => boolean) | undefined;
53
+ onConnectUri?: ((uri: string) => void) | undefined;
54
+ }, unknown>;
55
+ };
@@ -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 { verifyFarcaster } from "../../actions/index.js";
9
+ const VERIFY_FARCASTER_KEY = "VERIFY_FARCASTER";
10
+ const useVerifyFarcaster = () => {
11
+ const para = useClient();
12
+ const mutation = useMutation({
13
+ mutationKey: [VERIFY_FARCASTER_KEY],
14
+ mutationFn: (args) => __async(void 0, null, function* () {
15
+ try {
16
+ const result = yield verifyFarcaster(para, args);
17
+ return result;
18
+ } catch (error) {
19
+ throw error;
20
+ }
21
+ })
22
+ });
23
+ return renameMutations(mutation, "verifyFarcaster");
24
+ };
25
+ export {
26
+ VERIFY_FARCASTER_KEY,
27
+ useVerifyFarcaster
28
+ };