@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.
- package/dist/MoonPayEmbed-Q2HP2BFI.js.gz +0 -0
- package/dist/chunk-MMUBH76A.js.gz +0 -0
- package/dist/cli/cli.mjs +40 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3049 -3209
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/modal/components/AuthInput/AuthInput.d.ts +1 -1
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +4 -4
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +1 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +1 -1
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +1 -1
- package/dist/modal/components/Controls/Selects.d.ts +1 -1
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +1 -1
- package/dist/modal/components/Footer/Footer.d.ts +1 -1
- package/dist/modal/components/WalletCard/WalletCard.d.ts +2 -2
- package/dist/modal/components/common.d.ts +3 -3
- package/dist/modal/constants/constants.d.ts +1 -1
- package/dist/modal/index.d.ts +0 -2
- package/dist/modal/stores/index.d.ts +0 -2
- package/dist/modal/stores/modal/useModalStore.d.ts +22 -20
- package/dist/modal/types/commonTypes.d.ts +4 -9
- package/dist/modal/types/externalWallets.d.ts +0 -2
- package/dist/modal/types/modalProps.d.ts +1 -29
- package/dist/modal/utils/authLayoutHelpers.d.ts +2 -2
- package/dist/modal/utils/getTileButtonFlex.d.ts +1 -1
- package/dist/modal/utils/isPasskeySupported.d.ts +1 -0
- package/dist/modal/utils/openPopup.d.ts +2 -2
- package/dist/provider/ParaProvider.d.ts +3 -1
- package/dist/provider/actions/getAccount.d.ts +19 -7
- package/dist/provider/actions/getWallet.d.ts +1 -1
- package/dist/provider/actions/index.d.ts +25 -0
- package/dist/provider/actions/utils.d.ts +3 -0
- package/dist/provider/components/CosmosWalletWrapper.d.ts +11 -0
- package/dist/provider/components/EvmWalletWrapper.d.ts +12 -0
- package/dist/provider/components/ExternalWalletWrapper.d.ts +8 -0
- package/dist/provider/components/SolanaWalletWrapper.d.ts +9 -0
- package/dist/provider/external/getParaCosmosConnector.d.ts +7 -0
- package/dist/provider/external/getParaEvmConnector.d.ts +7 -0
- package/dist/provider/external/getParaSolanaConnector.d.ts +7 -0
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +12 -0
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +3 -0
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +8 -0
- package/dist/provider/hooks/mutations/index.d.ts +25 -10
- package/dist/provider/hooks/mutations/utils.d.ts +4 -0
- package/dist/provider/hooks/queries/useAccount.d.ts +1 -6
- package/dist/provider/hooks/queries/useWallet.d.ts +1 -1
- package/dist/provider/hooks/utils/useWalletState.d.ts +3 -2
- package/dist/provider/index.d.ts +1 -0
- package/dist/provider/providers/AuthProvider.d.ts +31 -0
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +7 -0
- package/dist/provider/providers/ExternalWalletProvider.d.ts +73 -0
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +7 -0
- package/dist/provider/stores/getters.d.ts +3 -3
- package/dist/provider/stores/setters.d.ts +1 -0
- package/dist/provider/stores/slices/config.d.ts +3 -0
- package/dist/provider/stores/slices/externalWallets.d.ts +3 -0
- package/dist/provider/stores/slices/index.d.ts +1 -0
- package/dist/provider/stores/types.d.ts +46 -1
- package/dist/provider/types/externalWalletProviders.d.ts +12 -0
- package/dist/provider/types/provider.d.ts +119 -16
- package/dist/provider/types/utils.d.ts +16 -0
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +7 -0
- package/dist/provider/utils/renameMutations.d.ts +3 -0
- package/package.json +19 -7
- package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.d.ts +0 -8
- package/dist/modal/hooks/useActiveWallet.d.ts +0 -1
- package/dist/modal/hooks/useCreateAccount.d.ts +0 -4
- package/dist/modal/hooks/useEmbeddedExternalConnection.d.ts +0 -1
- package/dist/modal/hooks/useSetLoginURLs.d.ts +0 -8
- package/dist/modal/providers/CosmosExternalWalletContextStub.d.ts +0 -42
- package/dist/modal/providers/EvmExternalWalletContextStub.d.ts +0 -44
- package/dist/modal/providers/ExternalWalletContext.d.ts +0 -89
- package/dist/modal/providers/SolanaExternalWalletContextStub.d.ts +0 -32
- package/dist/modal/stores/externalWalletProvider/actions.d.ts +0 -3
- package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.d.ts +0 -22
- package/dist/modal/stores/theme/actions.d.ts +0 -3
- package/dist/modal/stores/theme/useThemeStore.d.ts +0 -20
- package/dist/modal/stores/userInfo/actions.d.ts +0 -3
- package/dist/modal/stores/userInfo/useUserInfoStore.d.ts +0 -19
- package/dist/package.json +0 -4
- package/dist/provider/actions/checkIfUserExists.d.ts +0 -9
- package/dist/provider/actions/createUser.d.ts +0 -12
- package/dist/provider/actions/initiateLogin.d.ts +0 -4
- package/dist/provider/actions/keepSessionAlive.d.ts +0 -2
- package/dist/provider/actions/logout.d.ts +0 -2
- package/dist/provider/actions/signMessage.d.ts +0 -8
- package/dist/provider/actions/signTransaction.d.ts +0 -8
- package/dist/provider/actions/waitForAccountCreation.d.ts +0 -2
- package/dist/provider/actions/waitForLoginAndSetup.d.ts +0 -6
- package/dist/provider/actions/waitForPasskeyAndCreateWallet.d.ts +0 -2
- package/dist/provider/hooks/mutations/useCheckIfUserExists.d.ts +0 -13
- package/dist/provider/hooks/mutations/useCreateUser.d.ts +0 -13
- package/dist/provider/hooks/mutations/useInitiateLogin.d.ts +0 -14
- package/dist/provider/hooks/mutations/useKeepSessionAlive.d.ts +0 -12
- package/dist/provider/hooks/mutations/useLogout.d.ts +0 -12
- package/dist/provider/hooks/mutations/useSignMessage.d.ts +0 -15
- package/dist/provider/hooks/mutations/useSignTransaction.d.ts +0 -14
- package/dist/provider/hooks/mutations/useWaitForAccountCreation.d.ts +0 -12
- package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.d.ts +0 -14
- package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.d.ts +0 -13
- package/dist/provider/utils/constants.d.ts +0 -5
|
Binary file
|
|
Binary file
|
package/dist/cli/cli.mjs
ADDED
|
@@ -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;
|