@getpara/react-sdk 2.0.0-dev.3 → 2.0.0-dev.5
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/cosmos/actions/getCosmjsAminoSigner.d.ts +8 -0
- package/dist/cosmos/actions/getCosmjsAminoSigner.js +16 -0
- package/dist/cosmos/actions/getCosmjsProtoSigner.d.ts +8 -0
- package/dist/cosmos/actions/getCosmjsProtoSigner.js +16 -0
- package/dist/cosmos/actions/index.d.ts +2 -0
- package/dist/cosmos/actions/index.js +3 -0
- package/dist/cosmos/hooks/index.d.ts +2 -0
- package/dist/cosmos/hooks/index.js +3 -0
- package/dist/cosmos/hooks/useCosmjsAminoSigner.d.ts +11 -0
- package/dist/cosmos/hooks/useCosmjsAminoSigner.js +37 -0
- package/dist/cosmos/hooks/useCosmjsProtoSigner.d.ts +11 -0
- package/dist/cosmos/hooks/useCosmjsProtoSigner.js +37 -0
- package/dist/cosmos/index.d.ts +2 -0
- package/dist/cosmos/index.js +3 -0
- package/dist/css/modal.css +14 -1
- package/dist/evm/actions/getViemAccount.d.ts +22 -0
- package/dist/evm/actions/getViemAccount.js +20 -0
- package/dist/evm/actions/getViemClient.d.ts +7659 -0
- package/dist/evm/actions/getViemClient.js +25 -0
- package/dist/evm/actions/index.d.ts +2 -0
- package/dist/evm/actions/index.js +3 -0
- package/dist/evm/hooks/index.d.ts +2 -0
- package/dist/evm/hooks/index.js +3 -0
- package/dist/evm/hooks/useViemAccount.d.ts +26 -0
- package/dist/evm/hooks/useViemAccount.js +32 -0
- package/dist/evm/hooks/useViemClient.d.ts +7663 -0
- package/dist/evm/hooks/useViemClient.js +30 -0
- package/dist/evm/index.d.ts +2 -0
- package/dist/evm/index.js +3 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +4 -4
- package/dist/provider/ParaProvider.d.ts +1 -2
- package/dist/provider/ParaProvider.js +13 -106
- package/dist/public/PPMori-Regular.woff2 +0 -0
- package/dist/public/PPMori-SemiBold.woff2 +0 -0
- package/dist/solana/actions/getSolanaSigner.d.ts +8 -0
- package/dist/solana/actions/getSolanaSigner.js +15 -0
- package/dist/solana/actions/index.d.ts +1 -0
- package/dist/solana/actions/index.js +2 -0
- package/dist/solana/hooks/index.d.ts +1 -0
- package/dist/solana/hooks/index.js +2 -0
- package/dist/solana/hooks/useSolanaSigner.d.ts +12 -0
- package/dist/solana/hooks/useSolanaSigner.js +32 -0
- package/dist/solana/index.d.ts +2 -0
- package/dist/solana/index.js +3 -0
- package/package.json +19 -29
- package/styles.css/package.json +1 -1
- package/dist/cli/cli.mjs +0 -50
- package/dist/modal/ParaModal.d.ts +0 -2
- package/dist/modal/ParaModal.js +0 -301
- package/dist/modal/components/Account/Account.d.ts +0 -5
- package/dist/modal/components/Account/Account.js +0 -148
- package/dist/modal/components/Account/AccountProfile.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfile.js +0 -168
- package/dist/modal/components/Account/AccountProfileLink.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileLink.js +0 -206
- package/dist/modal/components/Account/AccountProfileLinkOptions.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileLinkOptions.js +0 -111
- package/dist/modal/components/Account/AccountProfileUnlink.d.ts +0 -1
- package/dist/modal/components/Account/AccountProfileUnlink.js +0 -47
- package/dist/modal/components/AddFunds/AddFunds.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFunds.js +0 -69
- package/dist/modal/components/AddFunds/AddFundsAsset.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsAsset.js +0 -125
- package/dist/modal/components/AddFunds/AddFundsAwaiting.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsAwaiting.js +0 -78
- package/dist/modal/components/AddFunds/AddFundsContext.d.ts +0 -31
- package/dist/modal/components/AddFunds/AddFundsContext.js +0 -160
- package/dist/modal/components/AddFunds/AddFundsDone.d.ts +0 -6
- package/dist/modal/components/AddFunds/AddFundsDone.js +0 -49
- package/dist/modal/components/AddFunds/AddFundsProvider.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsProvider.js +0 -109
- package/dist/modal/components/AddFunds/AddFundsReceive.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsReceive.js +0 -83
- package/dist/modal/components/AddFunds/AddFundsSettings.d.ts +0 -1
- package/dist/modal/components/AddFunds/AddFundsSettings.js +0 -237
- package/dist/modal/components/AddFunds/MoonPayEmbed.d.ts +0 -2
- package/dist/modal/components/AddFunds/MoonPayEmbed.js +0 -7
- package/dist/modal/components/AddFunds/common.d.ts +0 -19
- package/dist/modal/components/AddFunds/common.js +0 -24
- package/dist/modal/components/AddFunds/index.d.ts +0 -3
- package/dist/modal/components/AddFunds/index.js +0 -4
- package/dist/modal/components/AuthInput/AuthInput.d.ts +0 -20
- package/dist/modal/components/AuthInput/AuthInput.js +0 -277
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.d.ts +0 -7
- package/dist/modal/components/AuthInput/hooks/useDropdownPosition.js +0 -33
- package/dist/modal/components/AuthInput/phoneMasks.d.ts +0 -247
- package/dist/modal/components/AuthInput/phoneMasks.js +0 -253
- package/dist/modal/components/AuthMainStep/AuthMainStep.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStep.js +0 -50
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.d.ts +0 -9
- package/dist/modal/components/AuthMainStep/AuthMainStepContent.js +0 -164
- package/dist/modal/components/AuthOptions/AuthOptions.d.ts +0 -9
- package/dist/modal/components/AuthOptions/AuthOptions.js +0 -85
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.d.ts +0 -1
- package/dist/modal/components/AwaitingBiometricsStep/AwaitingBiometricsStep.js +0 -18
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.d.ts +0 -1
- package/dist/modal/components/AwaitingOAuthStep/AwaitingOAuthStep.js +0 -10
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.d.ts +0 -1
- package/dist/modal/components/AwaitingPasswordStep/AwaitingPasswordStep.js +0 -18
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.d.ts +0 -5
- package/dist/modal/components/AwaitingWalletCreationStep/AwaitingWalletCreationStep.js +0 -49
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.d.ts +0 -1
- package/dist/modal/components/BiometricCreationStep/BiometricCreationStep.js +0 -62
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.d.ts +0 -1
- package/dist/modal/components/BiometricLoginStep/BiometricLoginStep.js +0 -48
- package/dist/modal/components/Body/AnimatedHeightWrapper.d.ts +0 -6
- package/dist/modal/components/Body/AnimatedHeightWrapper.js +0 -29
- package/dist/modal/components/Body/Body.d.ts +0 -11
- package/dist/modal/components/Body/Body.js +0 -350
- package/dist/modal/components/ChainSwitch/ChainSwitch.d.ts +0 -1
- package/dist/modal/components/ChainSwitch/ChainSwitch.js +0 -95
- package/dist/modal/components/ChainSwitch/config.d.ts +0 -7
- package/dist/modal/components/ChainSwitch/config.js +0 -17
- package/dist/modal/components/Controls/Controls.d.ts +0 -5
- package/dist/modal/components/Controls/Controls.js +0 -78
- package/dist/modal/components/Controls/Selects.d.ts +0 -2
- package/dist/modal/components/Controls/Selects.js +0 -173
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.d.ts +0 -1
- package/dist/modal/components/ExternalWalletNetworkSelectStep/ExternalWalletNetworkSelectStep.js +0 -75
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.d.ts +0 -8
- package/dist/modal/components/ExternalWalletStep/ExternalWalletStep.js +0 -175
- package/dist/modal/components/ExternalWalletStep/config.d.ts +0 -7
- package/dist/modal/components/ExternalWalletStep/config.js +0 -17
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.d.ts +0 -1
- package/dist/modal/components/ExternalWalletVerificationStep/ExternalWalletVerificationStep.js +0 -39
- package/dist/modal/components/ExternalWallets/ExternalWallets.d.ts +0 -1
- package/dist/modal/components/ExternalWallets/ExternalWallets.js +0 -184
- package/dist/modal/components/Footer/Footer.d.ts +0 -1
- package/dist/modal/components/Footer/Footer.js +0 -95
- package/dist/modal/components/Header/Header.d.ts +0 -1
- package/dist/modal/components/Header/Header.js +0 -43
- package/dist/modal/components/Header/hooks/useStepTitle.d.ts +0 -3
- package/dist/modal/components/Header/hooks/useStepTitle.js +0 -61
- package/dist/modal/components/Hero/Hero.d.ts +0 -1
- package/dist/modal/components/Hero/Hero.js +0 -116
- package/dist/modal/components/IFrameStep/IFrameStep.d.ts +0 -1
- package/dist/modal/components/IFrameStep/IFrameStep.js +0 -59
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.d.ts +0 -5
- package/dist/modal/components/LoginDoneStep/LoginDoneStep.js +0 -44
- package/dist/modal/components/ModalContent/ModalContent.d.ts +0 -10
- package/dist/modal/components/ModalContent/ModalContent.js +0 -88
- package/dist/modal/components/OAuth/FarcasterOAuthStep.d.ts +0 -3
- package/dist/modal/components/OAuth/FarcasterOAuthStep.js +0 -31
- package/dist/modal/components/OAuth/OAuth.d.ts +0 -6
- package/dist/modal/components/OAuth/OAuth.js +0 -79
- package/dist/modal/components/OAuth/TelegramOAuthStep.d.ts +0 -8
- package/dist/modal/components/OAuth/TelegramOAuthStep.js +0 -74
- package/dist/modal/components/OnRampComponents/AddingFunds.d.ts +0 -1
- package/dist/modal/components/OnRampComponents/AddingFunds.js +0 -23
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.d.ts +0 -9
- package/dist/modal/components/OnRampComponents/OnRampProviderButton.js +0 -77
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.d.ts +0 -6
- package/dist/modal/components/RecoverySecretStep/RecoverySecretStep.js +0 -107
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.d.ts +0 -5
- package/dist/modal/components/Setup2FAStep/Setup2FAStep.js +0 -132
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.d.ts +0 -5
- package/dist/modal/components/TwoFactorDoneStep/TwoFactorDoneStep.js +0 -27
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.d.ts +0 -12
- package/dist/modal/components/VerificationCodeStep/VerificationCodeStep.js +0 -160
- package/dist/modal/components/Waiting/Waiting.d.ts +0 -6
- package/dist/modal/components/Waiting/Waiting.js +0 -17
- package/dist/modal/components/WalletCard/PartnerIcon.d.ts +0 -6
- package/dist/modal/components/WalletCard/PartnerIcon.js +0 -34
- package/dist/modal/components/WalletCard/WalletCard.d.ts +0 -18
- package/dist/modal/components/WalletCard/WalletCard.js +0 -128
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.d.ts +0 -6
- package/dist/modal/components/WalletCreationDoneStep/WalletCreationDoneStep.js +0 -83
- package/dist/modal/components/common.d.ts +0 -59
- package/dist/modal/components/common.js +0 -261
- package/dist/modal/components/index.d.ts +0 -1
- package/dist/modal/components/index.js +0 -2
- package/dist/modal/constants/constants.d.ts +0 -40
- package/dist/modal/constants/constants.js +0 -142
- package/dist/modal/constants/defaults.d.ts +0 -5
- package/dist/modal/constants/defaults.js +0 -10
- package/dist/modal/constants/oAuthLogos.d.ts +0 -17
- package/dist/modal/constants/oAuthLogos.js +0 -158
- package/dist/modal/constants/walletTypeConfig.d.ts +0 -6
- package/dist/modal/constants/walletTypeConfig.js +0 -13
- package/dist/modal/hooks/useGoBack.d.ts +0 -1
- package/dist/modal/hooks/useGoBack.js +0 -43
- package/dist/modal/hooks/useTelegramLogin.d.ts +0 -12
- package/dist/modal/hooks/useTelegramLogin.js +0 -65
- package/dist/modal/index.d.ts +0 -8
- package/dist/modal/index.js +0 -29
- package/dist/modal/stores/index.d.ts +0 -1
- package/dist/modal/stores/index.js +0 -2
- package/dist/modal/stores/modal/actions.d.ts +0 -3
- package/dist/modal/stores/modal/actions.js +0 -135
- package/dist/modal/stores/modal/useModalStore.d.ts +0 -103
- package/dist/modal/stores/modal/useModalStore.js +0 -73
- package/dist/modal/types/commonTypes.d.ts +0 -6
- package/dist/modal/types/commonTypes.js +0 -1
- package/dist/modal/types/modalProps.d.ts +0 -129
- package/dist/modal/types/modalProps.js +0 -12
- package/dist/modal/utils/authInputHelpers.d.ts +0 -5
- package/dist/modal/utils/authInputHelpers.js +0 -41
- package/dist/modal/utils/authLayoutHelpers.d.ts +0 -3
- package/dist/modal/utils/authLayoutHelpers.js +0 -8
- package/dist/modal/utils/countryCodes.d.ts +0 -8
- package/dist/modal/utils/countryCodes.js +0 -45
- package/dist/modal/utils/getMailtoLink.d.ts +0 -1
- package/dist/modal/utils/getMailtoLink.js +0 -10
- package/dist/modal/utils/getTileButtonFlex.d.ts +0 -1
- package/dist/modal/utils/getTileButtonFlex.js +0 -20
- package/dist/modal/utils/getWalletDisplayName.d.ts +0 -5
- package/dist/modal/utils/getWalletDisplayName.js +0 -22
- package/dist/modal/utils/isPasskeySupported.d.ts +0 -1
- package/dist/modal/utils/isPasskeySupported.js +0 -15
- package/dist/modal/utils/openPopup.d.ts +0 -6
- package/dist/modal/utils/openPopup.js +0 -60
- package/dist/modal/utils/routeMobileExternalWallet.d.ts +0 -1
- package/dist/modal/utils/routeMobileExternalWallet.js +0 -31
- package/dist/modal/utils/steps.d.ts +0 -133
- package/dist/modal/utils/steps.js +0 -273
- package/dist/modal/utils/stringFormatters.d.ts +0 -5
- package/dist/modal/utils/stringFormatters.js +0 -19
- package/dist/modal/utils/validateOnRampConfig.d.ts +0 -5
- package/dist/modal/utils/validateOnRampConfig.js +0 -32
- package/dist/provider/actions/getEmbeddedAccount.d.ts +0 -26
- package/dist/provider/actions/getEmbeddedAccount.js +0 -52
- package/dist/provider/actions/getWallet.d.ts +0 -5
- package/dist/provider/actions/getWallet.js +0 -18
- package/dist/provider/actions/index.d.ts +0 -47
- package/dist/provider/actions/index.js +0 -79
- package/dist/provider/actions/utils.d.ts +0 -4
- package/dist/provider/actions/utils.js +0 -34
- package/dist/provider/components/CosmosWalletWrapper.d.ts +0 -11
- package/dist/provider/components/CosmosWalletWrapper.js +0 -43
- package/dist/provider/components/EvmWalletWrapper.d.ts +0 -12
- package/dist/provider/components/EvmWalletWrapper.js +0 -43
- package/dist/provider/components/ExternalWalletWrapper.d.ts +0 -8
- package/dist/provider/components/ExternalWalletWrapper.js +0 -140
- package/dist/provider/components/SolanaWalletWrapper.d.ts +0 -9
- package/dist/provider/components/SolanaWalletWrapper.js +0 -44
- package/dist/provider/external/getParaCosmosConnector.d.ts +0 -7
- package/dist/provider/external/getParaCosmosConnector.js +0 -19
- package/dist/provider/external/getParaCosmosLib.d.ts +0 -4
- package/dist/provider/external/getParaCosmosLib.js +0 -16
- package/dist/provider/external/getParaEvmConnector.d.ts +0 -7
- package/dist/provider/external/getParaEvmConnector.js +0 -19
- package/dist/provider/external/getParaEvmLib.d.ts +0 -4
- package/dist/provider/external/getParaEvmLib.js +0 -16
- package/dist/provider/external/getParaSolanaConnector.d.ts +0 -7
- package/dist/provider/external/getParaSolanaConnector.js +0 -19
- package/dist/provider/external/getParaSolanaLib.d.ts +0 -4
- package/dist/provider/external/getParaSolanaLib.js +0 -16
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.d.ts +0 -2
- package/dist/provider/external/stubs/CosmosExternalWalletContextStub.js +0 -8
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.d.ts +0 -2
- package/dist/provider/external/stubs/EvmExternalWalletContextStub.js +0 -8
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.d.ts +0 -2
- package/dist/provider/external/stubs/SolanaExternalWalletContextStub.js +0 -8
- package/dist/provider/hooks/index.d.ts +0 -3
- package/dist/provider/hooks/index.js +0 -4
- package/dist/provider/hooks/mutations/core.d.ts +0 -27
- package/dist/provider/hooks/mutations/core.js +0 -66
- package/dist/provider/hooks/mutations/index.d.ts +0 -3
- package/dist/provider/hooks/mutations/index.js +0 -9
- package/dist/provider/hooks/mutations/useLinkAccount.d.ts +0 -9
- package/dist/provider/hooks/mutations/useLinkAccount.js +0 -18
- package/dist/provider/hooks/mutations/utils.d.ts +0 -12
- package/dist/provider/hooks/mutations/utils.js +0 -90
- package/dist/provider/hooks/queries/core.d.ts +0 -4
- package/dist/provider/hooks/queries/core.js +0 -16
- package/dist/provider/hooks/queries/index.d.ts +0 -4
- package/dist/provider/hooks/queries/index.js +0 -11
- package/dist/provider/hooks/queries/useAccount.d.ts +0 -90
- package/dist/provider/hooks/queries/useAccount.js +0 -135
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.d.ts +0 -5
- package/dist/provider/hooks/queries/useIsFullyLoggedIn.js +0 -24
- package/dist/provider/hooks/queries/useWallet.d.ts +0 -5
- package/dist/provider/hooks/queries/useWallet.js +0 -26
- package/dist/provider/hooks/queries/useWalletBalance.d.ts +0 -6
- package/dist/provider/hooks/queries/useWalletBalance.js +0 -55
- package/dist/provider/hooks/queries/utils.d.ts +0 -7
- package/dist/provider/hooks/queries/utils.js +0 -25
- package/dist/provider/hooks/utils/index.d.ts +0 -3
- package/dist/provider/hooks/utils/index.js +0 -10
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.d.ts +0 -3
- package/dist/provider/hooks/utils/useAutoSessionKeepAlive.js +0 -74
- package/dist/provider/hooks/utils/useClient.d.ts +0 -5
- package/dist/provider/hooks/utils/useClient.js +0 -10
- package/dist/provider/hooks/utils/useEventListeners.d.ts +0 -2
- package/dist/provider/hooks/utils/useEventListeners.js +0 -157
- package/dist/provider/hooks/utils/useFormattedBiometricHints.d.ts +0 -4
- package/dist/provider/hooks/utils/useFormattedBiometricHints.js +0 -27
- package/dist/provider/hooks/utils/useInternalClient.d.ts +0 -5
- package/dist/provider/hooks/utils/useInternalClient.js +0 -10
- package/dist/provider/hooks/utils/useModal.d.ts +0 -11
- package/dist/provider/hooks/utils/useModal.js +0 -27
- package/dist/provider/hooks/utils/useWalletState.d.ts +0 -15
- package/dist/provider/hooks/utils/useWalletState.js +0 -48
- package/dist/provider/index.d.ts +0 -6
- package/dist/provider/index.js +0 -11
- package/dist/provider/providers/AccountLinkProvider.d.ts +0 -47
- package/dist/provider/providers/AccountLinkProvider.js +0 -452
- package/dist/provider/providers/AuthProvider.d.ts +0 -37
- package/dist/provider/providers/AuthProvider.js +0 -523
- package/dist/provider/providers/CosmosExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/CosmosExternalWalletProvider.js +0 -66
- package/dist/provider/providers/EvmExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/EvmExternalWalletProvider.js +0 -74
- package/dist/provider/providers/ExternalWalletProvider.d.ts +0 -59
- package/dist/provider/providers/ExternalWalletProvider.js +0 -596
- package/dist/provider/providers/SolanaExternalWalletProvider.d.ts +0 -7
- package/dist/provider/providers/SolanaExternalWalletProvider.js +0 -66
- package/dist/provider/stores/getters.d.ts +0 -4
- package/dist/provider/stores/getters.js +0 -13
- package/dist/provider/stores/setters.d.ts +0 -1
- package/dist/provider/stores/setters.js +0 -7
- package/dist/provider/stores/slices/analytics.d.ts +0 -3
- package/dist/provider/stores/slices/analytics.js +0 -9
- package/dist/provider/stores/slices/client.d.ts +0 -3
- package/dist/provider/stores/slices/client.js +0 -9
- package/dist/provider/stores/slices/config.d.ts +0 -3
- package/dist/provider/stores/slices/config.js +0 -9
- package/dist/provider/stores/slices/externalWallets.d.ts +0 -3
- package/dist/provider/stores/slices/externalWallets.js +0 -46
- package/dist/provider/stores/slices/index.d.ts +0 -5
- package/dist/provider/stores/slices/index.js +0 -6
- package/dist/provider/stores/slices/modal.d.ts +0 -3
- package/dist/provider/stores/slices/modal.js +0 -18
- package/dist/provider/stores/slices/wallet.d.ts +0 -3
- package/dist/provider/stores/slices/wallet.js +0 -13
- package/dist/provider/stores/types.d.ts +0 -76
- package/dist/provider/stores/types.js +0 -1
- package/dist/provider/stores/useStore.d.ts +0 -17
- package/dist/provider/stores/useStore.js +0 -34
- package/dist/provider/types/externalWalletProviders.d.ts +0 -12
- package/dist/provider/types/externalWalletProviders.js +0 -1
- package/dist/provider/types/provider.d.ts +0 -161
- package/dist/provider/types/provider.js +0 -1
- package/dist/provider/types/query.d.ts +0 -3
- package/dist/provider/types/query.js +0 -1
- package/dist/provider/types/utils.d.ts +0 -45
- package/dist/provider/types/utils.js +0 -1
- package/dist/provider/utils/constants.d.ts +0 -5
- package/dist/provider/utils/constants.js +0 -10
- package/dist/provider/utils/paraConfigTypeGuards.d.ts +0 -7
- package/dist/provider/utils/paraConfigTypeGuards.js +0 -13
- package/dist/provider/utils/renameMutations.d.ts +0 -5
- package/dist/provider/utils/renameMutations.js +0 -18
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { Callbacks } from '../../types/provider.js';
|
|
2
|
-
export declare const useEventListeners: ({ onLogin, onLogout, onAccountSetup, onAccountCreation, onSignMessage, onSignTransaction, onWalletCreated, onPregenWalletClaimed, onExternalWalletChange, onWalletsChange, onGuestWalletsCreated, }?: Callbacks) => void;
|
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { useQueryClient } from "@tanstack/react-query";
|
|
4
|
-
import { useCallback, useEffect } from "react";
|
|
5
|
-
import { useWalletState } from "../index.js";
|
|
6
|
-
import {
|
|
7
|
-
ParaEvent
|
|
8
|
-
} from "@getpara/web-sdk";
|
|
9
|
-
import { ACCOUNT_BASE_KEY } from "../queries/useAccount.js";
|
|
10
|
-
import { useStore } from "../../stores/useStore.js";
|
|
11
|
-
import { WALLET_BASE_KEY } from "../queries/useWallet.js";
|
|
12
|
-
import { WALLET_BALANCE_BASE_KEY } from "../queries/useWalletBalance.js";
|
|
13
|
-
import { IS_FULLY_LOGGED_IN_BASE_KEY } from "../queries/useIsFullyLoggedIn.js";
|
|
14
|
-
const useEventListeners = ({
|
|
15
|
-
onLogin,
|
|
16
|
-
onLogout,
|
|
17
|
-
onAccountSetup,
|
|
18
|
-
onAccountCreation,
|
|
19
|
-
onSignMessage,
|
|
20
|
-
onSignTransaction,
|
|
21
|
-
onWalletCreated,
|
|
22
|
-
onPregenWalletClaimed,
|
|
23
|
-
onExternalWalletChange,
|
|
24
|
-
onWalletsChange,
|
|
25
|
-
onGuestWalletsCreated
|
|
26
|
-
} = {}) => {
|
|
27
|
-
const queryClient = useQueryClient();
|
|
28
|
-
const clearSelectedWallet = useStore((state) => state.clearSelectedWallet);
|
|
29
|
-
const { updateSelectedWallet } = useWalletState();
|
|
30
|
-
const loginOrSetupListener = useCallback(() => {
|
|
31
|
-
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
32
|
-
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
33
|
-
queryClient.refetchQueries({ queryKey: [WALLET_BASE_KEY] });
|
|
34
|
-
queryClient.invalidateQueries({ queryKey: [WALLET_BALANCE_BASE_KEY], exact: false });
|
|
35
|
-
}, [queryClient]);
|
|
36
|
-
const loginListener = useCallback(
|
|
37
|
-
(event) => {
|
|
38
|
-
loginOrSetupListener();
|
|
39
|
-
onLogin == null ? void 0 : onLogin(event);
|
|
40
|
-
},
|
|
41
|
-
[loginOrSetupListener, onLogin]
|
|
42
|
-
);
|
|
43
|
-
const accountSetupListener = useCallback(
|
|
44
|
-
(event) => {
|
|
45
|
-
loginOrSetupListener();
|
|
46
|
-
onAccountSetup == null ? void 0 : onAccountSetup(event);
|
|
47
|
-
},
|
|
48
|
-
[loginOrSetupListener, onAccountSetup]
|
|
49
|
-
);
|
|
50
|
-
const accountCreationListener = useCallback(
|
|
51
|
-
(event) => {
|
|
52
|
-
onAccountCreation == null ? void 0 : onAccountCreation(event);
|
|
53
|
-
},
|
|
54
|
-
[onAccountCreation]
|
|
55
|
-
);
|
|
56
|
-
const logoutListener = useCallback(
|
|
57
|
-
(event) => {
|
|
58
|
-
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
59
|
-
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
60
|
-
clearSelectedWallet();
|
|
61
|
-
onLogout == null ? void 0 : onLogout(event);
|
|
62
|
-
},
|
|
63
|
-
[queryClient, clearSelectedWallet, onLogout]
|
|
64
|
-
);
|
|
65
|
-
const signMessageListener = useCallback(
|
|
66
|
-
(event) => {
|
|
67
|
-
onSignMessage == null ? void 0 : onSignMessage(event);
|
|
68
|
-
},
|
|
69
|
-
[onSignMessage]
|
|
70
|
-
);
|
|
71
|
-
const signTransactionListener = useCallback(
|
|
72
|
-
(event) => {
|
|
73
|
-
onSignTransaction == null ? void 0 : onSignTransaction(event);
|
|
74
|
-
},
|
|
75
|
-
[onSignTransaction]
|
|
76
|
-
);
|
|
77
|
-
const walletChangeListener = useCallback(
|
|
78
|
-
(event) => {
|
|
79
|
-
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
80
|
-
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
81
|
-
updateSelectedWallet();
|
|
82
|
-
onWalletsChange == null ? void 0 : onWalletsChange(event);
|
|
83
|
-
},
|
|
84
|
-
[queryClient, updateSelectedWallet, onWalletsChange]
|
|
85
|
-
);
|
|
86
|
-
const externalWalletChangeListener = useCallback(
|
|
87
|
-
(event) => {
|
|
88
|
-
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
89
|
-
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
90
|
-
updateSelectedWallet();
|
|
91
|
-
onExternalWalletChange == null ? void 0 : onExternalWalletChange(event);
|
|
92
|
-
},
|
|
93
|
-
[queryClient, updateSelectedWallet, onExternalWalletChange]
|
|
94
|
-
);
|
|
95
|
-
const walletCreatedListener = useCallback(
|
|
96
|
-
(event) => {
|
|
97
|
-
onWalletCreated == null ? void 0 : onWalletCreated(event);
|
|
98
|
-
},
|
|
99
|
-
[onWalletCreated]
|
|
100
|
-
);
|
|
101
|
-
const pregenWalletClaimedListener = useCallback(
|
|
102
|
-
(event) => {
|
|
103
|
-
onPregenWalletClaimed == null ? void 0 : onPregenWalletClaimed(event);
|
|
104
|
-
},
|
|
105
|
-
[onPregenWalletClaimed]
|
|
106
|
-
);
|
|
107
|
-
const guestWalletsCreatedListener = useCallback(
|
|
108
|
-
(event) => {
|
|
109
|
-
queryClient.refetchQueries({ queryKey: [IS_FULLY_LOGGED_IN_BASE_KEY] });
|
|
110
|
-
queryClient.refetchQueries({ queryKey: [ACCOUNT_BASE_KEY] });
|
|
111
|
-
updateSelectedWallet();
|
|
112
|
-
onGuestWalletsCreated == null ? void 0 : onGuestWalletsCreated(event);
|
|
113
|
-
},
|
|
114
|
-
[queryClient, updateSelectedWallet, onGuestWalletsCreated]
|
|
115
|
-
);
|
|
116
|
-
useEffect(() => {
|
|
117
|
-
window.addEventListener(ParaEvent.LOGIN_EVENT, loginListener);
|
|
118
|
-
window.addEventListener(ParaEvent.ACCOUNT_SETUP_EVENT, accountSetupListener);
|
|
119
|
-
window.addEventListener(ParaEvent.ACCOUNT_CREATION_EVENT, accountCreationListener);
|
|
120
|
-
window.addEventListener(ParaEvent.LOGOUT_EVENT, logoutListener);
|
|
121
|
-
window.addEventListener(ParaEvent.SIGN_MESSAGE_EVENT, signMessageListener);
|
|
122
|
-
window.addEventListener(ParaEvent.SIGN_TRANSACTION_EVENT, signTransactionListener);
|
|
123
|
-
window.addEventListener(ParaEvent.WALLETS_CHANGE_EVENT, walletChangeListener);
|
|
124
|
-
window.addEventListener(ParaEvent.EXTERNAL_WALLET_CHANGE_EVENT, externalWalletChangeListener);
|
|
125
|
-
window.addEventListener(ParaEvent.WALLET_CREATED, walletCreatedListener);
|
|
126
|
-
window.addEventListener(ParaEvent.PREGEN_WALLET_CLAIMED, pregenWalletClaimedListener);
|
|
127
|
-
window.addEventListener(ParaEvent.GUEST_WALLETS_CREATED, guestWalletsCreatedListener);
|
|
128
|
-
return () => {
|
|
129
|
-
window.removeEventListener(ParaEvent.LOGIN_EVENT, loginListener);
|
|
130
|
-
window.removeEventListener(ParaEvent.ACCOUNT_SETUP_EVENT, accountSetupListener);
|
|
131
|
-
window.removeEventListener(ParaEvent.ACCOUNT_CREATION_EVENT, accountCreationListener);
|
|
132
|
-
window.removeEventListener(ParaEvent.LOGOUT_EVENT, logoutListener);
|
|
133
|
-
window.removeEventListener(ParaEvent.SIGN_MESSAGE_EVENT, signMessageListener);
|
|
134
|
-
window.removeEventListener(ParaEvent.SIGN_TRANSACTION_EVENT, signTransactionListener);
|
|
135
|
-
window.removeEventListener(ParaEvent.WALLETS_CHANGE_EVENT, walletChangeListener);
|
|
136
|
-
window.removeEventListener(ParaEvent.EXTERNAL_WALLET_CHANGE_EVENT, externalWalletChangeListener);
|
|
137
|
-
window.removeEventListener(ParaEvent.WALLET_CREATED, walletCreatedListener);
|
|
138
|
-
window.removeEventListener(ParaEvent.PREGEN_WALLET_CLAIMED, pregenWalletClaimedListener);
|
|
139
|
-
window.removeEventListener(ParaEvent.GUEST_WALLETS_CREATED, guestWalletsCreatedListener);
|
|
140
|
-
};
|
|
141
|
-
}, [
|
|
142
|
-
loginListener,
|
|
143
|
-
accountSetupListener,
|
|
144
|
-
accountCreationListener,
|
|
145
|
-
logoutListener,
|
|
146
|
-
signMessageListener,
|
|
147
|
-
signTransactionListener,
|
|
148
|
-
walletChangeListener,
|
|
149
|
-
externalWalletChangeListener,
|
|
150
|
-
walletCreatedListener,
|
|
151
|
-
pregenWalletClaimedListener,
|
|
152
|
-
guestWalletsCreatedListener
|
|
153
|
-
]);
|
|
154
|
-
};
|
|
155
|
-
export {
|
|
156
|
-
useEventListeners
|
|
157
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__async
|
|
4
|
-
} from "../../../chunk-MMUBH76A.js";
|
|
5
|
-
import { useQuery } from "@tanstack/react-query";
|
|
6
|
-
import { useModalStore } from "../../../modal/stores/index.js";
|
|
7
|
-
import { formatBiometricHints } from "@getpara/react-common";
|
|
8
|
-
import { useClient } from "./useClient.js";
|
|
9
|
-
const queryKey = ["FORMATTED_BIOMETRIC_HINTS"];
|
|
10
|
-
const useFormattedBiometricHints = () => {
|
|
11
|
-
var _a;
|
|
12
|
-
const client = useClient();
|
|
13
|
-
const loginState = useModalStore((state) => state.getLoginState());
|
|
14
|
-
return useQuery({
|
|
15
|
-
queryKey: [...queryKey, (_a = loginState == null ? void 0 : loginState.biometricHints) != null ? _a : "undefined"],
|
|
16
|
-
queryFn: () => __async(void 0, null, function* () {
|
|
17
|
-
if (!client || !(loginState == null ? void 0 : loginState.biometricHints)) {
|
|
18
|
-
return null;
|
|
19
|
-
}
|
|
20
|
-
const isPasskeySupported = yield client.isPasskeySupported();
|
|
21
|
-
return formatBiometricHints(loginState.biometricHints, isPasskeySupported);
|
|
22
|
-
})
|
|
23
|
-
});
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
useFormattedBiometricHints
|
|
27
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { useModalStore } from "../../../modal/stores/index.js";
|
|
4
|
-
import { useStore } from "../../stores/useStore.js";
|
|
5
|
-
const useModal = () => {
|
|
6
|
-
const isOpen = useStore((state) => state.isOpen);
|
|
7
|
-
const setIsOpen = useStore((state) => state.setIsOpen);
|
|
8
|
-
const openedToStep = useStore((state) => state.openedToStep);
|
|
9
|
-
const setStep = useModalStore((state) => state.setStep);
|
|
10
|
-
const openModal = ({ step } = {}) => {
|
|
11
|
-
if (step) {
|
|
12
|
-
openedToStep.current = step;
|
|
13
|
-
setStep(step);
|
|
14
|
-
}
|
|
15
|
-
if (!isOpen) {
|
|
16
|
-
setIsOpen(true);
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
const closeModal = () => {
|
|
20
|
-
openedToStep.current = null;
|
|
21
|
-
setIsOpen(false);
|
|
22
|
-
};
|
|
23
|
-
return { isOpen, openModal, closeModal };
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
useModal
|
|
27
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { TWalletType } from '@getpara/web-sdk';
|
|
2
|
-
/**
|
|
3
|
-
* Hook for controlling selected wallet
|
|
4
|
-
*/
|
|
5
|
-
export declare const useWalletState: () => {
|
|
6
|
-
selectedWallet: {
|
|
7
|
-
id: string | undefined;
|
|
8
|
-
type: "EVM" | "SOLANA" | "COSMOS" | undefined;
|
|
9
|
-
};
|
|
10
|
-
setSelectedWallet: ({ id, type }: {
|
|
11
|
-
id?: string;
|
|
12
|
-
type?: TWalletType;
|
|
13
|
-
}) => void;
|
|
14
|
-
updateSelectedWallet: () => void;
|
|
15
|
-
};
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../../chunk-MMUBH76A.js";
|
|
3
|
-
import { useStore } from "../../stores/useStore.js";
|
|
4
|
-
import { useClient } from "./useClient.js";
|
|
5
|
-
import { useCallback } from "react";
|
|
6
|
-
const useWalletState = () => {
|
|
7
|
-
const client = useClient();
|
|
8
|
-
const selectedWalletId = useStore((state) => state.selectedWalletId);
|
|
9
|
-
const selectedWalletType = useStore((state) => state.selectedWalletType);
|
|
10
|
-
const setStoredSelectedWallet = useStore((state) => state.setSelectedWallet);
|
|
11
|
-
const clearSelectedWallet = useStore((state) => state.clearSelectedWallet);
|
|
12
|
-
const setSelectedWallet = useCallback(
|
|
13
|
-
({ id, type }) => {
|
|
14
|
-
try {
|
|
15
|
-
const validId = client == null ? void 0 : client.findWalletId(id, type ? { type: [type] } : void 0);
|
|
16
|
-
if (validId !== id) {
|
|
17
|
-
clearSelectedWallet();
|
|
18
|
-
} else {
|
|
19
|
-
setStoredSelectedWallet(id, type);
|
|
20
|
-
}
|
|
21
|
-
} catch (e) {
|
|
22
|
-
clearSelectedWallet();
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
[client, clearSelectedWallet, setStoredSelectedWallet]
|
|
26
|
-
);
|
|
27
|
-
const updateSelectedWallet = useCallback(() => {
|
|
28
|
-
if (!client) {
|
|
29
|
-
clearSelectedWallet();
|
|
30
|
-
return;
|
|
31
|
-
}
|
|
32
|
-
if (!selectedWalletId || !client.findWallet(selectedWalletId)) {
|
|
33
|
-
const defaultWallet = client.findWallet(void 0, void 0, { forbidPregen: true });
|
|
34
|
-
setSelectedWallet({ id: defaultWallet == null ? void 0 : defaultWallet.id, type: defaultWallet == null ? void 0 : defaultWallet.type });
|
|
35
|
-
}
|
|
36
|
-
}, [clearSelectedWallet, setSelectedWallet, client, selectedWalletId]);
|
|
37
|
-
return {
|
|
38
|
-
selectedWallet: {
|
|
39
|
-
id: selectedWalletId,
|
|
40
|
-
type: selectedWalletType
|
|
41
|
-
},
|
|
42
|
-
setSelectedWallet,
|
|
43
|
-
updateSelectedWallet
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
useWalletState
|
|
48
|
-
};
|
package/dist/provider/index.d.ts
DELETED
package/dist/provider/index.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../chunk-MMUBH76A.js";
|
|
3
|
-
import { ParaProvider } from "./ParaProvider.js";
|
|
4
|
-
export * from "./hooks/index.js";
|
|
5
|
-
export * from "./stores/getters.js";
|
|
6
|
-
export * from "./stores/setters.js";
|
|
7
|
-
export * from "./types/externalWalletProviders.js";
|
|
8
|
-
export * from "./types/provider.js";
|
|
9
|
-
export {
|
|
10
|
-
ParaProvider
|
|
11
|
-
};
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
-
import { MutationStatus } from '@tanstack/react-query';
|
|
3
|
-
import { AccountLinkError, AccountLinkInProgress as CoreAccountLinkInProgress, LinkedAccount, LinkedAccounts, SupportedAccountLinks, TelegramAuthResponse, TExternalWallet, TLinkedAccountType, Auth, InternalMethodParams } from '@getpara/web-sdk';
|
|
4
|
-
import { TWalletType } from '@getpara/user-management-client';
|
|
5
|
-
type AccountLinkInProgress = Partial<CoreAccountLinkInProgress & {
|
|
6
|
-
pendingWalletProvider?: TExternalWallet;
|
|
7
|
-
pendingWalletType?: TWalletType;
|
|
8
|
-
}>;
|
|
9
|
-
export type ModalLinkAccountArgs = undefined | {
|
|
10
|
-
auth: Auth<'email' | 'phone'>;
|
|
11
|
-
} | {
|
|
12
|
-
type: Exclude<TLinkedAccountType, 'EXTERNAL_WALLET'> | 'X';
|
|
13
|
-
} | {
|
|
14
|
-
externalWallet: {
|
|
15
|
-
internalId: TExternalWallet;
|
|
16
|
-
type?: TWalletType;
|
|
17
|
-
};
|
|
18
|
-
} | {
|
|
19
|
-
options: SupportedAccountLinks;
|
|
20
|
-
};
|
|
21
|
-
type Value = {
|
|
22
|
-
isEnabled: boolean;
|
|
23
|
-
accountLinkInProgress: AccountLinkInProgress | undefined;
|
|
24
|
-
accountLinkOptions: SupportedAccountLinks;
|
|
25
|
-
linkAccount: (_: ModalLinkAccountArgs) => Promise<void>;
|
|
26
|
-
isLinkAccountPending: boolean;
|
|
27
|
-
verifyEmailOrPhoneLink: (verificationCode: string) => void;
|
|
28
|
-
verifyOAuthLink: (method: InternalMethodParams<'verifyOAuthLink'>['method']) => void;
|
|
29
|
-
verifyFarcasterLink: () => void;
|
|
30
|
-
verifyTelegramLink: (telegramAuthResponse: TelegramAuthResponse) => void;
|
|
31
|
-
verifyLinkedAccount: (accountLinkInProgress: AccountLinkInProgress) => void;
|
|
32
|
-
linkAccountStatus: MutationStatus;
|
|
33
|
-
linkAccountError: string | null;
|
|
34
|
-
setLinkAccountError: (_: AccountLinkError | null) => void;
|
|
35
|
-
unlinkingAccount: LinkedAccount | undefined;
|
|
36
|
-
unlinkAccount: (linkedAccount: LinkedAccount) => void;
|
|
37
|
-
unlinkAccountConfirm: () => void;
|
|
38
|
-
isUnlinkAccountPending: boolean;
|
|
39
|
-
cancelLinkAccount: () => void;
|
|
40
|
-
onAccountLinked: (_: AccountLinkInProgress) => void;
|
|
41
|
-
onAccountLinkVerified: (_: LinkedAccounts) => void;
|
|
42
|
-
resetMutations: () => void;
|
|
43
|
-
};
|
|
44
|
-
export declare const AccountLinkContext: import("react").Context<Value>;
|
|
45
|
-
export declare const AccountLinkProvider: ({ children }: PropsWithChildren) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
-
export declare const useAccountLinking: () => Value;
|
|
47
|
-
export {};
|