@getpara/react-core 2.20.0 → 2.22.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 (93) hide show
  1. package/dist/chains/cosmos/index.d.ts +4 -0
  2. package/dist/chains/cosmos/index.js +19 -0
  3. package/dist/chains/cosmos/mutations.d.ts +175 -0
  4. package/dist/chains/cosmos/mutations.js +63 -0
  5. package/dist/chains/cosmos/types.d.ts +9 -0
  6. package/dist/chains/cosmos/types.js +0 -0
  7. package/dist/chains/cosmos/useParaCosmjsAminoSigner.d.ts +54 -0
  8. package/dist/chains/cosmos/useParaCosmjsAminoSigner.js +115 -0
  9. package/dist/chains/cosmos/useParaCosmjsProtoSigner.d.ts +56 -0
  10. package/dist/chains/cosmos/useParaCosmjsProtoSigner.js +115 -0
  11. package/dist/chains/evm/ethers/index.d.ts +3 -0
  12. package/dist/chains/evm/ethers/index.js +7 -0
  13. package/dist/chains/evm/ethers/mutations.d.ts +608 -0
  14. package/dist/chains/evm/ethers/mutations.js +112 -0
  15. package/dist/chains/evm/ethers/types.d.ts +8 -0
  16. package/dist/chains/evm/ethers/types.js +0 -0
  17. package/dist/chains/evm/ethers/useParaEthersSigner.d.ts +55 -0
  18. package/dist/chains/evm/ethers/useParaEthersSigner.js +115 -0
  19. package/dist/chains/evm/viem/index.d.ts +4 -0
  20. package/dist/chains/evm/viem/index.js +11 -0
  21. package/dist/chains/evm/viem/mutations.d.ts +546 -0
  22. package/dist/chains/evm/viem/mutations.js +146 -0
  23. package/dist/chains/evm/viem/types.d.ts +10 -0
  24. package/dist/chains/evm/viem/types.js +0 -0
  25. package/dist/chains/evm/viem/useParaViemAccount.d.ts +44 -0
  26. package/dist/chains/evm/viem/useParaViemAccount.js +108 -0
  27. package/dist/chains/evm/viem/useParaViemClient.d.ts +57 -0
  28. package/dist/chains/evm/viem/useParaViemClient.js +115 -0
  29. package/dist/chains/index.d.ts +6 -0
  30. package/dist/chains/index.js +5 -0
  31. package/dist/chains/resolveWallet.d.ts +20 -0
  32. package/dist/chains/resolveWallet.js +42 -0
  33. package/dist/chains/solana/index.d.ts +3 -0
  34. package/dist/chains/solana/index.js +7 -0
  35. package/dist/chains/solana/mutations.d.ts +129 -0
  36. package/dist/chains/solana/mutations.js +59 -0
  37. package/dist/chains/solana/types.d.ts +7 -0
  38. package/dist/chains/solana/types.js +0 -0
  39. package/dist/chains/solana/useParaSolanaSigner.d.ts +59 -0
  40. package/dist/chains/solana/useParaSolanaSigner.js +108 -0
  41. package/dist/chains/stellar/index.d.ts +3 -0
  42. package/dist/chains/stellar/index.js +7 -0
  43. package/dist/chains/stellar/mutations.d.ts +351 -0
  44. package/dist/chains/stellar/mutations.js +77 -0
  45. package/dist/chains/stellar/types.d.ts +3 -0
  46. package/dist/chains/stellar/types.js +0 -0
  47. package/dist/chains/stellar/useParaStellarSigner.d.ts +54 -0
  48. package/dist/chains/stellar/useParaStellarSigner.js +108 -0
  49. package/dist/chains/types.d.ts +21 -0
  50. package/dist/chains/types.js +0 -0
  51. package/dist/index.d.ts +1 -0
  52. package/dist/index.js +4 -1
  53. package/dist/provider/ParaProviderCore.d.ts +39 -47
  54. package/dist/provider/ParaProviderCore.js +11 -6
  55. package/dist/provider/actions/index.d.ts +5 -0
  56. package/dist/provider/hooks/aa/createSmartAccountHook.js +3 -2
  57. package/dist/provider/hooks/aa/thirdweb.d.ts +6 -2
  58. package/dist/provider/hooks/mutations/useAuthenticateWithEmailOrPhone.d.ts +64 -5
  59. package/dist/provider/hooks/mutations/useAuthenticateWithOAuth.d.ts +64 -5
  60. package/dist/provider/hooks/mutations/useClaimPregenWallets.d.ts +66 -5
  61. package/dist/provider/hooks/mutations/useCreateGuestWallets.d.ts +64 -5
  62. package/dist/provider/hooks/mutations/useCreatePregenWallet.d.ts +66 -5
  63. package/dist/provider/hooks/mutations/useCreatePregenWalletPerType.d.ts +66 -5
  64. package/dist/provider/hooks/mutations/useCreateWallet.d.ts +64 -5
  65. package/dist/provider/hooks/mutations/useCreateWalletPerType.d.ts +64 -5
  66. package/dist/provider/hooks/mutations/useEnable2fa.d.ts +64 -5
  67. package/dist/provider/hooks/mutations/useExportPrivateKey.d.ts +112 -5
  68. package/dist/provider/hooks/mutations/useHasPregenWallet.d.ts +66 -5
  69. package/dist/provider/hooks/mutations/useIssueJwt.d.ts +64 -5
  70. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +64 -5
  71. package/dist/provider/hooks/mutations/useLoginExternalWallet.d.ts +64 -5
  72. package/dist/provider/hooks/mutations/useLogout.d.ts +64 -5
  73. package/dist/provider/hooks/mutations/useResendVerificationCode.d.ts +64 -5
  74. package/dist/provider/hooks/mutations/useSetup2fa.d.ts +64 -5
  75. package/dist/provider/hooks/mutations/useSignMessage.d.ts +64 -5
  76. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +64 -5
  77. package/dist/provider/hooks/mutations/useSignUpOrLogIn.d.ts +64 -5
  78. package/dist/provider/hooks/mutations/useUpdatePregenWalletIdentifier.d.ts +66 -5
  79. package/dist/provider/hooks/mutations/useVerify2fa.d.ts +64 -5
  80. package/dist/provider/hooks/mutations/useVerifyExternalWallet.d.ts +64 -5
  81. package/dist/provider/hooks/mutations/useVerifyNewAccount.d.ts +64 -5
  82. package/dist/provider/hooks/mutations/useWaitForLogin.d.ts +64 -5
  83. package/dist/provider/hooks/mutations/useWaitForSignup.d.ts +64 -5
  84. package/dist/provider/hooks/mutations/useWaitForWalletCreation.d.ts +64 -5
  85. package/dist/provider/hooks/queries/createAccountHook.js +3 -3
  86. package/dist/provider/hooks/queries/useAccount.d.ts +9 -63
  87. package/dist/provider/hooks/queries/useAccount.js +3 -61
  88. package/dist/provider/index.d.ts +1 -1
  89. package/dist/provider/stores/index.d.ts +1 -1
  90. package/dist/provider/stores/index.js +0 -1
  91. package/dist/provider/utils/renameMutations.d.ts +1 -1
  92. package/dist/provider/utils/renameMutations.js +1 -14
  93. package/package.json +68 -3
