@getpara/react-sdk-lite 2.18.0 → 2.20.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 (148) hide show
  1. package/dist/aa/hooks/alchemy.d.ts +15 -0
  2. package/dist/aa/hooks/alchemy.js +9 -0
  3. package/dist/aa/hooks/biconomy.d.ts +15 -0
  4. package/dist/aa/hooks/biconomy.js +9 -0
  5. package/dist/aa/hooks/cdp.d.ts +14 -0
  6. package/dist/aa/hooks/cdp.js +9 -0
  7. package/dist/aa/hooks/gelato.d.ts +14 -0
  8. package/dist/aa/hooks/gelato.js +9 -0
  9. package/dist/aa/hooks/pimlico.d.ts +15 -0
  10. package/dist/aa/hooks/pimlico.js +9 -0
  11. package/dist/aa/hooks/porto.d.ts +15 -0
  12. package/dist/aa/hooks/porto.js +9 -0
  13. package/dist/aa/hooks/rhinestone.d.ts +15 -0
  14. package/dist/aa/hooks/rhinestone.js +9 -0
  15. package/dist/aa/hooks/safe.d.ts +15 -0
  16. package/dist/aa/hooks/safe.js +9 -0
  17. package/dist/aa/hooks/thirdweb.d.ts +13 -0
  18. package/dist/aa/hooks/thirdweb.js +9 -0
  19. package/dist/aa/hooks/zerodev.d.ts +15 -0
  20. package/dist/aa/hooks/zerodev.js +9 -0
  21. package/dist/aa/useWagmiSignerEnhancer.d.ts +15 -0
  22. package/dist/aa/useWagmiSignerEnhancer.js +45 -0
  23. package/dist/index.d.ts +11 -12
  24. package/dist/index.js +10 -12
  25. package/dist/modal/ParaModal.js +1 -1
  26. package/dist/modal/components/Header/hooks/useStepTitle.d.ts +1 -1
  27. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +1 -1
  28. package/dist/modal/components/QuantityInput.js +1 -0
  29. package/dist/modal/components/SearchableButtonList.js +20 -11
  30. package/dist/modal/components/flows/account/AddFunds/AddFundsReceive.js +2 -1
  31. package/dist/modal/components/flows/account/AddFunds/AddFundsSettings.js +1 -0
  32. package/dist/modal/components/flows/account/Send/context.js +4 -4
  33. package/dist/modal/components/flows/account/Wallet/Wallet.js +5 -1
  34. package/dist/modal/constants/walletTypeConfig.js +2 -1
  35. package/dist/provider/ParaProviderMin.js +46 -54
  36. package/dist/provider/actions/index.d.ts +2 -34
  37. package/dist/provider/actions/index.js +43 -34
  38. package/dist/provider/hooks/mutations/index.d.ts +2 -29
  39. package/dist/provider/hooks/mutations/index.js +3 -58
  40. package/dist/provider/hooks/mutations/useAddAuthMethod.d.ts +2 -2
  41. package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +24 -4
  42. package/dist/provider/hooks/mutations/useExportPrivateKey.js +7 -2
  43. package/dist/provider/hooks/mutations/useSwitchWallets.d.ts +2 -2
  44. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +2 -2
  45. package/dist/provider/hooks/queries/index.d.ts +2 -2
  46. package/dist/provider/hooks/queries/index.js +2 -3
  47. package/dist/provider/hooks/queries/useAccount.d.ts +14 -69
  48. package/dist/provider/hooks/queries/useAccount.js +30 -136
  49. package/dist/provider/hooks/queries/useParaStatus.d.ts +7 -11
  50. package/dist/provider/hooks/queries/useParaStatus.js +9 -16
  51. package/dist/provider/hooks/queries/useProfileBalance.js +1 -1
  52. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +14 -10
  53. package/dist/provider/hooks/utils/useEventListeners.js +1 -1
  54. package/dist/provider/hooks/utils/useWalletState.d.ts +1 -1
  55. package/dist/provider/index.d.ts +1 -0
  56. package/dist/provider/stores/getters.d.ts +1 -1
  57. package/dist/provider/utils/renameMutations.d.ts +4 -2
  58. package/package.json +19 -18
  59. package/dist/aa/alchemy/hook.d.ts +0 -16708
  60. package/dist/aa/alchemy/hook.js +0 -26
  61. package/dist/aa/biconomy/hook.d.ts +0 -44
  62. package/dist/aa/biconomy/hook.js +0 -26
  63. package/dist/aa/cdp/hook.d.ts +0 -11
  64. package/dist/aa/cdp/hook.js +0 -26
  65. package/dist/aa/createSmartAccountHook.d.ts +0 -13
  66. package/dist/aa/createSmartAccountHook.js +0 -81
  67. package/dist/aa/gelato/hook.d.ts +0 -11
  68. package/dist/aa/gelato/hook.js +0 -26
  69. package/dist/aa/pimlico/hook.d.ts +0 -838
  70. package/dist/aa/pimlico/hook.js +0 -26
  71. package/dist/aa/porto/hook.d.ts +0 -12
  72. package/dist/aa/porto/hook.js +0 -26
  73. package/dist/aa/rhinestone/hook.d.ts +0 -12
  74. package/dist/aa/rhinestone/hook.js +0 -26
  75. package/dist/aa/safe/hook.d.ts +0 -12
  76. package/dist/aa/safe/hook.js +0 -26
  77. package/dist/aa/thirdweb/hook.d.ts +0 -12
  78. package/dist/aa/thirdweb/hook.js +0 -26
  79. package/dist/aa/types.d.ts +0 -21
  80. package/dist/aa/types.js +0 -1
  81. package/dist/aa/zerodev/hook.d.ts +0 -12
  82. package/dist/aa/zerodev/hook.js +0 -26
  83. package/dist/modal/components/flows/account/AddFunds/MoonPayEmbed.d.ts +0 -2
  84. package/dist/modal/components/flows/account/AddFunds/MoonPayEmbed.js +0 -7
  85. package/dist/provider/actions/getEmbeddedAccount.d.ts +0 -27
  86. package/dist/provider/actions/getEmbeddedAccount.js +0 -66
  87. package/dist/provider/actions/getWallet.d.ts +0 -5
  88. package/dist/provider/actions/getWallet.js +0 -18
  89. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +0 -34
  90. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.js +0 -28
  91. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +0 -34
  92. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.js +0 -28
  93. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +0 -34
  94. package/dist/provider/hooks/mutations/useClaimPregenWallets.js +0 -31
  95. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +0 -34
  96. package/dist/provider/hooks/mutations/useCreateGuestWallets.js +0 -31
  97. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +0 -34
  98. package/dist/provider/hooks/mutations/useCreatePregenWallet.js +0 -31
  99. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +0 -34
  100. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.js +0 -28
  101. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +0 -34
  102. package/dist/provider/hooks/mutations/useCreateWallet.js +0 -31
  103. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +0 -34
  104. package/dist/provider/hooks/mutations/useCreateWalletPerType.js +0 -28
  105. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +0 -34
  106. package/dist/provider/hooks/mutations/useEnable2fa.js +0 -28
  107. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +0 -34
  108. package/dist/provider/hooks/mutations/useHasPregenWallet.js +0 -28
  109. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +0 -34
  110. package/dist/provider/hooks/mutations/useIssueJwt.js +0 -28
  111. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -33
  112. package/dist/provider/hooks/mutations/useKeepSessionAlive.js +0 -28
  113. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +0 -34
  114. package/dist/provider/hooks/mutations/useLoginExternalWallet.js +0 -31
  115. package/dist/provider/hooks/mutations/useLogout.d.ts +0 -34
  116. package/dist/provider/hooks/mutations/useLogout.js +0 -28
  117. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +0 -34
  118. package/dist/provider/hooks/mutations/useResendVerificationCode.js +0 -31
  119. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +0 -34
  120. package/dist/provider/hooks/mutations/useSetup2fa.js +0 -28
  121. package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -34
  122. package/dist/provider/hooks/mutations/useSignMessage.js +0 -28
  123. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -34
  124. package/dist/provider/hooks/mutations/useSignTransaction.js +0 -31
  125. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +0 -34
  126. package/dist/provider/hooks/mutations/useSignUpOrLogIn.js +0 -31
  127. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +0 -34
  128. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.js +0 -31
  129. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +0 -34
  130. package/dist/provider/hooks/mutations/useVerify2fa.js +0 -28
  131. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +0 -34
  132. package/dist/provider/hooks/mutations/useVerifyExternalWallet.js +0 -31
  133. package/dist/provider/hooks/mutations/useVerifyFarcaster.d.ts +0 -34
  134. package/dist/provider/hooks/mutations/useVerifyFarcaster.js +0 -31
  135. package/dist/provider/hooks/mutations/useVerifyOAuth.d.ts +0 -34
  136. package/dist/provider/hooks/mutations/useVerifyOAuth.js +0 -28
  137. package/dist/provider/hooks/mutations/useVerifyTelegram.d.ts +0 -34
  138. package/dist/provider/hooks/mutations/useVerifyTelegram.js +0 -28
  139. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +0 -34
  140. package/dist/provider/hooks/mutations/useWaitForLogin.js +0 -31
  141. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +0 -34
  142. package/dist/provider/hooks/mutations/useWaitForSignup.js +0 -28
  143. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +0 -34
  144. package/dist/provider/hooks/mutations/useWaitForWalletCreation.js +0 -28
  145. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +0 -8
  146. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +0 -29
  147. package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
  148. package/dist/provider/hooks/queries/useWallet.js +0 -26
