@getpara/react-core 2.19.0

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 (143) hide show
  1. package/dist/index.d.ts +37 -0
  2. package/dist/index.js +73 -0
  3. package/dist/mutations.d.ts +29 -0
  4. package/dist/mutations.js +60 -0
  5. package/dist/package.json +4 -0
  6. package/dist/provider/ParaProviderCore.d.ts +85 -0
  7. package/dist/provider/ParaProviderCore.js +124 -0
  8. package/dist/provider/actions/getEmbeddedAccount.d.ts +28 -0
  9. package/dist/provider/actions/getEmbeddedAccount.js +82 -0
  10. package/dist/provider/actions/getWallet.js +34 -0
  11. package/dist/provider/actions/index.d.ts +38 -0
  12. package/dist/provider/actions/index.js +75 -0
  13. package/dist/provider/actions/utils.d.ts +4 -0
  14. package/dist/provider/actions/utils.js +32 -0
  15. package/dist/provider/hooks/aa/alchemy.d.ts +22 -0
  16. package/dist/provider/hooks/aa/alchemy.js +47 -0
  17. package/dist/provider/hooks/aa/biconomy.d.ts +22 -0
  18. package/dist/provider/hooks/aa/biconomy.js +47 -0
  19. package/dist/provider/hooks/aa/cdp.d.ts +21 -0
  20. package/dist/provider/hooks/aa/cdp.js +47 -0
  21. package/dist/provider/hooks/aa/createSmartAccountHook.d.ts +18 -0
  22. package/dist/provider/hooks/aa/createSmartAccountHook.js +96 -0
  23. package/dist/provider/hooks/aa/gelato.d.ts +21 -0
  24. package/dist/provider/hooks/aa/gelato.js +47 -0
  25. package/dist/provider/hooks/aa/index.d.ts +12 -0
  26. package/dist/provider/hooks/aa/index.js +48 -0
  27. package/dist/provider/hooks/aa/pimlico.d.ts +22 -0
  28. package/dist/provider/hooks/aa/pimlico.js +47 -0
  29. package/dist/provider/hooks/aa/porto.d.ts +22 -0
  30. package/dist/provider/hooks/aa/porto.js +47 -0
  31. package/dist/provider/hooks/aa/rhinestone.d.ts +22 -0
  32. package/dist/provider/hooks/aa/rhinestone.js +47 -0
  33. package/dist/provider/hooks/aa/safe.d.ts +22 -0
  34. package/dist/provider/hooks/aa/safe.js +47 -0
  35. package/dist/provider/hooks/aa/thirdweb.d.ts +18 -0
  36. package/dist/provider/hooks/aa/thirdweb.js +47 -0
  37. package/dist/provider/hooks/aa/types.d.ts +34 -0
  38. package/dist/provider/hooks/aa/types.js +0 -0
  39. package/dist/provider/hooks/aa/zerodev.d.ts +22 -0
  40. package/dist/provider/hooks/aa/zerodev.js +47 -0
  41. package/dist/provider/hooks/index.d.ts +4 -0
  42. package/dist/provider/hooks/index.js +4 -0
  43. package/dist/provider/hooks/mutations/index.d.ts +30 -0
  44. package/dist/provider/hooks/mutations/index.js +92 -0
  45. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +34 -0
  46. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +39 -0
  47. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +34 -0
  48. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +39 -0
  49. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +34 -0
  50. package/dist/provider/hooks/mutations/useClaimPregenWallets.js +42 -0
  51. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +34 -0
  52. package/dist/provider/hooks/mutations/useCreateGuestWallets.js +42 -0
  53. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +34 -0
  54. package/dist/provider/hooks/mutations/useCreatePregenWallet.js +42 -0
  55. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +34 -0
  56. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.js +39 -0
  57. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +34 -0
  58. package/dist/provider/hooks/mutations/useCreateWallet.js +42 -0
  59. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +34 -0
  60. package/dist/provider/hooks/mutations/useCreateWalletPerType.js +39 -0
  61. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +34 -0
  62. package/dist/provider/hooks/mutations/useEnable2fa.js +39 -0
  63. package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +39 -0
  64. package/dist/provider/hooks/mutations/useExportPrivateKey.js +63 -0
  65. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +34 -0
  66. package/dist/provider/hooks/mutations/useHasPregenWallet.js +39 -0
  67. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +34 -0
  68. package/dist/provider/hooks/mutations/useIssueJwt.js +39 -0
  69. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +33 -0
  70. package/dist/provider/hooks/mutations/useKeepSessionAlive.js +39 -0
  71. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +34 -0
  72. package/dist/provider/hooks/mutations/useLoginExternalWallet.js +42 -0
  73. package/dist/provider/hooks/mutations/useLogout.d.ts +34 -0
  74. package/dist/provider/hooks/mutations/useLogout.js +39 -0
  75. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +34 -0
  76. package/dist/provider/hooks/mutations/useResendVerificationCode.js +42 -0
  77. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +34 -0
  78. package/dist/provider/hooks/mutations/useSetup2fa.js +39 -0
  79. package/dist/provider/hooks/mutations/useSignMessage.d.ts +34 -0
  80. package/dist/provider/hooks/mutations/useSignMessage.js +39 -0
  81. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +34 -0
  82. package/dist/provider/hooks/mutations/useSignTransaction.js +42 -0
  83. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +34 -0
  84. package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +42 -0
  85. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +34 -0
  86. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +42 -0
  87. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +34 -0
  88. package/dist/provider/hooks/mutations/useVerify2fa.js +39 -0
  89. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +34 -0
  90. package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +42 -0
  91. package/dist/provider/hooks/mutations/useVerifyFarcaster.js +43 -0
  92. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +34 -0
  93. package/dist/provider/hooks/mutations/useVerifyNewAccount.js +42 -0
  94. package/dist/provider/hooks/mutations/useVerifyOAuth.js +40 -0
  95. package/dist/provider/hooks/mutations/useVerifyTelegram.js +40 -0
  96. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +34 -0
  97. package/dist/provider/hooks/mutations/useWaitForLogin.js +42 -0
  98. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +34 -0
  99. package/dist/provider/hooks/mutations/useWaitForSignup.js +39 -0
  100. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +34 -0
  101. package/dist/provider/hooks/mutations/useWaitForWalletCreation.js +39 -0
  102. package/dist/provider/hooks/queries/createAccountHook.d.ts +49 -0
  103. package/dist/provider/hooks/queries/createAccountHook.js +132 -0
  104. package/dist/provider/hooks/queries/index.d.ts +5 -0
  105. package/dist/provider/hooks/queries/index.js +20 -0
  106. package/dist/provider/hooks/queries/useAccount.d.ts +65 -0
  107. package/dist/provider/hooks/queries/useAccount.js +65 -0
  108. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +7 -0
  109. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +49 -0
  110. package/dist/provider/hooks/queries/useParaStatus.d.ts +15 -0
  111. package/dist/provider/hooks/queries/useParaStatus.js +32 -0
  112. package/dist/provider/hooks/queries/useWallet.js +43 -0
  113. package/dist/provider/hooks/utils/index.d.ts +2 -0
  114. package/dist/provider/hooks/utils/index.js +6 -0
  115. package/dist/provider/hooks/utils/useClient.d.ts +7 -0
  116. package/dist/provider/hooks/utils/useClient.js +8 -0
  117. package/dist/provider/hooks/utils/useCoreWalletState.d.ts +17 -0
  118. package/dist/provider/hooks/utils/useCoreWalletState.js +47 -0
  119. package/dist/provider/index.d.ts +5 -0
  120. package/dist/provider/index.js +11 -0
  121. package/dist/provider/stores/CoreStoreContext.d.ts +13 -0
  122. package/dist/provider/stores/CoreStoreContext.js +14 -0
  123. package/dist/provider/stores/createCoreStore.d.ts +26 -0
  124. package/dist/provider/stores/createCoreStore.js +61 -0
  125. package/dist/provider/stores/index.d.ts +4 -0
  126. package/dist/provider/stores/index.js +9 -0
  127. package/dist/provider/stores/slices/client.d.ts +3 -0
  128. package/dist/provider/stores/slices/client.js +7 -0
  129. package/dist/provider/stores/slices/config.d.ts +3 -0
  130. package/dist/provider/stores/slices/config.js +9 -0
  131. package/dist/provider/stores/slices/index.d.ts +4 -0
  132. package/dist/provider/stores/slices/index.js +10 -0
  133. package/dist/provider/stores/slices/paraState.d.ts +3 -0
  134. package/dist/provider/stores/slices/paraState.js +7 -0
  135. package/dist/provider/stores/slices/wallet.d.ts +3 -0
  136. package/dist/provider/stores/slices/wallet.js +11 -0
  137. package/dist/provider/stores/types.d.ts +28 -0
  138. package/dist/provider/stores/types.js +0 -0
  139. package/dist/provider/utils/renameMutations.d.ts +11 -0
  140. package/dist/provider/utils/renameMutations.js +39 -0
  141. package/dist/queries.d.ts +2 -0
  142. package/dist/queries.js +6 -0
  143. package/package.json +73 -0
