@getpara/react-sdk 1.8.0 → 2.0.0-alpha.3

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 (248) hide show
  1. package/dist/{modal/components/AddFunds/MoonPayEmbed.js → MoonPayEmbed-Q2HP2BFI.js} +3 -1
  2. package/dist/MoonPayEmbed-Q2HP2BFI.js.br +0 -0
  3. package/dist/MoonPayEmbed-Q2HP2BFI.js.gz +0 -0
  4. package/dist/chunk-MMUBH76A.js.br +0 -0
  5. package/dist/chunk-MMUBH76A.js.gz +0 -0
  6. package/dist/cli/cli.mjs +40 -0
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +6499 -6
  9. package/dist/index.js.br +0 -0
  10. package/dist/index.js.gz +0 -0
  11. package/dist/modal/components/AuthInput/AuthInput.d.ts +1 -1
  12. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +4 -4
  13. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -1
  14. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -1
  15. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -1
  16. package/dist/modal/components/Controls/Selects.d.ts +1 -1
  17. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +1 -1
  18. package/dist/modal/components/Footer/Footer.d.ts +1 -1
  19. package/dist/modal/components/WalletCard/WalletCard.d.ts +2 -2
  20. package/dist/modal/components/common.d.ts +7 -7
  21. package/dist/modal/constants/constants.d.ts +1 -1
  22. package/dist/modal/index.d.ts +0 -2
  23. package/dist/modal/stores/index.d.ts +0 -2
  24. package/dist/modal/stores/modal/useModalStore.d.ts +22 -20
  25. package/dist/modal/types/commonTypes.d.ts +4 -9
  26. package/dist/modal/types/externalWallets.d.ts +0 -2
  27. package/dist/modal/types/modalProps.d.ts +1 -33
  28. package/dist/modal/utils/authLayoutHelpers.d.ts +2 -2
  29. package/dist/modal/utils/getTileButtonFlex.d.ts +1 -1
  30. package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
  31. package/dist/modal/utils/openPopup.d.ts +2 -2
  32. package/dist/modal/utils/stringFormatters.d.ts +0 -1
  33. package/dist/provider/ParaProvider.d.ts +3 -1
  34. package/dist/provider/actions/getAccount.d.ts +19 -7
  35. package/dist/provider/actions/getWallet.d.ts +1 -1
  36. package/dist/provider/actions/index.d.ts +25 -0
  37. package/dist/provider/actions/utils.d.ts +3 -0
  38. package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
  39. package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
  40. package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
  41. package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
  42. package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
  43. package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
  44. package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
  45. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +12 -0
  46. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +3 -0
  47. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +8 -0
  48. package/dist/provider/hooks/mutations/index.d.ts +25 -10
  49. package/dist/provider/hooks/mutations/utils.d.ts +4 -0
  50. package/dist/provider/hooks/queries/index.d.ts +0 -1
  51. package/dist/provider/hooks/queries/useAccount.d.ts +1 -6
  52. package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
  53. package/dist/provider/hooks/utils/useWalletState.d.ts +3 -2
  54. package/dist/provider/index.d.ts +1 -0
  55. package/dist/provider/providers/AuthProvider.d.ts +31 -0
  56. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +7 -0
  57. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +7 -0
  58. package/dist/provider/providers/ExternalWalletProvider.d.ts +73 -0
  59. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
  60. package/dist/provider/stores/getters.d.ts +3 -3
  61. package/dist/provider/stores/setters.d.ts +1 -0
  62. package/dist/provider/stores/slices/config.d.ts +3 -0
  63. package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
  64. package/dist/provider/stores/slices/index.d.ts +1 -0
  65. package/dist/provider/stores/types.d.ts +46 -3
  66. package/dist/provider/types/externalWalletProviders.d.ts +12 -0
  67. package/dist/provider/types/provider.d.ts +119 -16
  68. package/dist/provider/types/utils.d.ts +16 -0
  69. package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
  70. package/dist/provider/utils/renameMutations.d.ts +3 -0
  71. package/package.json +19 -7
  72. package/dist/modal/ParaModal.js +0 -362
  73. package/dist/modal/components/Account/Account.js +0 -77
  74. package/dist/modal/components/AddFunds/AddFunds.js +0 -220
  75. package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -72
  76. package/dist/modal/components/AddFunds/AddFundsDone.js +0 -43
  77. package/dist/modal/components/AddFunds/index.js +0 -4
  78. package/dist/modal/components/AuthInput/AuthInput.js +0 -283
  79. package/dist/modal/components/AuthInput/countryCodes.js +0 -42
  80. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
  81. package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
  82. package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -37
  83. package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -113
  84. package/dist/modal/components/AuthOptions/AuthOptions.js +0 -33
  85. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
  86. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
  87. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
  88. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -44
  89. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -55
  90. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -93
  91. package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
  92. package/dist/modal/components/Body/Body.js +0 -308
  93. package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -94
  94. package/dist/modal/components/ChainSwitch/config.js +0 -17
  95. package/dist/modal/components/Controls/Controls.js +0 -74
  96. package/dist/modal/components/Controls/Selects.js +0 -234
  97. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -140
  98. package/dist/modal/components/ExternalWalletStep/config.js +0 -17
  99. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -96
  100. package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -172
  101. package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.d.ts +0 -8
  102. package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.js +0 -124
  103. package/dist/modal/components/Footer/Footer.js +0 -93
  104. package/dist/modal/components/Header/Header.js +0 -43
  105. package/dist/modal/components/Header/hooks/useStepTitle.js +0 -50
  106. package/dist/modal/components/Hero/Hero.js +0 -116
  107. package/dist/modal/components/IFrameStep/IFrameStep.js +0 -55
  108. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -28
  109. package/dist/modal/components/ModalContent/ModalContent.js +0 -324
  110. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -81
  111. package/dist/modal/components/OAuth/OAuth.js +0 -153
  112. package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -139
  113. package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
  114. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
  115. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -101
  116. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -141
  117. package/dist/modal/components/StripeComponents/StripeComponents.js +0 -88
  118. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -24
  119. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -159
  120. package/dist/modal/components/Waiting/Waiting.js +0 -17
  121. package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
  122. package/dist/modal/components/WalletCard/WalletCard.js +0 -127
  123. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -52
  124. package/dist/modal/components/common.js +0 -96
  125. package/dist/modal/components/index.js +0 -2
  126. package/dist/modal/constants/constants.js +0 -111
  127. package/dist/modal/constants/defaults.js +0 -10
  128. package/dist/modal/constants/oAuthLogos.js +0 -24
  129. package/dist/modal/hooks/useActiveWallet.d.ts +0 -1
  130. package/dist/modal/hooks/useActiveWallet.js +0 -15
  131. package/dist/modal/hooks/useCreateAccount.d.ts +0 -4
  132. package/dist/modal/hooks/useCreateAccount.js +0 -72
  133. package/dist/modal/hooks/useEmbeddedExternalConnection.d.ts +0 -1
  134. package/dist/modal/hooks/useEmbeddedExternalConnection.js +0 -54
  135. package/dist/modal/hooks/useGoBack.js +0 -42
  136. package/dist/modal/hooks/useSetLoginURLs.d.ts +0 -8
  137. package/dist/modal/hooks/useSetLoginURLs.js +0 -49
  138. package/dist/modal/hooks/useWalletBalance.d.ts +0 -4
  139. package/dist/modal/hooks/useWalletBalance.js +0 -47
  140. package/dist/modal/index.js +0 -33
  141. package/dist/modal/providers/CosmosExternalWalletContextStub.d.ts +0 -42
  142. package/dist/modal/providers/CosmosExternalWalletContextStub.js +0 -38
  143. package/dist/modal/providers/EvmExternalWalletContextStub.d.ts +0 -46
  144. package/dist/modal/providers/EvmExternalWalletContextStub.js +0 -55
  145. package/dist/modal/providers/ExternalWalletContext.d.ts +0 -92
  146. package/dist/modal/providers/ExternalWalletContext.js +0 -394
  147. package/dist/modal/providers/SolanaExternalWalletContextStub.d.ts +0 -32
  148. package/dist/modal/providers/SolanaExternalWalletContextStub.js +0 -32
  149. package/dist/modal/stores/externalWalletProvider/actions.d.ts +0 -3
  150. package/dist/modal/stores/externalWalletProvider/actions.js +0 -10
  151. package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.d.ts +0 -22
  152. package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.js +0 -21
  153. package/dist/modal/stores/index.js +0 -4
  154. package/dist/modal/stores/modal/actions.js +0 -70
  155. package/dist/modal/stores/modal/useModalStore.js +0 -65
  156. package/dist/modal/stores/theme/actions.d.ts +0 -3
  157. package/dist/modal/stores/theme/actions.js +0 -28
  158. package/dist/modal/stores/theme/useThemeStore.d.ts +0 -20
  159. package/dist/modal/stores/theme/useThemeStore.js +0 -21
  160. package/dist/modal/stores/userInfo/actions.d.ts +0 -3
  161. package/dist/modal/stores/userInfo/actions.js +0 -30
  162. package/dist/modal/stores/userInfo/useUserInfoStore.d.ts +0 -19
  163. package/dist/modal/stores/userInfo/useUserInfoStore.js +0 -17
  164. package/dist/modal/types/commonTypes.js +0 -1
  165. package/dist/modal/types/externalWallets.js +0 -32
  166. package/dist/modal/types/modalProps.js +0 -12
  167. package/dist/modal/utils/authLayoutHelpers.js +0 -8
  168. package/dist/modal/utils/getMailtoLink.js +0 -10
  169. package/dist/modal/utils/getTileButtonFlex.js +0 -20
  170. package/dist/modal/utils/openPopup.js +0 -60
  171. package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
  172. package/dist/modal/utils/steps.js +0 -232
  173. package/dist/modal/utils/stringFormatters.js +0 -19
  174. package/dist/modal/utils/validateOnRampConfig.js +0 -32
  175. package/dist/package.json +0 -6
  176. package/dist/provider/ParaProvider.js +0 -22
  177. package/dist/provider/actions/checkIfUserExists.d.ts +0 -9
  178. package/dist/provider/actions/checkIfUserExists.js +0 -21
  179. package/dist/provider/actions/createUser.d.ts +0 -12
  180. package/dist/provider/actions/createUser.js +0 -26
  181. package/dist/provider/actions/getAccount.js +0 -22
  182. package/dist/provider/actions/getWallet.js +0 -14
  183. package/dist/provider/actions/getWalletBalance.d.ts +0 -2
  184. package/dist/provider/actions/getWalletBalance.js +0 -14
  185. package/dist/provider/actions/initiateLogin.d.ts +0 -4
  186. package/dist/provider/actions/initiateLogin.js +0 -20
  187. package/dist/provider/actions/keepSessionAlive.d.ts +0 -2
  188. package/dist/provider/actions/keepSessionAlive.js +0 -20
  189. package/dist/provider/actions/logout.d.ts +0 -2
  190. package/dist/provider/actions/logout.js +0 -17
  191. package/dist/provider/actions/signMessage.d.ts +0 -8
  192. package/dist/provider/actions/signMessage.js +0 -20
  193. package/dist/provider/actions/signTransaction.d.ts +0 -8
  194. package/dist/provider/actions/signTransaction.js +0 -20
  195. package/dist/provider/actions/waitForAccountCreation.d.ts +0 -2
  196. package/dist/provider/actions/waitForAccountCreation.js +0 -21
  197. package/dist/provider/actions/waitForLoginAndSetup.d.ts +0 -6
  198. package/dist/provider/actions/waitForLoginAndSetup.js +0 -24
  199. package/dist/provider/actions/waitForPasskeyAndCreateWallet.d.ts +0 -2
  200. package/dist/provider/actions/waitForPasskeyAndCreateWallet.js +0 -21
  201. package/dist/provider/hooks/index.js +0 -4
  202. package/dist/provider/hooks/mutations/index.js +0 -24
  203. package/dist/provider/hooks/mutations/useCheckIfUserExists.d.ts +0 -13
  204. package/dist/provider/hooks/mutations/useCheckIfUserExists.js +0 -23
  205. package/dist/provider/hooks/mutations/useCreateUser.d.ts +0 -13
  206. package/dist/provider/hooks/mutations/useCreateUser.js +0 -20
  207. package/dist/provider/hooks/mutations/useInitiateLogin.d.ts +0 -14
  208. package/dist/provider/hooks/mutations/useInitiateLogin.js +0 -23
  209. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -12
  210. package/dist/provider/hooks/mutations/useKeepSessionAlive.js +0 -20
  211. package/dist/provider/hooks/mutations/useLogout.d.ts +0 -12
  212. package/dist/provider/hooks/mutations/useLogout.js +0 -30
  213. package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -15
  214. package/dist/provider/hooks/mutations/useSignMessage.js +0 -39
  215. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -14
  216. package/dist/provider/hooks/mutations/useSignTransaction.js +0 -39
  217. package/dist/provider/hooks/mutations/useWaitForAccountCreation.d.ts +0 -12
  218. package/dist/provider/hooks/mutations/useWaitForAccountCreation.js +0 -30
  219. package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.d.ts +0 -14
  220. package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.js +0 -30
  221. package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.d.ts +0 -13
  222. package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.js +0 -30
  223. package/dist/provider/hooks/queries/index.js +0 -10
  224. package/dist/provider/hooks/queries/useAccount.js +0 -21
  225. package/dist/provider/hooks/queries/useWallet.js +0 -22
  226. package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -7
  227. package/dist/provider/hooks/queries/useWalletBalance.js +0 -26
  228. package/dist/provider/hooks/utils/index.js +0 -10
  229. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
  230. package/dist/provider/hooks/utils/useClient.js +0 -10
  231. package/dist/provider/hooks/utils/useEventListeners.js +0 -105
  232. package/dist/provider/hooks/utils/useInternalClient.js +0 -10
  233. package/dist/provider/hooks/utils/useModal.js +0 -17
  234. package/dist/provider/hooks/utils/useWalletState.js +0 -33
  235. package/dist/provider/index.js +0 -8
  236. package/dist/provider/stores/getters.js +0 -13
  237. package/dist/provider/stores/slices/client.js +0 -9
  238. package/dist/provider/stores/slices/index.js +0 -4
  239. package/dist/provider/stores/slices/modal.js +0 -9
  240. package/dist/provider/stores/slices/wallet.js +0 -13
  241. package/dist/provider/stores/types.js +0 -1
  242. package/dist/provider/stores/useStore.js +0 -27
  243. package/dist/provider/types/provider.js +0 -1
  244. package/dist/provider/types/query.js +0 -1
  245. package/dist/provider/types/utils.js +0 -1
  246. package/dist/provider/utils/constants.d.ts +0 -5
  247. package/dist/provider/utils/constants.js +0 -11
  248. package/dist/provider/utils/renameMutations.js +0 -16
