@getpara/react-sdk 2.0.0-dev.1 → 2.0.0-dev.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 (265) hide show
  1. package/dist/cli/cli.mjs +22 -7
  2. package/dist/index.d.ts +0 -1
  3. package/dist/index.js +6 -7058
  4. package/dist/modal/ParaModal.js +301 -0
  5. package/dist/modal/components/Account/Account.js +148 -0
  6. package/dist/modal/components/Account/AccountProfile.d.ts +1 -0
  7. package/dist/modal/components/Account/AccountProfile.js +168 -0
  8. package/dist/modal/components/Account/AccountProfileLink.d.ts +1 -0
  9. package/dist/modal/components/Account/AccountProfileLink.js +206 -0
  10. package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +1 -0
  11. package/dist/modal/components/Account/AccountProfileLinkOptions.js +111 -0
  12. package/dist/modal/components/Account/AccountProfileUnlink.d.ts +1 -0
  13. package/dist/modal/components/Account/AccountProfileUnlink.js +47 -0
  14. package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -2
  15. package/dist/modal/components/AddFunds/AddFunds.js +69 -0
  16. package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +1 -0
  17. package/dist/modal/components/AddFunds/AddFundsAsset.js +125 -0
  18. package/dist/modal/components/AddFunds/AddFundsAwaiting.js +78 -0
  19. package/dist/modal/components/AddFunds/AddFundsContext.d.ts +31 -0
  20. package/dist/modal/components/AddFunds/AddFundsContext.js +160 -0
  21. package/dist/modal/components/AddFunds/AddFundsDone.js +49 -0
  22. package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +1 -0
  23. package/dist/modal/components/AddFunds/AddFundsProvider.js +109 -0
  24. package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +1 -0
  25. package/dist/modal/components/AddFunds/AddFundsReceive.js +83 -0
  26. package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +1 -0
  27. package/dist/modal/components/AddFunds/AddFundsSettings.js +237 -0
  28. package/dist/{MoonPayEmbed-Q2HP2BFI.js → modal/components/AddFunds/MoonPayEmbed.js} +1 -3
  29. package/dist/modal/components/AddFunds/common.d.ts +19 -0
  30. package/dist/modal/components/AddFunds/common.js +24 -0
  31. package/dist/modal/components/AddFunds/index.js +4 -0
  32. package/dist/modal/components/AuthInput/AuthInput.d.ts +17 -3
  33. package/dist/modal/components/AuthInput/AuthInput.js +277 -0
  34. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +33 -0
  35. package/dist/modal/components/AuthInput/phoneMasks.js +253 -0
  36. package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +4 -3
  37. package/dist/modal/components/AuthMainStep/AuthMainStep.js +50 -0
  38. package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +4 -3
  39. package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +164 -0
  40. package/dist/modal/components/AuthOptions/AuthOptions.d.ts +4 -3
  41. package/dist/modal/components/AuthOptions/AuthOptions.js +85 -0
  42. package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +18 -0
  43. package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +10 -0
  44. package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +18 -0
  45. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +5 -1
  46. package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +49 -0
  47. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -1
  48. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +62 -0
  49. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -1
  50. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +48 -0
  51. package/dist/modal/components/Body/AnimatedHeightWrapper.js +29 -0
  52. package/dist/modal/components/Body/Body.d.ts +4 -3
  53. package/dist/modal/components/Body/Body.js +350 -0
  54. package/dist/modal/components/ChainSwitch/ChainSwitch.js +95 -0
  55. package/dist/modal/components/ChainSwitch/config.js +17 -0
  56. package/dist/modal/components/Controls/Controls.js +78 -0
  57. package/dist/modal/components/Controls/Selects.js +173 -0
  58. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +1 -0
  59. package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +75 -0
  60. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +7 -0
  61. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +175 -0
  62. package/dist/modal/components/ExternalWalletStep/config.js +17 -0
  63. package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +39 -0
  64. package/dist/modal/components/ExternalWallets/ExternalWallets.js +184 -0
  65. package/dist/modal/components/Footer/Footer.js +95 -0
  66. package/dist/modal/components/Header/Header.js +43 -0
  67. package/dist/modal/components/Header/hooks/useStepTitle.js +61 -0
  68. package/dist/modal/components/Hero/Hero.js +116 -0
  69. package/dist/modal/components/IFrameStep/IFrameStep.js +59 -0
  70. package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +4 -0
  71. package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +44 -0
  72. package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -4
  73. package/dist/modal/components/ModalContent/ModalContent.js +88 -0
  74. package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +1 -0
  75. package/dist/modal/components/OAuth/FarcasterOAuthStep.js +31 -0
  76. package/dist/modal/components/OAuth/OAuth.d.ts +2 -2
  77. package/dist/modal/components/OAuth/OAuth.js +79 -0
  78. package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +7 -0
  79. package/dist/modal/components/OAuth/TelegramOAuthStep.js +74 -0
  80. package/dist/modal/components/OnRampComponents/AddingFunds.js +23 -0
  81. package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +77 -0
  82. package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +107 -0
  83. package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +132 -0
  84. package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +27 -0
  85. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +12 -1
  86. package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +160 -0
  87. package/dist/modal/components/Waiting/Waiting.js +17 -0
  88. package/dist/modal/components/WalletCard/PartnerIcon.js +34 -0
  89. package/dist/modal/components/WalletCard/WalletCard.d.ts +3 -3
  90. package/dist/modal/components/WalletCard/WalletCard.js +128 -0
  91. package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +83 -0
  92. package/dist/modal/components/common.d.ts +49 -13
  93. package/dist/modal/components/common.js +261 -0
  94. package/dist/modal/components/index.js +2 -0
  95. package/dist/modal/constants/constants.d.ts +10 -2
  96. package/dist/modal/constants/constants.js +142 -0
  97. package/dist/modal/constants/defaults.js +10 -0
  98. package/dist/modal/constants/oAuthLogos.d.ts +15 -6
  99. package/dist/modal/constants/oAuthLogos.js +158 -0
  100. package/dist/modal/constants/walletTypeConfig.d.ts +6 -0
  101. package/dist/modal/constants/walletTypeConfig.js +13 -0
  102. package/dist/modal/hooks/useGoBack.js +43 -0
  103. package/dist/modal/hooks/useTelegramLogin.d.ts +12 -0
  104. package/dist/modal/hooks/useTelegramLogin.js +65 -0
  105. package/dist/modal/index.d.ts +1 -1
  106. package/dist/modal/index.js +29 -0
  107. package/dist/modal/stores/index.d.ts +0 -1
  108. package/dist/modal/stores/index.js +2 -0
  109. package/dist/modal/stores/modal/actions.js +135 -0
  110. package/dist/modal/stores/modal/useModalStore.d.ts +17 -16
  111. package/dist/modal/stores/modal/useModalStore.js +73 -0
  112. package/dist/modal/types/commonTypes.js +1 -0
  113. package/dist/modal/types/modalProps.d.ts +15 -2
  114. package/dist/modal/types/modalProps.js +12 -0
  115. package/dist/modal/utils/authInputHelpers.d.ts +5 -0
  116. package/dist/modal/utils/authInputHelpers.js +41 -0
  117. package/dist/modal/utils/authLayoutHelpers.js +8 -0
  118. package/dist/modal/utils/countryCodes.js +45 -0
  119. package/dist/modal/utils/getMailtoLink.js +10 -0
  120. package/dist/modal/utils/getTileButtonFlex.js +20 -0
  121. package/dist/modal/utils/getWalletDisplayName.d.ts +5 -0
  122. package/dist/modal/utils/getWalletDisplayName.js +22 -0
  123. package/dist/modal/utils/isPasskeySupported.js +15 -0
  124. package/dist/modal/utils/openPopup.js +60 -0
  125. package/dist/modal/utils/routeMobileExternalWallet.js +31 -0
  126. package/dist/modal/utils/steps.d.ts +21 -2
  127. package/dist/modal/utils/steps.js +273 -0
  128. package/dist/modal/utils/stringFormatters.d.ts +1 -0
  129. package/dist/modal/utils/stringFormatters.js +19 -0
  130. package/dist/modal/utils/validateOnRampConfig.js +32 -0
  131. package/dist/package.json +6 -0
  132. package/dist/provider/ParaProvider.js +117 -0
  133. package/dist/provider/actions/getEmbeddedAccount.d.ts +26 -0
  134. package/dist/provider/actions/getEmbeddedAccount.js +52 -0
  135. package/dist/provider/actions/getWallet.d.ts +3 -3
  136. package/dist/provider/actions/getWallet.js +18 -0
  137. package/dist/provider/actions/index.d.ts +40 -18
  138. package/dist/provider/actions/index.js +79 -0
  139. package/dist/provider/actions/utils.d.ts +4 -3
  140. package/dist/provider/actions/utils.js +34 -0
  141. package/dist/provider/components/CosmosWalletWrapper.js +43 -0
  142. package/dist/provider/components/EvmWalletWrapper.js +43 -0
  143. package/dist/provider/components/ExternalWalletWrapper.js +140 -0
  144. package/dist/provider/components/SolanaWalletWrapper.js +44 -0
  145. package/dist/provider/external/getParaCosmosConnector.js +19 -0
  146. package/dist/provider/external/getParaCosmosLib.d.ts +4 -0
  147. package/dist/provider/external/getParaCosmosLib.js +16 -0
  148. package/dist/provider/external/getParaEvmConnector.js +19 -0
  149. package/dist/provider/external/getParaEvmLib.d.ts +4 -0
  150. package/dist/provider/external/getParaEvmLib.js +16 -0
  151. package/dist/provider/external/getParaSolanaConnector.js +19 -0
  152. package/dist/provider/external/getParaSolanaLib.d.ts +4 -0
  153. package/dist/provider/external/getParaSolanaLib.js +16 -0
  154. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +1 -11
  155. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +8 -0
  156. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +1 -2
  157. package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +8 -0
  158. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +1 -7
  159. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +8 -0
  160. package/dist/provider/hooks/index.js +4 -0
  161. package/dist/provider/hooks/mutations/core.d.ts +27 -0
  162. package/dist/provider/hooks/mutations/core.js +66 -0
  163. package/dist/provider/hooks/mutations/index.d.ts +3 -34
  164. package/dist/provider/hooks/mutations/index.js +9 -0
  165. package/dist/provider/hooks/mutations/useLinkAccount.d.ts +9 -0
  166. package/dist/provider/hooks/mutations/useLinkAccount.js +18 -0
  167. package/dist/provider/hooks/mutations/utils.d.ts +11 -3
  168. package/dist/provider/hooks/mutations/utils.js +90 -0
  169. package/dist/provider/hooks/queries/core.d.ts +4 -0
  170. package/dist/provider/hooks/queries/core.js +16 -0
  171. package/dist/provider/hooks/queries/index.d.ts +2 -0
  172. package/dist/provider/hooks/queries/index.js +11 -0
  173. package/dist/provider/hooks/queries/useAccount.d.ts +86 -7
  174. package/dist/provider/hooks/queries/useAccount.js +135 -0
  175. package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +5 -0
  176. package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +24 -0
  177. package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
  178. package/dist/provider/hooks/queries/useWallet.js +26 -0
  179. package/dist/provider/hooks/queries/useWalletBalance.d.ts +6 -0
  180. package/dist/provider/hooks/queries/useWalletBalance.js +55 -0
  181. package/dist/provider/hooks/queries/utils.d.ts +7 -0
  182. package/dist/provider/hooks/queries/utils.js +25 -0
  183. package/dist/provider/hooks/utils/index.js +10 -0
  184. package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +74 -0
  185. package/dist/provider/hooks/utils/useClient.d.ts +1 -1
  186. package/dist/provider/hooks/utils/useClient.js +10 -0
  187. package/dist/provider/hooks/utils/useEventListeners.d.ts +1 -1
  188. package/dist/provider/hooks/utils/useEventListeners.js +157 -0
  189. package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +4 -0
  190. package/dist/provider/hooks/utils/useFormattedBiometricHints.js +27 -0
  191. package/dist/provider/hooks/utils/useInternalClient.js +10 -0
  192. package/dist/provider/hooks/utils/useModal.d.ts +4 -1
  193. package/dist/provider/hooks/utils/useModal.js +27 -0
  194. package/dist/provider/hooks/utils/useWalletState.d.ts +3 -3
  195. package/dist/provider/hooks/utils/useWalletState.js +48 -0
  196. package/dist/provider/index.d.ts +2 -0
  197. package/dist/provider/index.js +11 -0
  198. package/dist/provider/providers/AccountLinkProvider.d.ts +47 -0
  199. package/dist/provider/providers/AccountLinkProvider.js +452 -0
  200. package/dist/provider/providers/AuthProvider.d.ts +12 -6
  201. package/dist/provider/providers/AuthProvider.js +523 -0
  202. package/dist/provider/providers/CosmosExternalWalletProvider.js +66 -0
  203. package/dist/provider/providers/EvmExternalWalletProvider.js +74 -0
  204. package/dist/provider/providers/ExternalWalletProvider.d.ts +23 -43
  205. package/dist/provider/providers/ExternalWalletProvider.js +596 -0
  206. package/dist/provider/providers/SolanaExternalWalletProvider.js +66 -0
  207. package/dist/provider/stores/getters.d.ts +1 -1
  208. package/dist/provider/stores/getters.js +13 -0
  209. package/dist/provider/stores/setters.js +7 -0
  210. package/dist/provider/stores/slices/analytics.d.ts +3 -0
  211. package/dist/provider/stores/slices/analytics.js +9 -0
  212. package/dist/provider/stores/slices/client.js +9 -0
  213. package/dist/provider/stores/slices/config.js +9 -0
  214. package/dist/provider/stores/slices/externalWallets.js +46 -0
  215. package/dist/provider/stores/slices/index.d.ts +1 -0
  216. package/dist/provider/stores/slices/index.js +6 -0
  217. package/dist/provider/stores/slices/modal.js +18 -0
  218. package/dist/provider/stores/slices/wallet.js +13 -0
  219. package/dist/provider/stores/types.d.ts +19 -5
  220. package/dist/provider/stores/types.js +1 -0
  221. package/dist/provider/stores/useStore.js +34 -0
  222. package/dist/provider/types/externalWalletProviders.js +1 -0
  223. package/dist/provider/types/provider.d.ts +23 -4
  224. package/dist/provider/types/provider.js +1 -0
  225. package/dist/provider/types/query.js +1 -0
  226. package/dist/provider/types/utils.d.ts +28 -5
  227. package/dist/provider/types/utils.js +1 -0
  228. package/dist/provider/utils/constants.d.ts +5 -0
  229. package/dist/provider/utils/constants.js +10 -0
  230. package/dist/provider/utils/paraConfigTypeGuards.js +13 -0
  231. package/dist/provider/utils/renameMutations.d.ts +2 -2
  232. package/dist/provider/utils/renameMutations.js +18 -0
  233. package/package.json +40 -39
  234. package/dist/MoonPayEmbed-Q2HP2BFI.js.br +0 -0
  235. package/dist/MoonPayEmbed-Q2HP2BFI.js.gz +0 -0
  236. package/dist/chunk-MMUBH76A.js.br +0 -0
  237. package/dist/chunk-MMUBH76A.js.gz +0 -0
  238. package/dist/index.js.br +0 -0
  239. package/dist/index.js.gz +0 -0
  240. package/dist/modal/components/StripeComponents/StripeComponents.d.ts +0 -16
  241. package/dist/modal/hooks/useCreateAccount.d.ts +0 -4
  242. package/dist/modal/stores/userInfo/actions.d.ts +0 -3
  243. package/dist/modal/stores/userInfo/useUserInfoStore.d.ts +0 -19
  244. package/dist/provider/actions/checkIfUserExists.d.ts +0 -4
  245. package/dist/provider/actions/createUser.d.ts +0 -4
  246. package/dist/provider/actions/getAccount.d.ts +0 -10
  247. package/dist/provider/actions/initiateLogin.d.ts +0 -4
  248. package/dist/provider/actions/keepSessionAlive.d.ts +0 -2
  249. package/dist/provider/actions/logout.d.ts +0 -5
  250. package/dist/provider/actions/signMessage.d.ts +0 -8
  251. package/dist/provider/actions/signTransaction.d.ts +0 -8
  252. package/dist/provider/actions/waitForAccountCreation.d.ts +0 -5
  253. package/dist/provider/actions/waitForLoginAndSetup.d.ts +0 -6
  254. package/dist/provider/actions/waitForPasskeyAndCreateWallet.d.ts +0 -2
  255. package/dist/provider/hooks/mutations/useCheckIfUserExists.d.ts +0 -13
  256. package/dist/provider/hooks/mutations/useCreateUser.d.ts +0 -13
  257. package/dist/provider/hooks/mutations/useInitiateLogin.d.ts +0 -14
  258. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -12
  259. package/dist/provider/hooks/mutations/useLogout.d.ts +0 -13
  260. package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -15
  261. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -15
  262. package/dist/provider/hooks/mutations/useWaitForAccountCreation.d.ts +0 -13
  263. package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.d.ts +0 -14
  264. package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.d.ts +0 -13
  265. /package/dist/modal/{components/AuthInput → utils}/countryCodes.d.ts +0 -0
