@getpara/react-sdk 1.6.1-dev.0 → 1.7.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.
- package/dist/{modal/components/AddFunds/MoonPayEmbed.js → MoonPayEmbed-Q2HP2BFI.js} +3 -1
- package/dist/MoonPayEmbed-Q2HP2BFI.js.br +0 -0
- package/dist/MoonPayEmbed-Q2HP2BFI.js.gz +0 -0
- package/dist/chunk-MMUBH76A.js.br +0 -0
- package/dist/chunk-MMUBH76A.js.gz +0 -0
- package/dist/index.js +6657 -6
- package/dist/index.js.br +0 -0
- package/dist/index.js.gz +0 -0
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +1 -0
- package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.d.ts +2 -1
- package/dist/modal/components/common.d.ts +4 -0
- package/dist/modal/index.d.ts +1 -0
- package/dist/modal/providers/CosmosExternalWalletContextStub.d.ts +13 -0
- package/dist/modal/providers/EvmExternalWalletContextStub.d.ts +11 -0
- package/dist/modal/providers/ExternalWalletContext.d.ts +15 -1
- package/dist/modal/providers/SolanaExternalWalletContextStub.d.ts +11 -0
- package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.d.ts +2 -0
- package/dist/modal/types/commonTypes.d.ts +12 -2
- package/dist/modal/types/externalWallets.d.ts +2 -0
- package/dist/modal/types/modalProps.d.ts +6 -0
- package/dist/modal/utils/steps.d.ts +2 -0
- package/dist/provider/utils/constants.d.ts +5 -0
- package/package.json +5 -5
- package/dist/modal/ParaModal.js +0 -337
- package/dist/modal/components/Account/Account.js +0 -69
- package/dist/modal/components/AddFunds/AddFunds.js +0 -220
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -72
- package/dist/modal/components/AddFunds/AddFundsDone.js +0 -43
- package/dist/modal/components/AddFunds/index.js +0 -4
- package/dist/modal/components/AuthInput/AuthInput.js +0 -283
- package/dist/modal/components/AuthInput/countryCodes.js +0 -42
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
- package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -37
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -113
- package/dist/modal/components/AuthOptions/AuthOptions.js +0 -33
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -44
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -52
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -93
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
- package/dist/modal/components/Body/Body.js +0 -304
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -94
- package/dist/modal/components/ChainSwitch/config.js +0 -17
- package/dist/modal/components/Controls/Controls.js +0 -74
- package/dist/modal/components/Controls/Selects.js +0 -213
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -151
- package/dist/modal/components/ExternalWalletStep/config.js +0 -17
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -172
- package/dist/modal/components/ExternalWalletsWrapper/ExternalWalletsWrapper.js +0 -123
- package/dist/modal/components/Footer/Footer.js +0 -93
- package/dist/modal/components/Header/Header.js +0 -43
- package/dist/modal/components/Header/hooks/useStepTitle.js +0 -50
- package/dist/modal/components/Hero/Hero.js +0 -122
- package/dist/modal/components/IFrameStep/IFrameStep.js +0 -55
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -28
- package/dist/modal/components/ModalContent/ModalContent.js +0 -310
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -81
- package/dist/modal/components/OAuth/OAuth.js +0 -153
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -139
- package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -101
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -141
- package/dist/modal/components/StripeComponents/StripeComponents.js +0 -88
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -24
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -159
- package/dist/modal/components/Waiting/Waiting.js +0 -17
- package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
- package/dist/modal/components/WalletCard/WalletCard.js +0 -127
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -52
- package/dist/modal/components/common.js +0 -83
- package/dist/modal/components/index.js +0 -2
- package/dist/modal/constants/constants.js +0 -111
- package/dist/modal/constants/defaults.js +0 -10
- package/dist/modal/constants/oAuthLogos.js +0 -24
- package/dist/modal/hooks/useActiveWallet.js +0 -15
- package/dist/modal/hooks/useCreateAccount.js +0 -72
- package/dist/modal/hooks/useEmbeddedExternalConnection.js +0 -39
- package/dist/modal/hooks/useGoBack.js +0 -35
- package/dist/modal/hooks/useSetLoginURLs.js +0 -45
- package/dist/modal/index.js +0 -32
- package/dist/modal/providers/CosmosExternalWalletContextStub.js +0 -34
- package/dist/modal/providers/EvmExternalWalletContextStub.js +0 -38
- package/dist/modal/providers/ExternalWalletContext.js +0 -275
- package/dist/modal/providers/SolanaExternalWalletContextStub.js +0 -19
- package/dist/modal/stores/externalWalletProvider/actions.js +0 -10
- package/dist/modal/stores/externalWalletProvider/useExternalWalletProviderStore.js +0 -20
- package/dist/modal/stores/index.js +0 -4
- package/dist/modal/stores/modal/actions.js +0 -70
- package/dist/modal/stores/modal/useModalStore.js +0 -65
- package/dist/modal/stores/theme/actions.js +0 -28
- package/dist/modal/stores/theme/useThemeStore.js +0 -21
- package/dist/modal/stores/userInfo/actions.js +0 -30
- package/dist/modal/stores/userInfo/useUserInfoStore.js +0 -17
- package/dist/modal/types/commonTypes.js +0 -1
- package/dist/modal/types/externalWallets.js +0 -31
- package/dist/modal/types/modalProps.js +0 -12
- package/dist/modal/utils/authLayoutHelpers.js +0 -8
- package/dist/modal/utils/getMailtoLink.js +0 -10
- package/dist/modal/utils/getTileButtonFlex.js +0 -20
- package/dist/modal/utils/openPopup.js +0 -60
- package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
- package/dist/modal/utils/steps.js +0 -228
- package/dist/modal/utils/stringFormatters.js +0 -14
- package/dist/modal/utils/validateOnRampConfig.js +0 -32
- package/dist/provider/ParaProvider.js +0 -22
- package/dist/provider/actions/checkIfUserExists.js +0 -21
- package/dist/provider/actions/createUser.js +0 -26
- package/dist/provider/actions/getAccount.js +0 -22
- package/dist/provider/actions/getWallet.js +0 -14
- package/dist/provider/actions/initiateLogin.js +0 -20
- package/dist/provider/actions/keepSessionAlive.js +0 -20
- package/dist/provider/actions/logout.js +0 -17
- package/dist/provider/actions/signMessage.js +0 -20
- package/dist/provider/actions/signTransaction.js +0 -20
- package/dist/provider/actions/waitForAccountCreation.js +0 -21
- package/dist/provider/actions/waitForLoginAndSetup.js +0 -24
- package/dist/provider/actions/waitForPasskeyAndCreateWallet.js +0 -21
- package/dist/provider/hooks/index.js +0 -4
- package/dist/provider/hooks/mutations/index.js +0 -24
- package/dist/provider/hooks/mutations/useCheckIfUserExists.js +0 -23
- package/dist/provider/hooks/mutations/useCreateUser.js +0 -20
- package/dist/provider/hooks/mutations/useInitiateLogin.js +0 -23
- package/dist/provider/hooks/mutations/useKeepSessionAlive.js +0 -20
- package/dist/provider/hooks/mutations/useLogout.js +0 -30
- package/dist/provider/hooks/mutations/useSignMessage.js +0 -33
- package/dist/provider/hooks/mutations/useSignTransaction.js +0 -33
- package/dist/provider/hooks/mutations/useWaitForAccountCreation.js +0 -30
- package/dist/provider/hooks/mutations/useWaitForLoginAndSetup.js +0 -30
- package/dist/provider/hooks/mutations/useWaitForPasskeyAndCreateWallet.js +0 -30
- package/dist/provider/hooks/queries/index.js +0 -8
- package/dist/provider/hooks/queries/useAccount.js +0 -21
- package/dist/provider/hooks/queries/useWallet.js +0 -22
- package/dist/provider/hooks/utils/index.js +0 -10
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
- package/dist/provider/hooks/utils/useClient.js +0 -10
- package/dist/provider/hooks/utils/useEventListeners.js +0 -105
- package/dist/provider/hooks/utils/useInternalClient.js +0 -10
- package/dist/provider/hooks/utils/useModal.js +0 -17
- package/dist/provider/hooks/utils/useWalletState.js +0 -33
- package/dist/provider/index.js +0 -8
- package/dist/provider/stores/getters.js +0 -13
- package/dist/provider/stores/slices/client.js +0 -9
- package/dist/provider/stores/slices/index.js +0 -4
- package/dist/provider/stores/slices/modal.js +0 -9
- package/dist/provider/stores/slices/wallet.js +0 -11
- package/dist/provider/stores/types.js +0 -1
- package/dist/provider/stores/useStore.js +0 -27
- package/dist/provider/types/provider.js +0 -1
- package/dist/provider/types/query.js +0 -1
- package/dist/provider/types/utils.js +0 -1
- package/dist/provider/utils/renameMutations.js +0 -16
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { useStore } from "../../stores/useStore.js";
|
|
4
|
-
import { useClient } from "./useClient.js";
|
|
5
|
-
const useWalletState = () => {
|
|
6
|
-
const client = useClient();
|
|
7
|
-
const selectedWalletId = useStore((state) => state.selectedWalletId);
|
|
8
|
-
const selectedWalletType = useStore((state) => state.selectedWalletType);
|
|
9
|
-
const setStoredSelectedWallet = useStore((state) => state.setSelectedWallet);
|
|
10
|
-
const clearSelectedWallet = useStore((state) => state.clearSelectedWallet);
|
|
11
|
-
const setSelectedWallet = ({ id, type }) => {
|
|
12
|
-
try {
|
|
13
|
-
const validId = client.findWalletId(id, { type: [type] });
|
|
14
|
-
if (validId !== id) {
|
|
15
|
-
clearSelectedWallet();
|
|
16
|
-
} else {
|
|
17
|
-
setStoredSelectedWallet(id, type);
|
|
18
|
-
}
|
|
19
|
-
} catch (e) {
|
|
20
|
-
clearSelectedWallet();
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
return {
|
|
24
|
-
selectedWallet: {
|
|
25
|
-
id: selectedWalletId,
|
|
26
|
-
type: selectedWalletType
|
|
27
|
-
},
|
|
28
|
-
setSelectedWallet
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
useWalletState
|
|
33
|
-
};
|
package/dist/provider/index.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
import { vanillaStore } from "./useStore.js";
|
|
4
|
-
const getClient = () => vanillaStore.getState().client;
|
|
5
|
-
const getIsOpen = () => vanillaStore.getState().isOpen;
|
|
6
|
-
const getSelectedWalletId = () => vanillaStore.getState().selectedWalletId;
|
|
7
|
-
const getSelectedWalletType = () => vanillaStore.getState().selectedWalletType;
|
|
8
|
-
export {
|
|
9
|
-
getClient,
|
|
10
|
-
getIsOpen,
|
|
11
|
-
getSelectedWalletId,
|
|
12
|
-
getSelectedWalletType
|
|
13
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
const createWalletSlice = (set) => ({
|
|
4
|
-
selectedWalletId: void 0,
|
|
5
|
-
selectedWalletType: void 0,
|
|
6
|
-
setSelectedWallet: (selectedWalletId, selectedWalletType) => set({ selectedWalletId, selectedWalletType }),
|
|
7
|
-
clearSelectedWallet: () => set({ selectedWalletId: void 0, selectedWalletType: void 0 })
|
|
8
|
-
});
|
|
9
|
-
export {
|
|
10
|
-
createWalletSlice
|
|
11
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "../../chunk-MMUBH76A.js";
|
|
5
|
-
import { createStore, useStore as useZustandStore } from "zustand";
|
|
6
|
-
import { createClientSlice, createModalSlice, createWalletSlice } from "./slices/index.js";
|
|
7
|
-
import { createJSONStorage, persist } from "zustand/middleware";
|
|
8
|
-
const vanillaStore = createStore()(
|
|
9
|
-
persist(
|
|
10
|
-
(...a) => __spreadValues(__spreadValues(__spreadValues({}, createClientSlice(...a)), createModalSlice(...a)), createWalletSlice(...a)),
|
|
11
|
-
{
|
|
12
|
-
version: 1,
|
|
13
|
-
name: "@PARA/web-state",
|
|
14
|
-
storage: createJSONStorage(() => localStorage),
|
|
15
|
-
partialize: (state) => ({
|
|
16
|
-
selectedWalletId: state.selectedWalletId,
|
|
17
|
-
selectedWalletType: state.selectedWalletType
|
|
18
|
-
})
|
|
19
|
-
}
|
|
20
|
-
)
|
|
21
|
-
);
|
|
22
|
-
const createBoundedUseStore = (store) => (selector) => useZustandStore(store, selector);
|
|
23
|
-
const useStore = createBoundedUseStore(vanillaStore);
|
|
24
|
-
export {
|
|
25
|
-
useStore,
|
|
26
|
-
vanillaStore
|
|
27
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__objRest,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "../../chunk-MMUBH76A.js";
|
|
6
|
-
function renameMutations(mutationObj, name) {
|
|
7
|
-
const _a = mutationObj, { mutate: _, mutateAsync: __ } = _a, mutationNoMutate = __objRest(_a, ["mutate", "mutateAsync"]);
|
|
8
|
-
const newMutations = {
|
|
9
|
-
[name]: mutationObj.mutate,
|
|
10
|
-
[`${name}Async`]: mutationObj.mutateAsync
|
|
11
|
-
};
|
|
12
|
-
return __spreadValues(__spreadValues({}, newMutations), mutationNoMutate);
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
renameMutations
|
|
16
|
-
};
|