@dodoex/widgets 3.2.0-beta.8 → 3.2.0-beta.9

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.
Files changed (205) hide show
  1. package/dist/cjs/locales/en-US.js +1 -1
  2. package/dist/cjs/locales/zh-CN.js +1 -1
  3. package/dist/{helper-Bwk-pafn.js → helper-DhgMbNPo.js} +1 -1
  4. package/dist/{helper-BxZqNcaq.cjs → helper-eVbgjF_C.cjs} +1 -1
  5. package/dist/{index-Bk4cKKCz.js → index-BHyTOtre.js} +1 -1
  6. package/dist/index-Bgu11Fp0.cjs +31 -0
  7. package/dist/{index-BDehUNkw.cjs → index-BzBpLCXO.cjs} +1 -1
  8. package/dist/{index-DRV1A2No.js → index-C24E6u3X.js} +1 -1
  9. package/dist/{index-cEhELacT.cjs → index-CV6mZEKx.cjs} +1 -1
  10. package/dist/index-Dd3PdXNw.js +31 -0
  11. package/dist/index.cjs +1 -1
  12. package/dist/index.js +1 -1
  13. package/dist/locales/en-US.js +1 -1
  14. package/dist/locales/zh-CN.js +1 -1
  15. package/dist/types/components/Message/index.d.ts +2 -1
  16. package/dist/types/components/SelectChain.d.ts +2 -1
  17. package/dist/types/components/SubmittedDialog.d.ts +6 -0
  18. package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +1 -2
  19. package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -2
  20. package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +7 -0
  21. package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageSetting.d.ts +2 -1
  22. package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageWarning.d.ts +3 -1
  23. package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +2 -1
  24. package/dist/types/components/Swap/components/SwitchBox.d.ts +1 -2
  25. package/dist/types/components/Swap/components/TokenCard/NumberInput.d.ts +0 -1
  26. package/dist/types/components/Swap/components/TokenCard/index.d.ts +2 -5
  27. package/dist/types/components/Swap/index.d.ts +3 -5
  28. package/dist/types/components/TokenSelect.d.ts +1 -2
  29. package/dist/types/components/Widget/index.d.ts +3 -3
  30. package/dist/types/components/WithExecutionDialog/index.d.ts +2 -1
  31. package/dist/types/constants/address.d.ts +0 -1
  32. package/dist/types/hooks/ConnectWallet/useSwitchChain.d.ts +3 -0
  33. package/dist/types/hooks/Submission/types.d.ts +0 -4
  34. package/dist/types/hooks/Swap/useSlippageLimit.d.ts +2 -2
  35. package/dist/types/hooks/contract/wallet.d.ts +2 -2
  36. package/dist/types/index.d.ts +1 -3
  37. package/dist/types/providers/useInitContractRequest.d.ts +1 -2
  38. package/dist/types/router/types.d.ts +1 -2
  39. package/dist/types/utils/address.d.ts +0 -35
  40. package/dist/types/widgets/PoolWidget/AMMV2Create/Ratio.d.ts +4 -1
  41. package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +3 -1
  42. package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +2 -1
  43. package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +2 -1
  44. package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +3 -1
  45. package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +3 -1
  46. package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +2 -1
  47. package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +2 -1
  48. package/dist/types/widgets/PoolWidget/PoolCreate/hooks/usePriceInit.d.ts +2 -1
  49. package/dist/types/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +3 -3
  50. package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +3 -1
  51. package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +2 -1
  52. package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/PriceModeSetting.d.ts +2 -1
  53. package/dist/types/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +2 -1
  54. package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +2 -1
  55. package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +2 -1
  56. package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +2 -1
  57. package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +2 -1
  58. package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +4 -5
  59. package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -1
  60. package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +4 -5
  61. package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +5 -9
  62. package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +2 -1
  63. package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -2
  64. package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +4 -2
  65. package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +5 -1
  66. package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +1 -1
  67. package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +4 -1
  68. package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +12 -0
  69. package/dist/types/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +1 -1
  70. package/dist/types/widgets/PoolWidget/hooks/useAMMV2AddLiquidity.d.ts +1 -1
  71. package/dist/types/widgets/PoolWidget/hooks/useAMMV2RemoveLiquidity.d.ts +1 -1
  72. package/dist/types/widgets/PoolWidget/hooks/usePoolListMyLiquidity.d.ts +15 -0
  73. package/package.json +1 -1
  74. package/dist/7feb1ff0e03a571d.svg +0 -9
  75. package/dist/index-B4_cnc94.cjs +0 -67
  76. package/dist/index-DQp2ouTr.js +0 -67
  77. package/dist/types/hooks/usePoolTokenSort.d.ts +0 -24
  78. package/dist/types/utils/fractions/fraction.d.ts +0 -24
  79. package/dist/types/utils/fractions/index.d.ts +0 -3
  80. package/dist/types/utils/fractions/percent.d.ts +0 -14
  81. package/dist/types/utils/fractions/price.d.ts +0 -29
  82. package/dist/types/utils/fractions/types.d.ts +0 -7
  83. package/dist/types/widgets/PoolWidget/AMMV2Create/Setting.d.ts +0 -16
  84. package/dist/types/widgets/PoolWidget/Algebra/AddLiquidity.d.ts +0 -14
  85. package/dist/types/widgets/PoolWidget/Algebra/AlgebraPositionManage.d.ts +0 -11
  86. package/dist/types/widgets/PoolWidget/Algebra/components/Badge/RangeBadge.d.ts +0 -4
  87. package/dist/types/widgets/PoolWidget/Algebra/components/ClaimButton.d.ts +0 -9
  88. package/dist/types/widgets/PoolWidget/Algebra/components/InRangeDot.d.ts +0 -4
  89. package/dist/types/widgets/PoolWidget/Algebra/components/InputStepCounter.d.ts +0 -17
  90. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Area.d.ts +0 -10
  91. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/AxisBottom.d.ts +0 -6
  92. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Brush.d.ts +0 -13
  93. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Chart.d.ts +0 -2
  94. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Line.d.ts +0 -6
  95. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Zoom.d.ts +0 -12
  96. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/index.d.ts +0 -19
  97. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/svg.d.ts +0 -22
  98. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/types.d.ts +0 -50
  99. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/usePrevious.d.ts +0 -1
  100. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/utils.d.ts +0 -14
  101. package/dist/types/widgets/PoolWidget/Algebra/components/MyLiquidity.d.ts +0 -10
  102. package/dist/types/widgets/PoolWidget/Algebra/components/PositionPreview.d.ts +0 -14
  103. package/dist/types/widgets/PoolWidget/Algebra/components/PositionSelectedRangePreview.d.ts +0 -11
  104. package/dist/types/widgets/PoolWidget/Algebra/components/RangeSelector.d.ts +0 -21
  105. package/dist/types/widgets/PoolWidget/Algebra/components/RateToggle.d.ts +0 -9
  106. package/dist/types/widgets/PoolWidget/Algebra/components/RemoveButton.d.ts +0 -11
  107. package/dist/types/widgets/PoolWidget/Algebra/components/ReviewModal.d.ts +0 -18
  108. package/dist/types/widgets/PoolWidget/Algebra/components/TokenAndEtherscan.d.ts +0 -4
  109. package/dist/types/widgets/PoolWidget/Algebra/components/TokenPairSelect.d.ts +0 -7
  110. package/dist/types/widgets/PoolWidget/Algebra/components/shared.d.ts +0 -4
  111. package/dist/types/widgets/PoolWidget/Algebra/components/widgets.d.ts +0 -56
  112. package/dist/types/widgets/PoolWidget/Algebra/constants/misc.d.ts +0 -17
  113. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAddAlgebraLiquidity.d.ts +0 -15
  114. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraAmounts.d.ts +0 -19
  115. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraPair.d.ts +0 -59
  116. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraPositionFees.d.ts +0 -13
  117. package/dist/types/widgets/PoolWidget/Algebra/hooks/useClaimAlgebraFees.d.ts +0 -12
  118. package/dist/types/widgets/PoolWidget/Algebra/hooks/useContract.d.ts +0 -2
  119. package/dist/types/widgets/PoolWidget/Algebra/hooks/useFetchPositionFromTokenId.d.ts +0 -295
  120. package/dist/types/widgets/PoolWidget/Algebra/hooks/useFetchPositions.d.ts +0 -23
  121. package/dist/types/widgets/PoolWidget/Algebra/hooks/usePoolActiveLiquidityChartData.d.ts +0 -37
  122. package/dist/types/widgets/PoolWidget/Algebra/hooks/usePools.d.ts +0 -22
  123. package/dist/types/widgets/PoolWidget/Algebra/hooks/useRemoveAlgebraLiquidity.d.ts +0 -14
  124. package/dist/types/widgets/PoolWidget/Algebra/hooks/useSetRange.d.ts +0 -32
  125. package/dist/types/widgets/PoolWidget/Algebra/hooks/useSwapTaxes.d.ts +0 -5
  126. package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3MintActionHandlers.d.ts +0 -11
  127. package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3PositionFees.d.ts +0 -8
  128. package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3Positions.d.ts +0 -13
  129. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/addresses.d.ts +0 -12
  130. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/chains.d.ts +0 -4
  131. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/constants.d.ts +0 -12
  132. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/baseCurrency.d.ts +0 -49
  133. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/currency.d.ts +0 -3
  134. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/currencyAmount.d.ts +0 -32
  135. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/fraction.d.ts +0 -24
  136. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/index.d.ts +0 -4
  137. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/percent.d.ts +0 -14
  138. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/price.d.ts +0 -38
  139. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/index.d.ts +0 -4
  140. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/nativeCurrency.d.ts +0 -16
  141. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/nativeCurrencyClass.d.ts +0 -8
  142. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/token.d.ts +0 -48
  143. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/index.d.ts +0 -5
  144. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/computePriceImpact.d.ts +0 -8
  145. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/index.d.ts +0 -4
  146. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/sortedInsert.d.ts +0 -1
  147. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/sqrt.d.ts +0 -7
  148. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/validateAndParseAddress.d.ts +0 -10
  149. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/constants.d.ts +0 -23
  150. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/index.d.ts +0 -7
  151. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/pool.d.ts +0 -81
  152. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/position.d.ts +0 -131
  153. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/route.d.ts +0 -26
  154. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tick.d.ts +0 -13
  155. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tickDataProvider.d.ts +0 -31
  156. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tickListDataProvider.d.ts +0 -15
  157. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/trade.d.ts +0 -220
  158. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/index.d.ts +0 -10
  159. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/internalConstants.d.ts +0 -6
  160. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/multicall.d.ts +0 -10
  161. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/nonfungiblePositionManager.d.ts +0 -159
  162. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/payments.d.ts +0 -24
  163. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/quoter.d.ts +0 -37
  164. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/selfPermit.d.ts +0 -25
  165. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/staker.d.ts +0 -101
  166. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/swapRouter.d.ts +0 -51
  167. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/calldata.d.ts +0 -20
  168. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/computePoolAddress.d.ts +0 -21
  169. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/encodeRouteToPath.d.ts +0 -8
  170. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/encodeSqrtRatioX96.d.ts +0 -9
  171. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/fullMath.d.ts +0 -8
  172. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/index.d.ts +0 -18
  173. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/isSorted.d.ts +0 -7
  174. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/liquidityMath.d.ts +0 -8
  175. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/maxLiquidityForAmounts.d.ts +0 -14
  176. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/mostSignificantBit.d.ts +0 -2
  177. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/nearestUsableTick.d.ts +0 -6
  178. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/position.d.ts +0 -8
  179. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/priceTickConversions.d.ts +0 -15
  180. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/sqrtPriceMath.d.ts +0 -13
  181. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/swapMath.d.ts +0 -9
  182. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickLibrary.d.ts +0 -14
  183. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickList.d.ts +0 -23
  184. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickMath.d.ts +0 -34
  185. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/v3swap.d.ts +0 -8
  186. package/dist/types/widgets/PoolWidget/Algebra/types/position.d.ts +0 -18
  187. package/dist/types/widgets/PoolWidget/Algebra/types.d.ts +0 -10
  188. package/dist/types/widgets/PoolWidget/Algebra/utils/calldata.d.ts +0 -7
  189. package/dist/types/widgets/PoolWidget/Algebra/utils/computeSurroundingTicks.d.ts +0 -4
  190. package/dist/types/widgets/PoolWidget/Algebra/utils/constants.d.ts +0 -7
  191. package/dist/types/widgets/PoolWidget/Algebra/utils/encodeSqrtRatioX96.d.ts +0 -9
  192. package/dist/types/widgets/PoolWidget/Algebra/utils/formatTickPrice.d.ts +0 -1
  193. package/dist/types/widgets/PoolWidget/Algebra/utils/fullMath.d.ts +0 -8
  194. package/dist/types/widgets/PoolWidget/Algebra/utils/getPositionAmount.d.ts +0 -37
  195. package/dist/types/widgets/PoolWidget/Algebra/utils/getPositionAmountWithSlippage.d.ts +0 -23
  196. package/dist/types/widgets/PoolWidget/Algebra/utils/getTickToPrice.d.ts +0 -10
  197. package/dist/types/widgets/PoolWidget/Algebra/utils/maxLiquidityForAmounts.d.ts +0 -22
  198. package/dist/types/widgets/PoolWidget/Algebra/utils/mostSignificantBit.d.ts +0 -2
  199. package/dist/types/widgets/PoolWidget/Algebra/utils/nearestUsableTick.d.ts +0 -6
  200. package/dist/types/widgets/PoolWidget/Algebra/utils/slippage.d.ts +0 -3
  201. package/dist/types/widgets/PoolWidget/Algebra/utils/sqrt.d.ts +0 -7
  202. package/dist/types/widgets/PoolWidget/Algebra/utils/sqrtPriceMath.d.ts +0 -13
  203. package/dist/types/widgets/PoolWidget/Algebra/utils/tickMath.d.ts +0 -34
  204. package/dist/types/widgets/PoolWidget/Algebra/utils/tryParseTick.d.ts +0 -4
  205. package/dist/types/widgets/PoolWidget/Algebra/utils.d.ts +0 -9
