@dodoex/widgets 3.1.3-bartio.1 → 3.1.3-pharos.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.
Files changed (191) 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-C48mTWX6.js → helper-BA2ADMC8.js} +1 -1
  4. package/dist/{helper-DJoFx-73.cjs → helper-Cv3dVMql.cjs} +1 -1
  5. package/dist/index-Bg3YIGnw.js +31 -0
  6. package/dist/index-C_R38uJr.cjs +31 -0
  7. package/dist/{index-BoitgUC-.cjs → index-D-CwWdfB.cjs} +1 -1
  8. package/dist/{index-92Z5vyfr.js → index-Dl7VDQnn.js} +1 -1
  9. package/dist/{index-Bst2VBXi.js → index-GuE-e5BJ.js} +1 -1
  10. package/dist/{index-B3jnm1t4.cjs → index-qHe2fLix.cjs} +1 -1
  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/SelectChain.d.ts +2 -1
  16. package/dist/types/components/Swap/components/ConnectWallet/index.d.ts +1 -2
  17. package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -2
  18. package/dist/types/components/Swap/components/SwapPreviewInfoCard.d.ts +7 -0
  19. package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageSetting.d.ts +2 -1
  20. package/dist/types/components/Swap/components/SwapSettingsDialog/SlippageWarning.d.ts +3 -1
  21. package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +2 -1
  22. package/dist/types/components/Swap/components/SwitchBox.d.ts +1 -2
  23. package/dist/types/components/Swap/components/TokenCard/NumberInput.d.ts +0 -1
  24. package/dist/types/components/Swap/components/TokenCard/index.d.ts +2 -5
  25. package/dist/types/components/Swap/index.d.ts +3 -5
  26. package/dist/types/components/TokenSelect.d.ts +1 -2
  27. package/dist/types/components/Widget/index.d.ts +1 -3
  28. package/dist/types/constants/address.d.ts +0 -1
  29. package/dist/types/hooks/Submission/types.d.ts +0 -4
  30. package/dist/types/index.d.ts +1 -3
  31. package/dist/types/providers/useInitContractRequest.d.ts +1 -2
  32. package/dist/types/router/types.d.ts +1 -2
  33. package/dist/types/utils/address.d.ts +0 -35
  34. package/dist/types/widgets/PoolWidget/AMMV2Create/Ratio.d.ts +4 -1
  35. package/dist/types/widgets/PoolWidget/PoolCreate/components/BaseInfoCardList.d.ts +2 -1
  36. package/dist/types/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +2 -1
  37. package/dist/types/widgets/PoolWidget/PoolCreate/components/LqRatioSet.d.ts +2 -1
  38. package/dist/types/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +2 -1
  39. package/dist/types/widgets/PoolWidget/PoolCreate/components/PriceModeCard.d.ts +2 -1
  40. package/dist/types/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +2 -1
  41. package/dist/types/widgets/PoolWidget/PoolCreate/components/widgets.d.ts +2 -1
  42. package/dist/types/widgets/PoolWidget/PoolCreate/hooks/usePriceInit.d.ts +2 -1
  43. package/dist/types/widgets/PoolWidget/PoolCreate/index.d.ts +3 -1
  44. package/dist/types/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +2 -1
  45. package/dist/types/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +2 -1
  46. package/dist/types/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +2 -1
  47. package/dist/types/widgets/PoolWidget/PoolDetail/index.d.ts +2 -1
  48. package/dist/types/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +4 -5
  49. package/dist/types/widgets/PoolWidget/PoolList/MyCreated.d.ts +2 -1
  50. package/dist/types/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +4 -5
  51. package/dist/types/widgets/PoolWidget/PoolList/index.d.ts +5 -9
  52. package/dist/types/widgets/PoolWidget/PoolModify/index.d.ts +2 -1
  53. package/dist/types/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -2
  54. package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +4 -2
  55. package/dist/types/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +5 -1
  56. package/dist/types/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +1 -1
  57. package/dist/types/widgets/PoolWidget/PoolOperate/index.d.ts +4 -1
  58. package/dist/types/widgets/PoolWidget/PoolOperate/types.d.ts +12 -0
  59. package/package.json +6 -5
  60. package/dist/e4364db573253fd1.svg +0 -9
  61. package/dist/index-BFUc9LPV.cjs +0 -67
  62. package/dist/index-Ig-Pm33B.js +0 -67
  63. package/dist/types/hooks/usePoolTokenSort.d.ts +0 -24
  64. package/dist/types/utils/fractions/fraction.d.ts +0 -24
  65. package/dist/types/utils/fractions/index.d.ts +0 -3
  66. package/dist/types/utils/fractions/percent.d.ts +0 -14
  67. package/dist/types/utils/fractions/price.d.ts +0 -29
  68. package/dist/types/utils/fractions/types.d.ts +0 -7
  69. package/dist/types/widgets/PoolWidget/AMMV2Create/Setting.d.ts +0 -16
  70. package/dist/types/widgets/PoolWidget/Algebra/AddLiquidity.d.ts +0 -14
  71. package/dist/types/widgets/PoolWidget/Algebra/AlgebraPositionManage.d.ts +0 -11
  72. package/dist/types/widgets/PoolWidget/Algebra/components/Badge/RangeBadge.d.ts +0 -4
  73. package/dist/types/widgets/PoolWidget/Algebra/components/ClaimButton.d.ts +0 -9
  74. package/dist/types/widgets/PoolWidget/Algebra/components/InRangeDot.d.ts +0 -4
  75. package/dist/types/widgets/PoolWidget/Algebra/components/InputStepCounter.d.ts +0 -17
  76. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Area.d.ts +0 -10
  77. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/AxisBottom.d.ts +0 -6
  78. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Brush.d.ts +0 -13
  79. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Chart.d.ts +0 -2
  80. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Line.d.ts +0 -6
  81. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/Zoom.d.ts +0 -12
  82. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/index.d.ts +0 -19
  83. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/svg.d.ts +0 -22
  84. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/types.d.ts +0 -50
  85. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/usePrevious.d.ts +0 -1
  86. package/dist/types/widgets/PoolWidget/Algebra/components/LiquidityChartRangeInput/utils.d.ts +0 -14
  87. package/dist/types/widgets/PoolWidget/Algebra/components/MyLiquidity.d.ts +0 -10
  88. package/dist/types/widgets/PoolWidget/Algebra/components/PositionPreview.d.ts +0 -15
  89. package/dist/types/widgets/PoolWidget/Algebra/components/PositionSelectedRangePreview.d.ts +0 -12
  90. package/dist/types/widgets/PoolWidget/Algebra/components/RangeSelector.d.ts +0 -21
  91. package/dist/types/widgets/PoolWidget/Algebra/components/RateToggle.d.ts +0 -9
  92. package/dist/types/widgets/PoolWidget/Algebra/components/RemoveButton.d.ts +0 -11
  93. package/dist/types/widgets/PoolWidget/Algebra/components/ReviewModal.d.ts +0 -19
  94. package/dist/types/widgets/PoolWidget/Algebra/components/TokenAndEtherscan.d.ts +0 -4
  95. package/dist/types/widgets/PoolWidget/Algebra/components/TokenPairSelect.d.ts +0 -7
  96. package/dist/types/widgets/PoolWidget/Algebra/components/shared.d.ts +0 -4
  97. package/dist/types/widgets/PoolWidget/Algebra/components/widgets.d.ts +0 -56
  98. package/dist/types/widgets/PoolWidget/Algebra/constants/misc.d.ts +0 -17
  99. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAddAlgebraLiquidity.d.ts +0 -15
  100. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraAmounts.d.ts +0 -19
  101. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraPair.d.ts +0 -59
  102. package/dist/types/widgets/PoolWidget/Algebra/hooks/useAlgebraPositionFees.d.ts +0 -13
  103. package/dist/types/widgets/PoolWidget/Algebra/hooks/useClaimAlgebraFees.d.ts +0 -12
  104. package/dist/types/widgets/PoolWidget/Algebra/hooks/useContract.d.ts +0 -2
  105. package/dist/types/widgets/PoolWidget/Algebra/hooks/useFetchPositionFromTokenId.d.ts +0 -295
  106. package/dist/types/widgets/PoolWidget/Algebra/hooks/useFetchPositions.d.ts +0 -23
  107. package/dist/types/widgets/PoolWidget/Algebra/hooks/usePoolActiveLiquidityChartData.d.ts +0 -37
  108. package/dist/types/widgets/PoolWidget/Algebra/hooks/usePools.d.ts +0 -22
  109. package/dist/types/widgets/PoolWidget/Algebra/hooks/useRemoveAlgebraLiquidity.d.ts +0 -14
  110. package/dist/types/widgets/PoolWidget/Algebra/hooks/useSetRange.d.ts +0 -32
  111. package/dist/types/widgets/PoolWidget/Algebra/hooks/useSwapTaxes.d.ts +0 -5
  112. package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3MintActionHandlers.d.ts +0 -11
  113. package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3PositionFees.d.ts +0 -8
  114. package/dist/types/widgets/PoolWidget/Algebra/hooks/useV3Positions.d.ts +0 -13
  115. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/addresses.d.ts +0 -12
  116. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/chains.d.ts +0 -4
  117. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/constants.d.ts +0 -12
  118. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/baseCurrency.d.ts +0 -49
  119. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/currency.d.ts +0 -3
  120. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/currencyAmount.d.ts +0 -32
  121. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/fraction.d.ts +0 -24
  122. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/index.d.ts +0 -4
  123. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/percent.d.ts +0 -14
  124. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/fractions/price.d.ts +0 -38
  125. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/index.d.ts +0 -4
  126. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/nativeCurrency.d.ts +0 -16
  127. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/nativeCurrencyClass.d.ts +0 -8
  128. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/entities/token.d.ts +0 -48
  129. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/index.d.ts +0 -5
  130. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/computePriceImpact.d.ts +0 -8
  131. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/index.d.ts +0 -4
  132. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/sortedInsert.d.ts +0 -1
  133. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/sqrt.d.ts +0 -7
  134. package/dist/types/widgets/PoolWidget/Algebra/sdks/sdk-core/utils/validateAndParseAddress.d.ts +0 -10
  135. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/constants.d.ts +0 -23
  136. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/index.d.ts +0 -7
  137. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/pool.d.ts +0 -81
  138. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/position.d.ts +0 -131
  139. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/route.d.ts +0 -26
  140. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tick.d.ts +0 -13
  141. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tickDataProvider.d.ts +0 -31
  142. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/tickListDataProvider.d.ts +0 -15
  143. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/entities/trade.d.ts +0 -220
  144. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/index.d.ts +0 -10
  145. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/internalConstants.d.ts +0 -6
  146. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/multicall.d.ts +0 -10
  147. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/nonfungiblePositionManager.d.ts +0 -159
  148. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/payments.d.ts +0 -24
  149. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/quoter.d.ts +0 -37
  150. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/selfPermit.d.ts +0 -25
  151. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/staker.d.ts +0 -101
  152. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/swapRouter.d.ts +0 -51
  153. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/calldata.d.ts +0 -20
  154. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/computePoolAddress.d.ts +0 -21
  155. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/encodeRouteToPath.d.ts +0 -8
  156. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/encodeSqrtRatioX96.d.ts +0 -9
  157. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/fullMath.d.ts +0 -8
  158. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/index.d.ts +0 -18
  159. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/isSorted.d.ts +0 -7
  160. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/liquidityMath.d.ts +0 -8
  161. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/maxLiquidityForAmounts.d.ts +0 -14
  162. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/mostSignificantBit.d.ts +0 -2
  163. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/nearestUsableTick.d.ts +0 -6
  164. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/position.d.ts +0 -8
  165. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/priceTickConversions.d.ts +0 -15
  166. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/sqrtPriceMath.d.ts +0 -13
  167. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/swapMath.d.ts +0 -9
  168. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickLibrary.d.ts +0 -14
  169. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickList.d.ts +0 -23
  170. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/tickMath.d.ts +0 -34
  171. package/dist/types/widgets/PoolWidget/Algebra/sdks/v3-sdk/utils/v3swap.d.ts +0 -8
  172. package/dist/types/widgets/PoolWidget/Algebra/types/position.d.ts +0 -18
  173. package/dist/types/widgets/PoolWidget/Algebra/types.d.ts +0 -10
  174. package/dist/types/widgets/PoolWidget/Algebra/utils/calldata.d.ts +0 -7
  175. package/dist/types/widgets/PoolWidget/Algebra/utils/computeSurroundingTicks.d.ts +0 -4
  176. package/dist/types/widgets/PoolWidget/Algebra/utils/constants.d.ts +0 -7
  177. package/dist/types/widgets/PoolWidget/Algebra/utils/encodeSqrtRatioX96.d.ts +0 -9
  178. package/dist/types/widgets/PoolWidget/Algebra/utils/formatTickPrice.d.ts +0 -1
  179. package/dist/types/widgets/PoolWidget/Algebra/utils/fullMath.d.ts +0 -8
  180. package/dist/types/widgets/PoolWidget/Algebra/utils/getPositionAmount.d.ts +0 -37
  181. package/dist/types/widgets/PoolWidget/Algebra/utils/getPositionAmountWithSlippage.d.ts +0 -23
  182. package/dist/types/widgets/PoolWidget/Algebra/utils/getTickToPrice.d.ts +0 -10
  183. package/dist/types/widgets/PoolWidget/Algebra/utils/maxLiquidityForAmounts.d.ts +0 -22
  184. package/dist/types/widgets/PoolWidget/Algebra/utils/mostSignificantBit.d.ts +0 -2
  185. package/dist/types/widgets/PoolWidget/Algebra/utils/nearestUsableTick.d.ts +0 -6
  186. package/dist/types/widgets/PoolWidget/Algebra/utils/slippage.d.ts +0 -3
  187. package/dist/types/widgets/PoolWidget/Algebra/utils/sqrt.d.ts +0 -7
  188. package/dist/types/widgets/PoolWidget/Algebra/utils/sqrtPriceMath.d.ts +0 -13
  189. package/dist/types/widgets/PoolWidget/Algebra/utils/tickMath.d.ts +0 -34
  190. package/dist/types/widgets/PoolWidget/Algebra/utils/tryParseTick.d.ts +0 -4
  191. package/dist/types/widgets/PoolWidget/Algebra/utils.d.ts +0 -9
