@dodoex/widgets 3.0.4-ve33.10 → 3.0.4-ve33.11

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 (156) 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-BPuHWVRM.cjs → helper-BASM7Iwr.cjs} +1 -1
  4. package/dist/{helper-t_Ye_aBf.js → helper-BASXTlaZ.js} +1 -1
  5. package/dist/{index-BA5HePEm.js → index-BPaBKoXS.js} +1 -1
  6. package/dist/index-CjO6DZLb.js +32 -0
  7. package/dist/index-DH1Xhcg6.cjs +32 -0
  8. package/dist/{index-al7nXNyl.cjs → index-mk0U3yyv.cjs} +1 -1
  9. package/dist/{index-CTWa5eCR.js → index-r9aOMH8w.js} +1 -1
  10. package/dist/{index-Cg3PeApO.cjs → index-zX4IFul3.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/CardWidgets.d.ts +2 -1
  16. package/dist/types/components/SimpleItemInfo.d.ts +4 -0
  17. package/dist/types/components/Swap/components/Dialog.d.ts +3 -0
  18. package/dist/types/components/Swap/components/TokenCard/NumberInput.d.ts +1 -0
  19. package/dist/types/components/Swap/components/TokenCard/TokenLpCard.d.ts +32 -0
  20. package/dist/types/components/Swap/components/TokenCard/index.d.ts +2 -1
  21. package/dist/types/components/Token/TokenItem.d.ts +2 -1
  22. package/dist/types/components/TokenSelect.d.ts +5 -2
  23. package/dist/types/components/TokenStatusButton.d.ts +1 -1
  24. package/dist/types/hooks/Submission/types.d.ts +19 -1
  25. package/dist/types/hooks/Token/usePoolTokenSort.d.ts +24 -0
  26. package/dist/types/index.d.ts +4 -0
  27. package/dist/types/utils/fractions/fraction.d.ts +24 -0
  28. package/dist/types/utils/fractions/index.d.ts +3 -0
  29. package/dist/types/utils/fractions/percent.d.ts +14 -0
  30. package/dist/types/utils/fractions/price.d.ts +29 -0
  31. package/dist/types/utils/fractions/types.d.ts +7 -0
  32. package/dist/types/widgets/ve33/Ve33IncentiveDetail/AddIncentiveDialog.d.ts +13 -0
  33. package/dist/types/widgets/ve33/Ve33IncentiveDetail/Dashboard.d.ts +1 -0
  34. package/dist/types/widgets/ve33/Ve33IncentiveDetail/PoolInfo.d.ts +5 -0
  35. package/dist/types/widgets/ve33/Ve33IncentiveDetail/index.d.ts +7 -0
  36. package/dist/types/widgets/ve33/Ve33IncentiveList/CardList.d.ts +10 -0
  37. package/dist/types/widgets/ve33/Ve33IncentiveList/TableList.d.ts +11 -0
  38. package/dist/types/widgets/ve33/Ve33IncentiveList/index.d.ts +7 -0
  39. package/dist/types/widgets/ve33/Ve33LockList/CardList.d.ts +11 -0
  40. package/dist/types/widgets/ve33/Ve33LockList/ClaimLockDialog.d.ts +6 -0
  41. package/dist/types/widgets/ve33/Ve33LockList/LockManageDialog.d.ts +7 -0
  42. package/dist/types/widgets/ve33/Ve33LockList/MergeDialog.d.ts +7 -0
  43. package/dist/types/widgets/ve33/Ve33LockList/TableList.d.ts +10 -0
  44. package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimBribes.d.ts +7 -0
  45. package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimRebases.d.ts +5 -0
  46. package/dist/types/widgets/ve33/Ve33LockList/hooks/useExtendLock.d.ts +6 -0
  47. package/dist/types/widgets/ve33/Ve33LockList/hooks/useFetchUserLocks.d.ts +282 -0
  48. package/dist/types/widgets/ve33/Ve33LockList/hooks/useIncreaseLock.d.ts +6 -0
  49. package/dist/types/widgets/ve33/Ve33LockList/hooks/useMergeLock.d.ts +5 -0
  50. package/dist/types/widgets/ve33/Ve33LockList/hooks/useTransferLock.d.ts +7 -0
  51. package/dist/types/widgets/ve33/Ve33LockList/index.d.ts +1 -0
  52. package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useCreateLock.d.ts +7 -0
  53. package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useFetchUserTotalVeNFT.d.ts +8 -0
  54. package/dist/types/widgets/ve33/Ve33LockOperate/index.d.ts +4 -0
  55. package/dist/types/widgets/ve33/Ve33LockOperate/utils.d.ts +21 -0
  56. package/dist/types/widgets/ve33/Ve33PoolDetail/MyAssets.d.ts +5 -0
  57. package/dist/types/widgets/ve33/Ve33PoolDetail/MyPosition.d.ts +5 -0
  58. package/dist/types/widgets/ve33/Ve33PoolDetail/PoolInfo.d.ts +5 -0
  59. package/dist/types/widgets/ve33/Ve33PoolDetail/useVe33V3Positions.d.ts +79 -0
  60. package/dist/types/widgets/ve33/Ve33PoolList/CardList.d.ts +13 -0
  61. package/dist/types/widgets/ve33/Ve33PoolOperate.d.ts +2 -0
  62. package/dist/types/widgets/ve33/Ve33StakeDialog.d.ts +11 -0
  63. package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/SliderPercentageCard.d.ts +2 -1
  64. package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useLiquidityOperateAmount.d.ts +4 -0
  65. package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useVe33V2BalanceInfo.d.ts +2 -0
  66. package/dist/types/widgets/ve33/Ve33V2PoolOperate/index.d.ts +15 -0
  67. package/dist/types/widgets/ve33/Ve33V3PoolOperate/Ve33V3AddLiquidity.d.ts +4 -0
  68. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/Badge/RangeBadge.d.ts +4 -0
  69. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ClaimButton.d.ts +9 -0
  70. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InRangeDot.d.ts +4 -0
  71. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InputStepCounter.d.ts +17 -0
  72. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Area.d.ts +10 -0
  73. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/AxisBottom.d.ts +6 -0
  74. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Brush.d.ts +13 -0
  75. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Chart.d.ts +2 -0
  76. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Line.d.ts +6 -0
  77. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Zoom.d.ts +12 -0
  78. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/index.d.ts +19 -0
  79. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/svg.d.ts +22 -0
  80. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/types.d.ts +50 -0
  81. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -0
  82. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/utils.d.ts +14 -0
  83. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/MyLiquidity.d.ts +10 -0
  84. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionManage.d.ts +8 -0
  85. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionPreview.d.ts +14 -0
  86. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionSelectedRangePreview.d.ts +11 -0
  87. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeRatioSelect.d.ts +2 -0
  88. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeSelector.d.ts +21 -0
  89. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RateToggle.d.ts +9 -0
  90. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RemoveButton.d.ts +12 -0
  91. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ReviewModal.d.ts +18 -0
  92. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenAndEtherscan.d.ts +4 -0
  93. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenPairSelect.d.ts +7 -0
  94. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/shared.d.ts +4 -0
  95. package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/widgets.d.ts +56 -0
  96. package/dist/types/widgets/ve33/Ve33V3PoolOperate/constants/misc.d.ts +17 -0
  97. package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useAddVe33V3Liquidity.d.ts +15 -0
  98. package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePoolActiveLiquidityChartData.d.ts +37 -0
  99. package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePriceRangeRatioSelect.d.ts +28 -0
  100. package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useRemoveVe33V3Liquidity.d.ts +14 -0
  101. package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useSetRange.d.ts +36 -0
  102. package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Amounts.d.ts +19 -0
  103. package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Pair.d.ts +58 -0
  104. package/dist/types/widgets/ve33/Ve33V3PoolOperate/index.d.ts +5 -0
  105. package/dist/types/widgets/ve33/Ve33V3PoolOperate/types.d.ts +10 -0
  106. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/calldata.d.ts +7 -0
  107. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/computeSurroundingTicks.d.ts +4 -0
  108. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/constants.d.ts +7 -0
  109. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/encodeSqrtRatioX96.d.ts +9 -0
  110. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/formatTickPrice.d.ts +1 -0
  111. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/fullMath.d.ts +8 -0
  112. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmount.d.ts +39 -0
  113. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmountWithSlippage.d.ts +23 -0
  114. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getTickToPrice.d.ts +10 -0
  115. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/maxLiquidityForAmounts.d.ts +22 -0
  116. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/mostSignificantBit.d.ts +2 -0
  117. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/nearestUsableTick.d.ts +6 -0
  118. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/slippage.d.ts +3 -0
  119. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrt.d.ts +7 -0
  120. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrtPriceMath.d.ts +13 -0
  121. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tickMath.d.ts +34 -0
  122. package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tryParseTick.d.ts +4 -0
  123. package/dist/types/widgets/ve33/VotePoolList/CardList.d.ts +12 -0
  124. package/dist/types/widgets/ve33/VotePoolList/SetVotePowerDialog.d.ts +12 -0
  125. package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +2 -4
  126. package/dist/types/widgets/ve33/VotePoolList/hooks/useVoteVe33.d.ts +7 -0
  127. package/dist/types/widgets/ve33/VotePoolList/widgets.d.ts +35 -0
  128. package/dist/types/widgets/ve33/components/LockSlider.d.ts +5 -0
  129. package/dist/types/widgets/ve33/components/PoolTokenInfo.d.ts +11 -0
  130. package/dist/types/widgets/ve33/hooks/useVe33PositionAmounts.d.ts +17 -0
  131. package/dist/types/widgets/ve33/hooks/useVe33V2ClaimEmissions.d.ts +4 -0
  132. package/dist/types/widgets/ve33/hooks/useVe33V2ClaimTradingFees.d.ts +4 -0
  133. package/dist/types/widgets/ve33/hooks/useVe33V2Stake.d.ts +5 -0
  134. package/dist/types/widgets/ve33/hooks/useVe33V2UnStake.d.ts +5 -0
  135. package/dist/types/widgets/ve33/hooks/useVe33V3ClaimEmissions.d.ts +5 -0
  136. package/dist/types/widgets/ve33/hooks/useVe33V3ClaimTradingFees.d.ts +4 -0
  137. package/dist/types/widgets/ve33/hooks/useVe33V3Stake.d.ts +5 -0
  138. package/dist/types/widgets/ve33/hooks/useVe33V3StakeApproveStatus.d.ts +17 -0
  139. package/dist/types/widgets/ve33/hooks/useVe33V3UnStake.d.ts +5 -0
  140. package/package.json +2 -2
  141. package/dist/index-C8qblH3I.js +0 -32
  142. package/dist/index-CQTOLjzQ.cjs +0 -32
  143. package/dist/types/widgets/ve33/Ve33PoolOperate/index.d.ts +0 -23
  144. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/AddPoolOperate.d.ts +0 -0
  145. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/RemovePoolOperate.d.ts +0 -0
  146. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/ComparePrice.d.ts +0 -0
  147. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/OperateBtn.d.ts +0 -0
  148. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/SlippageSetting.d.ts +0 -0
  149. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/V2ConfirmDialog.d.ts +0 -0
  150. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useComparePrice.d.ts +0 -0
  151. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/usePercentageRemove.d.ts +0 -0
  152. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/usePoolOperateTabs.d.ts +0 -0
  153. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useVe33V2AddLiquidity.d.ts +0 -0
  154. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useVe33V2RemoveLiquidity.d.ts +0 -0
  155. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useWithdrawInfo.d.ts +0 -0
  156. /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/types.d.ts +0 -0
@@ -0,0 +1,37 @@
1
+ import JSBI from 'jsbi';
2
+ import { TokenInfo } from '../../../../hooks/Token';
3
+ import { ChartEntry } from '../components/LiquidityChartRangeInput/types';
4
+ import { Price } from '../../../../utils/fractions';
5
+ export interface TickProcessed {
6
+ tick: number;
7
+ liquidityActive: JSBI;
8
+ liquidityNet: JSBI;
9
+ price0: string;
10
+ sdkPrice: Price;
11
+ }
12
+ export interface FetchTicks {
13
+ ticks: Array<{
14
+ id: string;
15
+ liquidityNet: string;
16
+ poolAddress?: string;
17
+ price0: string;
18
+ price1: string;
19
+ tickIdx: string;
20
+ }> | undefined | null;
21
+ isLoading: boolean;
22
+ isError: boolean;
23
+ refetch: () => void;
24
+ }
25
+ export declare function usePoolActiveLiquidityChartData({ tickCurrent, liquidity, fetchTicks, token0, token1, }: {
26
+ tickCurrent: number | undefined;
27
+ liquidity: string | undefined;
28
+ fetchTicks?: FetchTicks;
29
+ token0: TokenInfo | undefined;
30
+ token1: TokenInfo | undefined;
31
+ }): {
32
+ hidden: boolean;
33
+ isLoading: boolean;
34
+ error: boolean;
35
+ data: TickProcessed[] | undefined;
36
+ formattedData: ChartEntry[] | undefined;
37
+ };
@@ -0,0 +1,28 @@
1
+ import { Price } from '../../../../utils/fractions';
2
+ import { TokenInfo } from '../../../../hooks/Token';
3
+ import { Bound } from '../types';
4
+ export interface PriceRangeRatioSelectProps {
5
+ totalApr: bigint | undefined;
6
+ currentPrice?: string;
7
+ tickSpacing?: number;
8
+ priceLower: Price | undefined;
9
+ priceUpper: Price | undefined;
10
+ token0: TokenInfo | undefined;
11
+ token1: TokenInfo | undefined;
12
+ tickSpaceLimits: {
13
+ [bound in Bound]?: number | undefined;
14
+ };
15
+ onLeftRangeInput: (typedValue: string) => void;
16
+ onRightRangeInput: (typedValue: string) => void;
17
+ handleSetFullRange: () => void;
18
+ }
19
+ export declare function usePriceRangeRatioSelect({ totalApr, currentPrice, tickSpacing, priceLower, priceUpper, token0, token1, tickSpaceLimits, onLeftRangeInput, onRightRangeInput, handleSetFullRange, }: PriceRangeRatioSelectProps): {
20
+ options: {
21
+ type: string;
22
+ ratio: string;
23
+ apr: string;
24
+ borderRadius: string;
25
+ active: boolean;
26
+ onClick: () => void;
27
+ }[];
28
+ };
@@ -0,0 +1,14 @@
1
+ import BigNumber from 'bignumber.js';
2
+ export declare function useRemoveVe33V3Liquidity(): import("@tanstack/react-query").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult | undefined, Error, {
3
+ chainId?: number;
4
+ tokenId?: number | string;
5
+ amount0Min: string;
6
+ amount1Min: string;
7
+ newLiquidity: string;
8
+ collectOptions: {
9
+ expectedCurrencyOwed0: BigNumber;
10
+ expectedCurrencyOwed1: BigNumber;
11
+ recipient: string;
12
+ };
13
+ successBack?: () => void;
14
+ }, unknown>;
@@ -0,0 +1,36 @@
1
+ import { TokenInfo } from '../../../../hooks/Token';
2
+ import React from 'react';
3
+ import { Price } from '../../../../utils/fractions';
4
+ export declare function useSetRange({ tickCurrent, token0, token1, sorted, tickSpacing, price, }: {
5
+ tickCurrent: number | undefined;
6
+ token0: TokenInfo | undefined;
7
+ token1: TokenInfo | undefined;
8
+ sorted: boolean;
9
+ tickSpacing: number;
10
+ price?: Price;
11
+ }): {
12
+ tickSpaceLimits: {
13
+ LOWER: number | undefined;
14
+ UPPER: number | undefined;
15
+ };
16
+ ticksAtLimit: {
17
+ LOWER: boolean;
18
+ UPPER: boolean;
19
+ };
20
+ tickLower: number;
21
+ tickUpper: number;
22
+ priceLower: Price | undefined;
23
+ priceUpper: Price | undefined;
24
+ leftRangeTypedValue: string | boolean;
25
+ rightRangeTypedValue: string | boolean;
26
+ invalidRange: boolean;
27
+ outOfRange: boolean;
28
+ getDecrementLower: () => string;
29
+ getIncrementLower: () => string;
30
+ getDecrementUpper: () => string;
31
+ getIncrementUpper: () => string;
32
+ handleSetFullRange: () => void;
33
+ handleRateToggle: () => void;
34
+ onLeftRangeInput: React.Dispatch<React.SetStateAction<string | boolean>>;
35
+ onRightRangeInput: React.Dispatch<React.SetStateAction<string | boolean>>;
36
+ };
@@ -0,0 +1,19 @@
1
+ import { TokenInfo } from '../../../../hooks/Token';
2
+ import JSBI from 'jsbi';
3
+ export declare function useVe33V3Amounts({ 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
+ };
@@ -0,0 +1,58 @@
1
+ import { TokenInfo } from '../../../../hooks/Token';
2
+ import { Price } from '../../../../utils/fractions';
3
+ export declare function useVe33V3Pair({ address, baseToken, quoteToken, startPriceTypedValue, }: {
4
+ address: string | undefined;
5
+ baseToken: TokenInfo | undefined;
6
+ quoteToken: TokenInfo | undefined;
7
+ startPriceTypedValue?: string;
8
+ }): {
9
+ chainId: undefined;
10
+ isRearTokenA: boolean;
11
+ token0: undefined;
12
+ token1: undefined;
13
+ token0Wrapped: undefined;
14
+ token1Wrapped: undefined;
15
+ isBaseTokenNative: boolean;
16
+ isQuoteTokenNative: boolean;
17
+ address: string | undefined;
18
+ fetchTickSpacing: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
19
+ fetchGlobalState: import("@tanstack/react-query").UseQueryResult<{
20
+ sqrtPriceX96: bigint;
21
+ tick: bigint;
22
+ observationIndex: bigint;
23
+ observationCardinality: bigint;
24
+ observationCardinalityNext: bigint;
25
+ unlocked: boolean;
26
+ }, Error>;
27
+ fetchLiquidity: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
28
+ currentTick: number | undefined;
29
+ currentSqrt: string | undefined;
30
+ price: Price | undefined;
31
+ reversePrice: string | undefined;
32
+ tickSpacing: number;
33
+ } | {
34
+ chainId: import("@dodoex/api").ChainId;
35
+ isRearTokenA: boolean;
36
+ token0: TokenInfo;
37
+ token1: TokenInfo;
38
+ token0Wrapped: TokenInfo;
39
+ token1Wrapped: TokenInfo;
40
+ isBaseTokenNative: boolean;
41
+ isQuoteTokenNative: boolean;
42
+ address: string | undefined;
43
+ fetchTickSpacing: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
44
+ fetchGlobalState: import("@tanstack/react-query").UseQueryResult<{
45
+ sqrtPriceX96: bigint;
46
+ tick: bigint;
47
+ observationIndex: bigint;
48
+ observationCardinality: bigint;
49
+ observationCardinalityNext: bigint;
50
+ unlocked: boolean;
51
+ }, Error>;
52
+ fetchLiquidity: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
53
+ currentTick: number | undefined;
54
+ currentSqrt: string | undefined;
55
+ price: Price | undefined;
56
+ reversePrice: string | undefined;
57
+ tickSpacing: number;
58
+ };
@@ -0,0 +1,5 @@
1
+ import { PoolOperateProps } from '../Ve33V2PoolOperate';
2
+ export default function Ve33V3PoolOperateDialog({ modal, ...props }: PoolOperateProps & {
3
+ modal?: boolean;
4
+ }): JSX.Element;
5
+ export declare function Ve33V3PoolOperate({ sx, pool, operate, account, errorRefetch, submittedBack, onClose, }: PoolOperateProps): JSX.Element;
@@ -0,0 +1,10 @@
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';
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,4 @@
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[];
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,9 @@
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;
@@ -0,0 +1 @@
1
+ export declare function formatAmountWithAlphabetSymbol(amount: string | undefined, decimals?: number): string;
@@ -0,0 +1,8 @@
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
+ }
@@ -0,0 +1,39 @@
1
+ import JSBI from 'jsbi';
2
+ import { BigintIsh } from './constants';
3
+ export declare function getPositionAmount0({ tickCurrent, tickLower, tickUpper, liquidity, roundUp, sqrtRatioX96: sqrtRatioX96Props, }: {
4
+ tickCurrent: number;
5
+ tickLower: number;
6
+ tickUpper: number;
7
+ liquidity: number | bigint | JSBI | string;
8
+ roundUp?: boolean;
9
+ sqrtRatioX96?: JSBI | bigint;
10
+ }): JSBI;
11
+ export declare function getPositionAmount1({ tickCurrent, tickLower, tickUpper, liquidity, roundUp, sqrtRatioX96: sqrtRatioX96Props, }: {
12
+ tickCurrent: number;
13
+ tickLower: number;
14
+ tickUpper: number;
15
+ liquidity: number | bigint | JSBI | string;
16
+ roundUp?: boolean;
17
+ sqrtRatioX96?: bigint;
18
+ }): JSBI;
19
+ export declare function getPositionAmountFromAmount0({ sqrtRatioX96, tickCurrent, tickLower, tickUpper, amount0, useFullPrecision, }: {
20
+ sqrtRatioX96: JSBI;
21
+ tickCurrent: number;
22
+ tickLower: number;
23
+ tickUpper: number;
24
+ amount0: BigintIsh;
25
+ useFullPrecision: boolean;
26
+ }): {
27
+ amount0: JSBI;
28
+ amount1: JSBI;
29
+ };
30
+ export declare function getPositionAmountFromAmount1({ sqrtRatioX96, tickCurrent, tickLower, tickUpper, amount1, }: {
31
+ sqrtRatioX96: JSBI;
32
+ tickCurrent: number;
33
+ tickLower: number;
34
+ tickUpper: number;
35
+ amount1: BigintIsh;
36
+ }): {
37
+ amount0: JSBI;
38
+ amount1: JSBI;
39
+ };
@@ -0,0 +1,23 @@
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
+ }>;
@@ -0,0 +1,10 @@
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;
@@ -0,0 +1,22 @@
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;
@@ -0,0 +1,2 @@
1
+ import JSBI from 'jsbi';
2
+ export declare function mostSignificantBit(x: JSBI): number;
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1,3 @@
1
+ import { Percent } from '../../../../utils/fractions';
2
+ export declare function toSlippagePercent(slippage: string | number): Percent;
3
+ export declare function toSlippagePercentNumber(slippage: string | number): number;
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,34 @@
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
+ }
@@ -0,0 +1,4 @@
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;
@@ -0,0 +1,12 @@
1
+ import { VotePoolInfoI } from '../types';
2
+ export interface CardListProps {
3
+ poolList: VotePoolInfoI[];
4
+ onSelectPool: (item: VotePoolInfoI) => void;
5
+ selectedPoolList: string[];
6
+ }
7
+ export declare const CardList: ({ poolList, ...props }: CardListProps) => JSX.Element;
8
+ export declare function CardItem({ item, onSelectPool, selectedPoolList, }: {
9
+ item?: VotePoolInfoI;
10
+ onSelectPool?: (item: VotePoolInfoI) => void;
11
+ selectedPoolList?: string[];
12
+ }): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { VotePoolInfoI } from '../types';
2
+ import { Lock } from '../Ve33LockList/hooks/useFetchUserLocks';
3
+ export default function SetVotePowerDialog({ chainId, account, open, onClose, data, lock, setLock, refetch, }: {
4
+ chainId: number | undefined;
5
+ account: string | undefined;
6
+ open: boolean;
7
+ onClose: () => void;
8
+ data: Array<VotePoolInfoI>;
9
+ lock: Lock | null;
10
+ setLock: (lock: Lock | null) => void;
11
+ refetch?: () => void;
12
+ }): JSX.Element;
@@ -6,9 +6,7 @@ export interface TableListProps {
6
6
  hasMore?: boolean;
7
7
  loadMore?: () => void;
8
8
  loadMoreLoading?: boolean;
9
- onSelectPool: (id: string, selected: boolean) => void;
10
- selectedPoolList: {
11
- [key: string]: boolean;
12
- };
9
+ onSelectPool: (item: VotePoolInfoI) => void;
10
+ selectedPoolList: string[];
13
11
  }
