@dodoex/widgets 3.0.0-beta.31 → 3.0.0-beta.32
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/cjs/e2e/connect.test.d.ts +6 -0
- package/dist/cjs/e2e/constants.d.ts +87 -0
- package/dist/cjs/e2e/default.test.d.ts +6 -0
- package/dist/cjs/e2e/setup.d.ts +4 -0
- package/dist/cjs/helper-DNaeIBQY.cjs +1 -0
- package/dist/cjs/index-BZtt1iuv.cjs +12 -0
- package/dist/cjs/index-CULtuKOC.cjs +78 -0
- package/dist/cjs/index-DWLX0NSs.cjs +53 -0
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/lottie-4VzKv4A8.cjs +1 -0
- package/dist/cjs/src/components/Bridge/BridgeRouteShortCard.d.ts +6 -0
- package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.d.ts +5 -0
- package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/index.d.ts +18 -0
- package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/CrossStep.d.ts +16 -0
- package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/EtherscanLinkButton.d.ts +6 -0
- package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/RouteSteps.d.ts +6 -0
- package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/SwapStep.d.ts +14 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/BridgeLogo.d.ts +10 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/DirectionLine.d.ts +4 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +21 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteTagList.d.ts +12 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/TokenWithChain.d.ts +11 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/index.d.ts +9 -0
- package/dist/cjs/src/components/Bridge/SelectBridgeDialog/productList.d.ts +8 -0
- package/dist/cjs/src/components/ErrorMessageDialog.d.ts +5 -0
- package/dist/cjs/src/components/Swap/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
- package/dist/cjs/src/components/Swap/components/ConnectWallet/index.d.ts +9 -0
- package/dist/cjs/src/components/Swap/components/Dialog.d.ts +14 -0
- package/dist/cjs/src/components/Swap/components/ReviewDialog.d.ts +22 -0
- package/dist/cjs/src/components/Swap/components/SettingsDialog/NumberInput.d.ts +8 -0
- package/dist/cjs/src/components/Swap/components/SettingsDialog/index.d.ts +7 -0
- package/dist/cjs/src/components/Swap/components/SwitchBox.d.ts +5 -0
- package/dist/cjs/src/components/Swap/components/TokenCard/BalanceText.d.ts +9 -0
- package/dist/cjs/src/components/Swap/components/TokenCard/NumberInput.d.ts +13 -0
- package/dist/cjs/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +7 -0
- package/dist/cjs/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +13 -0
- package/dist/cjs/src/components/Swap/components/TokenCard/index.d.ts +23 -0
- package/dist/cjs/src/components/Swap/components/TokenPairPriceWithToggle.d.ts +10 -0
- package/dist/cjs/src/components/Swap/index.d.ts +9 -0
- package/dist/cjs/src/components/SwitchChainDialog/index.d.ts +7 -0
- package/dist/cjs/src/components/TokenLogo.d.ts +16 -0
- package/dist/cjs/src/components/TokenPicker/PopularToken.d.ts +7 -0
- package/dist/cjs/src/components/TokenPicker/SelectChainItem.d.ts +7 -0
- package/dist/cjs/src/components/TokenPicker/TokenItem.d.ts +8 -0
- package/dist/cjs/src/components/TokenPicker/index.d.ts +19 -0
- package/dist/cjs/src/components/Tooltip/QuestionTooltip.d.ts +3 -0
- package/dist/cjs/src/components/Tooltip/index.d.ts +1 -0
- package/dist/cjs/src/components/Widget/i18n.d.ts +9 -0
- package/dist/cjs/src/components/Widget/index.d.ts +34 -0
- package/dist/cjs/src/components/WithExecutionDialog/index.d.ts +5 -0
- package/dist/cjs/src/constants/address.d.ts +1 -0
- package/dist/cjs/src/constants/api.d.ts +16 -0
- package/dist/cjs/src/constants/chainList.d.ts +9 -0
- package/dist/cjs/src/constants/chains.d.ts +42 -0
- package/dist/cjs/src/constants/locales.d.ts +3 -0
- package/dist/cjs/src/constants/localstorage.d.ts +12 -0
- package/dist/cjs/src/constants/swap.d.ts +7 -0
- package/dist/cjs/src/constants/testId.d.ts +10 -0
- package/dist/cjs/src/constants/token.d.ts +2 -0
- package/dist/cjs/src/constants/tokenList.d.ts +18 -0
- package/dist/cjs/src/constants/wallet.d.ts +23 -0
- package/dist/cjs/src/hooks/Bridge/createBridgeOrder.d.ts +28 -0
- package/dist/cjs/src/hooks/Bridge/index.d.ts +4 -0
- package/dist/cjs/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +6 -0
- package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +113 -0
- package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Bridge/useSendRoute.d.ts +16 -0
- package/dist/cjs/src/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +1 -0
- package/dist/cjs/src/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +9 -0
- package/dist/cjs/src/hooks/ConnectWallet/TonConnect/index.d.ts +26 -0
- package/dist/cjs/src/hooks/ConnectWallet/index.d.ts +3 -0
- package/dist/cjs/src/hooks/ConnectWallet/useCurrentChainId.d.ts +2 -0
- package/dist/cjs/src/hooks/ConnectWallet/useSwitchChain.d.ts +10 -0
- package/dist/cjs/src/hooks/ConnectWallet/useWalletState.d.ts +24 -0
- package/dist/cjs/src/hooks/ConnectWallet/useWeb3Connectors.d.ts +17 -0
- package/dist/cjs/src/hooks/ConnectWallet/web3.d.ts +10 -0
- package/dist/cjs/src/hooks/Submission/getExecutionErrorMsg.d.ts +2 -0
- package/dist/cjs/src/hooks/Submission/index.d.ts +10 -0
- package/dist/cjs/src/hooks/Submission/spec.d.ts +56 -0
- package/dist/cjs/src/hooks/Submission/types.d.ts +50 -0
- package/dist/cjs/src/hooks/Submission/useExecution.d.ts +31 -0
- package/dist/cjs/src/hooks/Submission/useInflights.d.ts +5 -0
- package/dist/cjs/src/hooks/Swap/index.d.ts +5 -0
- package/dist/cjs/src/hooks/Swap/useExecuteSwap.d.ts +12 -0
- package/dist/cjs/src/hooks/Swap/useFetchFiatPrice.d.ts +13 -0
- package/dist/cjs/src/hooks/Swap/useFetchFiatPrice.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Swap/useFetchRoutePrice.d.ts +37 -0
- package/dist/cjs/src/hooks/Swap/useFetchRoutePrice.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Swap/useInitDefaultToken.d.ts +10 -0
- package/dist/cjs/src/hooks/Swap/useMarginAmount.d.ts +8 -0
- package/dist/cjs/src/hooks/Swap/useMarginAmount.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Swap/usePriceTimer.d.ts +5 -0
- package/dist/cjs/src/hooks/Swap/useSlippageLimit.d.ts +2 -0
- package/dist/cjs/src/hooks/Token/index.d.ts +4 -0
- package/dist/cjs/src/hooks/Token/type.d.ts +26 -0
- package/dist/cjs/src/hooks/Token/useDisabledTokenSwitch.d.ts +5 -0
- package/dist/cjs/src/hooks/Token/useFetchTokenAllowance.d.ts +13 -0
- package/dist/cjs/src/hooks/Token/useFindTokenByAddress.d.ts +1 -0
- package/dist/cjs/src/hooks/Token/useFindTokenByAddress.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Token/useGetAllowance.d.ts +3 -0
- package/dist/cjs/src/hooks/Token/useGetAllowance.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Token/useGetBalance.d.ts +2 -0
- package/dist/cjs/src/hooks/Token/useGetBalance.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Token/useGetCGTokenList.d.ts +15 -0
- package/dist/cjs/src/hooks/Token/useGetTokenStatus.d.ts +13 -0
- package/dist/cjs/src/hooks/Token/useGetTokenStatus.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Token/useInitTokenList.d.ts +8 -0
- package/dist/cjs/src/hooks/Token/useSelectChainList.d.ts +7 -0
- package/dist/cjs/src/hooks/Token/useSelectChainList.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Token/useTokenList.d.ts +30 -0
- package/dist/cjs/src/hooks/Token/useTokenList.test.d.ts +1 -0
- package/dist/cjs/src/hooks/Token/useTokenListFetchBalance.d.ts +9 -0
- package/dist/cjs/src/hooks/Widget/useInitPropsToRedux.d.ts +2 -0
- package/dist/cjs/src/hooks/contract/abis/OrbiterV3ABI.d.ts +85 -0
- package/dist/cjs/src/hooks/contract/abis/erc20ABI.d.ts +30 -0
- package/dist/cjs/src/hooks/contract/abis/erc20Helper.d.ts +16 -0
- package/dist/cjs/src/hooks/contract/abis/multicallABI.d.ts +34 -0
- package/dist/cjs/src/hooks/contract/batch.d.ts +18 -0
- package/dist/cjs/src/hooks/contract/contractConfig.d.ts +9 -0
- package/dist/cjs/src/hooks/contract/index.d.ts +5 -0
- package/dist/cjs/src/hooks/contract/orbiter/constants.d.ts +3 -0
- package/dist/cjs/src/hooks/contract/orbiter/encodeOrbiterBridge.d.ts +12 -0
- package/dist/cjs/src/hooks/contract/orbiter/useOrbiterContractMap.d.ts +5 -0
- package/dist/cjs/src/hooks/contract/orbiter/useOrbiterRouters.d.ts +21 -0
- package/dist/cjs/src/hooks/contract/provider.d.ts +2 -0
- package/dist/cjs/src/hooks/contract/token.d.ts +10 -0
- package/dist/cjs/src/hooks/contract/useFetchBlockNumber.d.ts +3 -0
- package/dist/cjs/src/hooks/contract/useFetchETHBalance.d.ts +1 -0
- package/dist/cjs/src/hooks/contract/useFetchTokens.d.ts +19 -0
- package/dist/cjs/src/hooks/contract/useMultiContract.d.ts +14 -0
- package/dist/cjs/src/hooks/contract/wallet.d.ts +16 -0
- package/dist/cjs/src/hooks/setting/useDefaultSlippage.d.ts +4 -0
- package/dist/cjs/src/hooks/setting/useGetAPIService.d.ts +2 -0
- package/dist/cjs/src/hooks/setting/useSetAutoSlippage.d.ts +13 -0
- package/dist/cjs/src/index.d.ts +6 -0
- package/dist/cjs/src/store/actions/globals.d.ts +9 -0
- package/dist/cjs/src/store/actions/index.d.ts +4 -0
- package/dist/cjs/src/store/actions/settings.d.ts +6 -0
- package/dist/cjs/src/store/actions/token.d.ts +15 -0
- package/dist/cjs/src/store/actions/wallet.d.ts +5 -0
- package/dist/cjs/src/store/index.d.ts +6 -0
- package/dist/cjs/src/store/reducers/globals.d.ts +23 -0
- package/dist/cjs/src/store/reducers/index.d.ts +17 -0
- package/dist/cjs/src/store/reducers/settings.d.ts +13 -0
- package/dist/cjs/src/store/reducers/token.d.ts +31 -0
- package/dist/cjs/src/store/reducers/wallet.d.ts +10 -0
- package/dist/cjs/src/store/selectors/globals.d.ts +7 -0
- package/dist/cjs/src/store/selectors/settings.d.ts +4 -0
- package/dist/cjs/src/store/selectors/token.d.ts +19 -0
- package/dist/cjs/src/store/selectors/wallet.d.ts +4 -0
- package/dist/cjs/src/utils/address.d.ts +15 -0
- package/dist/cjs/src/utils/address.test.d.ts +1 -0
- package/dist/cjs/src/utils/chains.d.ts +2 -0
- package/dist/cjs/src/utils/chains.test.d.ts +1 -0
- package/dist/cjs/src/utils/formatter.d.ts +25 -0
- package/dist/cjs/src/utils/formatter.test.d.ts +1 -0
- package/dist/cjs/src/utils/index.d.ts +5 -0
- package/dist/cjs/src/utils/time.d.ts +9 -0
- package/dist/cjs/src/utils/time.test.d.ts +1 -0
- package/dist/cjs/src/utils/token.d.ts +9 -0
- package/dist/cjs/src/utils/token.test.d.ts +1 -0
- package/dist/cjs/src/utils/wallet.d.ts +8 -0
- package/dist/cjs/src/utils/wallet.test.d.ts +1 -0
- package/dist/e2e/connect.test.d.ts +6 -0
- package/dist/e2e/constants.d.ts +87 -0
- package/dist/e2e/default.test.d.ts +6 -0
- package/dist/e2e/setup.d.ts +4 -0
- package/dist/helper-D1mp2p4F.js +1 -0
- package/dist/index-CE6izMXy.js +12 -0
- package/dist/index-CEwSZbo5.js +53 -0
- package/dist/index-Duga8SDh.js +78 -0
- package/dist/index.js +1 -1
- package/dist/lottie-DMZ5X1eY.js +1 -0
- package/dist/src/components/Bridge/BridgeRouteShortCard.d.ts +6 -0
- package/dist/src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.d.ts +5 -0
- package/dist/src/components/Bridge/BridgeSummaryDialog/index.d.ts +18 -0
- package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/CrossStep.d.ts +16 -0
- package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/EtherscanLinkButton.d.ts +6 -0
- package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/RouteSteps.d.ts +6 -0
- package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/SwapStep.d.ts +14 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/BridgeLogo.d.ts +10 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/DirectionLine.d.ts +4 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +21 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/RouteTagList.d.ts +12 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/TokenWithChain.d.ts +11 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/index.d.ts +9 -0
- package/dist/src/components/Bridge/SelectBridgeDialog/productList.d.ts +8 -0
- package/dist/src/components/ErrorMessageDialog.d.ts +5 -0
- package/dist/src/components/Swap/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
- package/dist/src/components/Swap/components/ConnectWallet/index.d.ts +9 -0
- package/dist/src/components/Swap/components/Dialog.d.ts +14 -0
- package/dist/src/components/Swap/components/ReviewDialog.d.ts +22 -0
- package/dist/src/components/Swap/components/SettingsDialog/NumberInput.d.ts +8 -0
- package/dist/src/components/Swap/components/SettingsDialog/index.d.ts +7 -0
- package/dist/src/components/Swap/components/SwitchBox.d.ts +5 -0
- package/dist/src/components/Swap/components/TokenCard/BalanceText.d.ts +9 -0
- package/dist/src/components/Swap/components/TokenCard/NumberInput.d.ts +13 -0
- package/dist/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +7 -0
- package/dist/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +13 -0
- package/dist/src/components/Swap/components/TokenCard/index.d.ts +23 -0
- package/dist/src/components/Swap/components/TokenPairPriceWithToggle.d.ts +10 -0
- package/dist/src/components/Swap/index.d.ts +9 -0
- package/dist/src/components/SwitchChainDialog/index.d.ts +7 -0
- package/dist/src/components/TokenLogo.d.ts +16 -0
- package/dist/src/components/TokenPicker/PopularToken.d.ts +7 -0
- package/dist/src/components/TokenPicker/SelectChainItem.d.ts +7 -0
- package/dist/src/components/TokenPicker/TokenItem.d.ts +8 -0
- package/dist/src/components/TokenPicker/index.d.ts +19 -0
- package/dist/src/components/Tooltip/QuestionTooltip.d.ts +3 -0
- package/dist/src/components/Tooltip/index.d.ts +1 -0
- package/dist/src/components/Widget/i18n.d.ts +9 -0
- package/dist/src/components/Widget/index.d.ts +34 -0
- package/dist/src/components/WithExecutionDialog/index.d.ts +5 -0
- package/dist/src/constants/address.d.ts +1 -0
- package/dist/src/constants/api.d.ts +16 -0
- package/dist/src/constants/chainList.d.ts +9 -0
- package/dist/src/constants/chains.d.ts +42 -0
- package/dist/src/constants/locales.d.ts +3 -0
- package/dist/src/constants/localstorage.d.ts +12 -0
- package/dist/src/constants/swap.d.ts +7 -0
- package/dist/src/constants/testId.d.ts +10 -0
- package/dist/src/constants/token.d.ts +2 -0
- package/dist/src/constants/tokenList.d.ts +18 -0
- package/dist/src/constants/wallet.d.ts +23 -0
- package/dist/src/hooks/Bridge/createBridgeOrder.d.ts +28 -0
- package/dist/src/hooks/Bridge/index.d.ts +4 -0
- package/dist/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +6 -0
- package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +113 -0
- package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.test.d.ts +1 -0
- package/dist/src/hooks/Bridge/useSendRoute.d.ts +16 -0
- package/dist/src/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +1 -0
- package/dist/src/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +9 -0
- package/dist/src/hooks/ConnectWallet/TonConnect/index.d.ts +26 -0
- package/dist/src/hooks/ConnectWallet/index.d.ts +3 -0
- package/dist/src/hooks/ConnectWallet/useCurrentChainId.d.ts +2 -0
- package/dist/src/hooks/ConnectWallet/useSwitchChain.d.ts +10 -0
- package/dist/src/hooks/ConnectWallet/useWalletState.d.ts +24 -0
- package/dist/src/hooks/ConnectWallet/useWeb3Connectors.d.ts +17 -0
- package/dist/src/hooks/ConnectWallet/web3.d.ts +10 -0
- package/dist/src/hooks/Submission/getExecutionErrorMsg.d.ts +2 -0
- package/dist/src/hooks/Submission/index.d.ts +10 -0
- package/dist/src/hooks/Submission/spec.d.ts +56 -0
- package/dist/src/hooks/Submission/types.d.ts +50 -0
- package/dist/src/hooks/Submission/useExecution.d.ts +31 -0
- package/dist/src/hooks/Submission/useInflights.d.ts +5 -0
- package/dist/src/hooks/Swap/index.d.ts +5 -0
- package/dist/src/hooks/Swap/useExecuteSwap.d.ts +12 -0
- package/dist/src/hooks/Swap/useFetchFiatPrice.d.ts +13 -0
- package/dist/src/hooks/Swap/useFetchFiatPrice.test.d.ts +1 -0
- package/dist/src/hooks/Swap/useFetchRoutePrice.d.ts +37 -0
- package/dist/src/hooks/Swap/useFetchRoutePrice.test.d.ts +1 -0
- package/dist/src/hooks/Swap/useInitDefaultToken.d.ts +10 -0
- package/dist/src/hooks/Swap/useMarginAmount.d.ts +8 -0
- package/dist/src/hooks/Swap/useMarginAmount.test.d.ts +1 -0
- package/dist/src/hooks/Swap/usePriceTimer.d.ts +5 -0
- package/dist/src/hooks/Swap/useSlippageLimit.d.ts +2 -0
- package/dist/src/hooks/Token/index.d.ts +4 -0
- package/dist/src/hooks/Token/type.d.ts +26 -0
- package/dist/src/hooks/Token/useDisabledTokenSwitch.d.ts +5 -0
- package/dist/src/hooks/Token/useFetchTokenAllowance.d.ts +13 -0
- package/dist/src/hooks/Token/useFindTokenByAddress.d.ts +1 -0
- package/dist/src/hooks/Token/useFindTokenByAddress.test.d.ts +1 -0
- package/dist/src/hooks/Token/useGetAllowance.d.ts +3 -0
- package/dist/src/hooks/Token/useGetAllowance.test.d.ts +1 -0
- package/dist/src/hooks/Token/useGetBalance.d.ts +2 -0
- package/dist/src/hooks/Token/useGetBalance.test.d.ts +1 -0
- package/dist/src/hooks/Token/useGetCGTokenList.d.ts +15 -0
- package/dist/src/hooks/Token/useGetTokenStatus.d.ts +13 -0
- package/dist/src/hooks/Token/useGetTokenStatus.test.d.ts +1 -0
- package/dist/src/hooks/Token/useInitTokenList.d.ts +8 -0
- package/dist/src/hooks/Token/useSelectChainList.d.ts +7 -0
- package/dist/src/hooks/Token/useSelectChainList.test.d.ts +1 -0
- package/dist/src/hooks/Token/useTokenList.d.ts +30 -0
- package/dist/src/hooks/Token/useTokenList.test.d.ts +1 -0
- package/dist/src/hooks/Token/useTokenListFetchBalance.d.ts +9 -0
- package/dist/src/hooks/Widget/useInitPropsToRedux.d.ts +2 -0
- package/dist/src/hooks/contract/abis/OrbiterV3ABI.d.ts +85 -0
- package/dist/src/hooks/contract/abis/erc20ABI.d.ts +30 -0
- package/dist/src/hooks/contract/abis/erc20Helper.d.ts +16 -0
- package/dist/src/hooks/contract/abis/multicallABI.d.ts +34 -0
- package/dist/src/hooks/contract/batch.d.ts +18 -0
- package/dist/src/hooks/contract/contractConfig.d.ts +9 -0
- package/dist/src/hooks/contract/index.d.ts +5 -0
- package/dist/src/hooks/contract/orbiter/constants.d.ts +3 -0
- package/dist/src/hooks/contract/orbiter/encodeOrbiterBridge.d.ts +12 -0
- package/dist/src/hooks/contract/orbiter/useOrbiterContractMap.d.ts +5 -0
- package/dist/src/hooks/contract/orbiter/useOrbiterRouters.d.ts +21 -0
- package/dist/src/hooks/contract/provider.d.ts +2 -0
- package/dist/src/hooks/contract/token.d.ts +10 -0
- package/dist/src/hooks/contract/useFetchBlockNumber.d.ts +3 -0
- package/dist/src/hooks/contract/useFetchETHBalance.d.ts +1 -0
- package/dist/src/hooks/contract/useFetchTokens.d.ts +19 -0
- package/dist/src/hooks/contract/useMultiContract.d.ts +14 -0
- package/dist/src/hooks/contract/wallet.d.ts +16 -0
- package/dist/src/hooks/setting/useDefaultSlippage.d.ts +4 -0
- package/dist/src/hooks/setting/useGetAPIService.d.ts +2 -0
- package/dist/src/hooks/setting/useSetAutoSlippage.d.ts +13 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/store/actions/globals.d.ts +9 -0
- package/dist/src/store/actions/index.d.ts +4 -0
- package/dist/src/store/actions/settings.d.ts +6 -0
- package/dist/src/store/actions/token.d.ts +15 -0
- package/dist/src/store/actions/wallet.d.ts +5 -0
- package/dist/src/store/index.d.ts +6 -0
- package/dist/src/store/reducers/globals.d.ts +23 -0
- package/dist/src/store/reducers/index.d.ts +17 -0
- package/dist/src/store/reducers/settings.d.ts +13 -0
- package/dist/src/store/reducers/token.d.ts +31 -0
- package/dist/src/store/reducers/wallet.d.ts +10 -0
- package/dist/src/store/selectors/globals.d.ts +7 -0
- package/dist/src/store/selectors/settings.d.ts +4 -0
- package/dist/src/store/selectors/token.d.ts +19 -0
- package/dist/src/store/selectors/wallet.d.ts +4 -0
- package/dist/src/utils/address.d.ts +15 -0
- package/dist/src/utils/address.test.d.ts +1 -0
- package/dist/src/utils/chains.d.ts +2 -0
- package/dist/src/utils/chains.test.d.ts +1 -0
- package/dist/src/utils/formatter.d.ts +25 -0
- package/dist/src/utils/formatter.test.d.ts +1 -0
- package/dist/src/utils/index.d.ts +5 -0
- package/dist/src/utils/time.d.ts +9 -0
- package/dist/src/utils/time.test.d.ts +1 -0
- package/dist/src/utils/token.d.ts +9 -0
- package/dist/src/utils/token.test.d.ts +1 -0
- package/dist/src/utils/wallet.d.ts +8 -0
- package/dist/src/utils/wallet.test.d.ts +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BridgeRouteI } from '../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
3
|
+
export interface BridgeTXRequest {
|
|
4
|
+
data: string;
|
|
5
|
+
to: string;
|
|
6
|
+
value: string;
|
|
7
|
+
from: string;
|
|
8
|
+
chainId: number;
|
|
9
|
+
encodeId?: string;
|
|
10
|
+
}
|
|
11
|
+
export default function BridgeSummaryDialog({ open, onClose, route, bridgeOrderTxRequest, clearToAmt, clearFromAmt, }: {
|
|
12
|
+
open: boolean;
|
|
13
|
+
onClose: () => void;
|
|
14
|
+
route?: BridgeRouteI;
|
|
15
|
+
bridgeOrderTxRequest?: BridgeTXRequest;
|
|
16
|
+
clearToAmt: () => void;
|
|
17
|
+
clearFromAmt: () => void;
|
|
18
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { BridgeStepTool } from '../../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
4
|
+
export declare function CrossStep({ fromChainId, toChainId, fromTokenAmount, toTokenAmount, fromTokenDecimals, fromTokenSymbol, toTokenDecimals, toTokenSymbol, fromHash, toHash, toolDetails, }: {
|
|
5
|
+
fromChainId: number;
|
|
6
|
+
toChainId: number;
|
|
7
|
+
fromTokenAmount: BigNumber;
|
|
8
|
+
toTokenAmount: BigNumber;
|
|
9
|
+
fromTokenSymbol: string;
|
|
10
|
+
fromTokenDecimals: number;
|
|
11
|
+
toTokenSymbol: string;
|
|
12
|
+
toTokenDecimals: number;
|
|
13
|
+
fromHash: string | null;
|
|
14
|
+
toHash: string | null;
|
|
15
|
+
toolDetails: BridgeStepTool;
|
|
16
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { BridgeStepTool } from '../../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
4
|
+
export declare function SwapStep({ chainId, fromTokenAmount, toTokenAmount, fromTokenDecimals, fromTokenSymbol, toTokenDecimals, toTokenSymbol, hash, toolDetails, }: {
|
|
5
|
+
chainId: number;
|
|
6
|
+
fromTokenAmount: BigNumber;
|
|
7
|
+
toTokenAmount: BigNumber;
|
|
8
|
+
fromTokenSymbol: string;
|
|
9
|
+
fromTokenDecimals: number;
|
|
10
|
+
toTokenSymbol: string;
|
|
11
|
+
toTokenDecimals: number;
|
|
12
|
+
hash: string | null;
|
|
13
|
+
toolDetails: BridgeStepTool;
|
|
14
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { BridgeStep } from '../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
4
|
+
export declare function BridgeLogo({ size, toolDetails, nameMarginLeft, logoMarginLeft, nameSx, }: {
|
|
5
|
+
size: 'small' | 'medium' | 'large';
|
|
6
|
+
toolDetails: BridgeStep['toolDetails'] | null | undefined;
|
|
7
|
+
nameMarginLeft?: number;
|
|
8
|
+
logoMarginLeft?: number;
|
|
9
|
+
nameSx?: BoxProps['sx'];
|
|
10
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { BridgeRouteI } from '../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
4
|
+
import { TokenInfo } from '../../../hooks/Token/type';
|
|
5
|
+
export default function RouteCard({ fromToken, toToken, fromChainId, toChainId, fromAmount, fromTokenBalance, toTokenAmount, toolDetails, product, executionDuration, feeUSD, selected, setSelected, spenderContractAddress, isBestPrice, }: {
|
|
6
|
+
fromToken?: TokenInfo;
|
|
7
|
+
toToken?: TokenInfo;
|
|
8
|
+
fromChainId: number;
|
|
9
|
+
toChainId: number;
|
|
10
|
+
fromAmount?: BridgeRouteI['fromAmount'];
|
|
11
|
+
fromTokenBalance: BigNumber | null;
|
|
12
|
+
toTokenAmount?: BigNumber | null;
|
|
13
|
+
toolDetails: undefined | Exclude<BridgeRouteI['step'], undefined>['toolDetails'];
|
|
14
|
+
product: BridgeRouteI['product'];
|
|
15
|
+
executionDuration: BridgeRouteI['executionDuration'];
|
|
16
|
+
feeUSD: BridgeRouteI['feeUSD'];
|
|
17
|
+
selected: boolean;
|
|
18
|
+
setSelected: () => void;
|
|
19
|
+
spenderContractAddress: string | undefined;
|
|
20
|
+
isBestPrice?: boolean;
|
|
21
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BridgeStep } from '../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
3
|
+
export interface RouteTag {
|
|
4
|
+
type: 'best-price' | 'no-approve';
|
|
5
|
+
toolDetails?: BridgeStep['toolDetails'] | null;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* 路径 tag 列表
|
|
9
|
+
*/
|
|
10
|
+
export declare function RouteTagList({ routeTagList }: {
|
|
11
|
+
routeTagList: RouteTag[];
|
|
12
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
4
|
+
/**
|
|
5
|
+
* token 数量附带有 chain 名称和 logo
|
|
6
|
+
*/
|
|
7
|
+
export declare function TokenWithChain({ chainId, token, amount, }: {
|
|
8
|
+
chainId: number;
|
|
9
|
+
token?: TokenInfo;
|
|
10
|
+
amount?: string | null | BigNumber;
|
|
11
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { BridgeRouteI } from '../../../hooks/Bridge/useFetchRoutePriceBridge';
|
|
3
|
+
export default function SelectBridgeDialog({ open, onClose, selectedRouteId, setSelectRouteId, bridgeRouteList, }: {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
selectedRouteId: string;
|
|
7
|
+
setSelectRouteId: Dispatch<SetStateAction<string>>;
|
|
8
|
+
bridgeRouteList: Array<BridgeRouteI>;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ChainId } from '../../../../constants/chains';
|
|
3
|
+
export interface ConnectWalletProps {
|
|
4
|
+
needSwitchChain?: ChainId;
|
|
5
|
+
/** If true is returned, the default wallet connection logic will not be executed */
|
|
6
|
+
onConnectWalletClick?: () => boolean | Promise<boolean>;
|
|
7
|
+
needConnectTwoWallet?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export default function ConnectWallet({ needSwitchChain, onConnectWalletClick, needConnectTwoWallet, }: ConnectWalletProps): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const transitionTime = 300;
|
|
3
|
+
export interface DialogProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose?: () => void;
|
|
6
|
+
afterClose?: () => void;
|
|
7
|
+
title?: string | React.ReactNode;
|
|
8
|
+
rightSlot?: React.ReactNode;
|
|
9
|
+
canBack?: boolean;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
height?: number | string;
|
|
12
|
+
testId?: string;
|
|
13
|
+
}
|
|
14
|
+
export default function Dialog({ open, onClose, afterClose, title, rightSlot, canBack, children, height, testId, }: DialogProps): JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
4
|
+
export interface ReviewDialogProps {
|
|
5
|
+
open: boolean;
|
|
6
|
+
execute: () => void;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
clearToAmt: () => void;
|
|
9
|
+
clearFromAmt: () => void;
|
|
10
|
+
toToken: TokenInfo | null;
|
|
11
|
+
fromToken: TokenInfo | null;
|
|
12
|
+
priceImpact: string;
|
|
13
|
+
fromAmount: string | number | null;
|
|
14
|
+
toAmount: string | number | null;
|
|
15
|
+
baseFeeAmount: number | null;
|
|
16
|
+
additionalFeeAmount: number | null;
|
|
17
|
+
curToFiatPrice: BigNumber | null;
|
|
18
|
+
curFromFiatPrice: BigNumber | null;
|
|
19
|
+
pricePerFromToken: number | null;
|
|
20
|
+
loading: boolean;
|
|
21
|
+
}
|
|
22
|
+
export declare function ReviewDialog({ open, execute, onClose, toToken, fromToken, fromAmount, toAmount, priceImpact, clearFromAmt, clearToAmt, baseFeeAmount, curToFiatPrice, curFromFiatPrice, pricePerFromToken, additionalFeeAmount, loading, }: ReviewDialogProps): JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { InputProps } from '@dodoex/components';
|
|
3
|
+
export interface NumberInputProps extends InputProps {
|
|
4
|
+
maxVal?: string | number;
|
|
5
|
+
decimals?: number;
|
|
6
|
+
onInputChange?: (v: string | null) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function NumberInput({ sx, maxVal, decimals, onInputChange, ...props }: NumberInputProps): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import BigNumber from 'bignumber.js';
|
|
3
|
+
export declare function BalanceText({ onClick, balance, decimals, address, showMaxBtn, }: {
|
|
4
|
+
onClick?: (max: string) => void;
|
|
5
|
+
balance: BigNumber | null;
|
|
6
|
+
decimals?: number;
|
|
7
|
+
address?: string;
|
|
8
|
+
showMaxBtn?: boolean;
|
|
9
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
export declare function NumberInput({ readOnly, sx, value, decimals, onChange, suffix, withClear, onFocus, placeholder, }: {
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
sx?: BoxProps['sx'];
|
|
6
|
+
value?: string;
|
|
7
|
+
decimals?: number;
|
|
8
|
+
onFocus?: () => void;
|
|
9
|
+
onChange?: (v: string) => void;
|
|
10
|
+
suffix?: React.ReactNode | string;
|
|
11
|
+
withClear?: boolean;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TokenPickerProps } from '../../../TokenPicker';
|
|
3
|
+
export declare function TokenLogoCollapse({ token, onClick, showChainLogo, }: {
|
|
4
|
+
token?: TokenPickerProps['value'];
|
|
5
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
6
|
+
showChainLogo?: boolean;
|
|
7
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TokenPickerProps } from '../../../TokenPicker';
|
|
3
|
+
import { DialogProps } from '../Dialog';
|
|
4
|
+
export declare function TokenPickerDialog({ open, value, onClose, occupiedAddrs, occupiedChainId, onTokenChange, side, defaultLoadBalance, }: {
|
|
5
|
+
open: boolean;
|
|
6
|
+
occupiedAddrs?: string[];
|
|
7
|
+
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
8
|
+
onClose: DialogProps['onClose'];
|
|
9
|
+
value?: TokenPickerProps['value'];
|
|
10
|
+
onTokenChange: TokenPickerProps['onChange'];
|
|
11
|
+
side?: TokenPickerProps['side'];
|
|
12
|
+
defaultLoadBalance?: boolean;
|
|
13
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenPickerProps } from '../../../TokenPicker';
|
|
4
|
+
export interface TokenCardProps {
|
|
5
|
+
amt: string;
|
|
6
|
+
fiatPriceTxt?: string | React.ReactNode;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
readOnly?: boolean;
|
|
9
|
+
showMaxBtn?: boolean;
|
|
10
|
+
occupiedAddrs?: string[];
|
|
11
|
+
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
12
|
+
onMaxClick?: (max: string) => void;
|
|
13
|
+
token?: TokenPickerProps['value'];
|
|
14
|
+
onInputChange?: (v: string) => void;
|
|
15
|
+
onInputFocus?: () => void;
|
|
16
|
+
onTokenClick?: () => void;
|
|
17
|
+
onTokenChange: TokenPickerProps['onChange'];
|
|
18
|
+
side?: TokenPickerProps['side'];
|
|
19
|
+
showChainLogo?: boolean;
|
|
20
|
+
onlyCurrentChain?: boolean;
|
|
21
|
+
defaultLoadBalance?: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare function TokenCard({ sx, amt, token, readOnly, showMaxBtn, onMaxClick, fiatPriceTxt, occupiedAddrs, occupiedChainId, onInputFocus, onTokenClick, onInputChange, onTokenChange, side, showChainLogo, onlyCurrentChain, defaultLoadBalance, }: TokenCardProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { RoutePriceStatus } from '../../../hooks/Swap';
|
|
4
|
+
export declare function TokenPairPriceWithToggle({ toToken, fromToken, priceStatus, pricePerToToken, pricePerFromToken, }: {
|
|
5
|
+
toToken: TokenInfo | null;
|
|
6
|
+
fromToken: TokenInfo | null;
|
|
7
|
+
priceStatus: RoutePriceStatus;
|
|
8
|
+
pricePerToToken: number | null;
|
|
9
|
+
pricePerFromToken: number | null;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ConnectWalletProps } from './components/ConnectWallet';
|
|
3
|
+
import { GetAutoSlippage } from '../../hooks/setting/useSetAutoSlippage';
|
|
4
|
+
export interface SwapProps {
|
|
5
|
+
/** Higher priority setting slippage */
|
|
6
|
+
getAutoSlippage?: GetAutoSlippage;
|
|
7
|
+
onConnectWalletClick?: ConnectWalletProps['onConnectWalletClick'];
|
|
8
|
+
}
|
|
9
|
+
export declare function Swap({ getAutoSlippage, onConnectWalletClick, }?: SwapProps): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
import { TokenInfo } from '../hooks/Token';
|
|
4
|
+
export interface TokenLogoProps {
|
|
5
|
+
address?: string;
|
|
6
|
+
token?: TokenInfo;
|
|
7
|
+
width?: number;
|
|
8
|
+
height?: number;
|
|
9
|
+
marginRight?: number;
|
|
10
|
+
url?: string;
|
|
11
|
+
zIndex?: number;
|
|
12
|
+
cross?: boolean;
|
|
13
|
+
sx?: BoxProps['sx'];
|
|
14
|
+
chainId?: number;
|
|
15
|
+
}
|
|
16
|
+
export default function TokenLogo({ width, height, marginRight, url, zIndex, cross, address: addressProps, token: tokenProps, sx, chainId, }: TokenLogoProps): React.ReactElement;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { TokenInfo } from './../../hooks/Token';
|
|
3
|
+
export default function TokenItem({ token, disabled, style, onClick, }: {
|
|
4
|
+
token: TokenInfo;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
onClick: () => void;
|
|
8
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { TokenInfo } from '../../hooks/Token';
|
|
3
|
+
import { ChainId } from '../../constants/chains';
|
|
4
|
+
export interface TokenPickerProps {
|
|
5
|
+
value?: TokenInfo | null;
|
|
6
|
+
onChange: (token: TokenInfo, isOccupied: boolean) => void;
|
|
7
|
+
/** token pair usage */
|
|
8
|
+
occupiedAddrs?: string[];
|
|
9
|
+
/** token pair usage */
|
|
10
|
+
occupiedChainId?: ChainId;
|
|
11
|
+
/** hide props */
|
|
12
|
+
hiddenAddrs?: string[];
|
|
13
|
+
/** only show props */
|
|
14
|
+
showAddrs?: string[];
|
|
15
|
+
visible?: boolean;
|
|
16
|
+
side?: 'from' | 'to';
|
|
17
|
+
defaultLoadBalance?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export default function TokenPicker({ value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, visible, side, defaultLoadBalance, }: TokenPickerProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as QuestionTooltip } from './QuestionTooltip';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SupportedLang } from '../../constants/locales';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
interface LangProviderProps {
|
|
4
|
+
locale?: SupportedLang;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
export declare function loadI18(locale?: SupportedLang): Promise<void>;
|
|
8
|
+
export declare function LangProvider({ locale, children }: LangProviderProps): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { PaletteMode, ThemeOptions } from '@dodoex/components';
|
|
3
|
+
import { SupportedLang } from '../../constants/locales';
|
|
4
|
+
import { Web3ConnectorsProps } from '../../hooks/ConnectWallet';
|
|
5
|
+
import { InitTokenListProps } from '../../hooks/Token/useInitTokenList';
|
|
6
|
+
import { ExecutionProps } from '../../hooks/Submission';
|
|
7
|
+
import { ChainId } from '../../constants/chains';
|
|
8
|
+
import { DefaultTokenInfo } from '../../hooks/Token/type';
|
|
9
|
+
import { APIServices } from '../../constants/api';
|
|
10
|
+
import { SwapProps } from '../Swap';
|
|
11
|
+
import { QueryClient } from '@tanstack/react-query';
|
|
12
|
+
export declare const WIDGET_CLASS_NAME = "dodo-widget-container";
|
|
13
|
+
export declare const queryClient: QueryClient;
|
|
14
|
+
export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, ExecutionProps, SwapProps {
|
|
15
|
+
apikey?: string;
|
|
16
|
+
theme?: ThemeOptions;
|
|
17
|
+
colorMode?: PaletteMode;
|
|
18
|
+
defaultChainId?: ChainId;
|
|
19
|
+
width?: string | number;
|
|
20
|
+
height?: string | number;
|
|
21
|
+
feeRate?: number;
|
|
22
|
+
rebateTo?: string;
|
|
23
|
+
defaultFromToken?: DefaultTokenInfo;
|
|
24
|
+
defaultToToken?: DefaultTokenInfo;
|
|
25
|
+
locale?: SupportedLang;
|
|
26
|
+
swapSlippage?: number;
|
|
27
|
+
bridgeSlippage?: number;
|
|
28
|
+
apiServices?: Partial<APIServices>;
|
|
29
|
+
crossChain?: boolean;
|
|
30
|
+
noPowerBy?: boolean;
|
|
31
|
+
tonConnect?: boolean;
|
|
32
|
+
onProviderChanged?: (provider?: any) => void;
|
|
33
|
+
}
|
|
34
|
+
export declare function Widget(props: PropsWithChildren<WidgetProps>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const EmptyAddress = "0x0000000000000000000000000000000000000000";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChainId } from './chains';
|
|
2
|
+
export declare enum APIServiceKey {
|
|
3
|
+
routePrice = "routePrice",
|
|
4
|
+
fiatPrice = "fiatPrice",
|
|
5
|
+
bridgeRoutePrice = "bridgeRoutePrice",
|
|
6
|
+
bridgeEncode = "bridgeEncode",
|
|
7
|
+
bridgeCreateRoute = "bridgeCreateRoute"
|
|
8
|
+
}
|
|
9
|
+
export declare type APIServices = {
|
|
10
|
+
[key in APIServiceKey]: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const AppUrl = "https://app.dodoex.io";
|
|
13
|
+
export declare const getCGTokenListAPI: (chainId: ChainId) => any;
|
|
14
|
+
export declare const RoutePriceAPI = "https://api.dodoex.io/route-service/v2/widget/getdodoroute";
|
|
15
|
+
export declare const FiatPriceAPI = "https://api.dodoex.io/frontend-price-api/current/batch";
|
|
16
|
+
export declare function getAPIService(key: APIServiceKey, serviceProps?: Partial<APIServices>): string;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChainId } from './chains';
|
|
2
|
+
import { ReactComponent as ETHereumLogo } from '../assets/logo/networks/eth.svg';
|
|
3
|
+
export interface ChainListItem {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
logo: typeof ETHereumLogo;
|
|
6
|
+
name: string;
|
|
7
|
+
mainnet?: ChainId;
|
|
8
|
+
}
|
|
9
|
+
export declare const chainListMap: Map<ChainId, ChainListItem>;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare enum ChainId {
|
|
2
|
+
MAINNET = 1,
|
|
3
|
+
GOERLI = 5,
|
|
4
|
+
BSC = 56,
|
|
5
|
+
POLYGON = 137,
|
|
6
|
+
ARBITRUM_ONE = 42161,
|
|
7
|
+
AURORA = 1313161554,
|
|
8
|
+
OKCHAIN = 66,
|
|
9
|
+
OPTIMISM = 10,
|
|
10
|
+
AVALANCHE = 43114,
|
|
11
|
+
CONFLUX = 1030,
|
|
12
|
+
BASE = 8453,
|
|
13
|
+
LINEA = 59144,
|
|
14
|
+
SCROLL = 534352,
|
|
15
|
+
MANTA = 169,
|
|
16
|
+
MANTLE = 5000,
|
|
17
|
+
TON = -239
|
|
18
|
+
}
|
|
19
|
+
export declare const rpcServerMap: {
|
|
20
|
+
[key in ChainId]: Array<string>;
|
|
21
|
+
};
|
|
22
|
+
export declare const etherTokenAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
|
|
23
|
+
declare const DEFAULT_BASIC_TOKEN: {
|
|
24
|
+
symbol: string;
|
|
25
|
+
address: string;
|
|
26
|
+
name: string;
|
|
27
|
+
decimals: number;
|
|
28
|
+
showDecimals: number;
|
|
29
|
+
wrappedTokenSymbol: string;
|
|
30
|
+
};
|
|
31
|
+
export declare const basicTokenMap: {
|
|
32
|
+
[key in ChainId]: typeof DEFAULT_BASIC_TOKEN & {
|
|
33
|
+
wrappedTokenAddress: string;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
export declare const platformIdMap: {
|
|
37
|
+
[key in ChainId]: string;
|
|
38
|
+
};
|
|
39
|
+
export declare const scanUrlDomainMap: {
|
|
40
|
+
[key in ChainId]: string;
|
|
41
|
+
};
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenInfo } from '../hooks/Token';
|
|
2
|
+
import { ChainId } from './chains';
|
|
3
|
+
export declare function getAuthSwitchCache(): boolean;
|
|
4
|
+
export declare function setAuthSwitchCache(isAuto: boolean): void;
|
|
5
|
+
export interface LastTokenCache {
|
|
6
|
+
chainId: ChainId;
|
|
7
|
+
address: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function getLastToken(side: TokenInfo['side']): LastTokenCache | null;
|
|
10
|
+
export declare function setLastToken(side: TokenInfo['side'], token: LastTokenCache | null): void;
|
|
11
|
+
export declare function getLastSlippage(isBridge: boolean): number | null;
|
|
12
|
+
export declare function setLastSlippage(isBridge: boolean, slippage: number | string | null): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare const AUTO_SWAP_SLIPPAGE_PROTECTION = "auto";
|
|
2
|
+
export declare const PRICE_IMPACT_THRESHOLD = 15;
|
|
3
|
+
export declare const DEFAULT_SWAP_SLIPPAGE = 0.2;
|
|
4
|
+
export declare const MAX_SWAP_SLIPPAGE = 50;
|
|
5
|
+
export declare const DEFAULT_SWAP_DDL = 20;
|
|
6
|
+
export declare const MIN_GAS_LIMIT = 30000;
|
|
7
|
+
export declare const DEFAULT_BRIDGE_SLIPPAGE = 0.5;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const connectWalletBtn = "connect-wallet-btn";
|
|
2
|
+
export declare const swapAlertSelectTokenBtn = "swap-alert-select-token-btn";
|
|
3
|
+
export declare const swapReviewBtn = "swap-review-btn";
|
|
4
|
+
export declare const swapSelectTokenBtn = "swap-select-token-btn";
|
|
5
|
+
export declare const swapAlertEnterAmountBtn = "swap-alert-enter-amount-btn";
|
|
6
|
+
export declare const swapAlertFetchPriceBtn = "swap-alert-fetch-price-btn";
|
|
7
|
+
export declare const swapAlertInsufficientBalanceBtn = "swap-alert-insufficient-balance-btn";
|
|
8
|
+
export declare const numberInputWrapper = "number-input-wrapper";
|
|
9
|
+
export declare const tokenPickerWrapper = "token-picker-wrapper";
|
|
10
|
+
export declare const tokenPickerItem = "token-picker-item";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const _default: ({
|
|
2
|
+
chainId: number;
|
|
3
|
+
address: string;
|
|
4
|
+
name: string;
|
|
5
|
+
decimals: number;
|
|
6
|
+
symbol: string;
|
|
7
|
+
logoURI: string;
|
|
8
|
+
canBridgeToTon?: undefined;
|
|
9
|
+
} | {
|
|
10
|
+
chainId: number;
|
|
11
|
+
address: string;
|
|
12
|
+
name: string;
|
|
13
|
+
decimals: number;
|
|
14
|
+
symbol: string;
|
|
15
|
+
logoURI: string;
|
|
16
|
+
canBridgeToTon: boolean;
|
|
17
|
+
})[];
|
|
18
|
+
export default _default;
|