@@ -15,20 +15,79 @@ export declare const WAIT_FOR_SIGN_UP_KEY = "WAIT_FOR_SIGN_UP";
15
15
  * await waitForSignupAsync({ ...params });
16
16
  */
17
17
  export declare const useWaitForSignup: () => {
18
+ data: undefined;
19
+ variables: undefined;
20
+ error: null;
21
+ isError: false;
22
+ isIdle: true;
23
+ isPending: false;
24
+ isSuccess: false;
25
+ status: "idle";
26
+ mutate: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
27
+ reset: () => void;
28
+ context: unknown;
29
+ failureCount: number;
30
+ failureReason: Error;
31
+ isPaused: boolean;
32
+ submittedAt: number;
33
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
34
+ waitForSignup: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
35
+ waitForSignupAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
36
+ } | {
37
+ data: undefined;
38
+ variables: void | WaitForSignupParams;
39
+ error: null;
40
+ isError: false;
41
+ isIdle: false;
42
+ isPending: true;
43
+ isSuccess: false;
44
+ status: "pending";
45
+ mutate: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
46
+ reset: () => void;
47
+ context: unknown;
48
+ failureCount: number;
49
+ failureReason: Error;
50
+ isPaused: boolean;
51
+ submittedAt: number;
52
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
53
+ waitForSignup: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
54
+ waitForSignupAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
55
+ } | {
56
+ data: undefined;
18
57
  error: Error;
19
- isSuccess: boolean;
58
+ variables: void | WaitForSignupParams;
59
+ isError: true;
60
+ isIdle: false;
61
+ isPending: false;
62
+ isSuccess: false;
63
+ status: "error";
64
+ mutate: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
65
+ reset: () => void;
66
+ context: unknown;
67
+ failureCount: number;
68
+ failureReason: Error;
69
+ isPaused: boolean;
70
+ submittedAt: number;
71
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
72
+ waitForSignup: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
73
+ waitForSignupAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
74
+ } | {
20
75
  data: true;
76
+ error: null;
21
77
  variables: void | WaitForSignupParams;
22
- isError: boolean;
23
- isIdle: boolean;
24
- isPending: boolean;
25
- status: "error" | "idle" | "pending" | "success";
78
+ isError: false;
79
+ isIdle: false;
80
+ isPending: false;
81
+ isSuccess: true;
82
+ status: "success";
83
+ mutate: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
26
84
  reset: () => void;
27
85
  context: unknown;
28
86
  failureCount: number;
29
87
  failureReason: Error;
30
88
  isPaused: boolean;
31
89
  submittedAt: number;
90
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
32
91
  waitForSignup: import("@tanstack/react-query").UseMutateFunction<true, Error, void | WaitForSignupParams, unknown>;
33
92
  waitForSignupAsync: import("@tanstack/react-query").UseMutateAsyncFunction<true, Error, void | WaitForSignupParams, unknown>;
34
93
  };
