@dodoex/widgets 3.2.0-beta.6 → 3.2.0-beta.8
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 +69 -69
- package/dist/{8de9a184d4ef0a11.svg → 219f8611c6c9e6e2.svg} +6 -6
- package/dist/{28442382d977858a.svg → 34acf2e58b457195.svg} +9 -9
- package/dist/{b3f16b2626f03378.svg → 44df077bd19df476.svg} +10 -10
- package/dist/{ed726d76d93d4899.svg → 5c5d298f247819e1.svg} +10 -10
- package/dist/7feb1ff0e03a571d.svg +9 -0
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-iOyIIXHm.js → helper-Bwk-pafn.js} +1 -1
- package/dist/{helper-D2B1OtCw.cjs → helper-BxZqNcaq.cjs} +1 -1
- package/dist/index-B4_cnc94.cjs +67 -0
- package/dist/{index-DWFukWDg.cjs → index-BDehUNkw.cjs} +1 -1
- package/dist/{index-BuDihNZU.js → index-Bk4cKKCz.js} +1 -1
- package/dist/index-DQp2ouTr.js +67 -0
- package/dist/{index-D1nFm1A3.js → index-DRV1A2No.js} +1 -1
- package/dist/{index-CUWak-Af.cjs → index-cEhELacT.cjs} +1 -1
- package/dist/index.cjs +1 -1
- 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/Message/index.d.ts +1 -2
- package/dist/types/components/SelectChain.d.ts +1 -2
- package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +2 -1
- package/dist/types/components/Swap/components/ReviewDialog.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/index.d.ts +1 -2
- package/dist/types/components/Swap/components/SwitchBox.d.ts +2 -1
- package/dist/types/components/Swap/components/TokenCard/NumberInput.d.ts +1 -0
- package/dist/types/components/Swap/components/TokenCard/index.d.ts +5 -2
- package/dist/types/components/Swap/index.d.ts +5 -3
- package/dist/types/components/TokenSelect.d.ts +2 -1
- package/dist/types/components/Widget/index.d.ts +3 -1
- package/dist/types/constants/address.d.ts +1 -0
- package/dist/types/hooks/ConnectWallet/useSwitchChain.d.ts +0 -3
- package/dist/types/hooks/Submission/types.d.ts +4 -0
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +2 -2
- package/dist/types/hooks/usePoolTokenSort.d.ts +24 -0
- package/dist/types/index.d.ts +3 -1
- package/dist/types/providers/useInitContractRequest.d.ts +2 -1
- package/dist/types/router/types.d.ts +2 -1
- package/dist/types/utils/address.d.ts +35 -0
- package/dist/types/utils/fractions/fraction.d.ts +24 -0
- package/dist/types/utils/fractions/index.d.ts +3 -0
- package/dist/types/utils/fractions/percent.d.ts +14 -0
- package/dist/types/utils/fractions/price.d.ts +29 -0
- package/dist/types/utils/fractions/types.d.ts +7 -0
- 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/Algebra/AddLiquidity.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/Algebra/AlgebraPositionManage.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/Badge/RangeBadge.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/ClaimButton.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/InRangeDot.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/InputStepCounter.d.ts +17 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Area.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/AxisBottom.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Brush.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Chart.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Line.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Zoom.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/index.d.ts +19 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/svg.d.ts +22 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/types.d.ts +50 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/utils.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/MyLiquidity.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/PositionPreview.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/PositionSelectedRangePreview.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/RangeSelector.d.ts +21 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/RateToggle.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/RemoveButton.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/ReviewModal.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/TokenAndEtherscan.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/TokenPairSelect.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/shared.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/widgets.d.ts +56 -0
- package/dist/types/widgets/PoolWidget/Algebra/constants/misc.d.ts +17 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useAddAlgebraLiquidity.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraAmounts.d.ts +19 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraPair.d.ts +59 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraPositionFees.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useClaimAlgebraFees.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useContract.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useFetchPositionFromTokenId.d.ts +295 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useFetchPositions.d.ts +23 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/usePoolActiveLiquidityChartData.d.ts +37 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/usePools.d.ts +22 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useRemoveAlgebraLiquidity.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useSetRange.d.ts +32 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useSwapTaxes.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3MintActionHandlers.d.ts +11 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3PositionFees.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3Positions.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/addresses.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/chains.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/constants.d.ts +12 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/baseCurrency.d.ts +49 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/currency.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/currencyAmount.d.ts +32 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/fraction.d.ts +24 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/index.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/percent.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/price.d.ts +38 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/index.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/nativeCurrency.d.ts +16 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/nativeCurrencyClass.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/token.d.ts +48 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/index.d.ts +5 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/computePriceImpact.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/index.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/sortedInsert.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/sqrt.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/validateAndParseAddress.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/constants.d.ts +23 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/index.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/pool.d.ts +81 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/position.d.ts +131 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/route.d.ts +26 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tick.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tickDataProvider.d.ts +31 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tickListDataProvider.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/trade.d.ts +220 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/index.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/internalConstants.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/multicall.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/nonfungiblePositionManager.d.ts +159 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/payments.d.ts +24 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/quoter.d.ts +37 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/selfPermit.d.ts +25 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/staker.d.ts +101 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/swapRouter.d.ts +51 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/calldata.d.ts +20 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/computePoolAddress.d.ts +21 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/encodeRouteToPath.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/encodeSqrtRatioX96.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/fullMath.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/index.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/isSorted.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/liquidityMath.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/maxLiquidityForAmounts.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/mostSignificantBit.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/nearestUsableTick.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/position.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/priceTickConversions.d.ts +15 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/sqrtPriceMath.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/swapMath.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickLibrary.d.ts +14 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickList.d.ts +23 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickMath.d.ts +34 -0
- package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/v3swap.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/types/position.d.ts +18 -0
- package/dist/types/widgets/PoolWidget/Algebra/types.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/calldata.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/computeSurroundingTicks.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/constants.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/encodeSqrtRatioX96.d.ts +9 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/formatTickPrice.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/fullMath.d.ts +8 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/getPositionAmount.d.ts +37 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/getPositionAmountWithSlippage.d.ts +23 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/getTickToPrice.d.ts +10 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/maxLiquidityForAmounts.d.ts +22 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/mostSignificantBit.d.ts +2 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/nearestUsableTick.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/slippage.d.ts +3 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/sqrt.d.ts +7 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/sqrtPriceMath.d.ts +13 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/tickMath.d.ts +34 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils/tryParseTick.d.ts +4 -0
- package/dist/types/widgets/PoolWidget/Algebra/utils.d.ts +9 -0
- 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/usePriceInit.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +3 -3
- 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/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/index.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +5 -4
- package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +1 -2
- package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +5 -4
- package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +9 -5
- package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +1 -2
- 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/Ratio.d.ts +1 -5
- package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +1 -4
- package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +0 -12
- 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/package.json +156 -156
- package/dist/index-Dn8BMKjl.cjs +0 -31
- package/dist/index-Dz9qNpWS.js +0 -31
- package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +0 -7
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { TokenInfo } from './Token';
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
|
+
export declare function usePoolTokenSort({ baseToken, quoteToken, }: {
|
|
4
|
+
baseToken: TokenInfo | undefined;
|
|
5
|
+
quoteToken: TokenInfo | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
chainId: undefined;
|
|
8
|
+
isRearTokenA: boolean;
|
|
9
|
+
token0: undefined;
|
|
10
|
+
token1: undefined;
|
|
11
|
+
token0Wrapped: undefined;
|
|
12
|
+
token1Wrapped: undefined;
|
|
13
|
+
isBaseTokenNative: boolean;
|
|
14
|
+
isQuoteTokenNative: boolean;
|
|
15
|
+
} | {
|
|
16
|
+
chainId: ChainId;
|
|
17
|
+
isRearTokenA: boolean;
|
|
18
|
+
token0: TokenInfo;
|
|
19
|
+
token1: TokenInfo;
|
|
20
|
+
token0Wrapped: TokenInfo;
|
|
21
|
+
token1Wrapped: TokenInfo;
|
|
22
|
+
isBaseTokenNative: boolean;
|
|
23
|
+
isQuoteTokenNative: boolean;
|
|
24
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -27,6 +27,8 @@ export { usePoolBalanceInfo } from './widgets/PoolWidget/hooks/usePoolBalanceInf
|
|
|
27
27
|
export { MiningList } from './widgets/MiningWidget/MiningList';
|
|
28
28
|
export { MiningDetail } from './widgets/MiningWidget/MiningDetail';
|
|
29
29
|
export { MiningCreate } from './widgets/MiningWidget/MiningCreate';
|
|
30
|
+
export { default as AlgebraAddLiquidity } from './widgets/PoolWidget/Algebra/AddLiquidity';
|
|
31
|
+
export { AlgebraPositionManage } from './widgets/PoolWidget/Algebra/AlgebraPositionManage';
|
|
30
32
|
export { default as AddLiquidityV3 } from './widgets/PoolWidget/AMMV3/AddLiquidityV3';
|
|
31
33
|
export { AMMV3PositionsView } from './widgets/PoolWidget/AMMV3/AMMV3PositionsView';
|
|
32
34
|
export { AMMV3PositionManage } from './widgets/PoolWidget/AMMV3/AMMV3PositionManage';
|
|
@@ -37,7 +39,7 @@ export { TokenCard } from './components/Swap/components/TokenCard';
|
|
|
37
39
|
export { default as TokenLogo } from './components/TokenLogo';
|
|
38
40
|
export { FailedList } from './components/List/FailedList';
|
|
39
41
|
export { EmptyList } from './components/List/EmptyList';
|
|
40
|
-
export { getEtherscanPage } from './utils/address';
|
|
42
|
+
export { getEtherscanPage, ALGEBRA_POOL_DEPLOYER_ADDRESSES, ALGEBRA_POOL_INIT_CODE_HASH, } from './utils/address';
|
|
41
43
|
export { formatReadableNumber, formatTokenAmountNumber, formatShortNumber, formatPercentageNumber, } from './utils/formatter';
|
|
42
44
|
export declare function SwapWidget(props: SwapWidgetProps): JSX.Element;
|
|
43
45
|
export declare function PoolWidget(props: SwapWidgetProps): JSX.Element;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { ContractRequests } from '@dodoex/contract-request';
|
|
2
|
+
export declare function useInitContractRequest(isSet?: boolean): ContractRequests;
|
|
@@ -8,7 +8,8 @@ export declare enum PageType {
|
|
|
8
8
|
MiningList = "miningList",
|
|
9
9
|
MiningDetail = "miningDetail",
|
|
10
10
|
createPoolAMMV2 = "createPoolAMMV2",
|
|
11
|
-
createPoolAMMV3 = "createPoolAMMV3"
|
|
11
|
+
createPoolAMMV3 = "createPoolAMMV3",
|
|
12
|
+
createPoolAlgebra = "createPoolAlgebra"
|
|
12
13
|
}
|
|
13
14
|
interface PageTypeParams {
|
|
14
15
|
[PageType.Pool]: {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { ChainId } from '@dodoex/api';
|
|
2
2
|
import { TokenInfo } from '../hooks/Token';
|
|
3
|
+
export declare const ALGEBRA_POOL_DEPLOYER_ADDRESSES: {
|
|
4
|
+
[chainId in ChainId]?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const ALGEBRA_POOL_INIT_CODE_HASH: {
|
|
7
|
+
[chainId in ChainId]?: string;
|
|
8
|
+
};
|
|
3
9
|
export declare const isSameAddress: (tokenAddress1: string, tokenAddress2: string) => boolean;
|
|
4
10
|
export declare function isAddress(value: any): boolean;
|
|
5
11
|
export declare function isETHAddress(addr: string): boolean;
|
|
@@ -25,9 +31,38 @@ export declare function openEtherscanPage(path: string | undefined, chainId: Cha
|
|
|
25
31
|
*/
|
|
26
32
|
export declare const getUniInitCodeHash: (chainId: number) => "0x96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f" | "0x007722521498f3d29a63d1eb6ab35e202874706c77ce73d45c1ad9da88174a3f" | "0x67a372377cf6d7f78cfdcc9df0bc21e1139bd49e5a47c33ee0de5389a4396410" | "0x2ebf1082215ab683deab4ee8ff50d42205db2059829b641717ab3f61f18d481a";
|
|
27
33
|
export declare function sortsBefore(tokenA: TokenInfo, tokenB: TokenInfo): boolean;
|
|
34
|
+
export declare function sortsBeforeTokenAddress(tokenA: string, tokenB: string): boolean;
|
|
28
35
|
export declare const computePairAddress: ({ factoryAddress, tokenA, tokenB, fee, }: {
|
|
29
36
|
factoryAddress: string;
|
|
30
37
|
tokenA: TokenInfo;
|
|
31
38
|
tokenB: TokenInfo;
|
|
32
39
|
fee: number;
|
|
33
40
|
}) => string;
|
|
41
|
+
/**
|
|
42
|
+
* Computes a pool address
|
|
43
|
+
* @param poolDeployer The Algebra Pool Deployer address
|
|
44
|
+
* @param tokenA The first token of the pair, irrespective of sort order
|
|
45
|
+
* @param tokenB The second token of the pair, irrespective of sort order
|
|
46
|
+
* @param initCodeHashManualOverride The initial code hash override
|
|
47
|
+
* @returns The pool address
|
|
48
|
+
*/
|
|
49
|
+
export declare function computePoolAddress({ tokenA, tokenB, poolDeployer, initCodeHashManualOverride, }: {
|
|
50
|
+
tokenA: TokenInfo;
|
|
51
|
+
tokenB: TokenInfo;
|
|
52
|
+
poolDeployer: string;
|
|
53
|
+
initCodeHashManualOverride: string;
|
|
54
|
+
}): string;
|
|
55
|
+
/**
|
|
56
|
+
* Computes a pool address
|
|
57
|
+
* @param poolDeployer The Algebra Pool Deployer address
|
|
58
|
+
* @param tokenA The first token of the pair, irrespective of sort order
|
|
59
|
+
* @param tokenB The second token of the pair, irrespective of sort order
|
|
60
|
+
* @param initCodeHashManualOverride The initial code hash override
|
|
61
|
+
* @returns The pool address
|
|
62
|
+
*/
|
|
63
|
+
export declare function computePoolAddressByAddress({ tokenA, tokenB, initCodeHashManualOverride, poolDeployer, }: {
|
|
64
|
+
tokenA: string;
|
|
65
|
+
tokenB: string;
|
|
66
|
+
initCodeHashManualOverride: string;
|
|
67
|
+
poolDeployer: string;
|
|
68
|
+
}): string;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import JSBI from 'jsbi';
|
|
2
|
+
import { BigintIsh, Rounding } from './types';
|
|
3
|
+
export declare class Fraction {
|
|
4
|
+
readonly numerator: JSBI;
|
|
5
|
+
readonly denominator: JSBI;
|
|
6
|
+
constructor(numerator: BigintIsh, denominator?: BigintIsh);
|
|
7
|
+
private static tryParseFraction;
|
|
8
|
+
get quotient(): JSBI;
|
|
9
|
+
get remainder(): Fraction;
|
|
10
|
+
invert(): Fraction;
|
|
11
|
+
add(other: Fraction | BigintIsh): Fraction;
|
|
12
|
+
subtract(other: Fraction | BigintIsh): Fraction;
|
|
13
|
+
lessThan(other: Fraction | BigintIsh): boolean;
|
|
14
|
+
equalTo(other: Fraction | BigintIsh): boolean;
|
|
15
|
+
greaterThan(other: Fraction | BigintIsh): boolean;
|
|
16
|
+
multiply(other: Fraction | BigintIsh): Fraction;
|
|
17
|
+
divide(other: Fraction | BigintIsh): Fraction;
|
|
18
|
+
toSignificant(significantDigits: number, format?: object, rounding?: Rounding): string;
|
|
19
|
+
toFixed(decimalPlaces: number, format?: object, rounding?: Rounding): string;
|
|
20
|
+
/**
|
|
21
|
+
* Helper method for converting any super class back to a fraction
|
|
22
|
+
*/
|
|
23
|
+
get asFraction(): Fraction;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BigintIsh, Rounding } from './types';
|
|
2
|
+
import { Fraction } from './fraction';
|
|
3
|
+
export declare class Percent extends Fraction {
|
|
4
|
+
/**
|
|
5
|
+
* This boolean prevents a fraction from being interpreted as a Percent
|
|
6
|
+
*/
|
|
7
|
+
readonly isPercent: true;
|
|
8
|
+
add(other: Fraction | BigintIsh): Percent;
|
|
9
|
+
subtract(other: Fraction | BigintIsh): Percent;
|
|
10
|
+
multiply(other: Fraction | BigintIsh): Percent;
|
|
11
|
+
divide(other: Fraction | BigintIsh): Percent;
|
|
12
|
+
toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
|
|
13
|
+
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BigintIsh, Rounding } from './types';
|
|
2
|
+
import { Fraction } from './fraction';
|
|
3
|
+
import { TokenInfo } from '../../hooks/Token';
|
|
4
|
+
export declare class Price extends Fraction {
|
|
5
|
+
readonly baseCurrency: TokenInfo;
|
|
6
|
+
readonly quoteCurrency: TokenInfo;
|
|
7
|
+
readonly scalar: Fraction;
|
|
8
|
+
/**
|
|
9
|
+
* Construct a price, either with the base and quote currency amount, or the
|
|
10
|
+
* @param args
|
|
11
|
+
*/
|
|
12
|
+
constructor(...args: [TokenInfo, TokenInfo, BigintIsh, BigintIsh]);
|
|
13
|
+
/**
|
|
14
|
+
* Flip the price, switching the base and quote currency
|
|
15
|
+
*/
|
|
16
|
+
invert(): Price;
|
|
17
|
+
/**
|
|
18
|
+
* Multiply the price by another price, returning a new price. The other price must have the same base currency as this price's quote currency
|
|
19
|
+
* @param other the other price
|
|
20
|
+
*/
|
|
21
|
+
multiply(other: Price): Price;
|
|
22
|
+
/**
|
|
23
|
+
* Get the value scaled by decimals for formatting
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private get adjustedForDecimals();
|
|
27
|
+
toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
|
|
28
|
+
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
|
|
29
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BoxProps } from '@dodoex/components';
|
|
2
2
|
import BigNumber from 'bignumber.js';
|
|
3
3
|
import { TokenInfo } from '../../../hooks/Token';
|
|
4
|
-
import { useSlipper } from '../PoolOperate/components/SlippageSetting';
|
|
5
4
|
export declare function RatioPrice({ baseToken, quoteToken, midPrice, loading, disabled, }: {
|
|
6
5
|
baseToken?: TokenInfo;
|
|
7
6
|
quoteToken?: TokenInfo;
|
|
@@ -9,13 +8,11 @@ export declare function RatioPrice({ baseToken, quoteToken, midPrice, loading, d
|
|
|
9
8
|
loading?: boolean;
|
|
10
9
|
disabled?: boolean;
|
|
11
10
|
}): JSX.Element;
|
|
12
|
-
export default function Ratio({ baseToken, quoteToken, loading, midPrice, shareOfPool, sx,
|
|
11
|
+
export default function Ratio({ baseToken, quoteToken, loading, midPrice, shareOfPool, sx, }: {
|
|
13
12
|
baseToken?: TokenInfo;
|
|
14
13
|
quoteToken?: TokenInfo;
|
|
15
14
|
loading?: boolean;
|
|
16
15
|
midPrice?: BigNumber | null;
|
|
17
16
|
shareOfPool?: string;
|
|
18
17
|
sx?: BoxProps['sx'];
|
|
19
|
-
slippage: ReturnType<typeof useSlipper>['slipper'];
|
|
20
|
-
setSlippage: ReturnType<typeof useSlipper>['setSlipper'];
|
|
21
18
|
}): JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { AUTO_SWAP_SLIPPAGE_PROTECTION } from '../../../constants/pool';
|
|
3
|
+
export declare const useSlipper: ({ address }: {
|
|
4
|
+
address?: string;
|
|
5
|
+
}) => {
|
|
6
|
+
slipper: number | "auto";
|
|
7
|
+
setSlipper: import("react").Dispatch<import("react").SetStateAction<number | "auto">>;
|
|
8
|
+
slipperValue: number;
|
|
9
|
+
resetSlipper: () => void;
|
|
10
|
+
};
|
|
11
|
+
export default function Setting({ sx, disabled, slippage, onChangeSlippage, }: {
|
|
12
|
+
sx?: BoxProps['sx'];
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
slippage: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION;
|
|
15
|
+
onChangeSlippage: (val: number | typeof AUTO_SWAP_SLIPPAGE_PROTECTION) => void;
|
|
16
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
import { FetchTicks } from './hooks/usePoolActiveLiquidityChartData';
|
|
3
|
+
export default function AddLiquidity({ params, border, fetchTicks, onBaseTokenChange, onQuoteTokenChange, }: {
|
|
4
|
+
params?: {
|
|
5
|
+
from?: string;
|
|
6
|
+
to?: string;
|
|
7
|
+
fee?: string;
|
|
8
|
+
};
|
|
9
|
+
border?: boolean;
|
|
10
|
+
fetchTicks?: FetchTicks;
|
|
11
|
+
ticksErrorRefetch?: () => void;
|
|
12
|
+
onBaseTokenChange?: (token: TokenInfo | undefined) => void;
|
|
13
|
+
onQuoteTokenChange?: (token: TokenInfo | undefined) => void;
|
|
14
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
import { ChainId } from '@dodoex/api';
|
|
3
|
+
export interface AlgebraPositionManageProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
baseToken: TokenInfo;
|
|
6
|
+
quoteToken: TokenInfo;
|
|
7
|
+
tokenId: string;
|
|
8
|
+
border?: boolean;
|
|
9
|
+
successBack?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const AlgebraPositionManage: ({ chainId, baseToken, quoteToken, tokenId, border, successBack: successBackProps, }: AlgebraPositionManageProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export interface ClaimButtonProps {
|
|
3
|
+
chainId: ChainId;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
isLoading: boolean;
|
|
6
|
+
border?: boolean;
|
|
7
|
+
onConfirm: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ClaimButton: ({ chainId, disabled, isLoading, border, onConfirm, }: ClaimButtonProps) => JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface StepCounterProps {
|
|
3
|
+
value: string;
|
|
4
|
+
onUserInput: (value: string) => void;
|
|
5
|
+
decrement: () => string;
|
|
6
|
+
increment: () => string;
|
|
7
|
+
decrementDisabled?: boolean;
|
|
8
|
+
incrementDisabled?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
locked?: boolean;
|
|
11
|
+
title: ReactNode;
|
|
12
|
+
tokenA?: string;
|
|
13
|
+
tokenB?: string;
|
|
14
|
+
border?: boolean;
|
|
15
|
+
}
|
|
16
|
+
declare const StepCounter: ({ value, decrement, increment, decrementDisabled, incrementDisabled, locked, onUserInput, title, tokenA, tokenB, border, }: StepCounterProps) => JSX.Element;
|
|
17
|
+
export default StepCounter;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ScaleLinear } from 'd3';
|
|
2
|
+
import { ChartEntry } from './types';
|
|
3
|
+
export declare const Area: ({ series, xScale, yScale, xValue, yValue, fill, }: {
|
|
4
|
+
series: ChartEntry[];
|
|
5
|
+
xScale: ScaleLinear<number, number>;
|
|
6
|
+
yScale: ScaleLinear<number, number>;
|
|
7
|
+
xValue: (d: ChartEntry) => number;
|
|
8
|
+
yValue: (d: ChartEntry) => number;
|
|
9
|
+
fill?: string;
|
|
10
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ScaleLinear } from 'd3';
|
|
2
|
+
export declare const Brush: ({ id, xScale, interactive, brushLabelValue, brushExtent, setBrushExtent, innerWidth, innerHeight, westHandleColor, eastHandleColor, }: {
|
|
3
|
+
id: string;
|
|
4
|
+
xScale: ScaleLinear<number, number>;
|
|
5
|
+
interactive: boolean;
|
|
6
|
+
brushLabelValue: (d: "w" | "e", x: number) => string;
|
|
7
|
+
brushExtent: [number, number];
|
|
8
|
+
setBrushExtent: (extent: [number, number], mode: string | undefined) => void;
|
|
9
|
+
innerWidth: number;
|
|
10
|
+
innerHeight: number;
|
|
11
|
+
westHandleColor: string;
|
|
12
|
+
eastHandleColor: string;
|
|
13
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { LiquidityChartRangeInputProps } from './types';
|
|
2
|
+
export declare function Chart({ id, data: { series, current }, ticksAtLimit, styles, dimensions: { width, height }, margins, interactive, brushDomain, brushLabels, onBrushDomainChange, zoomLevels, }: LiquidityChartRangeInputProps): JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ScaleLinear, ZoomTransform } from 'd3';
|
|
2
|
+
import { ZoomLevels } from './types';
|
|
3
|
+
export default function Zoom({ svg, xScale, setZoom, width, height, resetBrush, showResetButton, zoomLevels, }: {
|
|
4
|
+
svg: SVGElement | null;
|
|
5
|
+
xScale: ScaleLinear<number, number>;
|
|
6
|
+
setZoom: (transform: ZoomTransform) => void;
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
resetBrush: () => void;
|
|
10
|
+
showResetButton: boolean;
|
|
11
|
+
zoomLevels: ZoomLevels;
|
|
12
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Bound } from '../../types';
|
|
2
|
+
import { TokenInfo } from '../../../../../hooks/Token';
|
|
3
|
+
import { Price } from '../../../../../utils/fractions';
|
|
4
|
+
import { usePoolActiveLiquidityChartData } from '../../hooks/usePoolActiveLiquidityChartData';
|
|
5
|
+
export default function LiquidityChartRangeInput({ currencyA, currencyB, isSorted, ticksAtLimit, price, priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, interactive, chartData, }: {
|
|
6
|
+
currencyA?: TokenInfo;
|
|
7
|
+
currencyB?: TokenInfo;
|
|
8
|
+
isSorted: boolean;
|
|
9
|
+
ticksAtLimit: {
|
|
10
|
+
[bound in Bound]?: boolean | undefined;
|
|
11
|
+
};
|
|
12
|
+
price?: number;
|
|
13
|
+
priceLower?: Price;
|
|
14
|
+
priceUpper?: Price;
|
|
15
|
+
onLeftRangeInput: (typedValue: string) => void;
|
|
16
|
+
onRightRangeInput: (typedValue: string) => void;
|
|
17
|
+
interactive: boolean;
|
|
18
|
+
chartData: ReturnType<typeof usePoolActiveLiquidityChartData>;
|
|
19
|
+
}): JSX.Element | null;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Generates an SVG path for the east brush handle.
|
|
3
|
+
* Apply `scale(-1, 1)` to generate west brush handle.
|
|
4
|
+
*
|
|
5
|
+
* |```````\
|
|
6
|
+
* | | | |
|
|
7
|
+
* |______/
|
|
8
|
+
* |
|
|
9
|
+
* |
|
|
10
|
+
* |
|
|
11
|
+
* |
|
|
12
|
+
* |
|
|
13
|
+
*
|
|
14
|
+
* https://medium.com/@dennismphil/one-side-rounded-rectangle-using-svg-fb31cf318d90
|
|
15
|
+
*/
|
|
16
|
+
export declare const brushHandlePath: (height: number) => string;
|
|
17
|
+
export declare const brushHandleAccentPath: () => string;
|
|
18
|
+
export declare const OffScreenHandle: ({ color, size, margin, }: {
|
|
19
|
+
color: string;
|
|
20
|
+
size?: number;
|
|
21
|
+
margin?: number;
|
|
22
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Bound } from '../../types';
|
|
2
|
+
export interface ChartEntry {
|
|
3
|
+
activeLiquidity: number;
|
|
4
|
+
price0: number;
|
|
5
|
+
}
|
|
6
|
+
interface Dimensions {
|
|
7
|
+
width: number;
|
|
8
|
+
height: number;
|
|
9
|
+
}
|
|
10
|
+
interface Margins {
|
|
11
|
+
top: number;
|
|
12
|
+
right: number;
|
|
13
|
+
bottom: number;
|
|
14
|
+
left: number;
|
|
15
|
+
}
|
|
16
|
+
export interface ZoomLevels {
|
|
17
|
+
initialMin: number;
|
|
18
|
+
initialMax: number;
|
|
19
|
+
min: number;
|
|
20
|
+
max: number;
|
|
21
|
+
}
|
|
22
|
+
export interface LiquidityChartRangeInputProps {
|
|
23
|
+
id?: string;
|
|
24
|
+
data: {
|
|
25
|
+
series: ChartEntry[];
|
|
26
|
+
current: number;
|
|
27
|
+
};
|
|
28
|
+
ticksAtLimit: {
|
|
29
|
+
[bound in Bound]?: boolean | undefined;
|
|
30
|
+
};
|
|
31
|
+
styles: {
|
|
32
|
+
area: {
|
|
33
|
+
selection: string;
|
|
34
|
+
};
|
|
35
|
+
brush: {
|
|
36
|
+
handle: {
|
|
37
|
+
west: string;
|
|
38
|
+
east: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
dimensions: Dimensions;
|
|
43
|
+
margins: Margins;
|
|
44
|
+
interactive?: boolean;
|
|
45
|
+
brushLabels: (d: 'w' | 'e', x: number) => string;
|
|
46
|
+
brushDomain?: [number, number];
|
|
47
|
+
onBrushDomainChange: (domain: [number, number], mode: string | undefined) => void;
|
|
48
|
+
zoomLevels: ZoomLevels;
|
|
49
|
+
}
|
|
50
|
+
export {};
|
package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/usePrevious.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function usePrevious<T>(value: T): T | undefined;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export default function MyLiquidity({ border, token0, token1, amount0, amount1, sx, }: {
|
|
4
|
+
border?: boolean;
|
|
5
|
+
token0: TokenInfo | undefined;
|
|
6
|
+
token1: TokenInfo | undefined;
|
|
7
|
+
amount0: string | undefined;
|
|
8
|
+
amount1: string | undefined;
|
|
9
|
+
sx?: BoxProps['sx'];
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export declare const PositionPreview: ({ token0, token1, liquidity, amount0, amount1, price, tickLower, tickUpper, title, inRange, }: {
|
|
4
|
+
token0: TokenInfo | undefined;
|
|
5
|
+
token1: TokenInfo | undefined;
|
|
6
|
+
liquidity: number | undefined;
|
|
7
|
+
amount0: string | undefined;
|
|
8
|
+
amount1: string | undefined;
|
|
9
|
+
title?: ReactNode;
|
|
10
|
+
price: string | undefined;
|
|
11
|
+
tickLower: number | undefined;
|
|
12
|
+
tickUpper: number | undefined;
|
|
13
|
+
inRange: boolean;
|
|
14
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export declare const PositionSelectedRangePreview: ({ token0, token1, token0Price, tickLower, tickUpper, title, border, }: {
|
|
4
|
+
token0: TokenInfo;
|
|
5
|
+
token1: TokenInfo;
|
|
6
|
+
token0Price: string | undefined;
|
|
7
|
+
tickLower: number | undefined;
|
|
8
|
+
tickUpper: number | undefined;
|
|
9
|
+
title?: ReactNode;
|
|
10
|
+
border?: boolean;
|
|
11
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Bound } from '../types';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import { Price } from '../../../../utils/fractions';
|
|
4
|
+
export interface RangeSelectorProps {
|
|
5
|
+
priceLower?: Price;
|
|
6
|
+
priceUpper?: Price;
|
|
7
|
+
getDecrementLower: () => string;
|
|
8
|
+
getIncrementLower: () => string;
|
|
9
|
+
getDecrementUpper: () => string;
|
|
10
|
+
getIncrementUpper: () => string;
|
|
11
|
+
onLeftRangeInput: (typedValue: string) => void;
|
|
12
|
+
onRightRangeInput: (typedValue: string) => void;
|
|
13
|
+
tokenA?: TokenInfo | null;
|
|
14
|
+
tokenB?: TokenInfo | null;
|
|
15
|
+
ticksAtLimit: {
|
|
16
|
+
[bound in Bound]?: boolean | undefined;
|
|
17
|
+
};
|
|
18
|
+
isSorted: boolean;
|
|
19
|
+
border?: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare const RangeSelector: ({ priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, getDecrementLower, getIncrementLower, getDecrementUpper, getIncrementUpper, tokenA, tokenB, ticksAtLimit, isSorted, border, }: RangeSelectorProps) => JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
export interface RateToggleProps {
|
|
4
|
+
baseToken: TokenInfo | undefined;
|
|
5
|
+
quoteToken: TokenInfo | undefined;
|
|
6
|
+
handleRateToggle: () => void;
|
|
7
|
+
sx?: BoxProps['sx'];
|
|
8
|
+
}
|
|
9
|
+
export declare const RateToggle: ({ baseToken, quoteToken, handleRateToggle, sx, }: RateToggleProps) => JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export interface ButtonsProps {
|
|
3
|
+
chainId: ChainId;
|
|
4
|
+
disabled: boolean;
|
|
5
|
+
removed: boolean | undefined;
|
|
6
|
+
isLoading: boolean;
|
|
7
|
+
error?: React.ReactNode;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
border?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const RemoveButton: ({ chainId, disabled, removed, isLoading, error, onConfirm, border, }: ButtonsProps) => JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
export interface ReviewModalProps {
|
|
3
|
+
on: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onConfirm: () => void;
|
|
6
|
+
loading?: boolean;
|
|
7
|
+
token0: TokenInfo | undefined;
|
|
8
|
+
token1: TokenInfo | undefined;
|
|
9
|
+
liquidity: number | undefined;
|
|
10
|
+
amount0: string | undefined;
|
|
11
|
+
amount1: string | undefined;
|
|
12
|
+
title?: React.ReactNode;
|
|
13
|
+
price: string | undefined;
|
|
14
|
+
tickLower: number | undefined;
|
|
15
|
+
tickUpper: number | undefined;
|
|
16
|
+
inRange: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const ReviewModal: ({ on, onClose, onConfirm, loading, token0, token1, liquidity, amount0, amount1, price, tickLower, tickUpper, title, inRange, }: ReviewModalProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Actions, StateProps } from '../reducer';
|
|
2
|
+
export interface TokenPairSelectProps {
|
|
3
|
+
baseToken: StateProps['baseToken'];
|
|
4
|
+
quoteToken: StateProps['quoteToken'];
|
|
5
|
+
dispatch: React.Dispatch<Actions>;
|
|
6
|
+
}
|
|
7
|
+
export declare const TokenPairSelect: ({ baseToken, quoteToken, dispatch, }: TokenPairSelectProps) => JSX.Element;
|