@dodoex/widgets 3.14.1-react.9 → 3.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -674
- package/README.md +70 -70
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/helper-Dry2KYfh.js +1 -0
- package/dist/helper-iRd-4sp4.cjs +1 -0
- package/dist/index-BRTABuMK.cjs +12 -0
- package/dist/index-Ca_h9Yxg.js +34 -0
- package/dist/index-DDwPtr_I.js +12 -0
- package/dist/index-DHfQEIuw.cjs +78 -0
- package/dist/index-DsQIchnJ.js +78 -0
- package/dist/index-vyWzevj_.cjs +34 -0
- package/dist/index.cjs +1 -2
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/components/Bridge/BridgeRouteShortCard.d.ts +2 -4
- package/dist/types/components/Bridge/BridgeSummaryDialog/index.d.ts +2 -2
- package/dist/types/components/Bridge/CompareRoute.d.ts +4 -0
- package/dist/types/components/Bridge/RouteVision.d.ts +7 -0
- package/dist/types/components/Bridge/RouteVisionModal.d.ts +5 -0
- package/dist/types/components/CardWidgets.d.ts +11 -2
- package/dist/types/components/ConnectWallet/NeedConnectButton.d.ts +1 -1
- package/dist/types/components/ErrorMessageDialog.d.ts +2 -1
- package/dist/types/components/HowItWorks.d.ts +5 -5
- package/dist/types/components/Message/index.d.ts +1 -1
- package/dist/types/components/SelectChain.d.ts +1 -2
- package/dist/types/components/SquaredGoBack.d.ts +5 -0
- package/dist/types/components/Swap/SwapOrderHistory/CrossChainOrderList.d.ts +4 -0
- package/dist/types/components/Swap/SwapOrderHistory/CrossOrderCard.d.ts +8 -0
- package/dist/types/components/Swap/SwapOrderHistory/RefundModal.d.ts +9 -0
- package/dist/types/components/Swap/SwapOrderHistory/SameChainOrderList.d.ts +3 -0
- package/dist/types/components/Swap/SwapOrderHistory/index.d.ts +6 -5
- package/dist/types/components/Swap/components/Dialog.d.ts +1 -1
- package/dist/types/components/Swap/components/FiatEntryAndGasRefuel.d.ts +1 -0
- package/dist/types/components/Swap/components/ReceiveAddressInputModal.d.ts +10 -0
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +2 -1
- package/dist/types/components/Swap/components/RouteVisionModal.d.ts +7 -0
- package/dist/types/components/Swap/components/SettingsDialog/index.d.ts +2 -1
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageSetting.d.ts +1 -2
- package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageWarning.d.ts +1 -3
- package/dist/types/components/Swap/components/SwapSettingsDialog/SupplierSelect.d.ts +5 -0
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +3 -2
- package/dist/types/components/Swap/components/TokenCard/TokenCardSwap.d.ts +48 -0
- package/dist/types/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +2 -0
- package/dist/types/components/Swap/components/TokenCard/WalletConnectBtn.d.ts +11 -0
- package/dist/types/components/Swap/components/TokenPairPriceWithToggle.d.ts +3 -2
- package/dist/types/components/Swap/index.d.ts +2 -4
- package/dist/types/components/TokenPicker/TokenItem.d.ts +3 -4
- package/dist/types/components/TokenPicker/index.d.ts +3 -3
- package/dist/types/components/Widget/index.d.ts +13 -15
- package/dist/types/components/WithExecutionDialog/index.d.ts +1 -2
- package/dist/types/constants/address.d.ts +6 -0
- package/dist/types/constants/api.d.ts +96 -4
- package/dist/types/constants/chainList.d.ts +10 -0
- package/dist/types/constants/chains.d.ts +17 -1
- package/dist/types/constants/sessionStorage.d.ts +1 -0
- package/dist/types/constants/swap.d.ts +1 -0
- package/dist/types/constants/tokenList.d.ts +8 -9
- package/dist/types/hooks/Bridge/createBridgeOrder.d.ts +4 -24
- package/dist/types/hooks/Bridge/useExecuteBridgeRoute.d.ts +1 -2
- package/dist/types/hooks/Bridge/useFeeList.d.ts +9 -0
- package/dist/types/hooks/Bridge/useFetchRoutePriceBridge.d.ts +138 -48
- package/dist/types/hooks/Bridge/useSendRoute.d.ts +1 -2
- package/dist/types/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +4 -1
- package/dist/types/hooks/Bridge/utils.d.ts +6 -0
- package/dist/types/hooks/ConnectWallet/index.d.ts +0 -2
- package/dist/types/hooks/ConnectWallet/useBTCWalletStore.d.ts +1 -0
- package/dist/types/hooks/ConnectWallet/useSwitchChain.d.ts +1 -12
- package/dist/types/hooks/Submission/types.d.ts +29 -1
- package/dist/types/hooks/Submission/useExecution.d.ts +1 -1
- package/dist/types/hooks/Swap/useBridgeSlippage.d.ts +3 -0
- package/dist/types/hooks/Swap/useCrossSwapOrderList.d.ts +215 -0
- package/dist/types/hooks/Swap/useExecuteSwap.d.ts +2 -1
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +2 -4
- package/dist/types/hooks/Swap/useForecastSlippageList.d.ts +0 -6
- package/dist/types/hooks/Swap/usePrivacySwapStatus.d.ts +10 -0
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +2 -2
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +3 -5
- package/dist/types/hooks/Swap/useSwapSlippage.d.ts +0 -6
- package/dist/types/hooks/Swap/useSwitchToSupplierChain.d.ts +13 -0
- package/dist/types/hooks/Swap/useTradeSwapOrderList.d.ts +34 -133
- package/dist/types/hooks/Token/type.d.ts +3 -2
- package/dist/types/hooks/Token/useInitTokenList.d.ts +2 -2
- package/dist/types/hooks/Token/useSelectChainList.d.ts +5 -5
- package/dist/types/hooks/Token/useTokenList.d.ts +4 -8
- package/dist/types/hooks/Token/useTokenListDefaultToken.d.ts +2 -2
- package/dist/types/hooks/Token/useTokenListFetchBalance.d.ts +1 -4
- package/dist/types/hooks/Token/useTokenStatus.d.ts +28 -2
- package/dist/types/hooks/contract/useFetchETHBalance.d.ts +2 -1
- package/dist/types/hooks/contract/useFetchMultiTokensForSingleChain.d.ts +20 -0
- package/dist/types/hooks/contract/useFetchTokens.d.ts +9 -4
- package/dist/types/hooks/useAddressValidation.d.ts +2 -0
- package/dist/types/hooks/useGlobalState.d.ts +2 -0
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/hooks/useMessageState.d.ts +2 -1
- package/dist/types/hooks/useRouteVisionData.d.ts +17 -1
- package/dist/types/hooks/useTokenState.d.ts +3 -18
- package/dist/types/index.d.ts +27 -35
- package/dist/types/router/types.d.ts +5 -0
- package/dist/types/utils/CaipNetworksUtil.d.ts +5 -0
- package/dist/types/utils/address.d.ts +1 -1
- package/dist/types/utils/btc.d.ts +42 -0
- package/dist/types/utils/constants.d.ts +2 -0
- package/dist/types/utils/index.d.ts +2 -2
- package/dist/types/utils/reown-types.d.ts +28 -0
- package/dist/types/utils/solana.d.ts +7 -0
- package/dist/types/utils/token.d.ts +1 -1
- package/dist/types/utils/ton.d.ts +3 -0
- package/dist/types/utils/wallet.d.ts +2 -0
- package/dist/types/utils/zetachain_btc_test.d.ts +5 -0
- package/dist/types/widgets/MiningWidget/MiningCreate/hooks/useCreateMining.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/usePrevious.d.ts +1 -1
- package/dist/types/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV2Create/Ratio.d.ts +1 -4
- package/dist/types/widgets/PoolWidget/AMMV2Create/Setting.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/AMMV3/AddLiquidityV3.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/hooks.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/index.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/components/RangeSetList.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/AMMV3/components/TokenPairSelect.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/usePoolTickData.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/hooks/useV3DerivedMintInfo.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/AMMV3/reducer.d.ts +4 -1
- package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +2 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/usePriceInit.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +4 -4
- package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/PriceModeSetting.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/utils.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/ParametersTable.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +7 -5
- package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -7
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +7 -5
- package/dist/types/widgets/PoolWidget/PoolList/components/FilterGroup.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/GoPoolDetailBtn.d.ts +3 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/SortButtonGroup.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/TableSortButton.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/tags.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +14 -6
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +8 -7
- package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +2 -6
- package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +2 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +2 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/components/OperateBtn.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +1 -5
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +49 -2
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +2 -6
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +0 -12
- package/dist/types/widgets/PoolWidget/curve/Add.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/AddOrRemove.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/AllPools.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/curve/CurvePoolDetail.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/OperateDialog.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/Remove.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/ApyTooltip.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/CoinReservePieChart.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/CoinsLogoList.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/FilterAddressTags.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/curve/components/LiquidityProvidersTable.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/OperateButtonContainer.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/curve/components/ParametersTable.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/PoolTitle.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/PoolTotalStats.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/components/SlippageBonus.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/curve/components/SwapsTable.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/curve/components/TokenListPoolItem.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/useLiquidityProviders.d.ts +166 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/useLpTokenBalances.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolDetail.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolListFilterTokenAndPool.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/curve/hooks/usePoolSwapList.d.ts +166 -0
- package/dist/types/widgets/PoolWidget/curve/types.d.ts +44 -0
- package/dist/types/widgets/PoolWidget/curve/utils.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/hooks/usePoolDetail.d.ts +0 -6
- package/dist/types/widgets/PoolWidget/hooks/useUniV2Pairs.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/utils.d.ts +4 -0
- package/package.json +161 -161
- package/dist/28442382d977858a.svg +0 -9
- package/dist/8de9a184d4ef0a11.svg +0 -6
- package/dist/assets/bundle-BBymdwHN.css +0 -65
- package/dist/b3f16b2626f03378.svg +0 -10
- package/dist/ed726d76d93d4899.svg +0 -10
- package/dist/helper-Ds_8_78g.cjs +0 -2
- package/dist/helper-Ds_8_78g.cjs.map +0 -1
- package/dist/helper-l9rrGqkT.js +0 -1
- package/dist/index-B6OsCe_1.cjs +0 -13
- package/dist/index-B6OsCe_1.cjs.map +0 -1
- package/dist/index-Bcqk1fMQ.cjs +0 -15
- package/dist/index-Bcqk1fMQ.cjs.map +0 -1
- package/dist/index-Bp_1xqpK.js +0 -14
- package/dist/index-BrLsqpSG.js +0 -12
- package/dist/index-DyKuKZOu.cjs +0 -79
- package/dist/index-DyKuKZOu.cjs.map +0 -1
- package/dist/index-bVmd7uFj.js +0 -78
- package/dist/index.cjs.map +0 -1
- package/dist/types/components/ConnectWallet/ConnectWalletDialog.d.ts +0 -4
- package/dist/types/components/ConnectWallet/OpenConnectWalletInfo.d.ts +0 -2
- package/dist/types/components/SubmittedDialog.d.ts +0 -7
- package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +0 -5
- package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +0 -7
- package/dist/types/components/SwitchChainDialog/index.d.ts +0 -6
- package/dist/types/components/TokenPicker/ImportToken.d.ts +0 -6
- package/dist/types/components/TokenPicker/TokenDetailInfo.d.ts +0 -6
- package/dist/types/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +0 -9
- package/dist/types/hooks/ConnectWallet/useWalletInfo.d.ts +0 -8
- package/dist/types/hooks/ConnectWallet/useWeb3Connectors.d.ts +0 -17
- package/dist/types/hooks/ConnectWallet/web3.d.ts +0 -10
- package/dist/types/hooks/Token/useFindTokenByAddress.test.d.ts +0 -1
- package/dist/types/hooks/Token/useSelectChainList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenList.test.d.ts +0 -1
- package/dist/types/hooks/Token/useTokenStatus.test.d.ts +0 -1
- package/dist/types/widgets/PoolWidget/PoolList/components/OnlyV3Toggle.d.ts +0 -7
- package/dist/types/widgets/PoolWidget/hooks/usePoolListMyLiquidity.d.ts +0 -15
- /package/dist/types/hooks/{Bridge/useFetchRoutePriceBridge.test.d.ts → useAddressValidation.test.d.ts} +0 -0
- /package/dist/types/{widgets/MiningWidget/hooks → hooks}/useRefetch.d.ts +0 -0
- /package/dist/types/{hooks/Chain/useChainList.test.d.ts → tests/1-get-account-state.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useFetchFiatPrice.test.d.ts → tests/1-send-ton.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useFetchRoutePrice.test.d.ts → utils/sui_test.d.ts} +0 -0
- /package/dist/types/{hooks/Swap/useMarginAmount.test.d.ts → utils/ton_test.d.ts} +0 -0
|
@@ -18,5 +18,6 @@ export interface ReviewDialogProps {
|
|
|
18
18
|
pricePerFromToken: number | null;
|
|
19
19
|
loading: boolean;
|
|
20
20
|
slippage: string | number | null;
|
|
21
|
+
isDialogModal: boolean;
|
|
21
22
|
}
|
|
22
|
-
export declare function ReviewDialog({ open, execute, onClose, toToken, fromToken, fromAmount, toAmount, priceImpact, clearFromAmt, clearToAmt, baseFeeAmount, curToFiatPrice, curFromFiatPrice, pricePerFromToken, additionalFeeAmount, loading, slippage, }: ReviewDialogProps): import("react").JSX.Element;
|
|
23
|
+
export declare function ReviewDialog({ open, execute, onClose, toToken, fromToken, fromAmount, toAmount, priceImpact, clearFromAmt, clearToAmt, baseFeeAmount, curToFiatPrice, curFromFiatPrice, pricePerFromToken, additionalFeeAmount, loading, slippage, isDialogModal, }: ReviewDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
export interface RouteVisionModalProps {
|
|
3
|
+
routeInfo: string | null;
|
|
4
|
+
toToken: TokenInfo;
|
|
5
|
+
fromToken: TokenInfo;
|
|
6
|
+
}
|
|
7
|
+
export declare const RouteVisionModal: ({ routeInfo, toToken, fromToken, }: RouteVisionModalProps) => import("react").JSX.Element;
|
|
@@ -2,5 +2,6 @@ export interface SettingsDialogProps {
|
|
|
2
2
|
open: boolean;
|
|
3
3
|
onClose: () => void;
|
|
4
4
|
isBridge: boolean | undefined;
|
|
5
|
+
isDialogModal: boolean;
|
|
5
6
|
}
|
|
6
|
-
export declare function SettingsDialog({ open, onClose, isBridge, }: SettingsDialogProps): import("react").JSX.Element;
|
|
7
|
+
export declare function SettingsDialog({ open, onClose, isBridge, isDialogModal, }: SettingsDialogProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
-
export default function SlippageSetting({ fromToken, toToken,
|
|
3
|
+
export default function SlippageSetting({ fromToken, toToken, }: {
|
|
4
4
|
fromToken?: TokenInfo | null;
|
|
5
5
|
toToken?: TokenInfo | null;
|
|
6
|
-
slippageQuickInput?: boolean;
|
|
7
6
|
}): React.JSX.Element;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
export declare function SlippageWarning({ title, desc, doNotChecked, sx, onChangeDoNotChecked, }: {
|
|
1
|
+
export declare function SlippageWarning({ title, desc, doNotChecked, onChangeDoNotChecked, }: {
|
|
3
2
|
title: string;
|
|
4
3
|
desc: string;
|
|
5
4
|
doNotChecked: boolean;
|
|
6
|
-
sx?: BoxProps['sx'];
|
|
7
5
|
onChangeDoNotChecked?: (value: boolean) => void;
|
|
8
6
|
}): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { usePrivacySwapStatus } from '../../../../hooks/Swap/usePrivacySwapStatus';
|
|
3
|
+
export declare function SupplierSelect({ privacySwapSupplierEndpoints, endpointStatusMap, refetchEndpointStatus, setIsSelectSupplierMode, }: Pick<ReturnType<typeof usePrivacySwapStatus>, 'endpointStatusMap' | 'privacySwapSupplierEndpoints' | 'privacySwapEnable' | 'privacySwapEnableAble' | 'refetchEndpointStatus'> & {
|
|
4
|
+
setIsSelectSupplierMode: Dispatch<SetStateAction<boolean>>;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import { usePrivacySwapStatus } from '../../../../hooks/Swap/usePrivacySwapStatus';
|
|
3
4
|
export interface SwapSettingsDialogProps {
|
|
4
5
|
open: boolean;
|
|
5
6
|
onClose: () => void;
|
|
6
7
|
fromToken?: TokenInfo | null;
|
|
7
8
|
toToken?: TokenInfo | null;
|
|
8
|
-
|
|
9
|
+
isDialogModal: boolean;
|
|
9
10
|
}
|
|
10
|
-
export declare function SwapSettingsDialog({ open, onClose, fromToken, toToken,
|
|
11
|
+
export declare function SwapSettingsDialog({ open, onClose, fromToken, toToken, privacySwapEnableAble, privacySwapEnable, privacySwapSupplierEndpoints, endpointStatusMap, refetchEndpointStatus, isDialogModal, }: SwapSettingsDialogProps & Pick<ReturnType<typeof usePrivacySwapStatus>, 'endpointStatusMap' | 'privacySwapSupplierEndpoints' | 'privacySwapEnable' | 'privacySwapEnableAble' | 'refetchEndpointStatus'>): React.JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { UseQueryResult } from '@tanstack/react-query';
|
|
3
|
+
import BigNumber from 'bignumber.js';
|
|
4
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
5
|
+
import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo';
|
|
6
|
+
import { BalanceData } from '../../../../hooks/Submission/useBalanceUpdateLoading';
|
|
7
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
8
|
+
import { TokenPickerProps } from '../../../TokenPicker';
|
|
9
|
+
export interface TokenCardProps {
|
|
10
|
+
amt: string;
|
|
11
|
+
fiatPriceTxt?: string | React.ReactNode;
|
|
12
|
+
failedReason?: React.ReactNode;
|
|
13
|
+
sx?: BoxProps['sx'];
|
|
14
|
+
readOnly?: boolean;
|
|
15
|
+
showMaxBtn?: boolean;
|
|
16
|
+
canClickBalance?: boolean;
|
|
17
|
+
occupiedAddrs?: string[];
|
|
18
|
+
showAddrs?: string[];
|
|
19
|
+
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
20
|
+
onMaxClick?: (max: string) => void;
|
|
21
|
+
token?: TokenInfo | null;
|
|
22
|
+
onInputChange?: (v: string) => void;
|
|
23
|
+
onInputFocus?: () => void;
|
|
24
|
+
onTokenClick?: () => void;
|
|
25
|
+
onTokenChange?: (token: TokenInfo, isOccupied: boolean) => void;
|
|
26
|
+
side?: TokenPickerProps['side'];
|
|
27
|
+
showChainLogo?: boolean;
|
|
28
|
+
showChainName?: boolean;
|
|
29
|
+
defaultLoadBalance?: boolean;
|
|
30
|
+
overrideBalance?: BigNumber | null;
|
|
31
|
+
overrideBalanceLoading?: boolean;
|
|
32
|
+
balanceText?: React.ReactNode;
|
|
33
|
+
showPercentage?: boolean;
|
|
34
|
+
inputReadonlyTooltip?: React.ReactNode;
|
|
35
|
+
inputTypography?: string;
|
|
36
|
+
hideToken?: boolean;
|
|
37
|
+
checkLogBalance?: BalanceData;
|
|
38
|
+
notTokenPickerModal?: boolean;
|
|
39
|
+
enterAddressEnabled?: boolean;
|
|
40
|
+
inputToAddress: string | null;
|
|
41
|
+
setInputToAddress: Dispatch<SetStateAction<string | null>>;
|
|
42
|
+
account: ReturnType<ReturnType<typeof useWalletInfo>['getAppKitAccountByChainId']>;
|
|
43
|
+
tokenQuery: UseQueryResult<{
|
|
44
|
+
balance: BigNumber;
|
|
45
|
+
} | null, Error>;
|
|
46
|
+
filterBySupportTargetChain?: boolean;
|
|
47
|
+
}
|
|
48
|
+
export declare function TokenCardSwap({ sx, amt, token, readOnly, showMaxBtn, canClickBalance, onMaxClick, fiatPriceTxt, failedReason, occupiedAddrs, occupiedChainId, showAddrs, onInputFocus, onTokenClick, onInputChange, onTokenChange, side, showChainLogo, showChainName, defaultLoadBalance, overrideBalance, overrideBalanceLoading, balanceText, showPercentage, inputReadonlyTooltip, inputTypography, hideToken, checkLogBalance, notTokenPickerModal, enterAddressEnabled, inputToAddress, setInputToAddress, account, tokenQuery, filterBySupportTargetChain, }: TokenCardProps): import("react").JSX.Element;
|
|
@@ -5,6 +5,7 @@ export interface TokenPickerDialogProps {
|
|
|
5
5
|
title?: React.ReactNode | string;
|
|
6
6
|
occupiedAddrs?: string[];
|
|
7
7
|
hiddenAddrs?: string[];
|
|
8
|
+
showAddrs?: string[];
|
|
8
9
|
occupiedChainId?: TokenPickerProps['occupiedChainId'];
|
|
9
10
|
onClose: DialogProps['onClose'];
|
|
10
11
|
value?: TokenPickerProps['value'];
|
|
@@ -16,5 +17,6 @@ export interface TokenPickerDialogProps {
|
|
|
16
17
|
searchOtherAddress?: TokenPickerProps['searchOtherAddress'];
|
|
17
18
|
chainId?: TokenPickerProps['chainId'];
|
|
18
19
|
modal?: boolean;
|
|
20
|
+
filterBySupportTargetChain?: boolean;
|
|
19
21
|
}
|
|
20
22
|
export declare function TokenPickerDialog(props: TokenPickerDialogProps): import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { useWalletInfo } from '../../../../hooks/ConnectWallet/useWalletInfo';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token/type';
|
|
4
|
+
export interface Props {
|
|
5
|
+
token: TokenInfo;
|
|
6
|
+
enterAddressEnabled?: boolean;
|
|
7
|
+
inputToAddress: string | null;
|
|
8
|
+
setInputToAddress: Dispatch<SetStateAction<string | null>>;
|
|
9
|
+
account: ReturnType<ReturnType<typeof useWalletInfo>['getAppKitAccountByChainId']>;
|
|
10
|
+
}
|
|
11
|
+
export declare const WalletConnectBtn: ({ token, enterAddressEnabled, inputToAddress, setInputToAddress, account, }: Props) => import("react").JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { TokenInfo } from '../../../hooks/Token';
|
|
2
1
|
import { RoutePriceStatus } from '../../../hooks/Swap';
|
|
3
|
-
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
export declare function TokenPairPriceWithToggle({ toToken, fromToken, priceStatus, pricePerToToken, pricePerFromToken, routeInfo, }: {
|
|
4
4
|
toToken: TokenInfo | null;
|
|
5
5
|
fromToken: TokenInfo | null;
|
|
6
6
|
priceStatus: RoutePriceStatus;
|
|
7
7
|
pricePerToToken: number | null;
|
|
8
8
|
pricePerFromToken: number | null;
|
|
9
|
+
routeInfo: string | null;
|
|
9
10
|
}): import("react").JSX.Element;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
import { TokenInfo } from '../../hooks/Token/type';
|
|
2
1
|
import { GetAutoSlippage } from '../../hooks/setting/useSetAutoSlippage';
|
|
2
|
+
import { TokenInfo } from '../../hooks/Token/type';
|
|
3
3
|
export interface SwapProps {
|
|
4
|
-
showPreviewInfoCard?: boolean;
|
|
5
|
-
slippageQuickInput?: boolean;
|
|
6
4
|
/** Higher priority setting slippage */
|
|
7
5
|
getAutoSlippage?: GetAutoSlippage;
|
|
8
6
|
onPayTokenChange?: (token: TokenInfo) => void;
|
|
9
7
|
onReceiveTokenChange?: (token: TokenInfo) => void;
|
|
10
8
|
}
|
|
11
|
-
export declare function Swap({
|
|
9
|
+
export declare function Swap({ getAutoSlippage, onPayTokenChange, onReceiveTokenChange, }?: SwapProps): import("react").JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
1
2
|
import { CSSProperties } from 'react';
|
|
2
3
|
import { TokenInfo } from './../../hooks/Token';
|
|
3
|
-
|
|
4
|
-
export default function TokenItem({ token, disabled, style, balance: balanceBigNumber, onClick, onDelete, }: {
|
|
4
|
+
export default function TokenItem({ token, disabled, style, balance: balanceBigNumber, onSelect, }: {
|
|
5
5
|
token: TokenInfo;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
style?: CSSProperties;
|
|
8
8
|
balance?: BigNumber;
|
|
9
|
-
|
|
10
|
-
onDelete?: () => void;
|
|
9
|
+
onSelect: (token: TokenInfo) => void;
|
|
11
10
|
}): import("react").JSX.Element;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
import { BoxProps } from '@dodoex/components';
|
|
2
|
-
import React from 'react';
|
|
3
3
|
import type { TokenInfo } from '../../hooks/Token';
|
|
4
|
-
import { ChainId } from '@dodoex/api';
|
|
5
4
|
export interface TokenPickerProps {
|
|
6
5
|
chainId?: ChainId;
|
|
7
6
|
value?: TokenInfo | null | Array<TokenInfo>;
|
|
@@ -22,5 +21,6 @@ export interface TokenPickerProps {
|
|
|
22
21
|
/** like search pool address */
|
|
23
22
|
searchOtherAddress?: (address: string) => Promise<JSX.Element | null>;
|
|
24
23
|
sx?: BoxProps['sx'];
|
|
24
|
+
filterBySupportTargetChain?: boolean;
|
|
25
25
|
}
|
|
26
|
-
export default function TokenPicker({ chainId, value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, visible, side, defaultLoadBalance, multiple, searchPlaceholder, searchOtherAddress, sx, }: TokenPickerProps):
|
|
26
|
+
export default function TokenPicker({ chainId, value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, visible, side, defaultLoadBalance, multiple, searchPlaceholder, searchOtherAddress, sx, filterBySupportTargetChain, }: TokenPickerProps): import("react").JSX.Element;
|
|
@@ -1,23 +1,26 @@
|
|
|
1
|
-
import { ChainId,
|
|
1
|
+
import { ChainId, GraphQLRequests } from '@dodoex/api';
|
|
2
|
+
import type { WalletStore } from '@dodoex/btc-connect-react';
|
|
2
3
|
import { EmptyDataIcon, PaletteMode, ThemeOptions } from '@dodoex/components';
|
|
4
|
+
import { Connection } from '@solana/web3.js';
|
|
3
5
|
import { PropsWithChildren } from 'react';
|
|
4
6
|
import { APIServices } from '../../constants/api';
|
|
5
7
|
import { SupportedLang } from '../../constants/locales';
|
|
6
|
-
import { Web3ConnectorsProps } from '../../hooks/ConnectWallet';
|
|
7
8
|
import { ExecutionProps } from '../../hooks/Submission';
|
|
9
|
+
import { ExecutionCtx } from '../../hooks/Submission/types';
|
|
8
10
|
import { DefaultTokenInfo, TokenInfo } from '../../hooks/Token/type';
|
|
9
11
|
import { InitTokenListProps } from '../../hooks/Token/useInitTokenList';
|
|
12
|
+
import { Page } from '../../router';
|
|
10
13
|
import { ConfirmProps } from '../Confirm';
|
|
11
14
|
import { DialogProps } from '../Swap/components/Dialog';
|
|
12
|
-
import { Page } from '../../router';
|
|
13
|
-
import { ExecutionCtx } from '../../hooks/Submission/types';
|
|
14
15
|
import { TokenPickerDialogProps } from '../Swap/components/TokenCard/TokenPickerDialog';
|
|
15
16
|
export declare const WIDGET_CLASS_NAME = "dodo-widget-container";
|
|
16
|
-
export interface WidgetProps extends
|
|
17
|
+
export interface WidgetProps extends InitTokenListProps, ExecutionProps {
|
|
17
18
|
apikey?: string;
|
|
19
|
+
GRAPHQL_URL: string;
|
|
20
|
+
IS_TEST_ENV: boolean;
|
|
18
21
|
theme?: PartialDeep<ThemeOptions>;
|
|
19
22
|
colorMode?: PaletteMode;
|
|
20
|
-
defaultChainId
|
|
23
|
+
defaultChainId: ChainId;
|
|
21
24
|
width?: string | number;
|
|
22
25
|
height?: string | number;
|
|
23
26
|
feeRate?: number;
|
|
@@ -32,7 +35,6 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
32
35
|
noPowerBy?: boolean;
|
|
33
36
|
noDocumentLink?: boolean;
|
|
34
37
|
onlyChainId?: ChainId;
|
|
35
|
-
supportChainIds?: number[];
|
|
36
38
|
noUI?: boolean;
|
|
37
39
|
noLangProvider?: boolean;
|
|
38
40
|
noAutoConnect?: boolean;
|
|
@@ -44,16 +46,11 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
44
46
|
notSupportPMM?: boolean;
|
|
45
47
|
supportAMMV2?: boolean;
|
|
46
48
|
supportAMMV3?: boolean;
|
|
47
|
-
|
|
49
|
+
supportCurve?: boolean;
|
|
48
50
|
/** When the winding status changes, no pop-up window will be displayed. */
|
|
49
51
|
noSubmissionDialog?: boolean;
|
|
50
|
-
|
|
51
|
-
onProviderChanged?: (provider?: any) => void;
|
|
52
|
-
getStaticJsonRpcProviderByChainId?: Exclude<ConstructorParameters<typeof ContractRequests>[0], undefined>['getProvider'];
|
|
52
|
+
submissionDialogModal?: boolean;
|
|
53
53
|
widgetRef?: React.RefObject<HTMLDivElement>;
|
|
54
|
-
/** If true is returned, the default wallet connection logic will not be executed */
|
|
55
|
-
onConnectWalletClick?: () => boolean | Promise<boolean>;
|
|
56
|
-
onSwitchChain?: (chainId?: ChainId) => Promise<boolean>;
|
|
57
54
|
/** When the token balance is insufficient, users can purchase or swap callbacks */
|
|
58
55
|
gotoBuyToken?: (params: {
|
|
59
56
|
token: TokenInfo;
|
|
@@ -93,7 +90,8 @@ export interface WidgetProps extends Web3ConnectorsProps, InitTokenListProps, Ex
|
|
|
93
90
|
/** Default deadLine when it cannot be set. Unit: seconds */
|
|
94
91
|
deadLine?: number;
|
|
95
92
|
submission?: ExecutionCtx;
|
|
96
|
-
|
|
93
|
+
solanaConnection?: Connection;
|
|
94
|
+
btcWalletStore?: WalletStore;
|
|
97
95
|
}
|
|
98
96
|
export { LangProvider } from '../../providers/i18n';
|
|
99
97
|
export { default as Message } from '../Message';
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ExecutionProps } from '../../hooks/Submission';
|
|
3
|
-
export default function WithExecutionDialog({ children, executionStatus, showSubmitLoadingDialog,
|
|
3
|
+
export default function WithExecutionDialog({ children, executionStatus, showSubmitLoadingDialog, ...props }: {
|
|
4
4
|
children: React.ReactNode;
|
|
5
|
-
executionDialogExtra?: any;
|
|
6
5
|
} & ExecutionProps): React.JSX.Element;
|
|
@@ -1 +1,7 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
1
2
|
export declare const EmptyAddress = "0x0000000000000000000000000000000000000000";
|
|
3
|
+
export declare const solanaFallbackAddress = "CVVQYs9Pi3t4it4KFpm3hxk97uDA6AVzNVJvGQTPH17n";
|
|
4
|
+
export declare const btcFallbackAddress = "tb1qcrd8yvatjzpxl0ew29jsps2z595jpwtm5mj38v";
|
|
5
|
+
export declare const suiFallbackAddress = "0xf5361d9079c5769b7b0c83841357f8f5b96d48b0477e1721e81c875ac7277e73";
|
|
6
|
+
export declare const tonFallbackAddress = "0QArAJPiEbfybbhm4XYU2ve5fIMozDvZvqU7wpVoKd-xJcRd";
|
|
7
|
+
export declare const getFallbackAddress: (chainId: ChainId | undefined) => string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { ContractRequests,
|
|
1
|
+
import { ChainId, ContractRequests, SwapApi, TokenApi } from '@dodoex/api';
|
|
2
2
|
export declare enum APIServiceKey {
|
|
3
3
|
routePrice = "routePrice",
|
|
4
|
+
solanaRoutePrice = "solanaRoutePrice",
|
|
4
5
|
fiatPrice = "fiatPrice",
|
|
5
6
|
bridgeRoutePrice = "bridgeRoutePrice",
|
|
6
7
|
bridgeEncode = "bridgeEncode",
|
|
@@ -11,9 +12,100 @@ export type APIServices = {
|
|
|
11
12
|
};
|
|
12
13
|
export declare const AppUrl = "https://app.dodoex.io";
|
|
13
14
|
export declare const getCGTokenListAPI: (chainId: ChainId) => any;
|
|
14
|
-
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
https://api.dodoex.io/route-service/zetachain/swap?apikey=d5f476a6fd58e5e989&slippage=5&chainId=7001&source=dodoMix&fromTokenAddress=0x4bC32034caCcc9B7e02536945eDbC286bACbA073&toTokenAddress=0xcC683A782f4B30c138787CB5576a86AF66fdc31d&fromAmount=100000&userAddr=0x996AF9757c4995A91E3A9b2fAd59e72eE4436382
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
{
|
|
20
|
+
"status": 200,
|
|
21
|
+
"data": {
|
|
22
|
+
"resAmount": 0.100184,
|
|
23
|
+
"resPricePerToToken": 0.9981633793819373,
|
|
24
|
+
"resPricePerFromToken": 1.0018399999999998,
|
|
25
|
+
"priceImpact": 0,
|
|
26
|
+
"useSource": "DODORoute",
|
|
27
|
+
"targetDecimals": 6,
|
|
28
|
+
"targetApproveAddr": "0x143bE32C854E4Ddce45aD48dAe3343821556D0c3",
|
|
29
|
+
"to": "0x026eea5c10f526153e7578E5257801f8610D1142",
|
|
30
|
+
"data": "0xff84aafa0000000000000000000000004bc32034caccc9b7e02536945edbc286bacba073000000000000000000000000cc683a782f4b30c138787cb5576a86af66fdc31d00000000000000000000000000000000000000000000000000000000000186a0000000000000000000000000000000000000000000000000000000000001875800000000000000000000000000000000000000000000000000000000000173c6000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000682d987600000000000000000000000000000000000000000000000000000000000000010000000000000000000000000f9053e174c123098c17e60a2b1fab3b303f9e2900000000000000000000000000000000000000000000000000000000000000010000000000000000000000004f59b88556c1b133939b2655729ad53226ed5fad00000000000000000000000000000000000000000000000000000000000000020000000000000000000000004f59b88556c1b133939b2655729ad53226ed5fad000000000000000000000000026eea5c10f526153e7578e5257801f8610d11420000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
|
31
|
+
"minReturnAmount": "95174",
|
|
32
|
+
"gasLimit": "0",
|
|
33
|
+
"routeInfo": {
|
|
34
|
+
"subRouteTotalPart": 100,
|
|
35
|
+
"subRoute": [
|
|
36
|
+
{
|
|
37
|
+
"midPathPart": 100,
|
|
38
|
+
"midPath": [
|
|
39
|
+
{
|
|
40
|
+
"fromToken": "0x4bc32034caccc9b7e02536945edbc286bacba073",
|
|
41
|
+
"toToken": "0xcc683a782f4b30c138787cb5576a86af66fdc31d",
|
|
42
|
+
"oneSplitTotalPart": 20,
|
|
43
|
+
"poolDetails": [
|
|
44
|
+
{
|
|
45
|
+
"poolName": "DODOV2",
|
|
46
|
+
"pool": "0x4f59b88556c1b133939b2655729ad53226ed5fad",
|
|
47
|
+
"poolPart": 20,
|
|
48
|
+
"poolInAmount": "100000",
|
|
49
|
+
"poolOutAmount": "100184"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
"fromAmount": "100000",
|
|
53
|
+
"toAmount": "100184"
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
"value": "0",
|
|
60
|
+
"id": "4767a82128f23ea114ae4f05c4faef21"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
*/
|
|
65
|
+
export declare const RoutePriceAPI = "https://api.dodoex.io/route-service/zetachain/swap";
|
|
66
|
+
/**
|
|
67
|
+
https://api.dodoex.io/route-service/zetachain/svm/swap?apikey=d5f476a6fd58e5e989&inputMint=EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v&outputMint=Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB&amount=1000000&user=CjeWeg7Pfyq5VcakxaUwBHCZoEePKYuZTYgfkXaaiCw3&chainId=solana-mainnet&slippageBps=32&source=jupiter
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
{
|
|
71
|
+
"status": 200,
|
|
72
|
+
"data": {
|
|
73
|
+
"resAmount": 0.999554,
|
|
74
|
+
"priceImpact": 0.00010563595848026669,
|
|
75
|
+
"useSource": "Jupiter",
|
|
76
|
+
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
77
|
+
"inAmount": "1000000",
|
|
78
|
+
"inputMintDecimal": 6,
|
|
79
|
+
"outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
|
|
80
|
+
"outAmount": "999554",
|
|
81
|
+
"outputMintDecimal": 6,
|
|
82
|
+
"minOutAmount": "996356",
|
|
83
|
+
"inAmountWithOutDecimals": 1,
|
|
84
|
+
"outAmountWithOutDecimals": 0.999554,
|
|
85
|
+
"slippageBps": 32,
|
|
86
|
+
"routePlan": [
|
|
87
|
+
{
|
|
88
|
+
"swapInfo": {
|
|
89
|
+
"ammKey": "5K7CHUbBYAh6wrantyJvDDqwT4VoKuZTi73CN1DTUUer",
|
|
90
|
+
"label": "Stabble Stable Swap",
|
|
91
|
+
"inputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
|
|
92
|
+
"outputMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB",
|
|
93
|
+
"inAmount": "1000000",
|
|
94
|
+
"outAmount": "999554",
|
|
95
|
+
"feeAmount": "10",
|
|
96
|
+
"feeMint": "Es9vMFrzaCERmJfrF4H2FYD4KCoNkY11McCe8BenwNYB"
|
|
97
|
+
},
|
|
98
|
+
"percent": 100
|
|
99
|
+
}
|
|
100
|
+
],
|
|
101
|
+
"data": "AIABAAgLrl1dPXkIuWhzYVhFtYxb+JQ3GoZqa2pq14bW0E52rOJp7jJXlYhamzIeZUst3brLJbcQ9ZMduX/Gud3GUE0+/6/x/V52dT9Bjl8YSwqdPxo1PUQ8QzrmBC38ogNXtRwqxvp6877brTo9ZfNqq8l0MbG75MLS9uDkfKYCA0UvXWHOAQ5gr+2yJxe9YxkvVBRaP5ZaM7uC0scCnrLOHiCCZIyXJY9OJInxuz0QKRSODYMLWhOZ2v8QhASOe9jb6fhZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEedVb8jHAbu50xW7OaBUH/bGy3qP0jlECsc2iVrwTj7Q/+if11/ZKdMCbHylYed5LCas238ndUUsyGqezjOXoAwZGb+UhFzL/7K26csOb57yM5bvF9xJrLEObOkAAAABynzuLbKQ30Ca3pj/0Wq5lWzvmdbFt2OddEbICsJmWXzN8dj2NJQ6itko+eogXWBEuAwQlfGA3cbUcKdhqHrdTAgkABQKcQBAACh4AAwQCAQ8FBg8AAgEHBAcIBxAAAgELDA0OERITFA9H4a81SdQvNO1AQg8AAAAAAIJADwAAAAAABDQPAAAAAAAjAAAA5RfLl3rjrSoBAAAAOGQAAUBCDwAAAAAAgkAPAAAAAAAgAAABWX05K6qoNBpFvohhQGiBxG4ZEV+GAgS6FrxyNTh9k9oETqYKoQYEERQMDQc=",
|
|
102
|
+
"lastValidBlockHeight": 319671584
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
*/
|
|
106
|
+
export declare const SolanaRoutePriceAPI = "https://api.dodoex.io/route-service/zetachain/svm/swap";
|
|
107
|
+
export declare const FiatPriceAPI = "https://api.dodoex.io/frontend-price-api-v2/current/batch";
|
|
16
108
|
export declare function getAPIService(key: APIServiceKey, serviceProps?: Partial<APIServices>): string;
|
|
17
109
|
export declare const contractRequests: ContractRequests;
|
|
18
|
-
export declare const tokenContractRequests: ContractRequests;
|
|
19
110
|
export declare const tokenApi: TokenApi;
|
|
111
|
+
export declare const swapApi: SwapApi;
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { AppKitNetwork } from '@reown/appkit/networks';
|
|
2
3
|
import { ReactComponent as ETHereumLogo } from '../assets/logo/networks/eth.svg';
|
|
3
4
|
export interface ChainListItem {
|
|
4
5
|
chainId: ChainId;
|
|
5
6
|
logo: typeof ETHereumLogo;
|
|
6
7
|
name: string;
|
|
7
8
|
mainnet?: ChainId;
|
|
9
|
+
caipNetwork: AppKitNetwork;
|
|
10
|
+
isEVMChain: boolean;
|
|
11
|
+
isSolanaChain: boolean;
|
|
12
|
+
isBTCChain: boolean;
|
|
13
|
+
isSUIChain: boolean;
|
|
14
|
+
isTONChain: boolean;
|
|
15
|
+
isTestNet: boolean;
|
|
16
|
+
/** 未链接钱包时,使用该地址 */
|
|
17
|
+
fallbackAddress: string;
|
|
8
18
|
}
|
|
9
19
|
export declare const chainListMap: Map<ChainId, ChainListItem>;
|
|
10
20
|
export declare const isTestNet: (chainId: ChainId) => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
|
-
export {
|
|
2
|
+
export { basicTokenMap, etherTokenAddress } from '@dodoex/api';
|
|
3
3
|
export declare const rpcServerMap: {
|
|
4
4
|
[key in ChainId]: Array<string>;
|
|
5
5
|
};
|
|
@@ -18,3 +18,19 @@ export declare const blockTimeMap: {
|
|
|
18
18
|
export declare const dexKeysMap: {
|
|
19
19
|
[key in ChainId]: string[];
|
|
20
20
|
};
|
|
21
|
+
export interface PrivacySwapSupplierEndpointI {
|
|
22
|
+
key: string;
|
|
23
|
+
name: string;
|
|
24
|
+
logo: string;
|
|
25
|
+
docUrl: string;
|
|
26
|
+
/** 添加链的配置 */
|
|
27
|
+
addChainParameters: AddChainParameter;
|
|
28
|
+
/** 是否在该节点的检查方法 */
|
|
29
|
+
isPrivacyEndpoint: {
|
|
30
|
+
contract: string;
|
|
31
|
+
rpcMethod: string;
|
|
32
|
+
} | null;
|
|
33
|
+
}
|
|
34
|
+
export declare const privacySwapSupplierEndpointsMap: {
|
|
35
|
+
[key in ChainId]: PrivacySwapSupplierEndpointI[];
|
|
36
|
+
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export default _default;
|
|
1
|
+
import { TokenInfo } from '../hooks/Token';
|
|
2
|
+
declare const tokenList: (TokenInfo & {
|
|
3
|
+
id: number;
|
|
4
|
+
logo: string;
|
|
5
|
+
position: number;
|
|
6
|
+
slippage: number | null;
|
|
7
|
+
})[];
|
|
8
|
+
export default tokenList;
|
|
@@ -1,28 +1,8 @@
|
|
|
1
|
+
import { GraphQLRequests } from '@dodoex/api';
|
|
1
2
|
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
fromAmount: string;
|
|
5
|
-
fromTokenAddress: string;
|
|
6
|
-
toChainId: number;
|
|
7
|
-
toAmount: string;
|
|
8
|
-
toTokenAddress: string;
|
|
9
|
-
fromAddress: string;
|
|
10
|
-
toAddress: string;
|
|
11
|
-
slippage: number;
|
|
12
|
-
hash: string;
|
|
13
|
-
product: string | null;
|
|
14
|
-
extend: {
|
|
15
|
-
lifiBridge: BridgeRouteI['sourceRoute']['step']['tool'];
|
|
16
|
-
route: BridgeRouteI['sourceRoute'];
|
|
17
|
-
productParams: BridgeRouteI['productParams'];
|
|
18
|
-
encodeId: string;
|
|
19
|
-
source: string;
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
export declare function createBridgeOrder({ apikey, tx, route, bridgeCreateRouteAPI, encodeId, }: {
|
|
23
|
-
apikey?: string;
|
|
3
|
+
export declare function createBridgeOrder({ graphQLRequests, tx, route, calldata, }: {
|
|
4
|
+
graphQLRequests: GraphQLRequests;
|
|
24
5
|
tx: string;
|
|
25
6
|
route: BridgeRouteI;
|
|
26
|
-
|
|
27
|
-
encodeId: string;
|
|
7
|
+
calldata: string;
|
|
28
8
|
}): Promise<any>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BridgeTXRequest } from '../../components/Bridge/BridgeSummaryDialog';
|
|
2
2
|
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
3
|
-
import { Metadata } from '../Submission/types';
|
|
4
3
|
export default function useExecuteBridgeRoute({ route, bridgeOrderTxRequest, }: {
|
|
5
4
|
route?: BridgeRouteI;
|
|
6
5
|
bridgeOrderTxRequest?: BridgeTXRequest;
|
|
7
|
-
}): (
|
|
6
|
+
}): () => Promise<import("../Submission/types").ExecutionResult> | undefined;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BridgeRouteI } from './useFetchRoutePriceBridge';
|
|
2
|
+
export declare function useFeeList({ fees }: {
|
|
3
|
+
fees: BridgeRouteI['fees'];
|
|
4
|
+
}): {
|
|
5
|
+
key: "btcDepositFee" | "platformFee" | "destinationFee" | "protocolFees" | "svmRentFee";
|
|
6
|
+
title: string;
|
|
7
|
+
value: string | null;
|
|
8
|
+
isFree: boolean;
|
|
9
|
+
}[];
|