@@ -1,159 +0,0 @@
1
- "use client";
2
- import {
3
- __async
4
- } from "../../../chunk-MMUBH76A.js";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { CpslCodeInput, CpslSpinner, CpslText } from "@getpara/react-components";
7
- import { useEffect, useRef, useState } from "react";
8
- import { styled } from "styled-components";
9
- import { ModalStep } from "../../utils/steps.js";
10
- import { useModalStore, useThemeStore, useUserInfoStore } from "../../stores/index.js";
11
- import { Heading, InnerStepContainer, StepContainer } from "../common.js";
12
- import { AuthMethod } from "@getpara/core-sdk";
13
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
14
- const VerificationCodeStep = () => {
15
- const theme = useThemeStore((state) => state.theme);
16
- const authInfo = useUserInfoStore((state) => state.getAuthInfo());
17
- const setStep = useModalStore((state) => state.setStep);
18
- const setWebAuthURLForCreate = useModalStore((state) => state.setWebAuthURLForCreate);
19
- const setIFrameUrl = useModalStore((state) => state.setIFrameUrl);
20
- const setIsIFrameReady = useModalStore((state) => state.setIsIFrameReady);
21
- const setAuthStepRoute = useModalStore((state) => state.setAuthStepRoute);
22
- const para = useInternalClient();
23
- const inputRef = useRef(null);
24
- const [code, setCode] = useState("");
25
- const [codeError, setCodeError] = useState("");
26
- const [resendStatus, setResendStatus] = useState("Resend.");
27
- const [resendDisabled, setResendDisabled] = useState(false);
28
- const [isVerifying, setIsVerifying] = useState(false);
29
- const isEmail = (authInfo == null ? void 0 : authInfo.authType) === "email";
30
- useEffect(() => {
31
- setTimeout(() => {
32
- var _a, _b;
33
- (_b = (_a = inputRef.current.shadowRoot.querySelectorAll("input")) == null ? void 0 : _a[0]) == null ? void 0 : _b.focus();
34
- }, 10);
35
- }, []);
36
- useEffect(() => {
37
- if (code.length === 6) {
38
- handleSubmitCode();
39
- }
40
- }, [code]);
41
- const handleResendClick = () => __async(void 0, null, function* () {
42
- if (!resendDisabled) {
43
- setResendStatus("Resent!");
44
- setResendDisabled(true);
45
- isEmail ? yield para.resendVerificationCode() : yield para.resendVerificationCodeByPhone();
46
- setTimeout(() => {
47
- setResendStatus("Resend.");
48
- setResendDisabled(false);
49
- }, 3e3);
50
- }
51
- });
52
- const handleCodeInput = (e) => {
53
- if (codeError) {
54
- setCodeError("");
55
- }
56
- setCode(e.detail.value.trim());
57
- };
58
- const handleSubmitCode = () => __async(void 0, null, function* () {
59
- setIsVerifying(true);
60
- if (code.length === 6 && /^\d+$/.test(code)) {
61
- try {
62
- const supportedCreateAuthMethods = yield para.getSupportedCreateAuthMethods();
63
- if (supportedCreateAuthMethods.has(AuthMethod.PASSWORD) && supportedCreateAuthMethods.has(AuthMethod.PASSKEY)) {
64
- setIsIFrameReady(false);
65
- const webAuthUrl = isEmail ? yield para.verifyEmail({ verificationCode: code }) : yield para.verifyPhone({ verificationCode: code });
66
- const passwordAuthUrl = yield para.getSetupPasswordURL({ authType: authInfo == null ? void 0 : authInfo.authType, theme });
67
- setWebAuthURLForCreate(yield para.shortenLoginLink(webAuthUrl));
68
- setIFrameUrl(yield para.shortenLoginLink(passwordAuthUrl));
69
- setAuthStepRoute(ModalStep.BIOMETRIC_CREATION);
70
- return;
71
- } else if (supportedCreateAuthMethods.has(AuthMethod.PASSWORD)) {
72
- setIsIFrameReady(false);
73
- isEmail ? yield para.verifyEmail({ verificationCode: code }) : yield para.verifyPhone({ verificationCode: code });
74
- const url = yield para.getSetupPasswordURL({ authType: authInfo == null ? void 0 : authInfo.authType, theme });
75
- setIFrameUrl(yield para.shortenLoginLink(url));
76
- setAuthStepRoute(ModalStep.PASSWORD_CREATION);
77
- return;
78
- } else {
79
- const url = isEmail ? yield para.verifyEmail({ verificationCode: code }) : yield para.verifyPhone({ verificationCode: code });
80
- setWebAuthURLForCreate(yield para.shortenLoginLink(url));
81
- setStep(ModalStep.BIOMETRIC_CREATION);
82
- }
83
- } catch (e) {
84
- if (e.message.includes("429")) {
85
- setCodeError("Too many incorrect attempts. Please try again in 10 minutes.");
86
- } else {
87
- setCodeError("Incorrect code.");
88
- }
89
- }
90
- } else {
91
- setCodeError("Incorrect code.");
92
- }
93
- setIsVerifying(false);
94
- });
95
- return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
96
- /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
97
- /* @__PURE__ */ jsxs(Heading, { variant: "headingS", weight: "bold", children: [
98
- "Verify ",
99
- isEmail ? "Email" : "Phone Number"
100
- ] }),
101
- /* @__PURE__ */ jsxs(InlineText, { variant: "bodyS", color: "secondary", children: [
102
- "Please enter the code we sent to ",
103
- /* @__PURE__ */ jsx(InlineText, { variant: "bodyS", children: authInfo == null ? void 0 : authInfo.identifier })
104
- ] })
105
- ] }),
106
- /* @__PURE__ */ jsx(InnerStepContainer, { children: isVerifying ? /* @__PURE__ */ jsx(CpslSpinner, {}) : /* @__PURE__ */ jsxs(Fragment, { children: [
107
- /* @__PURE__ */ jsx(
108
- "form",
109
- {
110
- onSubmit: (e) => __async(void 0, null, function* () {
111
- e.preventDefault();
112
- yield handleSubmitCode();
113
- }),
114
- children: /* @__PURE__ */ jsx(
115
- StyledCodeInput,
116
- {
117
- ref: inputRef,
118
- length: 6,
119
- type: "number",
120
- code,
121
- onCpslInput: handleCodeInput,
122
- errorText: codeError,
123
- onKeyDown: (e) => __async(void 0, null, function* () {
124
- return e.key === "Enter" && (yield handleSubmitCode());
125
- })
126
- }
127
- )
128
- }
129
- ),
130
- /* @__PURE__ */ jsxs(InlineText, { variant: "bodyS", color: "secondary", children: [
131
- "Didn\u2019t receive a code?",
132
- " ",
133
- /* @__PURE__ */ jsx(
134
- ClickableText,
135
- {
136
- variant: "bodyS",
137
- style: { cursor: resendDisabled ? "default" : "pointer" },
138
- onClick: handleResendClick,
139
- children: resendStatus
140
- }
141
- )
142
- ] })
143
- ] }) })
144
- ] });
145
- };
146
- const StyledCodeInput = styled(CpslCodeInput)`
147
- align-self: center;
148
- `;
149
- const InlineText = styled(CpslText)`
150
- text-align: center;
151
- display: inline-block;
152
- `;
153
- const ClickableText = styled(InlineText)`
154
- cursor: pointer;
155
- display: inline-block;
156
- `;
157
- export {
158
- VerificationCodeStep
159
- };
@@ -1,17 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import { CpslSpinner, CpslText } from "@getpara/react-components";
5
- import { Heading, SpinnerContainer, StepContainer, InnerStepContainer } from "../common.js";
6
- const Waiting = ({ heading, subheading }) => {
7
- return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
8
- /* @__PURE__ */ jsx(SpinnerContainer, { children: /* @__PURE__ */ jsx(CpslSpinner, { size: 100 }) }),
9
- /* @__PURE__ */ jsxs(InnerStepContainer, { children: [
10
- /* @__PURE__ */ jsx(Heading, { variant: "headingS", weight: "bold", children: heading }),
11
- /* @__PURE__ */ jsx(CpslText, { variant: "bodyS", color: "secondary", weight: "medium", children: subheading })
12
- ] })
13
- ] });
14
- };
15
- export {
16
- Waiting
17
- };
@@ -1,34 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx } from "react/jsx-runtime";
4
- import styled from "styled-components";
5
- import { CpslIcon, CpslText } from "@getpara/react-components";
6
- const PartnerIcon = ({ partner }) => {
7
- const { logoUrl, displayName, backgroundColor, foregroundColor } = partner;
8
- if (logoUrl) {
9
- return /* @__PURE__ */ jsx(Icon, { src: logoUrl });
10
- }
11
- return /* @__PURE__ */ jsx(Container, { $backgroundColor: backgroundColor, children: /* @__PURE__ */ jsx(Text, { variant: "bodyXS", $color: foregroundColor, children: displayName[0] }) });
12
- };
13
- const Container = styled.div`
14
- width: 14px;
15
- height: 14px;
16
- display: flex;
17
- align-items: center;
18
- justify-content: center;
19
- background-color: ${({ $backgroundColor }) => `${$backgroundColor != null ? $backgroundColor : "var(--cpsl-color-contrast)"}`};
20
- border-radius: 100%;
21
- `;
22
- const Text = styled(CpslText)`
23
- &::part(text-element) {
24
- line-height: 100%;
25
- color: ${({ $color }) => `${$color != null ? $color : "var(--cpsl-color-foreground-0)"}`};
26
- }
27
- `;
28
- const Icon = styled(CpslIcon)`
29
- --height: 14px;
30
- --width: 14px;
31
- `;
32
- export {
33
- PartnerIcon
34
- };
@@ -1,127 +0,0 @@
1
- "use client";
2
- import "../../../chunk-MMUBH76A.js";
3
- import { jsx, jsxs } from "react/jsx-runtime";
4
- import styled from "styled-components";
5
- import { useModalStore, useThemeStore } from "../../stores/index.js";
6
- import { CpslButton, CpslIdenticon, CpslText } from "@getpara/react-components";
7
- import { truncateAddress } from "@getpara/web-sdk";
8
- import { ModalStep } from "../../utils/steps.js";
9
- import { useWalletState } from "../../../provider/index.js";
10
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
11
- const ExternalWalletCard = ({ address, showAddFunds }) => {
12
- var _a;
13
- const para = useInternalClient();
14
- const wallet = para.externalWallets[address];
15
- if (!wallet) {
16
- return null;
17
- }
18
- return /* @__PURE__ */ jsx(
19
- SharedWalletCard,
20
- {
21
- address: (_a = wallet.ensName) != null ? _a : truncateAddress(wallet.address, wallet.type),
22
- identiconHash: para.getIdenticonHash(wallet.id, wallet.type),
23
- showAddFunds
24
- }
25
- );
26
- };
27
- const WalletCard = ({ id, type, showAddFunds }) => {
28
- var _a, _b;
29
- const para = useInternalClient();
30
- const appName = useThemeStore((state) => state.appName);
31
- const wallet = para.findWallet(id, type);
32
- if (!wallet) {
33
- return null;
34
- }
35
- const address = para.getDisplayAddress(wallet.id, { addressType: type });
36
- return /* @__PURE__ */ jsx(
37
- SharedWalletCard,
38
- {
39
- id: wallet.id,
40
- type: wallet.type,
41
- address: (_a = wallet.ensName) != null ? _a : truncateAddress(address, type, { prefix: para.cosmosPrefix }),
42
- name: (_b = wallet.name) != null ? _b : `${appName ? `${appName} ` : ""}Wallet`,
43
- identiconHash: para.getIdenticonHash(wallet.id, type),
44
- showAddFunds
45
- }
46
- );
47
- };
48
- const SharedWalletCard = ({ address, name, identiconHash, showAddFunds, id, type }) => {
49
- const onRampConfig = useModalStore((state) => state.onRampConfig);
50
- const { setSelectedWallet } = useWalletState();
51
- const setStep = useModalStore((state) => state.setStep);
52
- const isAddFundsEnabled = onRampConfig.isBuyEnabled || onRampConfig.isReceiveEnabled;
53
- const handleAddFundsClick = () => {
54
- if (id && type) {
55
- setSelectedWallet({ id, type });
56
- isAddFundsEnabled && setStep(onRampConfig.isBuyEnabled ? ModalStep.ADD_FUNDS_BUY : ModalStep.ADD_FUNDS_RECEIVE);
57
- }
58
- };
59
- return /* @__PURE__ */ jsxs(Container, { children: [
60
- /* @__PURE__ */ jsxs(InnerContainer, { children: [
61
- /* @__PURE__ */ jsx(CpslIdenticon, { size: "48px", hash: identiconHash }),
62
- /* @__PURE__ */ jsxs(WalletNameContainer, { children: [
63
- !!name && /* @__PURE__ */ jsx(Name, { color: "contrast", variant: "bodyL", weight: "semiBold", children: name }),
64
- /* @__PURE__ */ jsx(Name, { color: "secondary", variant: "bodyS", weight: "medium", children: address })
65
- ] })
66
- ] }),
67
- showAddFunds && isAddFundsEnabled && /* @__PURE__ */ jsx(AddFundsButton, { onClick: handleAddFundsClick, children: /* @__PURE__ */ jsx(CpslText, { variant: "bodyXS", color: "contrast", weight: "medium", children: "Add Funds" }) })
68
- ] });
69
- };
70
- const WalletCards = styled.div`
71
- display: flex;
72
- flex-direction: column;
73
- gap: 8px;
74
- width: 100%;
75
- `;
76
- const Container = styled.div`
77
- width: 100%;
78
- padding: 24px;
79
- display: flex;
80
- justify-content: space-between;
81
- align-items: center;
82
- gap: 16px;
83
- background-color: var(--cpsl-color-background-8);
84
- border-radius: 16px;
85
- `;
86
- const InnerContainer = styled.div`
87
- display: flex;
88
- justify-content: flex-start;
89
- gap: 8px;
90
- align-items: center;
91
- overflow: hidden;
92
- `;
93
- const WalletNameContainer = styled.div`
94
- flex: 1;
95
- display: flex;
96
- flex-direction: column;
97
- gap: 4px;
98
- align-items: flex-start;
99
- justify-content: center;
100
- overflow: hidden;
101
- `;
102
- const Name = styled(CpslText)`
103
- width: 100%;
104
- &::part(text-element) {
105
- line-height: 100%;
106
- text-overflow: ellipsis;
107
- overflow: hidden;
108
- white-space: nowrap;
109
- }
110
- `;
111
- const AddFundsButton = styled(CpslButton)`
112
- --button-primary-background-color: var(--cpsl-color-card-surface);
113
- --button-primary-hover-background-color: var(--cpsl-color-background-4);
114
- --button-primary-color: var(--cpsl-color-text-contrast);
115
- --button-primary-hover-color: var(--cpsl-color-text-contrast);
116
- --button-primary-active-color: var(--cpsl-color-text-contrast);
117
- --button-padding-start: 8px;
118
- --button-padding-end: 8px;
119
- --button-padding-top: 8px;
120
- --button-padding-bottom: 8px;
121
- --button-border-radius: 8px;
122
- `;
123
- export {
124
- ExternalWalletCard,
125
- WalletCard,
126
- WalletCards
127
- };
@@ -1,52 +0,0 @@
1
- "use client";
2
- import {
3
- __async
4
- } from "../../../chunk-MMUBH76A.js";
5
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- import { CpslButton, CpslText } from "@getpara/react-components";
7
- import { StepContainer, InnerStepContainer, HeroIcon } from "../common.js";
8
- import { useModalStore, useThemeStore } from "../../stores/index.js";
9
- import { ModalStep } from "../../utils/steps.js";
10
- import { WalletCard, WalletCards } from "../WalletCard/WalletCard.js";
11
- import styled from "styled-components";
12
- import { useInternalClient } from "../../../provider/hooks/utils/useInternalClient.js";
13
- const WalletCreationDoneStep = ({ twoFactorAuthEnabled, onClose }) => {
14
- const hideWallets = useThemeStore((state) => state.hideWallets);
15
- const setStep = useModalStore((state) => state.setStep);
16
- const isLogin = useModalStore((state) => state.isLogin());
17
- const onRampConfig = useModalStore((state) => state.onRampConfig);
18
- const para = useInternalClient();
19
- const isOnRampConfigured = (onRampConfig == null ? void 0 : onRampConfig.isBuyEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isReceiveEnabled) || (onRampConfig == null ? void 0 : onRampConfig.isWithdrawEnabled);
20
- const handleNext = () => __async(void 0, null, function* () {
21
- if (isLogin) {
22
- if (!twoFactorAuthEnabled) {
23
- setStep(ModalStep.LOGIN_DONE);
24
- return;
25
- }
26
- const is2FAComplete = yield para.check2FAStatus();
27
- setStep(is2FAComplete ? ModalStep.LOGIN_DONE : ModalStep.SETUP_2FA);
28
- } else {
29
- if (twoFactorAuthEnabled) {
30
- setStep(ModalStep.SETUP_2FA);
31
- } else {
32
- onClose();
33
- }
34
- }
35
- });
36
- return /* @__PURE__ */ jsxs(StepContainer, { $wide: true, children: [
37
- /* @__PURE__ */ jsx(CardContainer, { children: hideWallets ? /* @__PURE__ */ jsxs(Fragment, { children: [
38
- /* @__PURE__ */ jsx(HeroIcon, { icon: "checkCircleFilled" }),
39
- /* @__PURE__ */ jsx(CpslText, { variant: "bodyM", color: "secondary", weight: "medium", style: { marginTop: "16px" }, children: "Your account has been created." })
40
- ] }) : /* @__PURE__ */ jsx(WalletCards, { children: para.currentWalletIdsArray.map(([id, type]) => {
41
- return /* @__PURE__ */ jsx(WalletCard, { id, type, showAddFunds: isOnRampConfigured }, id);
42
- }) }) }),
43
- /* @__PURE__ */ jsx(InnerStepContainer, { children: /* @__PURE__ */ jsx(CpslButton, { fullWidth: true, onClick: handleNext, children: twoFactorAuthEnabled ? "Continue" : "Done" }) })
44
- ] });
45
- };
46
- const CardContainer = styled(InnerStepContainer)`
47
- min-height: 196px;
48
- justify-content: center;
49
- `;
50
- export {
51
- WalletCreationDoneStep
52
- };
@@ -1,96 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- import { CpslIcon, CpslInput, CpslText, CpslTileButton } from "@getpara/react-components";
4
- import { styled } from "styled-components";
5
- const SpinnerContainer = styled.div`
6
- display: flex;
7
- align-items: center;
8
- justify-content: center;
9
- `;
10
- const QRContainer = styled.div`
11
- display: flex;
12
- justify-content: center;
13
- align-items: center;
14
- width: 286px;
15
- height: 286px;
16
- `;
17
- const InfoBoxContent = styled.div`
18
- display: flex;
19
- flex-direction: column;
20
- gap: 8px;
21
- `;
22
- const InfoBoxHeader = styled.div`
23
- display: flex;
24
- align-items: center;
25
- gap: 4px;
26
-
27
- cpsl-icon {
28
- --height: 20px;
29
- --width: 20px;
30
- }
31
- `;
32
- const FilledDisabledInput = styled(CpslInput)`
33
- --container-border-color: var(--cpsl-color-input-border-placeholder);
34
- --container-background-color: var(--cpsl-color-background-0);
35
- --input-background-color: transparent;
36
- --input-font-weight: 500;
37
- --input-color: var(--cpsl-color-text-secondary);
38
- `;
39
- const FullWidthFilledDisabledInput = styled(FilledDisabledInput)`
40
- width: 100%;
41
- `;
42
- const CenteredText = styled(CpslText)`
43
- width: 100%;
44
- text-align: center;
45
- `;
46
- const InnerStepContainer = styled.div`
47
- width: 100%;
48
- height: 100%;
49
- align-self: center;
50
- display: flex;
51
- flex-direction: column;
52
- align-items: center;
53
- gap: 8px;
54
- `;
55
- const StepContainer = styled(InnerStepContainer)`
56
- gap: ${({ $wide }) => $wide ? "32px" : "24px"};
57
- `;
58
- const Heading = styled(CenteredText)``;
59
- const StyledCpslTileButton = styled(CpslTileButton)`
60
- --button-width: 100%;
61
- --button-height: 87px;
62
- --button-icon-height: 32px;
63
- --button-icon-width: 32px;
64
- `;
65
- const HeroIcon = styled(CpslIcon)`
66
- --height: 80px;
67
- --width: 80px;
68
- --icon-color: var(--cpsl-color-text-primary);
69
- `;
70
- const ErrorContainer = styled.div`
71
- display: flex;
72
- align-items: center;
73
- justify-content: center;
74
- gap: 4px;
75
- `;
76
- const ErrorIcon = styled(CpslIcon)`
77
- --height: 16px;
78
- --width: 16px;
79
- --icon-color: var(--cpsl-color-text-error);
80
- `;
81
- export {
82
- CenteredText,
83
- ErrorContainer,
84
- ErrorIcon,
85
- FilledDisabledInput,
86
- FullWidthFilledDisabledInput,
87
- Heading,
88
- HeroIcon,
89
- InfoBoxContent,
90
- InfoBoxHeader,
91
- InnerStepContainer,
92
- QRContainer,
93
- SpinnerContainer,
94
- StepContainer,
95
- StyledCpslTileButton
96
- };
@@ -1,2 +0,0 @@
1
- "use client";
2
- export * from "./ModalContent/ModalContent.js";
@@ -1,111 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- import { Network, OnRampAsset, OnRampMethod, OnRampProvider } from "@getpara/core-sdk";
4
- const PARA_CONNECT = "https://connect.getpara.com/";
5
- const PARA_TERMS_AND_CONDITIONS = "https://getpara.com/terms";
6
- const ON_RAMP_PROVIDERS = {
7
- [OnRampProvider.STRIPE]: {
8
- name: "Stripe",
9
- feeLower: 0.99,
10
- feeUpper: 4.49,
11
- methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
12
- icon: "stripeBrand",
13
- backgroundColors: ["#6772E5", "#808AF4"]
14
- },
15
- [OnRampProvider.RAMP]: {
16
- name: "Ramp",
17
- feeLower: 0.99,
18
- feeUpper: 4.49,
19
- methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
20
- icon: "rampNetworkBrand",
21
- backgroundColors: ["#21BF73", "#3AE492"]
22
- },
23
- [OnRampProvider.MOONPAY]: {
24
- name: "MoonPay",
25
- feeLower: 1,
26
- feeUpper: 4.5,
27
- methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
28
- icon: "moonpayBrand",
29
- backgroundColors: ["#7715F5", "#9647fd"]
30
- }
31
- };
32
- const NETWORKS = {
33
- [Network.ETHEREUM]: { name: "Ethereum", icon: "ethereum" },
34
- [Network.SEPOLIA]: { name: "Sepolia", icon: "ethereum" },
35
- [Network.ARBITRUM]: { name: "Arbitrum", icon: "arbitrumBrand" },
36
- [Network.BASE]: { name: "Base", icon: "baseBrand" },
37
- [Network.OPTIMISM]: { name: "Optimism", icon: "optimismBrand" },
38
- [Network.POLYGON]: { name: "Polygon", icon: "polygonBrand" },
39
- [Network.SOLANA]: { name: "Solana", icon: "solana" },
40
- [Network.COSMOS]: { name: "Cosmos", icon: "cosmos" },
41
- [Network.CELO]: { name: "Celo", icon: "celoBrand" },
42
- [Network.NOBLE]: { name: "Noble", icon: "nobleBrand" }
43
- };
44
- const ON_RAMP_ASSETS = {
45
- [OnRampAsset.ETHEREUM]: { name: "Ethereum", code: "ETH", icon: "ethereum" },
46
- [OnRampAsset.USDC]: { name: "USDC", code: "USDC", icon: "usdcBrand" },
47
- [OnRampAsset.POLYGON]: { name: "Polygon", code: "MATIC", icon: "polygonBrand" },
48
- [OnRampAsset.SOLANA]: { name: "Solana", code: "SOL", icon: "solana" },
49
- [OnRampAsset.ATOM]: { name: "Atom", code: "ATOM", icon: "cosmos" },
50
- [OnRampAsset.CELO]: { name: "Celo", code: "CELO", icon: "celoBrand" },
51
- [OnRampAsset.TETHER]: { name: "Tether", code: "USDT", icon: "tetherBrand" },
52
- [OnRampAsset.CUSD]: { name: "Celo Dollar", code: "CUSD", icon: "celoBrand" },
53
- [OnRampAsset.CEUR]: { name: "Celo Euro", code: "CEUR", icon: "celoBrand" },
54
- [OnRampAsset.CREAL]: { name: "Celo Real", code: "CREAL", icon: "celoBrand" }
55
- };
56
- function getNetworkName(str) {
57
- var _a, _b;
58
- return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.name) != null ? _b : `${str[0]}${str.slice(1).toLowerCase()}`;
59
- }
60
- function getNetworkIcon(str) {
61
- var _a, _b;
62
- return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.icon) != null ? _b : "globe";
63
- }
64
- function getAssetName(str) {
65
- var _a, _b;
66
- return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.code) != null ? _b : str;
67
- }
68
- function getAssetIcon(str) {
69
- var _a, _b;
70
- return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.icon) != null ? _b : "emptyCircle";
71
- }
72
- const MOBILE_SIZE = 480;
73
- const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
74
- const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
75
- const BODY_MOTION_VARIANTS = {
76
- enter: (direction) => {
77
- return {
78
- scale: direction > 0 ? 0.9 : 1.1,
79
- opacity: 0
80
- };
81
- },
82
- center: {
83
- scale: 1,
84
- opacity: 1
85
- },
86
- exit: (direction) => {
87
- return {
88
- scale: direction < 0 ? 0.9 : 1.1,
89
- opacity: 0
90
- };
91
- }
92
- };
93
- const BODY_TRANSITION = {
94
- duration: 0.2
95
- };
96
- export {
97
- BODY_MOTION_VARIANTS,
98
- BODY_TRANSITION,
99
- EMAIL_REGEX,
100
- MOBILE_SIZE,
101
- NETWORKS,
102
- NETWORK_NOT_SUPPORTED_ERROR,
103
- ON_RAMP_ASSETS,
104
- ON_RAMP_PROVIDERS,
105
- PARA_CONNECT,
106
- PARA_TERMS_AND_CONDITIONS,
107
- getAssetIcon,
108
- getAssetName,
109
- getNetworkIcon,
110
- getNetworkName
111
- };
@@ -1,10 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- const DEFAULTS = {
4
- LOGGIN_POLLING_DELAY_MS: 5e3,
5
- POLLING_INTERVAL_MS: 2e3,
6
- ANIMATION_DURATION: 0.15
7
- };
8
- export {
9
- DEFAULTS
10
- };
@@ -1,24 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- const brandedOAuthLogos = {
4
- GOOGLE: "googleBrand",
5
- TWITTER: "twitter",
6
- APPLE: "apple",
7
- DISCORD: "discordBrand",
8
- FACEBOOK: "facebookBrand",
9
- FARCASTER: "farcasterBrand",
10
- TELEGRAM: "telegramBrand"
11
- };
12
- const oAuthLogos = {
13
- GOOGLE: "google",
14
- TWITTER: "twitter",
15
- APPLE: "apple",
16
- DISCORD: "discord",
17
- FACEBOOK: "facebook",
18
- FARCASTER: "farcaster",
19
- TELEGRAM: "telegram"
20
- };
21
- export {
22
- brandedOAuthLogos,
23
- oAuthLogos
24
- };
@@ -1 +0,0 @@
1
- export declare function useActiveWallet(): Omit<import("@getpara/core-sdk").Wallet, "signer">;
@@ -1,15 +0,0 @@
1
- "use client";
2
- import "../../chunk-MMUBH76A.js";
3
- import { useMemo } from "react";
4
- import { useWalletState } from "../../provider/index.js";
5
- import { useInternalClient } from "../../provider/hooks/utils/useInternalClient.js";
6
- function useActiveWallet() {
7
- const client = useInternalClient();
8
- const { selectedWallet } = useWalletState();
9
- return useMemo(() => {
10
- return client.findWallet(selectedWallet.id, selectedWallet.type, { forbidPregen: true });
11
- }, [client, selectedWallet]);
12
- }
13
- export {
14
- useActiveWallet
15
- };
@@ -1,4 +0,0 @@
1
- export declare function useCreateAccount(): {
2
- withPasskey: () => void;
3
- withPassword: () => void;
4
- };