@getpara/react-sdk 2.0.0-dev.3 → 2.0.0-dev.4
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/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/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,261 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
import { CpslIcon, CpslInput, CpslSelect, CpslSelectItem, CpslText, CpslTileButton } from "@getpara/react-components";
|
|
5
|
-
import { safeStyled } from "@getpara/react-common";
|
|
6
|
-
import { MOBILE_SIZE, NETWORKS, ON_RAMP_ASSETS } from "../constants/constants.js";
|
|
7
|
-
import { useStore } from "../../provider/stores/useStore.js";
|
|
8
|
-
import { ACCOUNT_TYPES } from "../constants/oAuthLogos.js";
|
|
9
|
-
import { useEffect, useRef, useState } from "react";
|
|
10
|
-
const SpinnerContainer = safeStyled.div`
|
|
11
|
-
display: flex;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
`;
|
|
15
|
-
const QRContainer = safeStyled.div`
|
|
16
|
-
display: flex;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
align-items: center;
|
|
19
|
-
width: 286px;
|
|
20
|
-
height: 286px;
|
|
21
|
-
`;
|
|
22
|
-
const InfoBoxContent = safeStyled.div`
|
|
23
|
-
display: flex;
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
gap: 8px;
|
|
26
|
-
`;
|
|
27
|
-
const InfoBoxHeader = safeStyled.div`
|
|
28
|
-
display: flex;
|
|
29
|
-
align-items: center;
|
|
30
|
-
gap: 4px;
|
|
31
|
-
|
|
32
|
-
cpsl-icon {
|
|
33
|
-
--height: 20px;
|
|
34
|
-
--width: 20px;
|
|
35
|
-
}
|
|
36
|
-
`;
|
|
37
|
-
const FilledDisabledInput = safeStyled(CpslInput)`
|
|
38
|
-
--container-border-color: var(--cpsl-color-input-border-placeholder);
|
|
39
|
-
--container-background-color: var(--cpsl-color-background-0);
|
|
40
|
-
--input-background-color: transparent;
|
|
41
|
-
--input-font-weight: 500;
|
|
42
|
-
--input-color: var(--cpsl-color-text-secondary);
|
|
43
|
-
`;
|
|
44
|
-
const FullWidthFilledDisabledInput = safeStyled(FilledDisabledInput)`
|
|
45
|
-
width: 100%;
|
|
46
|
-
`;
|
|
47
|
-
const CenteredText = safeStyled(CpslText)`
|
|
48
|
-
width: 100%;
|
|
49
|
-
text-align: center;
|
|
50
|
-
`;
|
|
51
|
-
const InnerStepContainer = safeStyled.div`
|
|
52
|
-
width: 100%;
|
|
53
|
-
height: 100%;
|
|
54
|
-
align-self: center;
|
|
55
|
-
display: flex;
|
|
56
|
-
flex-direction: column;
|
|
57
|
-
align-items: center;
|
|
58
|
-
gap: 8px;
|
|
59
|
-
`;
|
|
60
|
-
const StepContainer = safeStyled(InnerStepContainer)`
|
|
61
|
-
gap: ${({ $wide }) => $wide ? "32px" : "24px"};
|
|
62
|
-
`;
|
|
63
|
-
const Heading = safeStyled(CenteredText)``;
|
|
64
|
-
const StyledCpslTileButton = safeStyled(CpslTileButton)`
|
|
65
|
-
--button-width: 100%;
|
|
66
|
-
--button-height: 87px;
|
|
67
|
-
--button-icon-height: 32px;
|
|
68
|
-
--button-icon-width: 32px;
|
|
69
|
-
`;
|
|
70
|
-
const HeroIcon = safeStyled(CpslIcon)`
|
|
71
|
-
--height: 80px;
|
|
72
|
-
--width: 80px;
|
|
73
|
-
--icon-color: var(--cpsl-color-text-primary);
|
|
74
|
-
`;
|
|
75
|
-
const HeaderSelect = safeStyled(CpslSelect)`
|
|
76
|
-
--container-height: 26px;
|
|
77
|
-
--container-border-width: 0px;
|
|
78
|
-
--container-padding-end: 0px;
|
|
79
|
-
--container-padding-start: 0px;
|
|
80
|
-
--container-background-color: transparent;
|
|
81
|
-
--container-box-shadow: none;
|
|
82
|
-
--container-gap: 2px;
|
|
83
|
-
--icon-width: 16px;
|
|
84
|
-
--icon-height: 16px;
|
|
85
|
-
position: relative;
|
|
86
|
-
|
|
87
|
-
&::part(selected-text) {
|
|
88
|
-
white-space: nowrap;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
&::part(dropdown) {
|
|
92
|
-
min-width: ${({ $width }) => `${$width - 2}px`};
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
&::part(popover) {
|
|
96
|
-
/* Have to adjust the top of the popover here since we're using a transform on the modal which causes fixed position items to not be relative to the viewport */
|
|
97
|
-
@media (max-width: ${MOBILE_SIZE}px) {
|
|
98
|
-
top: ${({ $top }) => $top ? `${$top}px` : "0px"};
|
|
99
|
-
bottom: 16px;
|
|
100
|
-
}
|
|
101
|
-
cpsl-auth-modal.force-mobile-media & {
|
|
102
|
-
top: ${({ $top }) => $top ? `${$top}px` : "0px"};
|
|
103
|
-
bottom: 16px;
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
&::part(icon) {
|
|
108
|
-
--icon-color: var(--cpsl-color-contrast);
|
|
109
|
-
}
|
|
110
|
-
`;
|
|
111
|
-
const HeaderSelectItem = safeStyled(CpslSelectItem)`
|
|
112
|
-
--outer-container-padding-start: 4px;
|
|
113
|
-
--outer-container-padding-end: 4px;
|
|
114
|
-
--outer-container-padding-top: 4px;
|
|
115
|
-
--outer-container-padding-bottom: 4px;
|
|
116
|
-
`;
|
|
117
|
-
const HeaderSelectContainer = safeStyled.div`
|
|
118
|
-
position: relative;
|
|
119
|
-
display: flex;
|
|
120
|
-
align-items: center;
|
|
121
|
-
gap: 8px;
|
|
122
|
-
border-radius: 1000px;
|
|
123
|
-
background-color: var(--cpsl-color-background-8);
|
|
124
|
-
padding: 4px;
|
|
125
|
-
`;
|
|
126
|
-
const StyledIcon = safeStyled(CpslIcon)`
|
|
127
|
-
background: var(--cpsl-color-background-0);
|
|
128
|
-
border-radius: 100%;
|
|
129
|
-
`;
|
|
130
|
-
function AssetIcon({ asset, size }) {
|
|
131
|
-
const isDark = useStore((state) => {
|
|
132
|
-
var _a, _b;
|
|
133
|
-
return ((_b = (_a = state.modalConfig) == null ? void 0 : _a.theme) == null ? void 0 : _b.mode) === "dark";
|
|
134
|
-
});
|
|
135
|
-
const data = ON_RAMP_ASSETS[asset];
|
|
136
|
-
return /* @__PURE__ */ jsx(StyledIcon, { size, icon: data.icon, inset: data.isCircular ? void 0 : "15%", invert: isDark && data.isDark });
|
|
137
|
-
}
|
|
138
|
-
function NetworkIcon({ network, size }) {
|
|
139
|
-
const isDark = useStore((state) => {
|
|
140
|
-
var _a, _b;
|
|
141
|
-
return ((_b = (_a = state.modalConfig) == null ? void 0 : _a.theme) == null ? void 0 : _b.mode) === "dark";
|
|
142
|
-
});
|
|
143
|
-
const data = NETWORKS[network];
|
|
144
|
-
return /* @__PURE__ */ jsx(StyledIcon, { size, icon: data.icon, inset: data.isCircular ? void 0 : "15%", invert: isDark && data.isDark });
|
|
145
|
-
}
|
|
146
|
-
const ErrorContainer = safeStyled.div`
|
|
147
|
-
display: flex;
|
|
148
|
-
align-items: center;
|
|
149
|
-
justify-content: center;
|
|
150
|
-
gap: 4px;
|
|
151
|
-
`;
|
|
152
|
-
const ErrorIcon = safeStyled(CpslIcon)`
|
|
153
|
-
--height: 16px;
|
|
154
|
-
--width: 16px;
|
|
155
|
-
--icon-color: var(--cpsl-color-text-error);
|
|
156
|
-
`;
|
|
157
|
-
function AccountTypeIcon({
|
|
158
|
-
accountType,
|
|
159
|
-
size,
|
|
160
|
-
inset
|
|
161
|
-
}) {
|
|
162
|
-
var _a;
|
|
163
|
-
const isDark = useStore((state) => {
|
|
164
|
-
var _a2, _b;
|
|
165
|
-
return ((_b = (_a2 = state.modalConfig) == null ? void 0 : _a2.theme) == null ? void 0 : _b.mode) === "dark";
|
|
166
|
-
});
|
|
167
|
-
const data = accountType ? ACCOUNT_TYPES[accountType] : null;
|
|
168
|
-
return data ? /* @__PURE__ */ jsx(CpslIcon, { size, inset, icon: (_a = data.logoBranded) != null ? _a : data.logo, invert: isDark && data.isDark }) : null;
|
|
169
|
-
}
|
|
170
|
-
function HeroAccountTypeIcon({ accountType }) {
|
|
171
|
-
if (accountType === "EMAIL" || accountType === "PHONE") {
|
|
172
|
-
return /* @__PURE__ */ jsx(HeroGenericIcon, { accountType });
|
|
173
|
-
}
|
|
174
|
-
return /* @__PURE__ */ jsx(AccountTypeIcon, { accountType, size: "60px" });
|
|
175
|
-
}
|
|
176
|
-
function HeroSuccessIcon() {
|
|
177
|
-
return /* @__PURE__ */ jsx(CpslIcon, { icon: "checkCircleFilled", size: "80px", style: { ["--icon-color"]: "var(--cpsl-color-utility-green" } });
|
|
178
|
-
}
|
|
179
|
-
function GradientScroll({ height, gap, children }) {
|
|
180
|
-
const [isNotAtBottom, setIsNotAtBottom] = useState(false);
|
|
181
|
-
const [isNotAtTop, setIsNotAtTop] = useState(false);
|
|
182
|
-
const ref = useRef(null);
|
|
183
|
-
const onScroll = () => {
|
|
184
|
-
if (ref.current) {
|
|
185
|
-
const { scrollTop, scrollHeight, clientHeight } = ref.current;
|
|
186
|
-
if (height && scrollHeight <= parseInt(height)) {
|
|
187
|
-
setIsNotAtTop(false);
|
|
188
|
-
setIsNotAtBottom(false);
|
|
189
|
-
} else {
|
|
190
|
-
setIsNotAtTop(scrollTop > 30);
|
|
191
|
-
setIsNotAtBottom(scrollTop + clientHeight < scrollHeight - 30);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
};
|
|
195
|
-
useEffect(() => {
|
|
196
|
-
onScroll();
|
|
197
|
-
}, []);
|
|
198
|
-
return /* @__PURE__ */ jsx(
|
|
199
|
-
GradientScrollContainer,
|
|
200
|
-
{
|
|
201
|
-
ref,
|
|
202
|
-
$height: height,
|
|
203
|
-
$gap: gap,
|
|
204
|
-
$isNotAtBottom: isNotAtBottom,
|
|
205
|
-
$isNotAtTop: isNotAtTop,
|
|
206
|
-
onScroll,
|
|
207
|
-
children: /* @__PURE__ */ jsx("div", { children })
|
|
208
|
-
}
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
const HeroGenericIcon = ({ accountType }) => {
|
|
212
|
-
return /* @__PURE__ */ jsx(Avatar, { children: /* @__PURE__ */ jsx(AccountTypeIcon, { accountType, size: "24px" }) });
|
|
213
|
-
};
|
|
214
|
-
const GradientScrollContainer = safeStyled.div`
|
|
215
|
-
max-height: ${({ $height }) => $height || "100%"};
|
|
216
|
-
width: 100%;
|
|
217
|
-
overflow-y: auto;
|
|
218
|
-
mask-image: ${({ $isNotAtBottom, $isNotAtTop }) => $isNotAtBottom && $isNotAtTop ? "linear-gradient(to bottom, transparent 0%, black 24px, black calc(100% - 24px), transparent 100%)" : $isNotAtBottom ? "linear-gradient(to bottom, black calc(100% - 24px), transparent 100%)" : $isNotAtTop ? "linear-gradient(to top, black calc(100% - 24px), transparent 100%)" : "none"};
|
|
219
|
-
|
|
220
|
-
& > div {
|
|
221
|
-
width: 100%;
|
|
222
|
-
display: flex;
|
|
223
|
-
flex-direction: column;
|
|
224
|
-
gap: ${({ $gap }) => $gap || "8px"};
|
|
225
|
-
}
|
|
226
|
-
`;
|
|
227
|
-
const Avatar = safeStyled.div`
|
|
228
|
-
width: 80px;
|
|
229
|
-
height: 80px;
|
|
230
|
-
border-radius: 100%;
|
|
231
|
-
display: flex;
|
|
232
|
-
align-items: center;
|
|
233
|
-
justify-content: center;
|
|
234
|
-
background-color: var(--cpsl-color-background-8);
|
|
235
|
-
`;
|
|
236
|
-
export {
|
|
237
|
-
AccountTypeIcon,
|
|
238
|
-
AssetIcon,
|
|
239
|
-
CenteredText,
|
|
240
|
-
ErrorContainer,
|
|
241
|
-
ErrorIcon,
|
|
242
|
-
FilledDisabledInput,
|
|
243
|
-
FullWidthFilledDisabledInput,
|
|
244
|
-
GradientScroll,
|
|
245
|
-
HeaderSelect,
|
|
246
|
-
HeaderSelectContainer,
|
|
247
|
-
HeaderSelectItem,
|
|
248
|
-
Heading,
|
|
249
|
-
HeroAccountTypeIcon,
|
|
250
|
-
HeroGenericIcon,
|
|
251
|
-
HeroIcon,
|
|
252
|
-
HeroSuccessIcon,
|
|
253
|
-
InfoBoxContent,
|
|
254
|
-
InfoBoxHeader,
|
|
255
|
-
InnerStepContainer,
|
|
256
|
-
NetworkIcon,
|
|
257
|
-
QRContainer,
|
|
258
|
-
SpinnerContainer,
|
|
259
|
-
StepContainer,
|
|
260
|
-
StyledCpslTileButton
|
|
261
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ModalContent/ModalContent.js';
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Network, OnRampAsset, OnRampMethod, OnRampProvider } from '@getpara/core-sdk';
|
|
2
|
-
import { IconType } from '@getpara/react-components';
|
|
3
|
-
import { Transition, Variants } from 'framer-motion';
|
|
4
|
-
export declare const PARA_CONNECT = "https://connect.getpara.com/";
|
|
5
|
-
export declare const PARA_TERMS_AND_CONDITIONS = "https://getpara.com/terms";
|
|
6
|
-
export interface OnRampProviderConfig {
|
|
7
|
-
name: string;
|
|
8
|
-
feeLower: number;
|
|
9
|
-
feeUpper?: number;
|
|
10
|
-
methods: OnRampMethod[];
|
|
11
|
-
icon: IconType;
|
|
12
|
-
backgroundColors: string[];
|
|
13
|
-
}
|
|
14
|
-
export declare const ON_RAMP_PROVIDERS: Record<OnRampProvider, OnRampProviderConfig>;
|
|
15
|
-
type Networks = Record<Network, {
|
|
16
|
-
name: string;
|
|
17
|
-
icon: IconType;
|
|
18
|
-
isCircular?: boolean;
|
|
19
|
-
isDark?: boolean;
|
|
20
|
-
}>;
|
|
21
|
-
export declare const NETWORKS: Networks;
|
|
22
|
-
export declare const ON_RAMP_ASSETS: Record<OnRampAsset, {
|
|
23
|
-
name: string;
|
|
24
|
-
code: string;
|
|
25
|
-
icon: IconType;
|
|
26
|
-
isCircular?: boolean;
|
|
27
|
-
isDark?: boolean;
|
|
28
|
-
}>;
|
|
29
|
-
export declare function getNetworkName(str: Network | string): string;
|
|
30
|
-
export declare function getNetworkIcon(str: Network | string): IconType;
|
|
31
|
-
export declare function getAssetCode(str: OnRampAsset | string): string;
|
|
32
|
-
export declare function getAssetName(str: OnRampAsset | string): string;
|
|
33
|
-
export declare function getAssetIcon(str: OnRampAsset | string): "key" | "phone" | "farcaster" | "telegram" | "discord" | "x" | "search" | "wallet" | "cosmos" | "solana" | "para" | "walletConnect" | "close" | "copy" | "safe" | "alertCircle" | "alertTriangle" | "alignVerticalCenter" | "angelListBrand" | "angelList" | "appleBrand" | "apple" | "arbitrumBrand" | "arrowCircleBrokenDownLeft" | "arrowCircleDownFilled" | "arrowNarrow" | "arrow" | "asterisk" | "backpack" | "backupKit" | "bank" | "baseBrand" | "beraBrand" | "brush" | "celoBrand" | "checkCircleFilled" | "checkCircle" | "checkSquare" | "check" | "chevronDown" | "chevronRight" | "chevronSelectorVertical" | "chevronUp" | "clock" | "clubhouseBrand" | "clubhouse" | "code" | "coinbase" | "copy07" | "cosmosCircle" | "cosmostation" | "creditCard02" | "creditCard" | "cube03" | "cubeOutline" | "cube" | "currencyDollar" | "decentBrand" | "decent" | "dell" | "discordBrand" | "dot" | "dots" | "downloadCloud" | "download" | "dribbbleBrand" | "dribbble" | "earth" | "edit02" | "emptyCircle" | "ethCircle" | "ethereum" | "eyeOff" | "eye" | "facebookBrand" | "facebook" | "farcasterBrand" | "figmaBrand" | "figma" | "file" | "folder" | "githubBrand" | "github" | "globe" | "glow" | "googleBrand" | "google" | "gridDots" | "haha" | "helpCircle" | "heroAlertCircle" | "heroCheckmarkCapsule" | "heroCheckmark" | "heroEmail" | "heroExternalConnection" | "heroLock" | "heroPasskey" | "heroPhone" | "heroPlusCircleCapsule" | "heroPlusCircle" | "heroWallet" | "home" | "hp" | "image" | "infoCircle" | "instagramBrand" | "instagram" | "keplr" | "laptop" | "leap" | "lenovo" | "lg" | "lightning01" | "lightning" | "linkExternal" | "linkedinBrand" | "linkedin" | "lockKeyholeCircle" | "logOut" | "mail" | "menu" | "metamask" | "monitor" | "moonpayBrand" | "moreLoginOptions" | "motorola" | "nobleBrand" | "okx" | "optimismBrand" | "paraBlackBg" | "paraBrand" | "paraIconBrand" | "paraIconQr" | "paraIcon" | "paraLogo" | "paraRingsDark" | "paraRings" | "passcode" | "phantom" | "pintrestBrand" | "pintrest" | "plusCircle" | "plus" | "polygonBrand" | "polygon" | "puzzlePiece" | "qrCode02" | "qrCode" | "rabby" | "rainbow" | "rampNetworkBrand" | "rampNetwork" | "redditBrand" | "reddit" | "refresh" | "samsung" | "send" | "settings" | "share" | "shield" | "signalBrand" | "signal" | "sliders" | "snapchatBrand" | "snapchat" | "solanaCircle" | "solflare" | "spacingHeight" | "star04Filled" | "star05" | "stars01Filled" | "stars02" | "stars" | "stopSquare" | "stripeBrand" | "telegramBrand" | "tetherBrand" | "tikTokBrand" | "tikTok" | "trash" | "tumblrBrand" | "tumblr" | "twitterBrand" | "twitter" | "usdcBrand" | "userCircle" | "userPlus" | "user" | "valora" | "youtubeBrand" | "youtube" | "zerion" | "AD" | "AE" | "AF" | "AG" | "AI" | "AL" | "AM" | "AO" | "AR" | "AS" | "AT" | "AU" | "AW" | "AX" | "AZ" | "BA" | "BB" | "BD" | "BE" | "BF" | "BG" | "BH" | "BI" | "BJ" | "BL" | "BM" | "BN" | "BO" | "BQ" | "BQ2" | "BQ3" | "BR" | "BS" | "BT" | "BW" | "BY" | "BZ" | "CA" | "CC" | "CD" | "CD2" | "CF" | "CH" | "CK" | "CL" | "CM" | "CN" | "CO" | "CR" | "CU" | "CW" | "CX" | "CY" | "CZ" | "DE" | "DJ" | "DK" | "DM" | "DO" | "DS" | "DZ" | "EC" | "EE" | "EG" | "EH" | "ER" | "ES" | "ET" | "FI" | "FJ" | "FK" | "FM" | "FO" | "FR" | "GA" | "GB2" | "GB" | "GD" | "GE" | "GG" | "GH" | "GI" | "GL" | "GM" | "GN" | "GQ" | "GR" | "GT" | "GU" | "GW" | "GY" | "HK" | "HN" | "HR" | "HT" | "HU" | "ID" | "IE" | "IL" | "IM" | "IN" | "IO" | "IQ" | "IR" | "IS" | "IT" | "JE" | "JM" | "JO" | "JP" | "KE" | "KG" | "KH" | "KI" | "KM" | "KN" | "KP" | "KR" | "KW" | "KY" | "KZ" | "LA" | "LB" | "LC" | "LI" | "LK" | "LR" | "LS" | "LT" | "LU" | "LV" | "LY" | "MA" | "MC" | "MD" | "ME" | "MG" | "MH" | "MK" | "ML" | "MM" | "MN" | "MO" | "MP" | "MQ" | "MR" | "MS" | "MT" | "MU" | "MV" | "MW" | "MX" | "MY" | "MZ" | "NA" | "NE" | "NF" | "NG" | "NI" | "NL" | "NO" | "NP" | "NR" | "NU" | "NZ" | "OM" | "PA" | "PE" | "PF" | "PG" | "PH" | "PK" | "PL" | "PN" | "PR" | "PS" | "PT" | "PW" | "PY" | "QA" | "RO" | "RS" | "RU" | "RW" | "SA" | "SB" | "SC" | "SE" | "SG" | "SI" | "SK" | "SL" | "SM" | "SN" | "SO" | "SR" | "SS" | "ST" | "SV" | "SX" | "SY" | "SZ" | "TC" | "TD" | "TG" | "TH" | "TJ" | "TK" | "TL" | "TM" | "TN" | "TO" | "TR" | "TT" | "TV" | "TW" | "TZ" | "UA" | "UG" | "US" | "UY" | "UZ" | "VC" | "VE" | "VG" | "VI" | "VN" | "VU" | "WS" | "YE" | "ZA" | "ZM" | "ZW";
|
|
34
|
-
export declare const MOBILE_SIZE = 480;
|
|
35
|
-
export declare const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
36
|
-
export declare const EMAIL_REGEX: RegExp;
|
|
37
|
-
export declare const BODY_MOTION_VARIANTS: Variants;
|
|
38
|
-
export declare const BODY_TRANSITION: Transition;
|
|
39
|
-
export declare const SDK_VERSION: string;
|
|
40
|
-
export {};
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import {
|
|
3
|
-
__spreadProps,
|
|
4
|
-
__spreadValues
|
|
5
|
-
} from "../../chunk-MMUBH76A.js";
|
|
6
|
-
import { Network, OnRampAsset, OnRampMethod, OnRampProvider } from "@getpara/core-sdk";
|
|
7
|
-
const PARA_CONNECT = "https://connect.getpara.com/";
|
|
8
|
-
const PARA_TERMS_AND_CONDITIONS = "https://getpara.com/terms";
|
|
9
|
-
const ON_RAMP_PROVIDERS = {
|
|
10
|
-
[OnRampProvider.STRIPE]: {
|
|
11
|
-
name: "Stripe",
|
|
12
|
-
feeLower: 0.99,
|
|
13
|
-
feeUpper: 4.49,
|
|
14
|
-
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
15
|
-
icon: "stripeBrand",
|
|
16
|
-
backgroundColors: ["#6772E5", "#808AF4"]
|
|
17
|
-
},
|
|
18
|
-
[OnRampProvider.RAMP]: {
|
|
19
|
-
name: "Ramp",
|
|
20
|
-
feeLower: 0.99,
|
|
21
|
-
feeUpper: 4.49,
|
|
22
|
-
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
23
|
-
icon: "rampNetworkBrand",
|
|
24
|
-
backgroundColors: ["#21BF73", "#3AE492"]
|
|
25
|
-
},
|
|
26
|
-
[OnRampProvider.MOONPAY]: {
|
|
27
|
-
name: "MoonPay",
|
|
28
|
-
feeLower: 1,
|
|
29
|
-
feeUpper: 4.5,
|
|
30
|
-
methods: [OnRampMethod.ACH, OnRampMethod.DEBIT, OnRampMethod.CREDIT],
|
|
31
|
-
icon: "moonpayBrand",
|
|
32
|
-
backgroundColors: ["#7715F5", "#9647fd"]
|
|
33
|
-
}
|
|
34
|
-
};
|
|
35
|
-
const ICON_TYPES = {
|
|
36
|
-
ethereum: { isDark: true },
|
|
37
|
-
usdcBrand: { isCircular: true },
|
|
38
|
-
arbitrumBrand: { isCircular: true },
|
|
39
|
-
baseBrand: { isCircular: true },
|
|
40
|
-
optimismBrand: { isCircular: true },
|
|
41
|
-
cosmos: { isCircular: true, isDark: true },
|
|
42
|
-
celoBrand: { isCircular: true },
|
|
43
|
-
tetherBrand: { isCircular: true }
|
|
44
|
-
};
|
|
45
|
-
const NETWORKS = Object.entries({
|
|
46
|
-
[Network.ETHEREUM]: { name: "Ethereum", icon: "ethereum" },
|
|
47
|
-
[Network.SEPOLIA]: { name: "Sepolia", icon: "ethereum" },
|
|
48
|
-
[Network.ARBITRUM]: { name: "Arbitrum", icon: "arbitrumBrand" },
|
|
49
|
-
[Network.BASE]: { name: "Base", icon: "baseBrand" },
|
|
50
|
-
[Network.OPTIMISM]: { name: "Optimism", icon: "optimismBrand" },
|
|
51
|
-
[Network.POLYGON]: { name: "Polygon", icon: "polygonBrand" },
|
|
52
|
-
[Network.SOLANA]: { name: "Solana", icon: "solana" },
|
|
53
|
-
[Network.COSMOS]: { name: "Cosmos", icon: "cosmos" },
|
|
54
|
-
[Network.CELO]: { name: "Celo", icon: "celoBrand" },
|
|
55
|
-
[Network.SOLANA_DEVNET]: { name: "Solana Devnet", icon: "solana" },
|
|
56
|
-
[Network.NOBLE]: { name: "Noble", icon: "nobleBrand" },
|
|
57
|
-
[Network.BERACHAIN]: { name: "Berachain", icon: "beraBrand" }
|
|
58
|
-
}).reduce((acc, [key, entry]) => {
|
|
59
|
-
return __spreadProps(__spreadValues({}, acc), {
|
|
60
|
-
[key]: __spreadValues(__spreadValues({}, entry), ICON_TYPES[entry.icon])
|
|
61
|
-
});
|
|
62
|
-
}, {});
|
|
63
|
-
const ON_RAMP_ASSETS = Object.entries({
|
|
64
|
-
[OnRampAsset.ETHEREUM]: { name: "Ethereum", code: "ETH", icon: "ethereum" },
|
|
65
|
-
[OnRampAsset.USDC]: { name: "USD Coin", code: "USDC", icon: "usdcBrand" },
|
|
66
|
-
[OnRampAsset.POLYGON]: { name: "Polygon", code: "POL", icon: "polygonBrand" },
|
|
67
|
-
[OnRampAsset.SOLANA]: { name: "Solana", code: "SOL", icon: "solana" },
|
|
68
|
-
[OnRampAsset.ATOM]: { name: "Atom", code: "ATOM", icon: "cosmos" },
|
|
69
|
-
[OnRampAsset.CELO]: { name: "Celo", code: "CELO", icon: "celoBrand" },
|
|
70
|
-
[OnRampAsset.TETHER]: { name: "Tether", code: "USDT", icon: "tetherBrand" },
|
|
71
|
-
[OnRampAsset.CUSD]: { name: "Celo Dollar", code: "CUSD", icon: "celoBrand" },
|
|
72
|
-
[OnRampAsset.CEUR]: { name: "Celo Euro", code: "CEUR", icon: "celoBrand" },
|
|
73
|
-
[OnRampAsset.CREAL]: { name: "Celo Real", code: "CREAL", icon: "celoBrand" },
|
|
74
|
-
[OnRampAsset.BERA]: { name: "Berachain", code: "BERA", icon: "beraBrand" }
|
|
75
|
-
}).reduce((acc, [key, entry]) => {
|
|
76
|
-
return __spreadProps(__spreadValues({}, acc), {
|
|
77
|
-
[key]: __spreadValues(__spreadValues({}, entry), ICON_TYPES[entry.icon])
|
|
78
|
-
});
|
|
79
|
-
}, {});
|
|
80
|
-
function getNetworkName(str) {
|
|
81
|
-
var _a, _b;
|
|
82
|
-
return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.name) != null ? _b : `${str[0]}${str.slice(1).toLowerCase()}`;
|
|
83
|
-
}
|
|
84
|
-
function getNetworkIcon(str) {
|
|
85
|
-
var _a, _b;
|
|
86
|
-
return (_b = (_a = NETWORKS[str]) == null ? void 0 : _a.icon) != null ? _b : "globe";
|
|
87
|
-
}
|
|
88
|
-
function getAssetCode(str) {
|
|
89
|
-
var _a, _b;
|
|
90
|
-
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.code) != null ? _b : str;
|
|
91
|
-
}
|
|
92
|
-
function getAssetName(str) {
|
|
93
|
-
var _a, _b;
|
|
94
|
-
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.name) != null ? _b : str;
|
|
95
|
-
}
|
|
96
|
-
function getAssetIcon(str) {
|
|
97
|
-
var _a, _b;
|
|
98
|
-
return (_b = (_a = ON_RAMP_ASSETS[str]) == null ? void 0 : _a.icon) != null ? _b : "emptyCircle";
|
|
99
|
-
}
|
|
100
|
-
const MOBILE_SIZE = 480;
|
|
101
|
-
const NETWORK_NOT_SUPPORTED_ERROR = "network not supported";
|
|
102
|
-
const EMAIL_REGEX = /^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|.(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
|
103
|
-
const BODY_MOTION_VARIANTS = {
|
|
104
|
-
enter: (direction) => {
|
|
105
|
-
return {
|
|
106
|
-
scale: direction > 0 ? 0.9 : 1.1,
|
|
107
|
-
opacity: 0
|
|
108
|
-
};
|
|
109
|
-
},
|
|
110
|
-
center: {
|
|
111
|
-
scale: 1,
|
|
112
|
-
opacity: 1
|
|
113
|
-
},
|
|
114
|
-
exit: (direction) => {
|
|
115
|
-
return {
|
|
116
|
-
scale: direction < 0 ? 0.9 : 1.1,
|
|
117
|
-
opacity: 0
|
|
118
|
-
};
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
const BODY_TRANSITION = {
|
|
122
|
-
duration: 0.2
|
|
123
|
-
};
|
|
124
|
-
const SDK_VERSION = "2.0.0-dev.0";
|
|
125
|
-
export {
|
|
126
|
-
BODY_MOTION_VARIANTS,
|
|
127
|
-
BODY_TRANSITION,
|
|
128
|
-
EMAIL_REGEX,
|
|
129
|
-
MOBILE_SIZE,
|
|
130
|
-
NETWORKS,
|
|
131
|
-
NETWORK_NOT_SUPPORTED_ERROR,
|
|
132
|
-
ON_RAMP_ASSETS,
|
|
133
|
-
ON_RAMP_PROVIDERS,
|
|
134
|
-
PARA_CONNECT,
|
|
135
|
-
PARA_TERMS_AND_CONDITIONS,
|
|
136
|
-
SDK_VERSION,
|
|
137
|
-
getAssetCode,
|
|
138
|
-
getAssetIcon,
|
|
139
|
-
getAssetName,
|
|
140
|
-
getNetworkIcon,
|
|
141
|
-
getNetworkName
|
|
142
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TExternalWallet } from '@getpara/web-sdk';
|
|
2
|
-
import { IconType } from '@getpara/react-components';
|
|
3
|
-
import { TLinkedAccountType } from '@getpara/web-sdk';
|
|
4
|
-
export declare const ACCOUNT_TYPES: {
|
|
5
|
-
[key in TLinkedAccountType | TExternalWallet]: {
|
|
6
|
-
logo: IconType;
|
|
7
|
-
logoBranded?: IconType;
|
|
8
|
-
name: string;
|
|
9
|
-
isDark?: boolean;
|
|
10
|
-
inline?: string;
|
|
11
|
-
isExternalWallet?: boolean;
|
|
12
|
-
};
|
|
13
|
-
};
|
|
14
|
-
export declare function getAccountTypeName(type: TLinkedAccountType | TExternalWallet | undefined, { inline }?: {
|
|
15
|
-
inline?: boolean;
|
|
16
|
-
}): string | undefined;
|
|
17
|
-
export declare function getAccountTypeLogo(type: TLinkedAccountType | undefined): IconType | undefined;
|
|
@@ -1,158 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
const ACCOUNT_TYPES = {
|
|
4
|
-
EMAIL: {
|
|
5
|
-
logo: "mail",
|
|
6
|
-
name: "Email",
|
|
7
|
-
inline: "email address",
|
|
8
|
-
isDark: true
|
|
9
|
-
},
|
|
10
|
-
PHONE: {
|
|
11
|
-
logo: "phone",
|
|
12
|
-
name: "Phone",
|
|
13
|
-
inline: "phone number",
|
|
14
|
-
isDark: true
|
|
15
|
-
},
|
|
16
|
-
EXTERNAL_WALLET: {
|
|
17
|
-
logo: "wallet",
|
|
18
|
-
name: "External Wallet",
|
|
19
|
-
inline: "external wallet",
|
|
20
|
-
isDark: true
|
|
21
|
-
},
|
|
22
|
-
GOOGLE: {
|
|
23
|
-
logo: "google",
|
|
24
|
-
logoBranded: "googleBrand",
|
|
25
|
-
name: "Google"
|
|
26
|
-
},
|
|
27
|
-
TWITTER: {
|
|
28
|
-
logo: "twitter",
|
|
29
|
-
logoBranded: "twitterBrand",
|
|
30
|
-
name: "X / Twitter",
|
|
31
|
-
inline: "X account",
|
|
32
|
-
isDark: true
|
|
33
|
-
},
|
|
34
|
-
APPLE: {
|
|
35
|
-
logo: "apple",
|
|
36
|
-
logoBranded: "appleBrand",
|
|
37
|
-
name: "Apple",
|
|
38
|
-
isDark: true
|
|
39
|
-
},
|
|
40
|
-
DISCORD: {
|
|
41
|
-
logo: "discord",
|
|
42
|
-
logoBranded: "discordBrand",
|
|
43
|
-
name: "Discord"
|
|
44
|
-
},
|
|
45
|
-
FACEBOOK: {
|
|
46
|
-
logo: "facebook",
|
|
47
|
-
logoBranded: "facebookBrand",
|
|
48
|
-
name: "Facebook"
|
|
49
|
-
},
|
|
50
|
-
FARCASTER: {
|
|
51
|
-
logo: "farcaster",
|
|
52
|
-
logoBranded: "farcasterBrand",
|
|
53
|
-
name: "Farcaster"
|
|
54
|
-
},
|
|
55
|
-
TELEGRAM: {
|
|
56
|
-
logo: "telegram",
|
|
57
|
-
logoBranded: "telegramBrand",
|
|
58
|
-
name: "Telegram"
|
|
59
|
-
},
|
|
60
|
-
METAMASK: {
|
|
61
|
-
logo: "metamask",
|
|
62
|
-
name: "MetaMask",
|
|
63
|
-
isExternalWallet: true
|
|
64
|
-
},
|
|
65
|
-
RAINBOW: {
|
|
66
|
-
logo: "rainbow",
|
|
67
|
-
name: "Rainbow",
|
|
68
|
-
isExternalWallet: true
|
|
69
|
-
},
|
|
70
|
-
COINBASE: {
|
|
71
|
-
logo: "coinbase",
|
|
72
|
-
name: "Coinbase Wallet",
|
|
73
|
-
isExternalWallet: true
|
|
74
|
-
},
|
|
75
|
-
WALLETCONNECT: {
|
|
76
|
-
logo: "walletConnect",
|
|
77
|
-
name: "WalletConnect",
|
|
78
|
-
isExternalWallet: true
|
|
79
|
-
},
|
|
80
|
-
ZERION: {
|
|
81
|
-
logo: "zerion",
|
|
82
|
-
name: "Zerion",
|
|
83
|
-
isExternalWallet: true
|
|
84
|
-
},
|
|
85
|
-
SAFE: {
|
|
86
|
-
logo: "safe",
|
|
87
|
-
name: "Safe",
|
|
88
|
-
isExternalWallet: true
|
|
89
|
-
},
|
|
90
|
-
RABBY: {
|
|
91
|
-
logo: "rabby",
|
|
92
|
-
name: "Rabby",
|
|
93
|
-
isExternalWallet: true
|
|
94
|
-
},
|
|
95
|
-
OKX: {
|
|
96
|
-
logo: "okx",
|
|
97
|
-
name: "OKX",
|
|
98
|
-
isExternalWallet: true
|
|
99
|
-
},
|
|
100
|
-
PHANTOM: {
|
|
101
|
-
logo: "phantom",
|
|
102
|
-
name: "Phantom",
|
|
103
|
-
isExternalWallet: true
|
|
104
|
-
},
|
|
105
|
-
GLOW: {
|
|
106
|
-
logo: "glow",
|
|
107
|
-
name: "Glow",
|
|
108
|
-
isExternalWallet: true
|
|
109
|
-
},
|
|
110
|
-
BACKPACK: {
|
|
111
|
-
logo: "backpack",
|
|
112
|
-
name: "Backpack",
|
|
113
|
-
isExternalWallet: true
|
|
114
|
-
},
|
|
115
|
-
KEPLR: {
|
|
116
|
-
logo: "keplr",
|
|
117
|
-
name: "Keplr",
|
|
118
|
-
isExternalWallet: true
|
|
119
|
-
},
|
|
120
|
-
LEAP: {
|
|
121
|
-
logo: "leap",
|
|
122
|
-
name: "Leap",
|
|
123
|
-
isExternalWallet: true
|
|
124
|
-
},
|
|
125
|
-
HAHA: {
|
|
126
|
-
logo: "haha",
|
|
127
|
-
name: "HaHa",
|
|
128
|
-
isExternalWallet: true
|
|
129
|
-
},
|
|
130
|
-
COSMOSTATION: {
|
|
131
|
-
logo: "cosmostation",
|
|
132
|
-
name: "Cosmostation",
|
|
133
|
-
isExternalWallet: true
|
|
134
|
-
},
|
|
135
|
-
SOLFLARE: {
|
|
136
|
-
logo: "solflare",
|
|
137
|
-
name: "Solflare",
|
|
138
|
-
isExternalWallet: true
|
|
139
|
-
},
|
|
140
|
-
VALORA: {
|
|
141
|
-
logo: "valora",
|
|
142
|
-
name: "Valora",
|
|
143
|
-
isExternalWallet: true
|
|
144
|
-
}
|
|
145
|
-
};
|
|
146
|
-
function getAccountTypeName(type, { inline = false } = {}) {
|
|
147
|
-
var _a;
|
|
148
|
-
const data = type ? ACCOUNT_TYPES[type] : void 0;
|
|
149
|
-
return data ? inline ? (_a = data.inline) != null ? _a : `${data.name} ${data.isExternalWallet ? "wallet" : "account"}` : data.name : void 0;
|
|
150
|
-
}
|
|
151
|
-
function getAccountTypeLogo(type) {
|
|
152
|
-
return type ? ACCOUNT_TYPES[type].logoBranded || ACCOUNT_TYPES[type].logo : void 0;
|
|
153
|
-
}
|
|
154
|
-
export {
|
|
155
|
-
ACCOUNT_TYPES,
|
|
156
|
-
getAccountTypeLogo,
|
|
157
|
-
getAccountTypeName
|
|
158
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import "../../chunk-MMUBH76A.js";
|
|
3
|
-
const WALLET_TYPE_CONFIG = {
|
|
4
|
-
EVM: {
|
|
5
|
-
name: "Ethereum",
|
|
6
|
-
icon: "ethCircle"
|
|
7
|
-
},
|
|
8
|
-
SOLANA: { name: "Solana", icon: "solanaCircle" },
|
|
9
|
-
COSMOS: { name: "Cosmos", icon: "cosmosCircle" }
|
|
10
|
-
};
|
|
11
|
-
export {
|
|
12
|
-
WALLET_TYPE_CONFIG
|
|
13
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useGoBack: () => () => void;
|