@@ -1,21 +0,0 @@
1
- import { ChainId } from '../../sdk-core';
2
- import { Token } from '../../sdk-core/entities/token';
3
- import { FeeAmount } from '../constants';
4
- /**
5
- * Computes a pool address
6
- * @param factoryAddress The Uniswap V3 factory address
7
- * @param tokenA The first token of the pair, irrespective of sort order
8
- * @param tokenB The second token of the pair, irrespective of sort order
9
- * @param fee The fee tier of the pool
10
- * @param initCodeHashManualOverride Override the init code hash used to compute the pool address if necessary
11
- * @param chainId
12
- * @returns The pool address
13
- */
14
- export declare function computePoolAddress({ factoryAddress, tokenA, tokenB, fee, initCodeHashManualOverride, chainId, }: {
15
- factoryAddress: string;
16
- tokenA: Token;
17
- tokenB: Token;
18
- fee: FeeAmount;
19
- initCodeHashManualOverride?: string;
20
- chainId?: ChainId;
21
- }): string;
@@ -1,8 +0,0 @@
1
- import { Currency } from '../../sdk-core';
2
- import { Route } from '../entities/route';
3
- /**
4
- * Converts a route to a hex encoded path
5
- * @param route the v3 path to convert to an encoded path
6
- * @param exactOutput whether the route should be encoded in reverse, for making exact output swaps
7
- */
8
- export declare function encodeRouteToPath(route: Route<Currency, Currency>, exactOutput: boolean): string;
@@ -1,9 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { BigintIsh } from '../../sdk-core';
3
- /**
4
- * Returns the sqrt ratio as a Q64.96 corresponding to a given ratio of amount1 and amount0
5
- * @param amount1 The numerator amount i.e., the amount of token1
6
- * @param amount0 The denominator amount i.e., the amount of token0
7
- * @returns The sqrt ratio
8
- */
9
- export declare function encodeSqrtRatioX96(amount1: BigintIsh, amount0: BigintIsh): JSBI;
@@ -1,8 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class FullMath {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- static mulDivRoundingUp(a: JSBI, b: JSBI, denominator: JSBI): JSBI;
8
- }
@@ -1,18 +0,0 @@
1
- export * from './calldata';
2
- export * from './computePoolAddress';
3
- export * from './encodeRouteToPath';
4
- export * from './encodeSqrtRatioX96';
5
- export * from './fullMath';
6
- export * from './isSorted';
7
- export * from './liquidityMath';
8
- export * from './maxLiquidityForAmounts';
9
- export * from './mostSignificantBit';
10
- export * from './nearestUsableTick';
11
- export * from './position';
12
- export * from './priceTickConversions';
13
- export * from './sqrtPriceMath';
14
- export * from './v3swap';
15
- export * from './swapMath';
16
- export * from './tickLibrary';
17
- export * from './tickList';
18
- export * from './tickMath';
@@ -1,7 +0,0 @@
1
- /**
2
- * Determines if a tick list is sorted
3
- * @param list The tick list
4
- * @param comparator The comparator
5
- * @returns true if sorted
6
- */
7
- export declare function isSorted<T>(list: Array<T>, comparator: (a: T, b: T) => number): boolean;
@@ -1,8 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class LiquidityMath {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- static addDelta(x: JSBI, y: JSBI): JSBI;
8
- }
@@ -1,14 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { BigintIsh } from '../../sdk-core';
3
- /**
4
- * Computes the maximum amount of liquidity received for a given amount of token0, token1,
5
- * and the prices at the tick boundaries.
6
- * @param sqrtRatioCurrentX96 the current price
7
- * @param sqrtRatioAX96 price at lower boundary
8
- * @param sqrtRatioBX96 price at upper boundary
9
- * @param amount0 token0 amount
10
- * @param amount1 token1 amount
11
- * @param useFullPrecision if false, liquidity will be maximized according to what the router can calculate,
12
- * not what core can theoretically support
13
- */
14
- export declare function maxLiquidityForAmounts(sqrtRatioCurrentX96: JSBI, sqrtRatioAX96: JSBI, sqrtRatioBX96: JSBI, amount0: BigintIsh, amount1: BigintIsh, useFullPrecision: boolean): JSBI;
@@ -1,2 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare function mostSignificantBit(x: JSBI): number;
@@ -1,6 +0,0 @@
1
- /**
2
- * Returns the closest tick that is nearest a given tick and usable for the given tick spacing
3
- * @param tick the target tick
4
- * @param tickSpacing the spacing of the pool
5
- */
6
- export declare function nearestUsableTick(tick: number, tickSpacing: number): number;
@@ -1,8 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class PositionLibrary {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- static getTokensOwed(feeGrowthInside0LastX128: JSBI, feeGrowthInside1LastX128: JSBI, liquidity: JSBI, feeGrowthInside0X128: JSBI, feeGrowthInside1X128: JSBI): JSBI[];
8
- }
@@ -1,15 +0,0 @@
1
- import { Price, Token } from '../../sdk-core';
2
- /**
3
- * Returns a price object corresponding to the input tick and the base/quote token
4
- * Inputs must be tokens because the address order is used to interpret the price represented by the tick
5
- * @param baseToken the base token of the price
6
- * @param quoteToken the quote token of the price
7
- * @param tick the tick for which to return the price
8
- */
9
- export declare function tickToPrice(baseToken: Token, quoteToken: Token, tick: number): Price<Token, Token>;
10
- /**
11
- * Returns the first tick for which the given price is greater than or equal to the tick price
12
- * @param price for which to return the closest tick that represents a price less than or equal to the input price,
13
- * i.e. the price of the returned tick is less than or equal to the input price
14
- */
15
- export declare function priceToClosestTick(price: Price<Token, Token>): number;
@@ -1,13 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class SqrtPriceMath {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- static getAmount0Delta(sqrtRatioAX96: JSBI, sqrtRatioBX96: JSBI, liquidity: JSBI, roundUp: boolean): JSBI;
8
- static getAmount1Delta(sqrtRatioAX96: JSBI, sqrtRatioBX96: JSBI, liquidity: JSBI, roundUp: boolean): JSBI;
9
- static getNextSqrtPriceFromInput(sqrtPX96: JSBI, liquidity: JSBI, amountIn: JSBI, zeroForOne: boolean): JSBI;
10
- static getNextSqrtPriceFromOutput(sqrtPX96: JSBI, liquidity: JSBI, amountOut: JSBI, zeroForOne: boolean): JSBI;
11
- private static getNextSqrtPriceFromAmount0RoundingUp;
12
- private static getNextSqrtPriceFromAmount1RoundingDown;
13
- }
@@ -1,9 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { FeeAmount } from '../constants';
3
- export declare abstract class SwapMath {
4
- /**
5
- * Cannot be constructed.
6
- */
7
- private constructor();
8
- static computeSwapStep(sqrtRatioCurrentX96: JSBI, sqrtRatioTargetX96: JSBI, liquidity: JSBI, amountRemaining: JSBI, feePips: JSBI | FeeAmount): [JSBI, JSBI, JSBI, JSBI];
9
- }
@@ -1,14 +0,0 @@
1
- import JSBI from 'jsbi';
2
- interface FeeGrowthOutside {
3
- feeGrowthOutside0X128: JSBI;
4
- feeGrowthOutside1X128: JSBI;
5
- }
6
- export declare function subIn256(x: JSBI, y: JSBI): JSBI;
7
- export declare abstract class TickLibrary {
8
- /**
9
- * Cannot be constructed.
10
- */
11
- private constructor();
12
- static getFeeGrowthInside(feeGrowthOutsideLower: FeeGrowthOutside, feeGrowthOutsideUpper: FeeGrowthOutside, tickLower: number, tickUpper: number, tickCurrent: number, feeGrowthGlobal0X128: JSBI, feeGrowthGlobal1X128: JSBI): JSBI[];
13
- }
14
- export {};
@@ -1,23 +0,0 @@
1
- import { Tick } from '../entities/tick';
2
- /**
3
- * Utility methods for interacting with sorted lists of ticks
4
- */
5
- export declare abstract class TickList {
6
- /**
7
- * Cannot be constructed
8
- */
9
- private constructor();
10
- static validateList(ticks: Tick[], tickSpacing: number): void;
11
- static isBelowSmallest(ticks: readonly Tick[], tick: number): boolean;
12
- static isAtOrAboveLargest(ticks: readonly Tick[], tick: number): boolean;
13
- static getTick(ticks: readonly Tick[], index: number): Tick;
14
- /**
15
- * Finds the largest tick in the list of ticks that is less than or equal to tick
16
- * @param ticks list of ticks
17
- * @param tick tick to find the largest tick that is less than or equal to tick
18
- * @private
19
- */
20
- private static binarySearch;
21
- static nextInitializedTick(ticks: readonly Tick[], tick: number, lte: boolean): Tick;
22
- static nextInitializedTickWithinOneWord(ticks: readonly Tick[], tick: number, lte: boolean, tickSpacing: number): [number, boolean];
23
- }
@@ -1,34 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class TickMath {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- /**
8
- * The minimum tick that can be used on any pool.
9
- */
10
- static MIN_TICK: number;
11
- /**
12
- * The maximum tick that can be used on any pool.
13
- */
14
- static MAX_TICK: number;
15
- /**
16
- * The sqrt ratio corresponding to the minimum tick that could be used on any pool.
17
- */
18
- static MIN_SQRT_RATIO: JSBI;
19
- /**
20
- * The sqrt ratio corresponding to the maximum tick that could be used on any pool.
21
- */
22
- static MAX_SQRT_RATIO: JSBI;
23
- /**
24
- * Returns the sqrt ratio as a Q64.96 for the given tick. The sqrt ratio is computed as sqrt(1.0001)^tick
25
- * @param tick the tick for which to compute the sqrt ratio
26
- */
27
- static getSqrtRatioAtTick(tick: number): JSBI;
28
- /**
29
- * Returns the tick corresponding to a given sqrt ratio, s.t. #getSqrtRatioAtTick(tick) <= sqrtRatioX96
30
- * and #getSqrtRatioAtTick(tick + 1) > sqrtRatioX96
31
- * @param sqrtRatioX96 the sqrt ratio as a Q64.96 for which to compute the tick
32
- */
33
- static getTickAtSqrtRatio(sqrtRatioX96: JSBI): number;
34
- }
@@ -1,8 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { TickDataProvider } from '../entities/tickDataProvider';
3
- export declare function v3Swap(fee: JSBI, sqrtRatioX96: JSBI, tickCurrent: number, liquidity: JSBI, tickSpacing: number, tickDataProvider: TickDataProvider, zeroForOne: boolean, amountSpecified: JSBI, sqrtPriceLimitX96?: JSBI): Promise<{
4
- amountCalculated: JSBI;
5
- sqrtRatioX96: JSBI;
6
- liquidity: JSBI;
7
- tickCurrent: number;
8
- }>;
@@ -1,18 +0,0 @@
1
- export interface PositionDetails {
2
- nonce: string;
3
- tokenId: string;
4
- operator: string;
5
- token0: string;
6
- token1: string;
7
- tickLower: number;
8
- tickUpper: number;
9
- liquidity: string;
10
- feeGrowthInside0LastX128: string;
11
- feeGrowthInside1LastX128: string;
12
- tokensOwed0: string;
13
- tokensOwed1: string;
14
- }
15
- export declare enum PositionField {
16
- TOKEN0 = "TOKEN0",
17
- TOKEN1 = "TOKEN1"
18
- }
@@ -1,10 +0,0 @@
1
- export declare enum Field {
2
- CURRENCY_A = "CURRENCY_A",
3
- CURRENCY_B = "CURRENCY_B"
4
- }
5
- export declare enum Bound {
6
- LOWER = "LOWER",
7
- UPPER = "UPPER"
8
- }
9
- export type FullRange = true;
10
- export type OperateType = null | 'stake' | 'unstake' | 'claim';
@@ -1,7 +0,0 @@
1
- import { BigintIsh } from './constants';
2
- /**
3
- * Converts a big int to a hex string
4
- * @param bigintIsh
5
- * @returns The hex encoded calldata
6
- */
7
- export declare function toHex(bigintIsh: BigintIsh): string;
@@ -1,4 +0,0 @@
1
- import { Ticks } from '@dodoex/api';
2
- import { TickProcessed } from '../hooks/usePoolTickData';
3
- import { TokenInfo } from '../../../../hooks/Token';
4
- export default function computeSurroundingTicks(token0: TokenInfo, token1: TokenInfo, activeTickProcessed: TickProcessed, sortedTickData: Ticks, pivot: number, ascending: boolean): TickProcessed[];
@@ -1,7 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare const MaxUint256: JSBI;
3
- export declare const ZERO: JSBI;
4
- export declare const ONE: JSBI;
5
- export declare const Q96: JSBI;
6
- export declare const Q192: JSBI;
7
- export type BigintIsh = JSBI | string | number;
@@ -1,9 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { BigintIsh } from './constants';
3
- /**
4
- * Returns the sqrt ratio as a Q64.96 corresponding to a given ratio of amount1 and amount0
5
- * @param amount1 The numerator amount i.e., the amount of token1
6
- * @param amount0 The denominator amount i.e., the amount of token0
7
- * @returns The sqrt ratio
8
- */
9
- export declare function encodeSqrtRatioX96(amount1: BigintIsh, amount0: BigintIsh): JSBI;
@@ -1 +0,0 @@
1
- export declare function formatAmountWithAlphabetSymbol(amount: string | undefined, decimals?: number): string;
@@ -1,8 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class FullMath {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- static mulDivRoundingUp(a: JSBI, b: JSBI, denominator: JSBI): JSBI;
8
- }
@@ -1,37 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { BigintIsh } from './constants';
3
- export declare function getPositionAmount0({ tickCurrent, tickLower, tickUpper, liquidity, roundUp, }: {
4
- tickCurrent: number;
5
- tickLower: number;
6
- tickUpper: number;
7
- liquidity: number | bigint | JSBI | string;
8
- roundUp?: boolean;
9
- }): JSBI;
10
- export declare function getPositionAmount1({ tickCurrent, tickLower, tickUpper, liquidity, roundUp, }: {
11
- tickCurrent: number;
12
- tickLower: number;
13
- tickUpper: number;
14
- liquidity: number | bigint | JSBI | string;
15
- roundUp?: boolean;
16
- }): JSBI;
17
- export declare function getPositionAmountFromAmount0({ sqrtRatioX96, tickCurrent, tickLower, tickUpper, amount0, useFullPrecision, }: {
18
- sqrtRatioX96: JSBI;
19
- tickCurrent: number;
20
- tickLower: number;
21
- tickUpper: number;
22
- amount0: BigintIsh;
23
- useFullPrecision: boolean;
24
- }): {
25
- amount0: JSBI;
26
- amount1: JSBI;
27
- };
28
- export declare function getPositionAmountFromAmount1({ sqrtRatioX96, tickCurrent, tickLower, tickUpper, amount1, }: {
29
- sqrtRatioX96: JSBI;
30
- tickCurrent: number;
31
- tickLower: number;
32
- tickUpper: number;
33
- amount1: BigintIsh;
34
- }): {
35
- amount0: JSBI;
36
- amount1: JSBI;
37
- };
@@ -1,23 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { Percent } from '../../../../utils/fractions';
3
- import { TokenInfo } from '../../../../hooks/Token';
4
- /**
5
- * Returns the minimum amounts that must be sent in order to safely mint the amount of liquidity held by the position
6
- * with the given slippage tolerance
7
- * @param slippageTolerance Tolerance of unfavorable slippage from the current price
8
- * @returns The amounts, with slippage
9
- */
10
- export declare function mintAmountsWithSlippage(tickCurrent: number, slippageTolerance: Percent, tickLower: number, tickUpper: number, baseToken: TokenInfo, quoteToken: TokenInfo, amount0: string, amount1: string): {
11
- amount0: JSBI;
12
- amount1: JSBI;
13
- };
14
- /**
15
- * Returns the minimum amounts that should be requested in order to safely burn the amount of liquidity held by the
16
- * position with the given slippage tolerance
17
- * @param slippageTolerance tolerance of unfavorable slippage from the current price
18
- * @returns The amounts, with slippage
19
- */
20
- export declare function burnAmountsWithSlippage(tickCurrent: number, slippageTolerance: Percent, tickLower: number, tickUpper: number, liquidity: number | bigint | JSBI | string, baseToken: TokenInfo, quoteToken: TokenInfo): Readonly<{
21
- amount0: JSBI;
22
- amount1: JSBI;
23
- }>;
@@ -1,10 +0,0 @@
1
- import { TokenInfo } from '../../../../hooks/Token';
2
- import { Price } from '../../../../utils/fractions';
3
- /**
4
- * Returns the first tick for which the given price is greater than or equal to the tick price
5
- * @param price for which to return the closest tick that represents a price less than or equal to the input price,
6
- * i.e. the price of the returned tick is less than or equal to the input price
7
- */
8
- export declare function priceToClosestTick(price: Price): number;
9
- export declare function tickToPrice(baseToken: TokenInfo, quoteToken: TokenInfo, tickCurrent: number | bigint): Price;
10
- export declare function getTickToPrice(baseToken?: TokenInfo, quoteToken?: TokenInfo, tickCurrent?: number | bigint): string | undefined;
@@ -1,22 +0,0 @@
1
- import JSBI from 'jsbi';
2
- import { BigintIsh } from './constants';
3
- /**
4
- * Computes the maximum amount of liquidity received for a given amount of token0, token1,
5
- * and the prices at the tick boundaries.
6
- * @param sqrtRatioCurrentX96 the current price
7
- * @param sqrtRatioAX96 price at lower boundary
8
- * @param sqrtRatioBX96 price at upper boundary
9
- * @param amount0 token0 amount
10
- * @param amount1 token1 amount
11
- * @param useFullPrecision if false, liquidity will be maximized according to what the router can calculate,
12
- * not what core can theoretically support
13
- */
14
- export declare function maxLiquidityForAmounts(sqrtRatioCurrentX96: JSBI, sqrtRatioAX96: JSBI, sqrtRatioBX96: JSBI, amount0: BigintIsh, amount1: BigintIsh, useFullPrecision: boolean): JSBI;
15
- export declare function getLiquidityByAmounts({ sqrtRatioX96, tickLower, tickUpper, amount0, amount1, useFullPrecision, }: {
16
- sqrtRatioX96: JSBI;
17
- tickLower: number;
18
- tickUpper: number;
19
- amount0: BigintIsh;
20
- amount1: BigintIsh;
21
- useFullPrecision: boolean;
22
- }): JSBI;
@@ -1,2 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare function mostSignificantBit(x: JSBI): number;
@@ -1,6 +0,0 @@
1
- /**
2
- * Returns the closest tick that is nearest a given tick and usable for the given tick spacing
3
- * @param tick the target tick
4
- * @param tickSpacing the spacing of the pool
5
- */
6
- export declare function nearestUsableTick(tick: number, tickSpacing: number): number;
@@ -1,3 +0,0 @@
1
- import { Percent } from '../../../../utils/fractions';
2
- export declare function toSlippagePercent(slippage: string | number): Percent;
3
- export declare function toSlippagePercentNumber(slippage: string | number): number;
@@ -1,7 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare const MAX_SAFE_INTEGER: JSBI;
3
- /**
4
- * Computes floor(sqrt(value))
5
- * @param value the value for which to compute the square root, rounded down
6
- */
7
- export declare function sqrt(value: JSBI): JSBI;
@@ -1,13 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class SqrtPriceMath {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- static getAmount0Delta(sqrtRatioAX96: JSBI, sqrtRatioBX96: JSBI, liquidity: JSBI, roundUp: boolean): JSBI;
8
- static getAmount1Delta(sqrtRatioAX96: JSBI, sqrtRatioBX96: JSBI, liquidity: JSBI, roundUp: boolean): JSBI;
9
- static getNextSqrtPriceFromInput(sqrtPX96: JSBI, liquidity: JSBI, amountIn: JSBI, zeroForOne: boolean): JSBI;
10
- static getNextSqrtPriceFromOutput(sqrtPX96: JSBI, liquidity: JSBI, amountOut: JSBI, zeroForOne: boolean): JSBI;
11
- private static getNextSqrtPriceFromAmount0RoundingUp;
12
- private static getNextSqrtPriceFromAmount1RoundingDown;
13
- }
@@ -1,34 +0,0 @@
1
- import JSBI from 'jsbi';
2
- export declare abstract class TickMath {
3
- /**
4
- * Cannot be constructed.
5
- */
6
- private constructor();
7
- /**
8
- * The minimum tick that can be used on any pool.
9
- */
10
- static MIN_TICK: number;
11
- /**
12
- * The maximum tick that can be used on any pool.
13
- */
14
- static MAX_TICK: number;
15
- /**
16
- * The sqrt ratio corresponding to the minimum tick that could be used on any pool.
17
- */
18
- static MIN_SQRT_RATIO: JSBI;
19
- /**
20
- * The sqrt ratio corresponding to the maximum tick that could be used on any pool.
21
- */
22
- static MAX_SQRT_RATIO: JSBI;
23
- /**
24
- * Returns the sqrt ratio as a Q64.96 for the given tick. The sqrt ratio is computed as sqrt(1.0001)^tick
25
- * @param tick the tick for which to compute the sqrt ratio
26
- */
27
- static getSqrtRatioAtTick(tick: number): JSBI;
28
- /**
29
- * Returns the tick corresponding to a given sqrt ratio, s.t. #getSqrtRatioAtTick(tick) <= sqrtRatioX96
30
- * and #getSqrtRatioAtTick(tick + 1) > sqrtRatioX96
31
- * @param sqrtRatioX96 the sqrt ratio as a Q64.96 for which to compute the tick
32
- */
33
- static getTickAtSqrtRatio(sqrtRatioX96: JSBI): number;
34
- }
@@ -1,4 +0,0 @@
1
- import { TokenInfo } from '../../../../hooks/Token';
2
- import { Price } from '../../../../utils/fractions';
3
- export declare function tryParsePrice(baseToken?: TokenInfo, quoteToken?: TokenInfo, value?: string): Price | undefined;
4
- export declare function tryParseTick(baseToken?: TokenInfo, quoteToken?: TokenInfo, value?: string, tickSpacing?: number): number | undefined;
@@ -1,9 +0,0 @@
1
- import { ChainId } from '@dodoex/api';
2
- import { TokenInfo } from '../../../hooks/Token';
3
- import { Token } from './sdks/sdk-core';
4
- import { NativeCurrency } from './sdks/sdk-core/entities/nativeCurrency';
5
- export declare function getNativeAddress(chainId: ChainId): string;
6
- export declare function areAddressesEqual(a1: Maybe<Address>, a2: Maybe<Address>): boolean;
7
- export declare const isNativeCurrencyAddress: (chainId: ChainId, address: Maybe<Address>) => boolean;
8
- export declare function buildCurrency(token: TokenInfo | null): Token | NativeCurrency | undefined;
9
- export declare function convertBackToTokenInfo(currency: Token | NativeCurrency | undefined | null): TokenInfo | undefined;