@getpara/react-sdk 1.7.1 → 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 (103) hide show
  1. package/dist/MoonPayEmbed-Q2HP2BFI.js.gz +0 -0
  2. package/dist/chunk-MMUBH76A.js.gz +0 -0
  3. package/dist/cli/cli.mjs +40 -0
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +3049 -3209
  6. package/dist/index.js.br +0 -0
  7. package/dist/index.js.gz +0 -0
  8. package/dist/modal/components/AuthInput/AuthInput.d.ts +1 -1
  9. package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +4 -4
  10. package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -1
  11. package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -1
  12. package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -1
  13. package/dist/modal/components/Controls/Selects.d.ts +1 -1
  14. package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +1 -1
  15. package/dist/modal/components/Footer/Footer.d.ts +1 -1
  16. package/dist/modal/components/WalletCard/WalletCard.d.ts +2 -2
  17. package/dist/modal/components/common.d.ts +3 -3
  18. package/dist/modal/constants/constants.d.ts +1 -1
  19. package/dist/modal/index.d.ts +0 -2
  20. package/dist/modal/stores/index.d.ts +0 -2
  21. package/dist/modal/stores/modal/useModalStore.d.ts +22 -20
  22. package/dist/modal/types/commonTypes.d.ts +4 -9
  23. package/dist/modal/types/externalWallets.d.ts +0 -2
  24. package/dist/modal/types/modalProps.d.ts +1 -29
  25. package/dist/modal/utils/authLayoutHelpers.d.ts +2 -2
  26. package/dist/modal/utils/getTileButtonFlex.d.ts +1 -1
  27. package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
  28. package/dist/modal/utils/openPopup.d.ts +2 -2
  29. package/dist/provider/ParaProvider.d.ts +3 -1
  30. package/dist/provider/actions/getAccount.d.ts +19 -7
  31. package/dist/provider/actions/getWallet.d.ts +1 -1
  32. package/dist/provider/actions/index.d.ts +25 -0
  33. package/dist/provider/actions/utils.d.ts +3 -0
  34. package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
  35. package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
  36. package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
  37. package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
  38. package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
  39. package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
  40. package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
  41. package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +12 -0
  42. package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +3 -0
  43. package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +8 -0
  44. package/dist/provider/hooks/mutations/index.d.ts +25 -10
  45. package/dist/provider/hooks/mutations/utils.d.ts +4 -0
  46. package/dist/provider/hooks/queries/useAccount.d.ts +1 -6
  47. package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
  48. package/dist/provider/hooks/utils/useWalletState.d.ts +3 -2
  49. package/dist/provider/index.d.ts +1 -0
  50. package/dist/provider/providers/AuthProvider.d.ts +31 -0
  51. package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +7 -0
  52. package/dist/provider/providers/EvmExternalWalletProvider.d.ts +7 -0
  53. package/dist/provider/providers/ExternalWalletProvider.d.ts +73 -0
  54. package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
  55. package/dist/provider/stores/getters.d.ts +3 -3
  56. package/dist/provider/stores/setters.d.ts +1 -0
  57. package/dist/provider/stores/slices/config.d.ts +3 -0
  58. package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
  59. package/dist/provider/stores/slices/index.d.ts +1 -0
  60. package/dist/provider/stores/types.d.ts +46 -1
  61. package/dist/provider/types/externalWalletProviders.d.ts +12 -0
  62. package/dist/provider/types/provider.d.ts +119 -16
  63. package/dist/provider/types/utils.d.ts +16 -0
  64. package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
  65. package/dist/provider/utils/renameMutations.d.ts +3 -0
  66. package/package.json +19 -7
  67. package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.d.ts +0 -8
  68. package/dist/modal/hooks/useActiveWallet.d.ts +0 -1
  69. package/dist/modal/hooks/useCreateAccount.d.ts +0 -4
  70. package/dist/modal/hooks/useEmbeddedExternalConnection.d.ts +0 -1
  71. package/dist/modal/hooks/useSetLoginURLs.d.ts +0 -8
  72. package/dist/modal/providers/CosmosExternalWalletContextStub.d.ts +0 -42
  73. package/dist/modal/providers/EvmExternalWalletContextStub.d.ts +0 -44
  74. package/dist/modal/providers/ExternalWalletContext.d.ts +0 -89
  75. package/dist/modal/providers/SolanaExternalWalletContextStub.d.ts +0 -32
  76. package/dist/modal/stores/externalWalletProvider/actions.d.ts +0 -3
  77. package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.d.ts +0 -22
  78. package/dist/modal/stores/theme/actions.d.ts +0 -3
  79. package/dist/modal/stores/theme/useThemeStore.d.ts +0 -20
  80. package/dist/modal/stores/userInfo/actions.d.ts +0 -3
  81. package/dist/modal/stores/userInfo/useUserInfoStore.d.ts +0 -19
  82. package/dist/package.json +0 -4
  83. package/dist/provider/actions/checkIfUserExists.d.ts +0 -9
  84. package/dist/provider/actions/createUser.d.ts +0 -12
  85. package/dist/provider/actions/initiateLogin.d.ts +0 -4
  86. package/dist/provider/actions/keepSessionAlive.d.ts +0 -2
  87. package/dist/provider/actions/logout.d.ts +0 -2
  88. package/dist/provider/actions/signMessage.d.ts +0 -8
  89. package/dist/provider/actions/signTransaction.d.ts +0 -8
  90. package/dist/provider/actions/waitForAccountCreation.d.ts +0 -2
  91. package/dist/provider/actions/waitForLoginAndSetup.d.ts +0 -6
  92. package/dist/provider/actions/waitForPasskeyAndCreateWallet.d.ts +0 -2
  93. package/dist/provider/hooks/mutations/useCheckIfUserExists.d.ts +0 -13
  94. package/dist/provider/hooks/mutations/useCreateUser.d.ts +0 -13
  95. package/dist/provider/hooks/mutations/useInitiateLogin.d.ts +0 -14
  96. package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -12
  97. package/dist/provider/hooks/mutations/useLogout.d.ts +0 -12
  98. package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -15
  99. package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -14
  100. package/dist/provider/hooks/mutations/useWaitForAccountCreation.d.ts +0 -12
  101. package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.d.ts +0 -14
  102. package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.d.ts +0 -13
  103. package/dist/provider/utils/constants.d.ts +0 -5