@@ -15,20 +15,79 @@ export declare const WAIT_FOR_WALLET_CREATION_KEY = "WAIT_FOR_WALLET_CREATION";
15
15
  * await waitForWalletCreationAsync({ ...params });
16
16
  */
17
17
  export declare const useWaitForWalletCreation: () => {
18
+ data: undefined;
19
+ variables: undefined;
20
+ error: null;
21
+ isError: false;
22
+ isIdle: true;
23
+ isPending: false;
24
+ isSuccess: false;
25
+ status: "idle";
26
+ mutate: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
27
+ reset: () => void;
28
+ context: unknown;
29
+ failureCount: number;
30
+ failureReason: Error;
31
+ isPaused: boolean;
32
+ submittedAt: number;
33
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
34
+ waitForWalletCreation: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
35
+ waitForWalletCreationAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
36
+ } | {
37
+ data: undefined;
38
+ variables: void | WaitForWalletCreationParams;
39
+ error: null;
40
+ isError: false;
41
+ isIdle: false;
42
+ isPending: true;
43
+ isSuccess: false;
44
+ status: "pending";
45
+ mutate: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
46
+ reset: () => void;
47
+ context: unknown;
48
+ failureCount: number;
49
+ failureReason: Error;
50
+ isPaused: boolean;
51
+ submittedAt: number;
52
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
53
+ waitForWalletCreation: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
54
+ waitForWalletCreationAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
55
+ } | {
56
+ data: undefined;
18
57
  error: Error;
19
- isSuccess: boolean;
58
+ variables: void | WaitForWalletCreationParams;
59
+ isError: true;
60
+ isIdle: false;
61
+ isPending: false;
62
+ isSuccess: false;
63
+ status: "error";
64
+ mutate: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
65
+ reset: () => void;
66
+ context: unknown;
67
+ failureCount: number;
68
+ failureReason: Error;
69
+ isPaused: boolean;
70
+ submittedAt: number;
71
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
72
+ waitForWalletCreation: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
73
+ waitForWalletCreationAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
74
+ } | {
20
75
  data: WaitForWalletCreationResponse;
76
+ error: null;
21
77
  variables: void | WaitForWalletCreationParams;
22
- isError: boolean;
23
- isIdle: boolean;
24
- isPending: boolean;
25
- status: "error" | "idle" | "pending" | "success";
78
+ isError: false;
79
+ isIdle: false;
80
+ isPending: false;
81
+ isSuccess: true;
82
+ status: "success";
83
+ mutate: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
26
84
  reset: () => void;
27
85
  context: unknown;
28
86
  failureCount: number;
29
87
  failureReason: Error;
30
88
  isPaused: boolean;
31
89
  submittedAt: number;
90
+ mutateAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
32
91
  waitForWalletCreation: import("@tanstack/react-query").UseMutateFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
33
92
  waitForWalletCreationAsync: import("@tanstack/react-query").UseMutateAsyncFunction<WaitForWalletCreationResponse, Error, void | WaitForWalletCreationParams, unknown>;
34
93
  };