14
12
  export declare const TableList: ({ chainId, poolList, hasMore, loadMore, loadMoreLoading, onSelectPool, selectedPoolList, }: TableListProps) => JSX.Element;
@@ -0,0 +1,7 @@
1
+ export declare function useVoteVe33({ refetch, }: {
2
+ refetch?: () => Promise<void> | void;
3
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, {
4
+ tokenId: number;
5
+ poolIds: string[];
6
+ weights: number[];
7
+ }, unknown>;
@@ -0,0 +1,35 @@
1
+ import { VotePoolInfoI } from '../types';
2
+ import { Lock } from '../Ve33LockList/hooks/useFetchUserLocks';
3
+ export declare function VAPRWidgets({ item }: {
4
+ item: VotePoolInfoI;
5
+ }): JSX.Element;
6
+ export declare function IncentivesWidgets({ item, showLogo, singleLine, }: {
7
+ item: VotePoolInfoI;
8
+ showLogo?: boolean;
9
+ singleLine?: boolean;
10
+ }): JSX.Element;
11
+ export declare function FeesWidgets({ item, showLogo, }: {
12
+ item: VotePoolInfoI;
13
+ showLogo?: boolean;
14
+ }): JSX.Element;
15
+ export declare function TotalVoteWidgets({ item, showLogo, singleLine, }: {
16
+ item: VotePoolInfoI;
17
+ showLogo?: boolean;
18
+ singleLine?: boolean;
19
+ }): JSX.Element;
20
+ export declare function MyVoteWidgets({ label, value, onChange, onBlur, loading, veNFTAmount, veNFTSymbol, }: {
21
+ label?: string;
22
+ value: number | undefined;
23
+ onChange: (v: number | undefined) => void;
24
+ onBlur?: () => void;
25
+ loading?: boolean;
26
+ veNFTAmount: number | string;
27
+ veNFTSymbol: string;
28
+ }): JSX.Element;
29
+ export declare function SelectLock({ fullWidth, chainId, account, selectedLock, setSelectedLock, }: {
30
+ fullWidth?: boolean;
31
+ chainId: number | undefined;
32
+ account: string | undefined;
33
+ selectedLock: Lock | null;
34
+ setSelectedLock: (lock: Lock | null) => void;
35
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { SliderProps } from '@dodoex/components';
2
+ export default function LockSlider({ currentValue, ...props }: SliderProps & {
3
+ currentValue?: boolean;
4
+ }): JSX.Element;
5
+ export declare const MAX_LOCK_DURATION = 31536000;
@@ -0,0 +1,11 @@
1
+ import { TokenInfo } from '../../../hooks/Token';
2
+ import { PoolTypeTagProps } from './PoolTypeTag';
3
+ export default function PoolTokenInfo({ item, }: {
4
+ item?: PoolTypeTagProps & {
5
+ id: string;
6
+ gaugeAddress: string;
7
+ baseToken: TokenInfo;
8
+ quoteToken: TokenInfo;
9
+ chainId: number;
10
+ };
11
+ }): JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { Ve33PoolInfoI } from '../types';
2
+ import BigNumber from 'bignumber.js';
3
+ export declare function useVe33PositionAmounts({ poolInfo, tokenId, }: {
4
+ poolInfo: Ve33PoolInfoI | undefined;
5
+ tokenId: number | undefined;
6
+ }): {
7
+ liquidity: bigint | undefined;
8
+ isLoading: boolean;
9
+ tickCurrent: number | undefined;
10
+ tickLower: number | undefined;
11
+ tickUpper: number | undefined;
12
+ sqrtPriceX96: bigint | undefined;
13
+ amount0Bg: BigNumber | null;
14
+ amount1Bg: BigNumber | null;
15
+ refetch: () => void;
16
+ errorRefetch: (() => void) | undefined;
17
+ };
@@ -0,0 +1,4 @@
1
+ export declare function useVe33V2ClaimEmissions({ gaugeAddress, refetch, }: {
2
+ gaugeAddress?: string;
3
+ refetch?: () => Promise<void> | void;
4
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,4 @@
1
+ export declare function useVe33V2ClaimTradingFees({ address, refetch, }: {
2
+ address?: string;
3
+ refetch?: () => Promise<void> | void;
4
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,5 @@
1
+ export declare function useVe33V2Stake({ amount, gaugeAddress, refetch, }: {
2
+ amount: string;
3
+ gaugeAddress?: string;
4
+ refetch?: () => Promise<void> | void;
5
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,5 @@
1
+ export declare function useVe33V2UnStake({ amount, gaugeAddress, refetch, }: {
2
+ amount: string;
3
+ gaugeAddress?: string;
4
+ refetch?: () => Promise<void> | void;
5
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,5 @@
1
+ export declare function useVe33V3ClaimEmissions({ tokenId, gaugeAddress, refetch, }: {
2
+ tokenId?: number;
3
+ gaugeAddress?: string;
4
+ refetch?: () => Promise<void> | void;
5
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,4 @@
1
+ export declare function useVe33V3ClaimTradingFees({ tokenId, refetch, }: {
2
+ tokenId?: number;
3
+ refetch?: () => Promise<void> | void;
4
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,5 @@
1
+ export declare function useVe33V3Stake({ tokenId, gaugeAddress, refetch, }: {
2
+ tokenId?: number;
3
+ gaugeAddress?: string;
4
+ refetch?: () => Promise<void> | void;
5
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
@@ -0,0 +1,17 @@
1
+ import { Ve33PoolInfoI } from '../types';
2
+ export default function useVe33V3StakeApproveStatus({ poolInfo, tokenId, }: {
3
+ poolInfo: Ve33PoolInfoI | undefined;
4
+ tokenId: number | undefined;
5
+ }): {
6
+ token: import("../../..").TokenInfo | null | undefined;
7
+ isApproving: boolean;
8
+ isGetApproveLoading: boolean;
9
+ needApprove: boolean;
10
+ needReset: boolean | undefined;
11
+ needShowTokenStatusButton: boolean;
12
+ insufficientBalance: boolean;
13
+ loading: boolean;
14
+ approveTitle: string;
15
+ submitApprove: () => Promise<void>;
16
+ getMaxBalance: () => string;
17
+ };
@@ -0,0 +1,5 @@
1
+ export declare function useVe33V3UnStake({ tokenId, gaugeAddress, refetch, }: {
2
+ tokenId?: number;
3
+ gaugeAddress?: string;
4
+ refetch?: () => Promise<void> | void;
5
+ }): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;