@@ -0,0 +1,42 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { signTransaction } from "../../actions/index.js";
25
+ const SIGN_TRANSACTION_KEY = "SIGN_TRANSACTION";
26
+ const useSignTransaction = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [SIGN_TRANSACTION_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ return signTransaction(para, args);
32
+ })
33
+ });
34
+ return renameMutations(
35
+ mutation,
36
+ "signTransaction"
37
+ );
38
+ };
39
+ export {
40
+ SIGN_TRANSACTION_KEY,
41
+ useSignTransaction
42
+ };
@@ -0,0 +1,34 @@
1
+ import type { SignUpOrLogInParams, SignUpOrLogInResponse } from '@getpara/core-sdk';
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
+ error: Error;
19
+ isSuccess: boolean;
20
+ data: SignUpOrLogInResponse;
21
+ variables: SignUpOrLogInParams;
22
+ isError: boolean;
23
+ isIdle: boolean;
24
+ isPending: boolean;
25
+ status: "error" | "idle" | "pending" | "success";
26
+ reset: () => void;
27
+ context: unknown;
28
+ failureCount: number;
29
+ failureReason: Error;
30
+ isPaused: boolean;
31
+ submittedAt: number;
32
+ signUpOrLogIn: import("@tanstack/react-query").UseMutateFunction<SignUpOrLogInResponse, Error, SignUpOrLogInParams, unknown>;
33
+ signUpOrLogInAsync: import("@tanstack/react-query").UseMutateAsyncFunction<SignUpOrLogInResponse, Error, SignUpOrLogInParams, unknown>;
34
+ };
@@ -0,0 +1,42 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { signUpOrLogIn } from "../../actions/index.js";
25
+ const SIGN_UP_LOG_IN_KEY = "SIGN_UP_LOG_IN";
26
+ const useSignUpOrLogIn = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [SIGN_UP_LOG_IN_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ return signUpOrLogIn(para, args);
32
+ })
33
+ });
34
+ return renameMutations(
35
+ mutation,
36
+ "signUpOrLogIn"
37
+ );
38
+ };
39
+ export {
40
+ SIGN_UP_LOG_IN_KEY,
41
+ useSignUpOrLogIn
42
+ };
@@ -0,0 +1,34 @@
1
+ import type { UpdatePregenWalletIdentifierParams } from '@getpara/core-sdk';
2
+ export declare const UPDATE_PREGEN_WALLET_IDENTIFIER_KEY = "UPDATE_PREGEN_WALLET_IDENTIFIER";
3
+ /**
4
+ * React hook for the `updatePregenWalletIdentifier` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `updatePregenWalletIdentifier`: function to trigger the mutation (same as `mutate`)
9
+ * - `updatePregenWalletIdentifierAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { updatePregenWalletIdentifier, updatePregenWalletIdentifierAsync } = useUpdatePregenWalletIdentifier();
13
+ * updatePregenWalletIdentifier({ ...params });
14
+ * // or
15
+ * await updatePregenWalletIdentifierAsync({ ...params });
16
+ */
17
+ export declare const useUpdatePregenWalletIdentifier: () => {
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ data: void;
21
+ variables: UpdatePregenWalletIdentifierParams;
22
+ isError: boolean;
23
+ isIdle: boolean;
24
+ isPending: boolean;
25
+ status: "error" | "idle" | "pending" | "success";
26
+ reset: () => void;
27
+ context: unknown;
28
+ failureCount: number;
29
+ failureReason: Error;
30
+ isPaused: boolean;
31
+ submittedAt: number;
32
+ updatePregenWalletIdentifier: import("@tanstack/react-query").UseMutateFunction<void, Error, UpdatePregenWalletIdentifierParams, unknown>;
33
+ updatePregenWalletIdentifierAsync: import("@tanstack/react-query").UseMutateAsyncFunction<void, Error, UpdatePregenWalletIdentifierParams, unknown>;
34
+ };
@@ -0,0 +1,42 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { updatePregenWalletIdentifier } from "../../actions/index.js";
25
+ const UPDATE_PREGEN_WALLET_IDENTIFIER_KEY = "UPDATE_PREGEN_WALLET_IDENTIFIER";
26
+ const useUpdatePregenWalletIdentifier = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [UPDATE_PREGEN_WALLET_IDENTIFIER_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ return updatePregenWalletIdentifier(para, args);
32
+ })
33
+ });
34
+ return renameMutations(
35
+ mutation,
36
+ "updatePregenWalletIdentifier"
37
+ );
38
+ };
39
+ export {
40
+ UPDATE_PREGEN_WALLET_IDENTIFIER_KEY,
41
+ useUpdatePregenWalletIdentifier
42
+ };
@@ -0,0 +1,34 @@
1
+ import type { Verify2faParams, Verify2faResponse } from '@getpara/core-sdk';
2
+ export declare const VERIFY_2FA_KEY = "VERIFY_2FA";
3
+ /**
4
+ * React hook for the `verify2fa` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `verify2fa`: function to trigger the mutation (same as `mutate`)
9
+ * - `verify2faAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { verify2fa, verify2faAsync } = useVerify2fa();
13
+ * verify2fa({ ...params });
14
+ * // or
15
+ * await verify2faAsync({ ...params });
16
+ */
17
+ export declare const useVerify2fa: () => {
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ data: Verify2faResponse;
21
+ variables: Verify2faParams;
22
+ isError: boolean;
23
+ isIdle: boolean;
24
+ isPending: boolean;
25
+ status: "error" | "idle" | "pending" | "success";
26
+ reset: () => void;
27
+ context: unknown;
28
+ failureCount: number;
29
+ failureReason: Error;
30
+ isPaused: boolean;
31
+ submittedAt: number;
32
+ verify2fa: import("@tanstack/react-query").UseMutateFunction<Verify2faResponse, Error, Verify2faParams, unknown>;
33
+ verify2faAsync: import("@tanstack/react-query").UseMutateAsyncFunction<Verify2faResponse, Error, Verify2faParams, unknown>;
34
+ };
@@ -0,0 +1,39 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { verify2fa } from "../../actions/index.js";
25
+ const VERIFY_2FA_KEY = "VERIFY_2FA";
26
+ const useVerify2fa = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [VERIFY_2FA_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ return verify2fa(para, args);
32
+ })
33
+ });
34
+ return renameMutations(mutation, "verify2fa");
35
+ };
36
+ export {
37
+ VERIFY_2FA_KEY,
38
+ useVerify2fa
39
+ };
@@ -0,0 +1,34 @@
1
+ import type { VerifyExternalWalletParams, VerifyExternalWalletResponse } from '@getpara/core-sdk';
2
+ export declare const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
3
+ /**
4
+ * React hook for the `verifyExternalWallet` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `verifyExternalWallet`: function to trigger the mutation (same as `mutate`)
9
+ * - `verifyExternalWalletAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { verifyExternalWallet, verifyExternalWalletAsync } = useVerifyExternalWallet();
13
+ * verifyExternalWallet({ ...params });
14
+ * // or
15
+ * await verifyExternalWalletAsync({ ...params });
16
+ */
17
+ export declare const useVerifyExternalWallet: () => {
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ data: VerifyExternalWalletResponse;
21
+ variables: VerifyExternalWalletParams;
22
+ isError: boolean;
23
+ isIdle: boolean;
24
+ isPending: boolean;
25
+ status: "error" | "idle" | "pending" | "success";
26
+ reset: () => void;
27
+ context: unknown;
28
+ failureCount: number;
29
+ failureReason: Error;
30
+ isPaused: boolean;
31
+ submittedAt: number;
32
+ verifyExternalWallet: import("@tanstack/react-query").UseMutateFunction<VerifyExternalWalletResponse, Error, VerifyExternalWalletParams, unknown>;
33
+ verifyExternalWalletAsync: import("@tanstack/react-query").UseMutateAsyncFunction<VerifyExternalWalletResponse, Error, VerifyExternalWalletParams, unknown>;
34
+ };
@@ -0,0 +1,42 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { verifyExternalWallet } from "../../actions/index.js";
25
+ const VERIFY_EXTERNAL_WALLET_KEY = "VERIFY_EXTERNAL_WALLET";
26
+ const useVerifyExternalWallet = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [VERIFY_EXTERNAL_WALLET_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ return verifyExternalWallet(para, args);
32
+ })
33
+ });
34
+ return renameMutations(
35
+ mutation,
36
+ "verifyExternalWallet"
37
+ );
38
+ };
39
+ export {
40
+ VERIFY_EXTERNAL_WALLET_KEY,
41
+ useVerifyExternalWallet
42
+ };
@@ -0,0 +1,43 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { verifyFarcaster } from "../../actions/index.js";
25
+ const VERIFY_FARCASTER_KEY = "VERIFY_FARCASTER";
26
+ const useVerifyFarcaster = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [VERIFY_FARCASTER_KEY],
30
+ mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
31
+ const result = yield verifyFarcaster(para, args);
32
+ return result;
33
+ })
34
+ });
35
+ return renameMutations(
36
+ mutation,
37
+ "verifyFarcaster"
38
+ );
39
+ };
40
+ export {
41
+ VERIFY_FARCASTER_KEY,
42
+ useVerifyFarcaster
43
+ };
@@ -0,0 +1,34 @@
1
+ import type { VerifyNewAccountParams } from '@getpara/core-sdk';
2
+ export declare const VERIFY_NEW_ACCOUNT_KEY = "VERIFY_NEW_ACCOUNT";
3
+ /**
4
+ * React hook for the `verifyNewAccount` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `verifyNewAccount`: function to trigger the mutation (same as `mutate`)
9
+ * - `verifyNewAccountAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { verifyNewAccount, verifyNewAccountAsync } = useVerifyNewAccount();
13
+ * verifyNewAccount({ ...params });
14
+ * // or
15
+ * await verifyNewAccountAsync({ ...params });
16
+ */
17
+ export declare const useVerifyNewAccount: () => {
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ data: import("@getpara/core-sdk").AuthStateSignup;
21
+ variables: VerifyNewAccountParams;
22
+ isError: boolean;
23
+ isIdle: boolean;
24
+ isPending: boolean;
25
+ status: "error" | "idle" | "pending" | "success";
26
+ reset: () => void;
27
+ context: unknown;
28
+ failureCount: number;
29
+ failureReason: Error;
30
+ isPaused: boolean;
31
+ submittedAt: number;
32
+ verifyNewAccount: import("@tanstack/react-query").UseMutateFunction<import("@getpara/core-sdk").AuthStateSignup, Error, VerifyNewAccountParams, unknown>;
33
+ verifyNewAccountAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@getpara/core-sdk").AuthStateSignup, Error, VerifyNewAccountParams, unknown>;
34
+ };
@@ -0,0 +1,42 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { verifyNewAccount } from "../../actions/index.js";
25
+ const VERIFY_NEW_ACCOUNT_KEY = "VERIFY_NEW_ACCOUNT";
26
+ const useVerifyNewAccount = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [VERIFY_NEW_ACCOUNT_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ return verifyNewAccount(para, args);
32
+ })
33
+ });
34
+ return renameMutations(
35
+ mutation,
36
+ "verifyNewAccount"
37
+ );
38
+ };
39
+ export {
40
+ VERIFY_NEW_ACCOUNT_KEY,
41
+ useVerifyNewAccount
42
+ };
@@ -0,0 +1,40 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { verifyOAuth } from "../../actions/index.js";
25
+ const VERIFY_OAUTH_KEY = "VERIFY_OAUTH";
26
+ const useVerifyOAuth = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [VERIFY_OAUTH_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ const result = yield verifyOAuth(para, args);
32
+ return result;
33
+ })
34
+ });
35
+ return renameMutations(mutation, "verifyOAuth");
36
+ };
37
+ export {
38
+ VERIFY_OAUTH_KEY,
39
+ useVerifyOAuth
40
+ };
@@ -0,0 +1,40 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { verifyTelegram } from "../../actions/index.js";
25
+ const VERIFY_TELEGRAM_KEY = "VERIFY_TELEGRAM";
26
+ const useVerifyTelegram = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [VERIFY_TELEGRAM_KEY],
30
+ mutationFn: (args) => __async(void 0, null, function* () {
31
+ const result = yield verifyTelegram(para, args);
32
+ return result;
33
+ })
34
+ });
35
+ return renameMutations(mutation, "verifyTelegram");
36
+ };
37
+ export {
38
+ VERIFY_TELEGRAM_KEY,
39
+ useVerifyTelegram
40
+ };
@@ -0,0 +1,34 @@
1
+ import type { WaitForLoginParams, WaitForLoginResponse } from '@getpara/core-sdk';
2
+ export declare const WAIT_FOR_LOG_IN_KEY = "WAIT_FOR_LOG_IN";
3
+ /**
4
+ * React hook for the `waitForLogin` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `waitForLogin`: function to trigger the mutation (same as `mutate`)
9
+ * - `waitForLoginAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { waitForLogin, waitForLoginAsync } = useWaitForLogin();
13
+ * waitForLogin({ ...params });
14
+ * // or
15
+ * await waitForLoginAsync({ ...params });
16
+ */
17
+ export declare const useWaitForLogin: () => {
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ data: WaitForLoginResponse;
21
+ variables: void | WaitForLoginParams;
22
+ isError: boolean;
23
+ isIdle: boolean;
24
+ isPending: boolean;
25
+ status: "error" | "idle" | "pending" | "success";
26
+ reset: () => void;
27
+ context: unknown;
28
+ failureCount: number;
29
+ failureReason: Error;
30
+ isPaused: boolean;
31
+ submittedAt: number;
32
+ waitForLogin: import("@tanstack/react-query").UseMutateFunction<WaitForLoginResponse, Error, void | WaitForLoginParams, unknown>;
33
+ waitForLoginAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForLoginResponse, Error, void | WaitForLoginParams, unknown>;
34
+ };
@@ -0,0 +1,42 @@
1
+ var __async = (__this, __arguments, generator) => {
2
+ return new Promise((resolve, reject) => {
3
+ var fulfilled = (value) => {
4
+ try {
5
+ step(generator.next(value));
6
+ } catch (e) {
7
+ reject(e);
8
+ }
9
+ };
10
+ var rejected = (value) => {
11
+ try {
12
+ step(generator.throw(value));
13
+ } catch (e) {
14
+ reject(e);
15
+ }
16
+ };
17
+ var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
18
+ step((generator = generator.apply(__this, __arguments)).next());
19
+ });
20
+ };
21
+ import { useMutation } from "@tanstack/react-query";
22
+ import { useClient } from "../utils/index.js";
23
+ import { renameMutations } from "../../utils/renameMutations.js";
24
+ import { waitForLogin } from "../../actions/index.js";
25
+ const WAIT_FOR_LOG_IN_KEY = "WAIT_FOR_LOG_IN";
26
+ const useWaitForLogin = () => {
27
+ const para = useClient();
28
+ const mutation = useMutation({
29
+ mutationKey: [WAIT_FOR_LOG_IN_KEY],
30
+ mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
31
+ return waitForLogin(para, args);
32
+ })
33
+ });
34
+ return renameMutations(
35
+ mutation,
36
+ "waitForLogin"
37
+ );
38
+ };
39
+ export {
40
+ WAIT_FOR_LOG_IN_KEY,
41
+ useWaitForLogin
42
+ };
@@ -0,0 +1,34 @@
1
+ import type { WaitForSignupParams } from '@getpara/core-sdk';
2
+ export declare const WAIT_FOR_SIGN_UP_KEY = "WAIT_FOR_SIGN_UP";
3
+ /**
4
+ * React hook for the `waitForSignup` mutation.
5
+ *
6
+ * Returns a mutation result object with all standard fields from `useMutation`, except:
7
+ * - `mutate` and `mutateAsync` are replaced by:
8
+ * - `waitForSignup`: function to trigger the mutation (same as `mutate`)
9
+ * - `waitForSignupAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
+ *
11
+ * @example
12
+ * const { waitForSignup, waitForSignupAsync } = useWaitForSignup();
13
+ * waitForSignup({ ...params });
14
+ * // or
15
+ * await waitForSignupAsync({ ...params });
16
+ */
17
+ export declare const useWaitForSignup: () => {
18
+ error: Error;
19
+ isSuccess: boolean;
20
+ data: true;
21
+ variables: void | WaitForSignupParams;
22
+ isError: boolean;
23
+ isIdle: boolean;
24
+ isPending: boolean;
25
+ status: "error" | "idle" | "pending" | "success";
26
+ reset: () => void;
27
+ context: unknown;
28
+ failureCount: number;
29
+ failureReason: Error;
30
+ isPaused: boolean;
31
+ submittedAt: number;
32
+ waitForSignup: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
33
+ waitForSignupAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
34
+ };