@@ -1,34 +0,0 @@
1
- import type { VerifyTelegramParams } from '@getpara/web-sdk';
2
- export declare const VERIFY_TELEGRAM_KEY = "VERIFY_TELEGRAM";
3
- /**
4
- * React hook for the `verifyTelegram` mutation.
5
- *
6
- * Returns a mutation result object with all standard fields from `useMutation`, except:
7
- * - `mutate` and `mutateAsync` are replaced by:
8
- * - `verifyTelegram`: function to trigger the mutation (same as `mutate`)
9
- * - `verifyTelegramAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
- *
11
- * @example
12
- * const { verifyTelegram, verifyTelegramAsync } = useVerifyTelegram();
13
- * verifyTelegram({ ...params });
14
- * // or
15
- * await verifyTelegramAsync({ ...params });
16
- */
17
- export declare const useVerifyTelegram: () => {
18
- data: import("@getpara/core-sdk/dist/types/types/authState.js").AuthStateSignupOrLoginOrDone | undefined;
19
- variables: VerifyTelegramParams | undefined;
20
- error: Error | null;
21
- isError: boolean;
22
- isIdle: boolean;
23
- isPending: boolean;
24
- isSuccess: boolean;
25
- status: "pending" | "error" | "idle" | "success";
26
- reset: () => void;
27
- context: unknown;
28
- failureCount: number;
29
- failureReason: Error | null;
30
- isPaused: boolean;
31
- submittedAt: number;
32
- verifyTelegram: import("@tanstack/react-query").UseMutateFunction<import("@getpara/core-sdk/dist/types/types/authState.js").AuthStateSignupOrLoginOrDone, Error, VerifyTelegramParams, unknown>;
33
- verifyTelegramAsync: import("@tanstack/react-query").UseMutateAsyncFunction<import("@getpara/core-sdk/dist/types/types/authState.js").AuthStateSignupOrLoginOrDone, Error, VerifyTelegramParams, unknown>;
34
- };
@@ -1,28 +0,0 @@
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 { verifyTelegram } from "../../actions/index.js";
9
- const VERIFY_TELEGRAM_KEY = "VERIFY_TELEGRAM";
10
- const useVerifyTelegram = () => {
11
- const para = useClient();
12
- const mutation = useMutation({
13
- mutationKey: [VERIFY_TELEGRAM_KEY],
14
- mutationFn: (args) => __async(void 0, null, function* () {
15
- try {
16
- const result = yield verifyTelegram(para, args);
17
- return result;
18
- } catch (error) {
19
- throw error;
20
- }
21
- })
22
- });
23
- return renameMutations(mutation, "verifyTelegram");
24
- };
25
- export {
26
- VERIFY_TELEGRAM_KEY,
27
- useVerifyTelegram
28
- };
@@ -1,34 +0,0 @@
1
- import type { WaitForLoginParams, WaitForLoginResponse } from '@getpara/web-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
- data: WaitForLoginResponse | undefined;
19
- variables: void | WaitForLoginParams | undefined;
20
- error: Error | null;
21
- isError: boolean;
22
- isIdle: boolean;
23
- isPending: boolean;
24
- isSuccess: boolean;
25
- status: "pending" | "error" | "idle" | "success";
26
- reset: () => void;
27
- context: unknown;
28
- failureCount: number;
29
- failureReason: Error | null;
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
- };
@@ -1,31 +0,0 @@
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 { waitForLogin } from "../../actions/index.js";
9
- const WAIT_FOR_LOG_IN_KEY = "WAIT_FOR_LOG_IN";
10
- const useWaitForLogin = () => {
11
- const para = useClient();
12
- const mutation = useMutation({
13
- mutationKey: [WAIT_FOR_LOG_IN_KEY],
14
- mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
15
- try {
16
- const result = yield waitForLogin(para, args);
17
- return result;
18
- } catch (error) {
19
- throw error;
20
- }
21
- })
22
- });
23
- return renameMutations(
24
- mutation,
25
- "waitForLogin"
26
- );
27
- };
28
- export {
29
- WAIT_FOR_LOG_IN_KEY,
30
- useWaitForLogin
31
- };
@@ -1,34 +0,0 @@
1
- import type { WaitForSignupParams } from '@getpara/web-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
- data: true | undefined;
19
- variables: void | WaitForSignupParams | undefined;
20
- error: Error | null;
21
- isError: boolean;
22
- isIdle: boolean;
23
- isPending: boolean;
24
- isSuccess: boolean;
25
- status: "pending" | "error" | "idle" | "success";
26
- reset: () => void;
27
- context: unknown;
28
- failureCount: number;
29
- failureReason: Error | null;
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
- };
@@ -1,28 +0,0 @@
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 { waitForSignup } from "../../actions/index.js";
9
- const WAIT_FOR_SIGN_UP_KEY = "WAIT_FOR_SIGN_UP";
10
- const useWaitForSignup = () => {
11
- const para = useClient();
12
- const mutation = useMutation({
13
- mutationKey: [WAIT_FOR_SIGN_UP_KEY],
14
- mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
15
- try {
16
- const result = yield waitForSignup(para, args);
17
- return result;
18
- } catch (error) {
19
- throw error;
20
- }
21
- })
22
- });
23
- return renameMutations(mutation, "waitForSignup");
24
- };
25
- export {
26
- WAIT_FOR_SIGN_UP_KEY,
27
- useWaitForSignup
28
- };
@@ -1,34 +0,0 @@
1
- import type { WaitForWalletCreationParams, WaitForWalletCreationResponse } from '@getpara/web-sdk';
2
- export declare const WAIT_FOR_WALLET_CREATION_KEY = "WAIT_FOR_WALLET_CREATION";
3
- /**
4
- * React hook for the `waitForWalletCreation` mutation.
5
- *
6
- * Returns a mutation result object with all standard fields from `useMutation`, except:
7
- * - `mutate` and `mutateAsync` are replaced by:
8
- * - `waitForWalletCreation`: function to trigger the mutation (same as `mutate`)
9
- * - `waitForWalletCreationAsync`: async function to trigger the mutation (same as `mutateAsync`)
10
- *
11
- * @example
12
- * const { waitForWalletCreation, waitForWalletCreationAsync } = useWaitForWalletCreation();
13
- * waitForWalletCreation({ ...params });
14
- * // or
15
- * await waitForWalletCreationAsync({ ...params });
16
- */
17
- export declare const useWaitForWalletCreation: () => {
18
- data: WaitForWalletCreationResponse | undefined;
19
- variables: void | WaitForWalletCreationParams | undefined;
20
- error: Error | null;
21
- isError: boolean;
22
- isIdle: boolean;
23
- isPending: boolean;
24
- isSuccess: boolean;
25
- status: "pending" | "error" | "idle" | "success";
26
- reset: () => void;
27
- context: unknown;
28
- failureCount: number;
29
- failureReason: Error | null;
30
- isPaused: boolean;
31
- submittedAt: number;
32
- waitForWalletCreation: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
33
- waitForWalletCreationAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
34
- };
@@ -1,28 +0,0 @@
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 { waitForWalletCreation } from "../../actions/index.js";
9
- const WAIT_FOR_WALLET_CREATION_KEY = "WAIT_FOR_WALLET_CREATION";
10
- const useWaitForWalletCreation = () => {
11
- const para = useClient();
12
- const mutation = useMutation({
13
- mutationKey: [WAIT_FOR_WALLET_CREATION_KEY],
14
- mutationFn: (..._0) => __async(void 0, [..._0], function* (args = {}) {
15
- try {
16
- const result = yield waitForWalletCreation(para, args);
17
- return result;
18
- } catch (error) {
19
- throw error;
20
- }
21
- })
22
- });
23
- return renameMutations(mutation, "waitForWalletCreation");
24
- };
25
- export {
26
- WAIT_FOR_WALLET_CREATION_KEY,
27
- useWaitForWalletCreation
28
- };
@@ -1,8 +0,0 @@
1
- export declare const IS_FULLY_LOGGED_IN_BASE_KEY = "PARA_FULLY_LOGGED_IN";
2
- /**
3
- * Hook for returning whether the user is fully logged in with Para.
4
- * Uses the core state machine phase as a reactive query key so the query
5
- * automatically refetches on state transitions (login, logout, etc.)
6
- * without relying on manual event-based invalidation.
7
- */
8
- export declare const useIsFullyLoggedIn: () => import("@tanstack/react-query").UseQueryResult<boolean, Error>;
@@ -1,29 +0,0 @@
1
- "use client";
2
- import {
3
- __async
4
- } from "../../../chunk-MMUBH76A.js";
5
- import { useQuery } from "@tanstack/react-query";
6
- import { useInternalClient } from "../utils/useInternalClient.js";
7
- import { useStore } from "../../stores/useStore.js";
8
- const IS_FULLY_LOGGED_IN_BASE_KEY = "PARA_FULLY_LOGGED_IN";
9
- const useIsFullyLoggedIn = () => {
10
- var _a;
11
- const client = useInternalClient();
12
- const corePhase = useStore((state) => {
13
- var _a2;
14
- return (_a2 = state.paraState) == null ? void 0 : _a2.corePhase;
15
- });
16
- const phaseKey = corePhase === "authenticated" || corePhase === "guest_mode" ? "authenticated" : "incomplete";
17
- return useQuery({
18
- enabled: !!(client == null ? void 0 : client.isReady),
19
- queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY, phaseKey, (_a = client == null ? void 0 : client.userId) != null ? _a : null],
20
- queryFn: () => __async(void 0, null, function* () {
21
- var _a2;
22
- return (_a2 = yield client == null ? void 0 : client.isFullyLoggedIn()) != null ? _a2 : false;
23
- })
24
- });
25
- };
26
- export {
27
- IS_FULLY_LOGGED_IN_BASE_KEY,
28
- useIsFullyLoggedIn
29
- };
@@ -1,5 +0,0 @@
1
- export declare const WALLET_BASE_KEY = "PARA_WALLET";
2
- /**
3
- * Hook for retrieving the selected wallet
4
- */
5
- export declare const useWallet: () => import("@tanstack/react-query").UseQueryResult<import("@getpara/core-sdk/dist/types/types/wallet.js").WalletNoSigner | null, Error>;
@@ -1,26 +0,0 @@
1
- "use client";
2
- import {
3
- __async
4
- } from "../../../chunk-MMUBH76A.js";
5
- import { useQuery } from "@tanstack/react-query";
6
- import { useClient, useWalletState } from "../index.js";
7
- import { getWallet } from "../../actions/getWallet.js";
8
- import { useIsFullyLoggedIn } from "./useIsFullyLoggedIn.js";
9
- const WALLET_BASE_KEY = "PARA_WALLET";
10
- const useWallet = () => {
11
- var _a, _b;
12
- const client = useClient();
13
- const { selectedWallet } = useWalletState();
14
- const { data: isFullyLoggedIn, isSuccess } = useIsFullyLoggedIn();
15
- return useQuery({
16
- enabled: !!client && !!selectedWallet && isSuccess,
17
- queryKey: [WALLET_BASE_KEY, isFullyLoggedIn != null ? isFullyLoggedIn : null, (_a = selectedWallet.id) != null ? _a : null, (_b = selectedWallet.type) != null ? _b : null],
18
- queryFn: () => __async(void 0, null, function* () {
19
- return yield getWallet(client, selectedWallet, isFullyLoggedIn);
20
- })
21
- });
22
- };
23
- export {
24
- WALLET_BASE_KEY,
25
- useWallet
26
- };