@@ -1,24 +0,0 @@
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
- };
@@ -1,24 +0,0 @@
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
- }
@@ -1,3 +0,0 @@
1
- export { Fraction } from './fraction';
2
- export { Percent } from './percent';
3
- export { Price } from './price';
@@ -1,14 +0,0 @@
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
- }
@@ -1,29 +0,0 @@
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 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export type BigintIsh = JSBI | string | number;
3
- export declare enum Rounding {
4
- ROUND_DOWN = 0,
5
- ROUND_HALF_UP = 1,
6
- ROUND_UP = 2
7
- }
@@ -1,16 +0,0 @@
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;
@@ -1,14 +0,0 @@
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;
@@ -1,11 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- export default function RangeBadge({ removed, inRange, }: {
2
- removed?: boolean;
3
- inRange?: boolean;
4
- }): JSX.Element;
@@ -1,9 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- export interface InRangeDotProps {
2
- outOfRange: boolean;
3
- }
4
- export declare const InRangeDot: ({ outOfRange }: InRangeDotProps) => JSX.Element;
@@ -1,17 +0,0 @@
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;
@@ -1,10 +0,0 @@
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;
@@ -1,6 +0,0 @@
1
- import { ScaleLinear } from 'd3';
2
- export declare const AxisBottom: ({ xScale, innerHeight, offset, }: {
3
- xScale: ScaleLinear<number, number>;
4
- innerHeight: number;
5
- offset?: number;
6
- }) => JSX.Element;
@@ -1,13 +0,0 @@
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;
@@ -1,2 +0,0 @@
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;
@@ -1,6 +0,0 @@
1
- import { ScaleLinear } from 'd3';
2
- export declare const Line: ({ value, xScale, innerHeight, }: {
3
- value: number;
4
- xScale: ScaleLinear<number, number>;
5
- innerHeight: number;
6
- }) => JSX.Element;
@@ -1,12 +0,0 @@
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;
@@ -1,19 +0,0 @@
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;
@@ -1,22 +0,0 @@
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;
@@ -1,50 +0,0 @@
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 {};
@@ -1 +0,0 @@
1
- export default function usePrevious<T>(value: T): T | undefined;
@@ -1,14 +0,0 @@
1
- export declare const themeColor: {
2
- neutral1: string;
3
- neutral2: string;
4
- accent1: string;
5
- critical: string;
6
- white: string;
7
- surface3: string;
8
- opacity: {
9
- hover: number;
10
- click: number;
11
- disabled: number;
12
- enabled: number;
13
- };
14
- };
@@ -1,10 +0,0 @@
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;
@@ -1,14 +0,0 @@
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;
@@ -1,11 +0,0 @@
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;
@@ -1,21 +0,0 @@
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;
@@ -1,9 +0,0 @@
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;
@@ -1,11 +0,0 @@
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;
@@ -1,18 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- import { TokenInfo } from '../../../../hooks/Token';
2
- export default function TokenAndEtherscan({ token }: {
3
- token: TokenInfo;
4
- }): JSX.Element;
@@ -1,7 +0,0 @@
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;
@@ -1,4 +0,0 @@
1
- import { FeeAmount } from '../sdks/v3-sdk/constants';
2
- export declare const FEE_AMOUNT_DETAIL: Record<FeeAmount, {
3
- label: string;
4
- }>;
@@ -1,56 +0,0 @@
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 {};
@@ -1,17 +0,0 @@
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;
@@ -1,15 +0,0 @@
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>;
@@ -1,19 +0,0 @@
1
- import { TokenInfo } from '../../../../hooks/Token';
2
- import JSBI from 'jsbi';
3
- export declare function useAlgebraAmounts({ baseToken, quoteToken, sqrtRatioX96, tickCurrent, tickLower, tickUpper, }: {
4
- baseToken: TokenInfo | undefined;
5
- quoteToken: TokenInfo | undefined;
6
- sqrtRatioX96: JSBI | undefined;
7
- tickCurrent: number | undefined;
8
- tickLower: number | undefined;
9
- tickUpper: number | undefined;
10
- }): {
11
- readonly: boolean;
12
- baseAmount: string;
13
- quoteAmount: string;
14
- handleChangeBaseAmount: (value: string) => void;
15
- handleChangeQuoteAmount: (value: string) => void;
16
- handleBlurBaseAmount: (value: string) => void;
17
- handleBlurQuoteAmount: (value: string) => void;
18
- reset: () => void;
19
- };