@dodoex/widgets 3.1.2 → 3.1.3-bartio.1
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/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/e4364db573253fd1.svg +9 -0
- package/dist/{helper-DvTqUYSd.js → helper-C48mTWX6.js} +1 -1
- package/dist/{helper-DiqTz5Q1.cjs → helper-DJoFx-73.cjs} +1 -1
- package/dist/{index-Cm7qS4de.js → index-92Z5vyfr.js} +1 -1
- package/dist/{index-v8k2GdIb.cjs → index-B3jnm1t4.cjs} +1 -1
- package/dist/index-BFUc9LPV.cjs +67 -0
- package/dist/{index-51X_JVKT.cjs → index-BoitgUC-.cjs} +1 -1
- package/dist/{index-KEmmG3yM.js → index-Bst2VBXi.js} +1 -1
- package/dist/index-Ig-Pm33B.js +67 -0
- 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/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/Submission/types.d.ts +4 -0
- 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 +15 -0
- package/dist/types/widgets/PoolWidget/Algebra/components/PositionSelectedRangePreview.d.ts +12 -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 +19 -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 -2
- 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 -2
- package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +1 -2
- 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/index.d.ts +1 -3
- 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/package.json +4 -5
- package/dist/index-DTfSlaFn.cjs +0 -31
- package/dist/index-UBWmoEPT.js +0 -31
- package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +0 -7
|
@@ -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,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import { Price } from '../../../../utils/fractions';
|
|
4
|
+
export declare const PositionPreview: ({ token0, token1, liquidity, amount0, amount1, price, tickLower, tickUpper, title, inRange, }: {
|
|
5
|
+
token0: TokenInfo | undefined;
|
|
6
|
+
token1: TokenInfo | undefined;
|
|
7
|
+
liquidity: number | undefined;
|
|
8
|
+
amount0: string | undefined;
|
|
9
|
+
amount1: string | undefined;
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
price: Price | undefined;
|
|
12
|
+
tickLower: number | undefined;
|
|
13
|
+
tickUpper: number | undefined;
|
|
14
|
+
inRange: boolean;
|
|
15
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
3
|
+
import { Price } from '../../../../utils/fractions';
|
|
4
|
+
export declare const PositionSelectedRangePreview: ({ token0, token1, token0Price, tickLower, tickUpper, title, border, }: {
|
|
5
|
+
token0: TokenInfo;
|
|
6
|
+
token1: TokenInfo;
|
|
7
|
+
token0Price: Price | undefined;
|
|
8
|
+
tickLower: number | undefined;
|
|
9
|
+
tickUpper: number | undefined;
|
|
10
|
+
title?: ReactNode;
|
|
11
|
+
border?: boolean;
|
|
12
|
+
}) => 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,19 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
import { Price } from '../../../../utils/fractions';
|
|
3
|
+
export interface ReviewModalProps {
|
|
4
|
+
on: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onConfirm: () => void;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
token0: TokenInfo | undefined;
|
|
9
|
+
token1: TokenInfo | undefined;
|
|
10
|
+
liquidity: number | undefined;
|
|
11
|
+
amount0: string | undefined;
|
|
12
|
+
amount1: string | undefined;
|
|
13
|
+
title?: React.ReactNode;
|
|
14
|
+
price: Price | undefined;
|
|
15
|
+
tickLower: number | undefined;
|
|
16
|
+
tickUpper: number | undefined;
|
|
17
|
+
inRange: boolean;
|
|
18
|
+
}
|
|
19
|
+
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;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
declare const gapValues: {
|
|
3
|
+
xs: string;
|
|
4
|
+
sm: string;
|
|
5
|
+
md: string;
|
|
6
|
+
lg: string;
|
|
7
|
+
xl: string;
|
|
8
|
+
};
|
|
9
|
+
export type Gap = keyof typeof gapValues;
|
|
10
|
+
export interface YellowCardProps {
|
|
11
|
+
children?: React.ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const Card: ({ children, sx, }: {
|
|
14
|
+
sx?: BoxProps["sx"];
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}) => JSX.Element;
|
|
17
|
+
export declare const LightCard: ({ children, border, sx, }: {
|
|
18
|
+
sx?: BoxProps["sx"];
|
|
19
|
+
border?: boolean;
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
}) => JSX.Element;
|
|
22
|
+
export declare const YellowCard: ({ children }: YellowCardProps) => JSX.Element;
|
|
23
|
+
export declare function ColumnCenter({ gap, flex, children, style, }: {
|
|
24
|
+
gap?: Gap | string;
|
|
25
|
+
flex?: string;
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
style?: BoxProps['sx'];
|
|
28
|
+
}): JSX.Element;
|
|
29
|
+
export declare function AutoColumn({ gap, justify, grow, children, style, }: {
|
|
30
|
+
gap?: Gap | string;
|
|
31
|
+
justify?: 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'space-between';
|
|
32
|
+
grow?: true;
|
|
33
|
+
children: React.ReactNode;
|
|
34
|
+
style?: BoxProps['sx'];
|
|
35
|
+
}): JSX.Element;
|
|
36
|
+
export declare function Row({ gap, children, sx, }: {
|
|
37
|
+
gap?: Gap | string;
|
|
38
|
+
children: React.ReactNode;
|
|
39
|
+
sx?: BoxProps['sx'];
|
|
40
|
+
}): JSX.Element;
|
|
41
|
+
export declare function RowBetween({ children, style, }: {
|
|
42
|
+
children: React.ReactNode;
|
|
43
|
+
style?: BoxProps['sx'];
|
|
44
|
+
}): JSX.Element;
|
|
45
|
+
export declare function RowFixed({ gap, justify, children, sx, }: {
|
|
46
|
+
gap?: string;
|
|
47
|
+
justify?: string;
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
sx?: BoxProps['sx'];
|
|
50
|
+
}): JSX.Element;
|
|
51
|
+
export declare function DynamicSection({ children, disabled, sx, }: {
|
|
52
|
+
children: React.ReactNode;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
sx?: BoxProps['sx'];
|
|
55
|
+
}): JSX.Element;
|
|
56
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import JSBI from 'jsbi';
|
|
2
|
+
import { Percent } from '../../../../utils/fractions';
|
|
3
|
+
export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
|
|
4
|
+
export declare const DEFAULT_DEADLINE_FROM_NOW: number;
|
|
5
|
+
export declare const L2_DEADLINE_FROM_NOW: number;
|
|
6
|
+
export declare const DEFAULT_TXN_DISMISS_MS = 10000;
|
|
7
|
+
export declare const L2_TXN_DISMISS_MS = 5000;
|
|
8
|
+
export declare const BIG_INT_ZERO: JSBI;
|
|
9
|
+
export declare const BIPS_BASE = 10000;
|
|
10
|
+
export declare const ONE_BIPS: Percent;
|
|
11
|
+
export declare const ALLOWED_PRICE_IMPACT_LOW: Percent;
|
|
12
|
+
export declare const ALLOWED_PRICE_IMPACT_MEDIUM: Percent;
|
|
13
|
+
export declare const ALLOWED_PRICE_IMPACT_HIGH: Percent;
|
|
14
|
+
export declare const PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN: Percent;
|
|
15
|
+
export declare const BLOCKED_PRICE_IMPACT_NON_EXPERT: Percent;
|
|
16
|
+
export declare const ZERO_PERCENT: Percent;
|
|
17
|
+
export declare const ONE_HUNDRED_PERCENT: Percent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useAlgebraPair } from './useAlgebraPair';
|
|
2
|
+
export declare function useAddAlgebraLiquidity(): import("@tanstack/react-query").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult | undefined, Error, {
|
|
3
|
+
createPool?: boolean;
|
|
4
|
+
recipient?: string;
|
|
5
|
+
deployer?: string;
|
|
6
|
+
pool?: ReturnType<typeof useAlgebraPair>;
|
|
7
|
+
tokenId?: number | string;
|
|
8
|
+
amount0: string;
|
|
9
|
+
amount1: string;
|
|
10
|
+
tickLower: number;
|
|
11
|
+
tickUpper: number;
|
|
12
|
+
amount0Min: string;
|
|
13
|
+
amount1Min: string;
|
|
14
|
+
successBack?: () => void;
|
|
15
|
+
}, unknown>;
|