Binary file
Binary file
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+ import * as fs from 'node:fs/promises';
3
+ import * as path from 'node:path';
4
+ import { createRequire } from 'module';
5
+ const require = createRequire(import.meta.url);
6
+
7
+ const PACKAGES_TO_STUB = [
8
+ '@getpara/evm-wallet-connectors',
9
+ '@getpara/cosmos-wallet-connectors',
10
+ '@getpara/solana-wallet-connectors',
11
+ ];
12
+
13
+ const checkForPackages = async () => {
14
+ const pathToParaPackages = require.resolve('@getpara/react-sdk');
15
+
16
+ const pathToNodeModules = path.resolve(pathToParaPackages, '../../node_modules');
17
+
18
+ for (let i = 0; i < PACKAGES_TO_STUB.length; i++) {
19
+ const packageName = PACKAGES_TO_STUB[i];
20
+ try {
21
+ await import(packageName);
22
+ } catch (err) {
23
+ if (err.code === 'ERR_MODULE_NOT_FOUND') {
24
+ const packageJsonContent = {
25
+ name: packageName,
26
+ main: './index.js',
27
+ };
28
+ await fs.mkdir(path.join(pathToNodeModules, packageName), { recursive: true });
29
+ await fs.writeFile(path.join(pathToNodeModules, packageName, 'index.js'), '//STUB');
30
+ await fs.writeFile(path.join(pathToNodeModules, packageName, 'package.json'), JSON.stringify(packageJsonContent), {
31
+ encoding: 'utf-8',
32
+ });
33
+ } else {
34
+ console.err('Para setup failed:', err);
35
+ }
36
+ }
37
+ }
38
+ };
39
+
40
+ await checkForPackages();
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  export * from './modal/index.js';
2
2
  export * from './provider/index.js';
3
3
  export * from '@getpara/web-sdk';
4
+ export { ExternalWallet, EvmWallet, SolanaWallet, CosmosWallet } from '@getpara/react-common';
4
5
  export type { Theme } from '@getpara/react-components';
5
6
  import ParaWeb from '@getpara/web-sdk';
6
7
  export default ParaWeb;