@@ -93,17 +93,17 @@ function createAccountHook(useExternalWallets) {
93
93
  const hasExternalConnection = Object.values(external.connections).some(Boolean);
94
94
  if (paraAccount.isConnected) {
95
95
  connectionType = "embedded";
96
- if (paraAccount.wallets.some((w) => w.isExternal)) {
96
+ if (paraAccount.wallets.some((w) => "isExternal" in w && w.isExternal)) {
97
97
  connectionType = "both";
98
98
  }
99
- if (paraAccount.wallets.every((w) => w.isExternal) && hasExternalConnection) {
99
+ if (paraAccount.wallets.every((w) => "isExternal" in w && w.isExternal) && hasExternalConnection) {
100
100
  connectionType = "external";
101
101
  }
102
102
  }
103
103
  const isEmbeddedConnected = connectionType === "embedded" || connectionType === "both";
104
104
  const connectedNetworks = Object.entries(external.connections).filter(([, connected]) => connected).map(([network]) => network);
105
105
  return {
106
- isConnected: paraAccount.isConnected,
106
+ isConnected: paraAccount.isConnected || hasExternalConnection,
107
107
  connectionType,
108
108
  embedded: __spreadProps(__spreadValues({}, paraAccount), { isConnected: isEmbeddedConnected }),
109
109
  external: __spreadProps(__spreadValues({}, external.data), {
@@ -1,65 +1,11 @@
1
- import { type Account } from '../../actions/getEmbeddedAccount.js';
2
- export declare const EMBEDDED_ACCOUNT_BASE_KEY = "PARA_EMBEDDED_ACCOUNT";
3
- export type { Account };
1
+ import { type UseAccountReturn } from './createAccountHook.js';
2
+ export type Account = UseAccountReturn;
3
+ export declare const EMBEDDED_ACCOUNT_BASE_KEY = "PARA_ACCOUNT";
4
4
  /**
5
- * Platform-agnostic hook for the embedded (Para) account only.
6
- * Does not include external wallet accounts (EVM/Cosmos/Solana).
7
- * Web SDK's `useAccount()` extends this with external wallet data
8
- * via `createAccountHook`.
5
+ * Platform-agnostic hook for the embedded (Para) account.
6
+ * Returns `{ embedded, external, isConnected, connectionType, isLoading }`.
7
+ *
8
+ * Web SDK overrides this with a version that includes external wallet data
9
+ * via `createAccountHook(useExternalWallets)`.
9
10
  */
10
- export declare const useAccount: () => {
11
- isLoading: boolean;
12
- isConnected: false;
13
- isGuestMode?: false;
14
- auth?: undefined;
15
- authType?: undefined;
16
- identifier?: undefined;
17
- email?: undefined;
18
- phone?: undefined;
19
- farcasterUsername?: undefined;
20
- telegramUserId?: undefined;
21
- externalWalletAddress?: undefined;
22
- wallets?: undefined;
23
- userId?: undefined;
24
- authMethods?: undefined;
25
- } | {
26
- isLoading: boolean;
27
- isConnected: true;
28
- isGuestMode: true;
29
- wallets: import("@getpara/core-sdk").default["availableWallets"];
30
- email?: undefined;
31
- phone?: undefined;
32
- userId?: undefined;
33
- auth?: undefined;
34
- authType?: undefined;
35
- identifier?: undefined;
36
- farcasterUsername?: undefined;
37
- telegramUserId?: undefined;
38
- externalWalletAddress?: undefined;
39
- authMethods?: undefined;
40
- } | {
41
- isLoading: boolean;
42
- isConnected: true;
43
- isGuestMode: false;
44
- auth: {
45
- email: string;
46
- } | {
47
- phone: import("@getpara/shared").AuthIdentifier<"phone">;
48
- } | {
49
- farcasterUsername: import("@getpara/shared").AuthIdentifier<"farcaster">;
50
- } | {
51
- telegramUserId: import("@getpara/shared").AuthIdentifier<"telegram">;
52
- } | {
53
- externalWalletAddress: import("@getpara/shared").AuthIdentifier<"externalWallet">;
54
- };
55
- authType: import("@getpara/shared").PrimaryAuthType;
56
- identifier: string;
57
- email?: string;
58
- phone?: `+${number}`;
59
- farcasterUsername?: string;
60
- telegramUserId?: string;
61
- externalWalletAddress?: string;
62
- wallets: import("@getpara/core-sdk").default["availableWallets"];
63
- userId?: string;
64
- authMethods?: Set<import("@getpara/shared").AuthMethod>;
65
- };
11
+ export declare const useAccount: () => UseAccountReturn<Record<string, unknown>>;
@@ -1,64 +1,6 @@
1
- var __defProp = Object.defineProperty;
2
- var __defProps = Object.defineProperties;
3
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
- var __spreadValues = (a, b) => {
9
- for (var prop in b || (b = {}))
10
- if (__hasOwnProp.call(b, prop))
11
- __defNormalProp(a, prop, b[prop]);
12
- if (__getOwnPropSymbols)
13
- for (var prop of __getOwnPropSymbols(b)) {
14
- if (__propIsEnum.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- }
17
- return a;
18
- };
19
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- var __async = (__this, __arguments, generator) => {
21
- return new Promise((resolve, reject) => {
22
- var fulfilled = (value) => {
23
- try {
24
- step(generator.next(value));
25
- } catch (e) {
26
- reject(e);
27
- }
28
- };
29
- var rejected = (value) => {
30
- try {
31
- step(generator.throw(value));
32
- } catch (e) {
33
- reject(e);
34
- }
35
- };
36
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
37
- step((generator = generator.apply(__this, __arguments)).next());
38
- });
39
- };
40
- import { useQuery } from "@tanstack/react-query";
41
- import { useClient } from "../utils/useClient.js";
42
- import { useIsFullyLoggedIn } from "./useIsFullyLoggedIn.js";
43
- import { getEmbeddedAccount } from "../../actions/getEmbeddedAccount.js";
44
- const EMBEDDED_ACCOUNT_BASE_KEY = "PARA_EMBEDDED_ACCOUNT";
45
- const useAccount = () => {
46
- var _a;
47
- const client = useClient();
48
- const { data: isFullyLoggedIn, isSuccess, isLoading: isFullyLoggedInLoading } = useIsFullyLoggedIn();
49
- const queryKey = [EMBEDDED_ACCOUNT_BASE_KEY, isFullyLoggedIn != null ? isFullyLoggedIn : null, isFullyLoggedInLoading, (_a = client == null ? void 0 : client.userId) != null ? _a : null];
50
- const { data, isLoading } = useQuery({
51
- enabled: isSuccess && !!client,
52
- queryKey,
53
- queryFn: () => __async(void 0, null, function* () {
54
- return getEmbeddedAccount(client, isFullyLoggedIn);
55
- })
56
- });
57
- const defaultResp = { isConnected: false };
58
- return __spreadProps(__spreadValues({}, data != null ? data : defaultResp), {
59
- isLoading: isFullyLoggedInLoading || isLoading
60
- });
61
- };
1
+ import { createAccountHook } from "./createAccountHook.js";
2
+ const EMBEDDED_ACCOUNT_BASE_KEY = "PARA_ACCOUNT";
3
+ const useAccount = createAccountHook();
62
4
  export {
63
5
  EMBEDDED_ACCOUNT_BASE_KEY,
64
6
  useAccount
@@ -1,4 +1,4 @@
1
- export { ParaProviderCore, type ParaProviderCoreProps, type ParaClientConfig, type ParaClientConfigWithFactory, type CoreProviderConfig, type CoreCallbacks, type ParaCallbackEvent, } from './ParaProviderCore.js';
1
+ export { ParaProviderCore, type ParaProviderBaseProps, type ParaProviderCoreProps, type ParaClientConfig, type ParaClientConfigWithFactory, type CoreProviderConfig, type CoreCallbacks, type ParaCallbackEvent, } from './ParaProviderCore.js';
2
2
  export * from './stores/index.js';
3
3
  export * from './hooks/index.js';
4
4
  export * from './actions/index.js';
@@ -1,4 +1,4 @@
1
- export * from './types.js';
1
+ export type { CoreStore, CoreClientSlice, CoreWalletSlice, CoreConfigSlice, CoreParaStateSlice } from './types.js';
2
2
  export * from './slices/index.js';
3
3
  export { createCoreStore, type ParaStorageAdapter, type CorePersistedState } from './createCoreStore.js';
4
4
  export { CoreStoreContext, useCoreStore } from './CoreStoreContext.js';
@@ -1,4 +1,3 @@
1
- export * from "./types.js";
2
1
  export * from "./slices/index.js";
3
2
  import { createCoreStore } from "./createCoreStore.js";
4
3
  import { CoreStoreContext, useCoreStore } from "./CoreStoreContext.js";
@@ -2,7 +2,7 @@ import type { DefaultError, UseMutateAsyncFunction, UseMutateFunction, UseMutati
2
2
  export type Compute<type> = {
3
3
  [key in keyof type]: type[key];
4
4
  } & unknown;
5
- type RenamedMutationResult<TData, TError, TVariables, TContext, TName extends string> = Omit<UseMutationResult<TData, TError, TVariables, TContext>, 'mutate' | 'mutateAsync'> & {
5
+ type RenamedMutationResult<TData, TError, TVariables, TContext, TName extends string> = UseMutationResult<TData, TError, TVariables, TContext> & {
6
6
  [K in TName]: UseMutateFunction<TData, TError, TVariables, TContext>;
7
7
  } & {
8
8
  [K in `${TName}Async`]: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
@@ -14,25 +14,12 @@ var __spreadValues = (a, b) => {
14
14
  }
15
15
  return a;
16
16
  };
17
- var __objRest = (source, exclude) => {
18
- var target = {};
19
- for (var prop in source)
20
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
21
- target[prop] = source[prop];
22
- if (source != null && __getOwnPropSymbols)
23
- for (var prop of __getOwnPropSymbols(source)) {
24
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
25
- target[prop] = source[prop];
26
- }
27
- return target;
28
- };
29
17
  function renameMutations(mutationObj, name) {
30
18
  const newMutations = {
31
19
  [name]: mutationObj.mutate,
32
20
  [`${name}Async`]: mutationObj.mutateAsync
33
21
  };
34
- const _a = mutationObj, { mutate: _, mutateAsync: __ } = _a, rest = __objRest(_a, ["mutate", "mutateAsync"]);
35
- return __spreadValues(__spreadValues({}, newMutations), rest);
22
+ return __spreadValues(__spreadValues({}, mutationObj), newMutations);
36
23
  }
37
24
  export {
38
25
  renameMutations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getpara/react-core",
3
- "version": "2.20.0",
3
+ "version": "2.22.0",
4
4
  "description": "Platform-agnostic ParaProvider, hooks, and store for Para SDK",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -23,6 +23,26 @@
23
23
  "./queries": {
24
24
  "types": "./dist/queries.d.ts",
25
25
  "import": "./dist/queries.js"
26
+ },
27
+ "./evm/viem": {
28
+ "types": "./dist/chains/evm/viem/index.d.ts",
29
+ "import": "./dist/chains/evm/viem/index.js"
30
+ },
31
+ "./evm/ethers": {
32
+ "types": "./dist/chains/evm/ethers/index.d.ts",
33
+ "import": "./dist/chains/evm/ethers/index.js"
34
+ },
35
+ "./cosmos": {
36
+ "types": "./dist/chains/cosmos/index.d.ts",
37
+ "import": "./dist/chains/cosmos/index.js"
38
+ },
39
+ "./solana": {
40
+ "types": "./dist/chains/solana/index.d.ts",
41
+ "import": "./dist/chains/solana/index.js"
42
+ },
43
+ "./stellar": {
44
+ "types": "./dist/chains/stellar/index.d.ts",
45
+ "import": "./dist/chains/stellar/index.js"
26
46
  }
27
47
  },
28
48
  "typesVersions": {
@@ -35,6 +55,21 @@
35
55
  ],
36
56
  "queries": [
37
57
  "./dist/queries.d.ts"
58
+ ],
59
+ "evm/viem": [
60
+ "./dist/chains/evm/viem/index.d.ts"
61
+ ],
62
+ "evm/ethers": [
63
+ "./dist/chains/evm/ethers/index.d.ts"
64
+ ],
65
+ "cosmos": [
66
+ "./dist/chains/cosmos/index.d.ts"
67
+ ],
68
+ "solana": [
69
+ "./dist/chains/solana/index.d.ts"
70
+ ],
71
+ "stellar": [
72
+ "./dist/chains/stellar/index.d.ts"
38
73
  ]
39
74
  }
40
75
  },
@@ -47,10 +82,18 @@
47
82
  "test": "vitest run"
48
83
  },
49
84
  "dependencies": {
50
- "@getpara/core-sdk": "2.20.0",
85
+ "@getpara/core-sdk": "2.22.0",
51
86
  "zustand": "^5.0.0"
52
87
  },
53
88
  "devDependencies": {
89
+ "@cosmjs/amino": "^0.32.0",
90
+ "@cosmjs/proto-signing": "^0.32.0",
91
+ "@getpara/cosmjs-v0-integration": "2.22.0",
92
+ "@getpara/ethers-v6-integration": "2.22.0",
93
+ "@getpara/solana-signers-v2-integration": "2.22.0",
94
+ "@getpara/stellar-sdk-v14-integration": "2.22.0",
95
+ "@getpara/viem-v2-integration": "2.22.0",
96
+ "@solana/signers": "^2.0.0",
54
97
  "@tanstack/react-query": "^5.74.0",
55
98
  "@testing-library/dom": "^10.4.0",
56
99
  "@testing-library/react": "^16.3.0",
@@ -65,9 +108,31 @@
65
108
  "vitest": "^3.0.0"
66
109
  },
67
110
  "peerDependencies": {
111
+ "@getpara/cosmjs-v0-integration": ">=2",
112
+ "@getpara/ethers-v6-integration": ">=2",
113
+ "@getpara/solana-signers-v2-integration": ">=2",
114
+ "@getpara/stellar-sdk-v14-integration": ">=2",
115
+ "@getpara/viem-v2-integration": ">=2",
68
116
  "@tanstack/react-query": ">=5",
69
117
  "react": ">=18",
70
118
  "viem": ">=2"
71
119
  },
72
- "gitHead": "a8443bcc4018864f5e582f238ade1bb3b4e121f4"
120
+ "peerDependenciesMeta": {
121
+ "@getpara/cosmjs-v0-integration": {
122
+ "optional": true
123
+ },
124
+ "@getpara/ethers-v6-integration": {
125
+ "optional": true
126
+ },
127
+ "@getpara/solana-signers-v2-integration": {
128
+ "optional": true
129
+ },
130
+ "@getpara/stellar-sdk-v14-integration": {
131
+ "optional": true
132
+ },
133
+ "@getpara/viem-v2-integration": {
134
+ "optional": true
135
+ }
136
+ },
137
+ "gitHead": "7191b8c823ec592eb1da16c9a085f8e69c6bf377"
73
138
  }