@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,5 @@
1
+ import { Ve33PoolInfoI } from '../types';
2
+ export default function MyAssets({ poolInfo, account, }: {
3
+ poolInfo?: Ve33PoolInfoI;
4
+ account?: string;
5
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Ve33PoolInfoI } from '../types';
2
+ export default function MyPosition({ poolInfo, account, }: {
3
+ poolInfo?: Ve33PoolInfoI;
4
+ account: string;
5
+ }): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { Ve33PoolInfoI } from '../types';
2
+ export default function PoolInfo({ poolInfo, isLoading, }: {
3
+ poolInfo?: Ve33PoolInfoI;
4
+ isLoading?: boolean;
5
+ }): JSX.Element;
@@ -0,0 +1,79 @@
1
+ import { getFetchVE33NonfungiblePositionManagerPositionsQueryOptions } from '@dodoex/dodo-contract-request';
2
+ import { Ve33PoolInfoI } from '../types';
3
+ export declare function useVe33V3Positions({ poolInfo, account, }: {
4
+ poolInfo?: Ve33PoolInfoI;
5
+ account?: string;
6
+ }): {
7
+ positionsQuery: {
8
+ isLoading: boolean;
9
+ refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<{
10
+ nonce: bigint;
11
+ operator: string;
12
+ token0: string;
13
+ token1: string;
14
+ tickSpacing: bigint;
15
+ tickLower: bigint;
16
+ tickUpper: bigint;
17
+ liquidity: bigint;
18
+ feeGrowthInside0LastX128: bigint;
19
+ feeGrowthInside1LastX128: bigint;
20
+ tokensOwed0: bigint;
21
+ tokensOwed1: bigint;
22
+ }, Error>>;
23
+ errorRefetch: (() => void) | undefined;
24
+ data: {
25
+ tokenId: number;
26
+ amount0: number;
27
+ amount1: number;
28
+ tickCurrent: number;
29
+ feeGrowthInside0LastX128: bigint;
30
+ feeGrowthInside1LastX128: bigint;
31
+ liquidity: bigint;
32
+ nonce: bigint;
33
+ operator: string;
34
+ tickLower: bigint;
35
+ tickUpper: bigint;
36
+ token0: string;
37
+ token1: string;
38
+ tokensOwed0: bigint;
39
+ tokensOwed1: bigint;
40
+ } | null;
41
+ }[];
42
+ fetchBalance: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
43
+ fetchPositions: import("@tanstack/react-query").UseQueryResult<{
44
+ nonce: bigint;
45
+ operator: string;
46
+ token0: string;
47
+ token1: string;
48
+ tickSpacing: bigint;
49
+ tickLower: bigint;
50
+ tickUpper: bigint;
51
+ liquidity: bigint;
52
+ feeGrowthInside0LastX128: bigint;
53
+ feeGrowthInside1LastX128: bigint;
54
+ tokensOwed0: bigint;
55
+ tokensOwed1: bigint;
56
+ }, Error>[];
57
+ fetchGlobalState: import("@tanstack/react-query").UseQueryResult<{
58
+ sqrtPriceX96: bigint;
59
+ tick: bigint;
60
+ observationIndex: bigint;
61
+ observationCardinality: bigint;
62
+ observationCardinalityNext: bigint;
63
+ unlocked: boolean;
64
+ }, Error>;
65
+ fetchStakedValues: import("@tanstack/react-query").UseQueryResult<bigint[], Error>;
66
+ };
67
+ export declare function convertPositionData(data: Awaited<ReturnType<ReturnType<typeof getFetchVE33NonfungiblePositionManagerPositionsQueryOptions>['queryFn']>> | undefined): {
68
+ feeGrowthInside0LastX128: bigint;
69
+ feeGrowthInside1LastX128: bigint;
70
+ liquidity: bigint;
71
+ nonce: bigint;
72
+ operator: string;
73
+ tickLower: bigint;
74
+ tickUpper: bigint;
75
+ token0: string;
76
+ token1: string;
77
+ tokensOwed0: bigint;
78
+ tokensOwed1: bigint;
79
+ } | null;
@@ -0,0 +1,13 @@
1
+ import { ChainId } from '@dodoex/api';
2
+ import { Ve33PoolInfoI, Ve33PoolOperateProps } from '../types';
3
+ export interface CardListProps {
4
+ chainId: ChainId;
5
+ poolList: Ve33PoolInfoI[];
6
+ usdValueChecked: boolean;
7
+ setOperatePool: (operate: Ve33PoolOperateProps | null) => void;
8
+ onClickPoolListRow: (id: string, chainId: ChainId) => void;
9
+ }
10
+ export declare const CardList: ({ poolList, ...props }: CardListProps) => JSX.Element;
11
+ export declare function CardItem({ item, chainId, usdValueChecked, setOperatePool, onClickPoolListRow, }: Partial<Omit<CardListProps, 'poolList'> & {
12
+ item?: Ve33PoolInfoI;
13
+ }>): JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { PoolOperateProps } from './Ve33V2PoolOperate';
2
+ export default function Ve33PoolOperateDialog(props: PoolOperateProps): JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { Ve33PoolInfoI } from './types';
2
+ export declare enum OperateType {
3
+ Stake = 1,
4
+ UnStake = 2
5
+ }
6
+ export default function Ve33StakeDialog({ poolInfo, tokenId, operateType: operateTypeProps, onClose, }: {
7
+ poolInfo?: Ve33PoolInfoI;
8
+ tokenId?: number;
9
+ operateType?: OperateType;
10
+ onClose: () => void;
11
+ }): JSX.Element;
@@ -1,7 +1,8 @@
1
1
  import { BoxProps } from '@dodoex/components';
2
- export declare function SliderPercentageCard({ disabled, value, onChange, sx, }: {
2
+ export declare function SliderPercentageCard({ disabled, value, onChange, sx, hideNumberInput, }: {
3
3
  disabled?: boolean;
4
4
  value: number;
5
5
  onChange: (val: number) => void;
6
6
  sx?: BoxProps['sx'];
7
+ hideNumberInput?: boolean;
7
8
  }): JSX.Element;
@@ -19,6 +19,8 @@ export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuot
19
19
  _reserve1: bigint;
20
20
  _blockTimestampLast: bigint;
21
21
  }, Error>;
22
+ baseLpToTokenProportion: BigNumber | undefined;
23
+ quoteLpToTokenProportion: BigNumber | undefined;
22
24
  userLp: BigNumber | undefined;
23
25
  totalLp: BigNumber | undefined;
24
26
  token0Reserve: BigNumber | undefined;
@@ -63,6 +65,8 @@ export declare function useLiquidityOperateAmount({ pool, maxBaseAmount, maxQuot
63
65
  _reserve1: bigint;
64
66
  _blockTimestampLast: bigint;
65
67
  }, Error>;
68
+ baseLpToTokenProportion: BigNumber | undefined;
69
+ quoteLpToTokenProportion: BigNumber | undefined;
66
70
  userLp: BigNumber | undefined;
67
71
  totalLp: BigNumber | undefined;
68
72
  token0Reserve: BigNumber | undefined;
@@ -17,6 +17,8 @@ export declare function useVe33V2BalanceInfo({ account, pool, }: {
17
17
  _reserve1: bigint;
18
18
  _blockTimestampLast: bigint;
19
19
  }, Error>;
20
+ baseLpToTokenProportion: BigNumber | undefined;
21
+ quoteLpToTokenProportion: BigNumber | undefined;
20
22
  userLp: BigNumber | undefined;
21
23
  totalLp: BigNumber | undefined;
22
24
  token0Reserve: BigNumber | undefined;
@@ -0,0 +1,15 @@
1
+ import { OperateTypeE, Ve33PoolInfoI } from '../types';
2
+ import { BoxProps } from '@dodoex/components';
3
+ export interface PoolOperateProps {
4
+ sx?: BoxProps['sx'];
5
+ pool?: Ve33PoolInfoI;
6
+ account?: string;
7
+ operate?: OperateTypeE;
8
+ errorRefetch?: () => void;
9
+ submittedBack?: () => void;
10
+ onClose?: () => void;
11
+ }
12
+ export default function Ve33V2PoolOperateDialog({ modal, ...props }: PoolOperateProps & {
13
+ modal?: boolean;
14
+ }): JSX.Element;
15
+ export declare function Ve33V2PoolOperate({ sx, pool, operate, account, errorRefetch, submittedBack, onClose, }: PoolOperateProps): JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { Ve33PoolInfoI } from '../types';
2
+ export default function Ve33V3AddLiquidity({ pool, }: {
3
+ pool: Ve33PoolInfoI | undefined;
4
+ }): JSX.Element;
@@ -0,0 +1,4 @@
1
+ export default function RangeBadge({ removed, inRange, }: {
2
+ removed?: boolean;
3
+ inRange?: boolean;
4
+ }): JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { ChainId } from '@dodoex/api';
2
+ export interface ClaimButtonProps {
3
+ chainId: ChainId;
4
+ disabled: boolean;
5
+ isLoading: boolean;
6
+ border?: boolean;
7
+ onConfirm: () => void;
8
+ }
9
+ export declare const ClaimButton: ({ chainId, disabled, isLoading, border, onConfirm, }: ClaimButtonProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ export interface InRangeDotProps {
2
+ outOfRange: boolean;
3
+ }
4
+ export declare const InRangeDot: ({ outOfRange }: InRangeDotProps) => JSX.Element;
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ interface StepCounterProps {
3
+ value: string;
4
+ onUserInput: (value: string) => void;
5
+ decrement: () => string;
6
+ increment: () => string;
7
+ decrementDisabled?: boolean;
8
+ incrementDisabled?: boolean;
9
+ label?: string;
10
+ locked?: boolean;
11
+ title: ReactNode;
12
+ tokenA?: string;
13
+ tokenB?: string;
14
+ border?: boolean;
15
+ }
16
+ declare const StepCounter: ({ value, decrement, increment, decrementDisabled, incrementDisabled, locked, onUserInput, title, tokenA, tokenB, border, }: StepCounterProps) => JSX.Element;
17
+ export default StepCounter;
@@ -0,0 +1,10 @@
1
+ import { ScaleLinear } from 'd3';
2
+ import { ChartEntry } from './types';
3
+ export declare const Area: ({ series, xScale, yScale, xValue, yValue, fill, }: {
4
+ series: ChartEntry[];
5
+ xScale: ScaleLinear<number, number>;
6
+ yScale: ScaleLinear<number, number>;
7
+ xValue: (d: ChartEntry) => number;
8
+ yValue: (d: ChartEntry) => number;
9
+ fill?: string;
10
+ }) => JSX.Element;
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1,13 @@
1
+ import { ScaleLinear } from 'd3';
2
+ export declare const Brush: ({ id, xScale, interactive, brushLabelValue, brushExtent, setBrushExtent, innerWidth, innerHeight, westHandleColor, eastHandleColor, }: {
3
+ id: string;
4
+ xScale: ScaleLinear<number, number>;
5
+ interactive: boolean;
6
+ brushLabelValue: (d: "w" | "e", x: number) => string;
7
+ brushExtent: [number, number];
8
+ setBrushExtent: (extent: [number, number], mode: string | undefined) => void;
9
+ innerWidth: number;
10
+ innerHeight: number;
11
+ westHandleColor: string;
12
+ eastHandleColor: string;
13
+ }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { LiquidityChartRangeInputProps } from './types';
2
+ export declare function Chart({ id, data: { series, current }, ticksAtLimit, styles, dimensions: { width, height }, margins, interactive, brushDomain, brushLabels, onBrushDomainChange, zoomLevels, }: LiquidityChartRangeInputProps): JSX.Element;
@@ -0,0 +1,6 @@
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;
@@ -0,0 +1,12 @@
1
+ import { ScaleLinear, ZoomTransform } from 'd3';
2
+ import { ZoomLevels } from './types';
3
+ export default function Zoom({ svg, xScale, setZoom, width, height, resetBrush, showResetButton, zoomLevels, }: {
4
+ svg: SVGElement | null;
5
+ xScale: ScaleLinear<number, number>;
6
+ setZoom: (transform: ZoomTransform) => void;
7
+ width: number;
8
+ height: number;
9
+ resetBrush: () => void;
10
+ showResetButton: boolean;
11
+ zoomLevels: ZoomLevels;
12
+ }): JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { Bound } from '../../types';
2
+ import { TokenInfo } from '../../../../../hooks/Token';
3
+ import { Price } from '../../../../../utils/fractions';
4
+ import { usePoolActiveLiquidityChartData } from '../../hooks/usePoolActiveLiquidityChartData';
5
+ export default function LiquidityChartRangeInput({ currencyA, currencyB, isSorted, ticksAtLimit, price, priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, interactive, chartData, }: {
6
+ currencyA?: TokenInfo;
7
+ currencyB?: TokenInfo;
8
+ isSorted: boolean;
9
+ ticksAtLimit: {
10
+ [bound in Bound]?: boolean | undefined;
11
+ };
12
+ price?: number;
13
+ priceLower?: Price;
14
+ priceUpper?: Price;
15
+ onLeftRangeInput: (typedValue: string) => void;
16
+ onRightRangeInput: (typedValue: string) => void;
17
+ interactive: boolean;
18
+ chartData: ReturnType<typeof usePoolActiveLiquidityChartData>;
19
+ }): JSX.Element | null;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Generates an SVG path for the east brush handle.
3
+ * Apply `scale(-1, 1)` to generate west brush handle.
4
+ *
5
+ * |```````\
6
+ * | | | |
7
+ * |______/
8
+ * |
9
+ * |
10
+ * |
11
+ * |
12
+ * |
13
+ *
14
+ * https://medium.com/@dennismphil/one-side-rounded-rectangle-using-svg-fb31cf318d90
15
+ */
16
+ export declare const brushHandlePath: (height: number) => string;
17
+ export declare const brushHandleAccentPath: () => string;
18
+ export declare const OffScreenHandle: ({ color, size, margin, }: {
19
+ color: string;
20
+ size?: number;
21
+ margin?: number;
22
+ }) => JSX.Element;
@@ -0,0 +1,50 @@
1
+ import { Bound } from '../../types';
2
+ export interface ChartEntry {
3
+ activeLiquidity: number;
4
+ price0: number;
5
+ }
6
+ interface Dimensions {
7
+ width: number;
8
+ height: number;
9
+ }
10
+ interface Margins {
11
+ top: number;
12
+ right: number;
13
+ bottom: number;
14
+ left: number;
15
+ }
16
+ export interface ZoomLevels {
17
+ initialMin: number;
18
+ initialMax: number;
19
+ min: number;
20
+ max: number;
21
+ }
22
+ export interface LiquidityChartRangeInputProps {
23
+ id?: string;
24
+ data: {
25
+ series: ChartEntry[];
26
+ current: number;
27
+ };
28
+ ticksAtLimit: {
29
+ [bound in Bound]?: boolean | undefined;
30
+ };
31
+ styles: {
32
+ area: {
33
+ selection: string;
34
+ };
35
+ brush: {
36
+ handle: {
37
+ west: string;
38
+ east: string;
39
+ };
40
+ };
41
+ };
42
+ dimensions: Dimensions;
43
+ margins: Margins;
44
+ interactive?: boolean;
45
+ brushLabels: (d: 'w' | 'e', x: number) => string;
46
+ brushDomain?: [number, number];
47
+ onBrushDomainChange: (domain: [number, number], mode: string | undefined) => void;
48
+ zoomLevels: ZoomLevels;
49
+ }
50
+ export {};
@@ -0,0 +1 @@
1
+ export default function usePrevious<T>(value: T): T | undefined;
@@ -0,0 +1,14 @@
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
+ };
@@ -0,0 +1,10 @@
1
+ import { BoxProps } from '@dodoex/components';
2
+ import { TokenInfo } from '../../../../hooks/Token';
3
+ export default function MyLiquidity({ border, token0, token1, amount0, amount1, sx, }: {
4
+ border?: boolean;
5
+ token0: TokenInfo | undefined;
6
+ token1: TokenInfo | undefined;
7
+ amount0: string | undefined;
8
+ amount1: string | undefined;
9
+ sx?: BoxProps['sx'];
10
+ }): JSX.Element;
@@ -0,0 +1,8 @@
1
+ import { Ve33PoolInfoI } from '../../types';
2
+ export interface AMMV3PositionManageProps {
3
+ poolInfo?: Ve33PoolInfoI;
4
+ tokenId: string | number | undefined;
5
+ onClose: (() => void) | undefined;
6
+ dialog?: boolean;
7
+ }
8
+ export default function PositionManage({ dialog, ...props }: AMMV3PositionManageProps): JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ import { TokenInfo } from '../../../../hooks/Token';
3
+ export declare const PositionPreview: ({ token0, token1, liquidity, amount0, amount1, price, tickLower, tickUpper, title, inRange, }: {
4
+ token0: TokenInfo | undefined;
5
+ token1: TokenInfo | undefined;
6
+ liquidity: number | string | undefined;
7
+ amount0: string | undefined;
8
+ amount1: string | undefined;
9
+ title?: ReactNode;
10
+ price: string | undefined;
11
+ tickLower: number | undefined;
12
+ tickUpper: number | undefined;
13
+ inRange: boolean;
14
+ }) => JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { TokenInfo } from '../../../../hooks/Token';
3
+ export declare const PositionSelectedRangePreview: ({ token0, token1, token0Price, tickLower, tickUpper, title, border, }: {
4
+ token0: TokenInfo;
5
+ token1: TokenInfo;
6
+ token0Price: string | undefined;
7
+ tickLower: number | undefined;
8
+ tickUpper: number | undefined;
9
+ title?: ReactNode;
10
+ border?: boolean;
11
+ }) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { PriceRangeRatioSelectProps } from '../hooks/usePriceRangeRatioSelect';
2
+ export default function RangeRatioSelect({ totalApr, currentPrice, tickSpacing, priceLower, priceUpper, token0, token1, tickSpaceLimits, onLeftRangeInput, onRightRangeInput, handleSetFullRange, }: PriceRangeRatioSelectProps): JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { Bound } from '../types';
2
+ import { TokenInfo } from '../../../../hooks/Token';
3
+ import { Price } from '../../../../utils/fractions';
4
+ export interface RangeSelectorProps {
5
+ priceLower?: Price;
6
+ priceUpper?: Price;
7
+ getDecrementLower: () => string;
8
+ getIncrementLower: () => string;
9
+ getDecrementUpper: () => string;
10
+ getIncrementUpper: () => string;
11
+ onLeftRangeInput: (typedValue: string) => void;
12
+ onRightRangeInput: (typedValue: string) => void;
13
+ tokenA?: TokenInfo | null;
14
+ tokenB?: TokenInfo | null;
15
+ ticksAtLimit: {
16
+ [bound in Bound]?: boolean | undefined;
17
+ };
18
+ isSorted: boolean;
19
+ border?: boolean;
20
+ }
21
+ export declare const RangeSelector: ({ priceLower, priceUpper, onLeftRangeInput, onRightRangeInput, getDecrementLower, getIncrementLower, getDecrementUpper, getIncrementUpper, tokenA, tokenB, ticksAtLimit, isSorted, border, }: RangeSelectorProps) => JSX.Element;
@@ -0,0 +1,9 @@
1
+ import { BoxProps } from '@dodoex/components';
2
+ import { TokenInfo } from '../../../../hooks/Token';
3
+ export interface RateToggleProps {
4
+ baseToken: TokenInfo | undefined;
5
+ quoteToken: TokenInfo | undefined;
6
+ handleRateToggle: () => void;
7
+ sx?: BoxProps['sx'];
8
+ }
9
+ export declare const RateToggle: ({ baseToken, quoteToken, handleRateToggle, sx, }: RateToggleProps) => JSX.Element;
@@ -0,0 +1,12 @@
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
+ removeText?: React.ReactNode;
11
+ }
12
+ export declare const RemoveButton: ({ chainId, disabled, removed, isLoading, error, onConfirm, border, removeText, }: ButtonsProps) => JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { TokenInfo } from '../../../../hooks/Token';
2
+ export interface ReviewModalProps {
3
+ on: boolean;
4
+ onClose: () => void;
5
+ onConfirm: () => void;
6
+ loading?: boolean;
7
+ token0: TokenInfo | undefined;
8
+ token1: TokenInfo | undefined;
9
+ liquidity: number | string | undefined;
10
+ amount0: string | undefined;
11
+ amount1: string | undefined;
12
+ title?: React.ReactNode;
13
+ price: string | undefined;
14
+ tickLower: number | undefined;
15
+ tickUpper: number | undefined;
16
+ inRange: boolean;
17
+ }
18
+ export declare const ReviewModal: ({ on, onClose, onConfirm, loading, token0, token1, liquidity, amount0, amount1, price, tickLower, tickUpper, title, inRange, }: ReviewModalProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { TokenInfo } from '../../../../hooks/Token';
2
+ export default function TokenAndEtherscan({ token }: {
3
+ token: TokenInfo;
4
+ }): JSX.Element;
@@ -0,0 +1,7 @@
1
+ import { Actions, StateProps } from '../reducer';
2
+ export interface TokenPairSelectProps {
3
+ baseToken: StateProps['baseToken'];
4
+ quoteToken: StateProps['quoteToken'];
5
+ dispatch: React.Dispatch<Actions>;
6
+ }
7
+ export declare const TokenPairSelect: ({ baseToken, quoteToken, dispatch, }: TokenPairSelectProps) => JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { FeeAmount } from '../sdks/v3-sdk/constants';
2
+ export declare const FEE_AMOUNT_DETAIL: Record<FeeAmount, {
3
+ label: string;
4
+ }>;
@@ -0,0 +1,56 @@
1
+ import { BoxProps } from '@dodoex/components';
2
+ declare const gapValues: {
3
+ xs: string;
4
+ sm: string;
5
+ md: string;
6
+ lg: string;
7
+ xl: string;
8
+ };
9
+ export type Gap = keyof typeof gapValues;
10
+ export interface YellowCardProps {
11
+ children?: React.ReactNode;
12
+ }
13
+ export declare const Card: ({ children, sx, }: {
14
+ sx?: BoxProps["sx"];
15
+ children?: React.ReactNode;
16
+ }) => JSX.Element;
17
+ export declare const LightCard: ({ children, border, sx, }: {
18
+ sx?: BoxProps["sx"];
19
+ border?: boolean;
20
+ children?: React.ReactNode;
21
+ }) => JSX.Element;
22
+ export declare const YellowCard: ({ children }: YellowCardProps) => JSX.Element;
23
+ export declare function ColumnCenter({ gap, flex, children, style, }: {
24
+ gap?: Gap | string;
25
+ flex?: string;
26
+ children: React.ReactNode;
27
+ style?: BoxProps['sx'];
28
+ }): JSX.Element;
29
+ export declare function AutoColumn({ gap, justify, grow, children, style, }: {
30
+ gap?: Gap | string;
31
+ justify?: 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'space-between';
32
+ grow?: true;
33
+ children: React.ReactNode;
34
+ style?: BoxProps['sx'];
35
+ }): JSX.Element;
36
+ export declare function Row({ gap, children, sx, }: {
37
+ gap?: Gap | string;
38
+ children: React.ReactNode;
39
+ sx?: BoxProps['sx'];
40
+ }): JSX.Element;
41
+ export declare function RowBetween({ children, style, }: {
42
+ children: React.ReactNode;
43
+ style?: BoxProps['sx'];
44
+ }): JSX.Element;
45
+ export declare function RowFixed({ gap, justify, children, sx, }: {
46
+ gap?: string;
47
+ justify?: string;
48
+ children: React.ReactNode;
49
+ sx?: BoxProps['sx'];
50
+ }): JSX.Element;
51
+ export declare function DynamicSection({ children, disabled, sx, }: {
52
+ children: React.ReactNode;
53
+ disabled?: boolean;
54
+ sx?: BoxProps['sx'];
55
+ }): JSX.Element;
56
+ export {};
@@ -0,0 +1,17 @@
1
+ import JSBI from 'jsbi';
2
+ import { Percent } from '../../../../utils/fractions';
3
+ export declare const ZERO_ADDRESS = "0x0000000000000000000000000000000000000000";
4
+ export declare const DEFAULT_DEADLINE_FROM_NOW: number;
5
+ export declare const L2_DEADLINE_FROM_NOW: number;
6
+ export declare const DEFAULT_TXN_DISMISS_MS = 10000;
7
+ export declare const L2_TXN_DISMISS_MS = 5000;
8
+ export declare const BIG_INT_ZERO: JSBI;
9
+ export declare const BIPS_BASE = 10000;
10
+ export declare const ONE_BIPS: Percent;
11
+ export declare const ALLOWED_PRICE_IMPACT_LOW: Percent;
12
+ export declare const ALLOWED_PRICE_IMPACT_MEDIUM: Percent;
13
+ export declare const ALLOWED_PRICE_IMPACT_HIGH: Percent;
14
+ export declare const PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN: Percent;
15
+ export declare const BLOCKED_PRICE_IMPACT_NON_EXPERT: Percent;
16
+ export declare const ZERO_PERCENT: Percent;
17
+ export declare const ONE_HUNDRED_PERCENT: Percent;
@@ -0,0 +1,15 @@
1
+ import { useVe33V3Pair } from './useVe33V3Pair';
2
+ export declare function useAddVe33V3Liquidity(): import("@tanstack/react-query").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult | undefined, Error, {
3
+ recipient?: string;
4
+ pool?: ReturnType<typeof useVe33V3Pair>;
5
+ tokenId?: number | string;
6
+ amount0: string;
7
+ amount1: string;
8
+ sqrtPriceX96: string;
9
+ tickSpacing: number;
10
+ tickLower: number;
11
+ tickUpper: number;
12
+ amount0Min: string;
13
+ amount1Min: string;
14
+ successBack?: () => void;
15
+ }, unknown>;