@@ -1,16 +0,0 @@
1
- import { OnrampSessionResult } from '@stripe/crypto';
2
- export declare const STRIPE_PUBLISHABLE_KEY = "pk_live_51MvquNGrzDeP5yP9EgVSMBPQbrbg0oHDjPIIXypePd0jzOFjbadyfO7wBKLHhUtbKIUiEUVC3YYcTJyAmJ8xA7JE00T2UDfYKz";
3
- export declare const STRIPE_PUBLISHABLE_KEY_TEST = "pk_test_51MvquNGrzDeP5yP98WgPaAUgQ50I3OpfPhVfiLO47FBHepJnZRPO62IzZY2uxT5ovhSS10RwcTcnaVil1mcJOzIi00dHapODdS";
4
- export declare const CryptoElements: ({ stripeOnramp, children }: {
5
- stripeOnramp: any;
6
- children: any;
7
- }) => import("react/jsx-runtime").JSX.Element;
8
- export declare const useStripeOnramp: () => any;
9
- export declare const OnrampElement: ({ clientSecret, appearance, onReady, onSessionChange, ...props }: {
10
- clientSecret: string;
11
- appearance: "dark" | "light";
12
- onReady?: () => void;
13
- onSessionChange: (_: {
14
- session: OnrampSessionResult;
15
- }) => void;
16
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,4 +0,0 @@
1
- export declare function useCreateAccount(): {
2
- withPasskey: () => void;
3
- withPassword: () => void;
4
- };
@@ -1,3 +0,0 @@
1
- import { StoreApi } from 'zustand';
2
- import { UserInfoActions, UserInfoStore } from './useUserInfoStore.js';
3
- export declare const getActions: (set: StoreApi<UserInfoStore>["setState"], get: StoreApi<UserInfoStore>["getState"]) => UserInfoActions;
@@ -1,19 +0,0 @@
1
- import { PrimaryAuth } from '@getpara/user-management-client';
2
- import { ModalAuthInfo } from '@getpara/react-common';
3
- type SetAuthInfo = PrimaryAuth & Partial<Pick<ModalAuthInfo, 'pfpUrl' | 'displayName'>>;
4
- type UserInfoState = {
5
- auth: PrimaryAuth | null;
6
- pfpUrl: string | null;
7
- displayName: string | null;
8
- recoveryShare: string | null;
9
- };
10
- export interface UserInfoActions {
11
- resetState: () => void;
12
- setAuthInfo: (auth: SetAuthInfo) => void;
13
- getAuthInfo: () => ModalAuthInfo | null;
14
- setRecoveryShare: (recoveryShare: string | null) => void;
15
- }
16
- export type UserInfoStore = UserInfoState & UserInfoActions;
17
- export declare const DEFAULT_USER_INFO_STATE: UserInfoState;
18
- export declare const useUserInfoStore: import("zustand").UseBoundStore<import("zustand").StoreApi<UserInfoStore>>;
19
- export {};
@@ -1,4 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- import { Auth } from '@getpara/user-management-client';
3
- export type CheckIfUserExistsArgs = Auth<'email'> | Auth<'phone'>;
4
- export declare const checkIfUserExists: (para?: ParaWeb, args?: CheckIfUserExistsArgs) => Promise<boolean>;
@@ -1,4 +0,0 @@
1
- import { Auth } from '@getpara/user-management-client';
2
- import ParaWeb from '@getpara/web-sdk';
3
- export type CreateUserArgs = Auth<'email'> | Auth<'phone'>;
4
- export declare const createUser: (para?: ParaWeb, args?: CreateUserArgs) => Promise<void>;
@@ -1,10 +0,0 @@
1
- import ParaWeb, { Wallet } from '@getpara/web-sdk';
2
- type AccountType = {
3
- isConnected: boolean;
4
- email?: string;
5
- phone?: string;
6
- wallets?: Pick<Wallet, 'id' | 'type' | 'name' | 'address' | 'isExternal'>[];
7
- userId?: string;
8
- };
9
- export declare const getAccount: (para?: ParaWeb) => Promise<AccountType>;
10
- export {};
@@ -1,4 +0,0 @@
1
- import { PrimaryAuth } from '@getpara/user-management-client';
2
- import ParaWeb from '@getpara/web-sdk';
3
- export type InitiateLoginArgs = PrimaryAuth;
4
- export declare const initiateLogin: (para?: ParaWeb, args?: InitiateLoginArgs) => Promise<Set<import("@getpara/user-management-client").AuthMethod>>;
@@ -1,2 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export declare const keepSessionAlive: (para?: ParaWeb) => Promise<void>;
@@ -1,5 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export interface LogoutArgs {
3
- clearPregenWallets?: boolean;
4
- }
5
- export declare const logout: (para?: ParaWeb, args?: LogoutArgs) => Promise<void>;
@@ -1,8 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export interface SignMessageArgs {
3
- walletId: string;
4
- messageBase64: string;
5
- timeoutMs?: number;
6
- cosmosSignDocBase64?: string;
7
- }
8
- export declare const signMessage: (para?: ParaWeb, args?: SignMessageArgs) => Promise<import("@getpara/web-sdk").FullSignatureRes>;
@@ -1,8 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export interface SignTransactionArgs {
3
- walletId: string;
4
- rlpEncodedTxBase64: string;
5
- chainId: string;
6
- timeoutMs?: number;
7
- }
8
- export declare const signTransaction: (para?: ParaWeb, args?: SignTransactionArgs) => Promise<import("@getpara/web-sdk").FullSignatureRes>;
@@ -1,5 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export interface waitForAccountCreationArgs {
3
- popupWindow?: Window | null;
4
- }
5
- export declare const waitForAccountCreation: (para?: ParaWeb, args?: waitForAccountCreationArgs) => Promise<true>;
@@ -1,6 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export interface WaitForLoginAndSetupArgs {
3
- popupWindow?: Window | null;
4
- skipSessionRefresh?: boolean;
5
- }
6
- export declare const waitForLoginAndSetup: (para?: ParaWeb, args?: WaitForLoginAndSetupArgs) => Promise<import("@getpara/web-sdk").LoginResponse>;
@@ -1,2 +0,0 @@
1
- import ParaWeb from '@getpara/web-sdk';
2
- export declare const waitForPasskeyAndCreateWallet: (para?: ParaWeb) => Promise<import("@getpara/web-sdk").AccountSetupResponse>;
@@ -1,13 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { CheckIfUserExistsArgs } from '../../actions/checkIfUserExists.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { UseMutationReturnType } from '../../types/query.js';
5
- type UseCheckIfUserExistsReturnType<TData = boolean, TError = Error, TVariables = CheckIfUserExistsArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
6
- checkIfUserExists: UseMutateFunction<TData, TError, TVariables, TContext>;
7
- checkIfUserExistsAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
8
- }>;
9
- /**
10
- * Hook for checking is a user exists
11
- */
12
- export declare const useCheckIfUserExists: () => UseCheckIfUserExistsReturnType<boolean, Error, CheckIfUserExistsArgs, unknown>;
13
- export {};
@@ -1,13 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { CreateUserArgs } from '../../actions/createUser.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { UseMutationReturnType } from '../../types/query.js';
5
- type UseCreateUserReturnType<TData = void, TError = Error, TVariables = CreateUserArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
6
- createUser: UseMutateFunction<TData, TError, TVariables, TContext>;
7
- createUserAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
8
- }>;
9
- /**
10
- * Hook for creating a new user
11
- */
12
- export declare const useCreateUser: () => UseCreateUserReturnType<void, Error, CreateUserArgs, unknown>;
13
- export {};
@@ -1,14 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { InitiateLoginArgs } from '../../actions/initiateLogin.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { UseMutationReturnType } from '../../types/query.js';
5
- import { AuthMethod } from '@getpara/web-sdk';
6
- type UseInitiateLoginReturnType<TData = Set<AuthMethod>, TError = Error, TVariables = InitiateLoginArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
7
- initiateLogin: UseMutateFunction<TData, TError, TVariables, TContext>;
8
- initiateLoginAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
9
- }>;
10
- /**
11
- * Hook for initiating a user login
12
- */
13
- export declare const useInitiateLogin: () => UseInitiateLoginReturnType<Set<AuthMethod>, Error, import("@getpara/user-management-client").PrimaryAuth, unknown>;
14
- export {};
@@ -1,12 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { Compute } from '../../types/utils.js';
3
- import { UseMutationReturnType } from '../../types/query.js';
4
- type UseKeepSessionAliveReturnType<TData = void, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
5
- keepSessionAlive: UseMutateFunction<TData, TError, TVariables, TContext>;
6
- keepSessionAliveAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
7
- }>;
8
- /**
9
- * Hook for keeping a session alive
10
- */
11
- export declare const useKeepSessionAlive: () => UseKeepSessionAliveReturnType<void, Error, void, unknown>;
12
- export {};
@@ -1,13 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { LogoutArgs } from '../../actions/logout.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { UseMutationReturnType } from '../../types/query.js';
5
- type UseLogoutReturnType<TData = void, TError = Error, TVariables = LogoutArgs | undefined, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
6
- logout: UseMutateFunction<TData, TError, TVariables, TContext>;
7
- logoutAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
8
- }>;
9
- /**
10
- * Hook for logging out a user
11
- */
12
- export declare const useLogout: () => UseLogoutReturnType<void, Error, LogoutArgs | undefined, unknown>;
13
- export {};
@@ -1,15 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { SignMessageArgs } from '../../actions/signMessage.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { UseMutationReturnType } from '../../types/query.js';
5
- import { FullSignatureRes } from '@getpara/web-sdk';
6
- type SignMessageMutationArgs = Omit<SignMessageArgs, 'walletId'> & Partial<Pick<SignMessageArgs, 'walletId'>>;
7
- type UseSignMessageReturnType<TData = FullSignatureRes, TError = Error, TVariables = SignMessageMutationArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
8
- signMessage: UseMutateFunction<TData, TError, TVariables, TContext>;
9
- signMessageAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
10
- }>;
11
- /**
12
- * Hook for signing a message
13
- */
14
- export declare const useSignMessage: () => UseSignMessageReturnType<FullSignatureRes, Error, SignMessageMutationArgs, unknown>;
15
- export {};
@@ -1,15 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { SignTransactionArgs } from '../../actions/signTransaction.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { UseMutationReturnType } from '../../types/query.js';
5
- import { FullSignatureRes } from '@getpara/web-sdk';
6
- type SignTransactionMutationArgs = Omit<SignTransactionArgs, 'walletId'> & Partial<Pick<SignTransactionArgs, 'walletId'>>;
7
- type UseSignTransactionReturnType<TData = FullSignatureRes, TError = Error, TVariables = SignTransactionMutationArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
8
- signTransaction: UseMutateFunction<TData, TError, TVariables, TContext>;
9
- signTransactionAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
10
- }>;
11
- /**
12
- * Hook for signing a transaction
13
- */
14
- export declare const useSignTransaction: () => UseSignTransactionReturnType<FullSignatureRes, Error, SignTransactionMutationArgs, unknown>;
15
- export {};
@@ -1,13 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { waitForAccountCreationArgs } from '../../actions/waitForAccountCreation.js';
3
- import { UseMutationReturnType } from '../../types/query.js';
4
- import { Compute } from '../../types/utils.js';
5
- type UseWaitForAccountCreationReturnType<TData = boolean, TError = Error, TVariables = waitForAccountCreationArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
6
- waitForAccountCreation: UseMutateFunction<TData, TError, TVariables, TContext>;
7
- waitForAccountCreationAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
8
- }>;
9
- /**
10
- * Hook for waiting for account creation
11
- */
12
- export declare const useWaitForAccountCreation: () => UseWaitForAccountCreationReturnType<boolean, Error, waitForAccountCreationArgs, unknown>;
13
- export {};
@@ -1,14 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { WaitForLoginAndSetupArgs } from '../../actions/waitForLoginAndSetup.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { UseMutationReturnType } from '../../types/query.js';
5
- import { LoginResponse } from '@getpara/web-sdk';
6
- type UseWaitForLoginAndSetupReturnType<TData = LoginResponse, TError = Error, TVariables = WaitForLoginAndSetupArgs, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
7
- waitForLoginAndSetup: UseMutateFunction<TData, TError, TVariables, TContext>;
8
- waitForLoginAndSetupAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
9
- }>;
10
- /**
11
- * Hook for waiting for user login and account setup
12
- */
13
- export declare const useWaitForLoginAndSetup: () => UseWaitForLoginAndSetupReturnType<LoginResponse, Error, WaitForLoginAndSetupArgs, unknown>;
14
- export {};
@@ -1,13 +0,0 @@
1
- import { UseMutateAsyncFunction, UseMutateFunction } from '@tanstack/react-query';
2
- import { UseMutationReturnType } from '../../types/query.js';
3
- import { Compute } from '../../types/utils.js';
4
- import { AccountSetupResponse } from '@getpara/web-sdk';
5
- type UseWaitForPasskeyAndCreateWalletReturnType<TData = AccountSetupResponse, TError = Error, TVariables = void, TContext = unknown> = Compute<UseMutationReturnType<TData, TError, TVariables, TContext> & {
6
- waitForPasskeyAndCreateWallet: UseMutateFunction<TData, TError, TVariables, TContext>;
7
- waitForPasskeyAndCreateWalletAsync: UseMutateAsyncFunction<TData, TError, TVariables, TContext>;
8
- }>;
9
- /**
10
- * Hook for waiting for session setup and wallet creation
11
- */
12
- export declare const useWaitForPasskeyAndCreateWallet: () => UseWaitForPasskeyAndCreateWalletReturnType<AccountSetupResponse, Error, void, unknown>;
13
- export {};