@dodoex/widgets 2.6.6 → 3.0.0-beta.0

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 (405) hide show
  1. package/dist/b3f16b2626f03378.svg +10 -0
  2. package/dist/cjs/b3f16b2626f03378.svg +10 -0
  3. package/dist/cjs/helper-889c5e9a.cjs +1 -0
  4. package/dist/cjs/index-256d5f78.cjs +12 -0
  5. package/dist/cjs/index-4190bae6.cjs +58 -0
  6. package/dist/cjs/index-457c65f3.cjs +78 -0
  7. package/dist/cjs/index.cjs +1 -45
  8. package/dist/cjs/locales/en-US.js +1 -1
  9. package/dist/cjs/locales/zh-CN.js +1 -1
  10. package/dist/cjs/lottie-edc8e0b8.cjs +1 -0
  11. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +1 -2
  12. package/dist/cjs/src/components/Confirm.d.ts +15 -0
  13. package/dist/cjs/src/components/ConnectWallet/NeedConnectButton.d.ts +2 -1
  14. package/dist/cjs/src/components/GoBack.d.ts +6 -0
  15. package/dist/cjs/src/components/HowItWorks.d.ts +11 -0
  16. package/dist/cjs/src/components/RiskDialog.d.ts +7 -0
  17. package/dist/cjs/src/components/Swap/components/ConnectWallet/index.d.ts +1 -3
  18. package/dist/cjs/src/components/Swap/components/Dialog.d.ts +2 -1
  19. package/dist/cjs/src/components/Swap/components/TokenCard/BalanceText.d.ts +4 -2
  20. package/dist/cjs/src/components/Swap/components/TokenCard/NumberInput.d.ts +12 -9
  21. package/dist/cjs/src/components/Swap/components/TokenCard/PercentageSelectButtonGroup.d.ts +7 -0
  22. package/dist/cjs/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +4 -3
  23. package/dist/cjs/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +6 -1
  24. package/dist/cjs/src/components/Swap/components/TokenCard/index.d.ts +16 -3
  25. package/dist/cjs/src/components/Swap/index.d.ts +1 -3
  26. package/dist/cjs/src/components/Token/TokenItem.d.ts +9 -0
  27. package/dist/cjs/src/components/TokenLogo.d.ts +3 -1
  28. package/dist/cjs/src/components/TokenLogoPair.d.ts +3 -2
  29. package/dist/cjs/src/components/TokenPicker/TokenItem.d.ts +3 -1
  30. package/dist/cjs/src/components/TokenPicker/index.d.ts +8 -3
  31. package/dist/cjs/src/components/TokenStatusButton.d.ts +7 -0
  32. package/dist/cjs/src/components/Widget/index.d.ts +3 -1
  33. package/dist/cjs/src/components/WidgetConfirm.d.ts +15 -0
  34. package/dist/cjs/src/components/WidgetContainer.d.ts +3 -0
  35. package/dist/cjs/src/components/WidgetDialog.d.ts +15 -0
  36. package/dist/cjs/src/components/chart/components/BaseButton.d.ts +5 -0
  37. package/dist/cjs/src/components/chart/components/Display.d.ts +9 -0
  38. package/dist/cjs/src/components/chart/components/Input.d.ts +7 -0
  39. package/dist/cjs/src/components/chart/components/NumberInput.d.ts +6 -0
  40. package/dist/cjs/src/components/chart/components/TogglePriceIcon.d.ts +8 -0
  41. package/dist/cjs/src/components/chart/components/TokenLogo.d.ts +5 -0
  42. package/dist/cjs/src/components/chart/depth-chart/DepthChartKonva.d.ts +30 -0
  43. package/dist/cjs/src/components/chart/depth-chart/__tests__/utils.test.d.ts +1 -0
  44. package/dist/cjs/src/components/chart/depth-chart/helper.d.ts +125 -0
  45. package/dist/cjs/src/components/chart/depth-chart/index.d.ts +18 -0
  46. package/dist/cjs/src/components/chart/depth-chart/index.styled.d.ts +29 -0
  47. package/dist/cjs/src/components/chart/depth-chart/useDepthLinePoints.d.ts +21 -0
  48. package/dist/cjs/src/components/chart/depth-chart/useGridLinePoints.d.ts +9 -0
  49. package/dist/cjs/src/components/chart/depth-chart/useHorizontalLabelPoints.d.ts +15 -0
  50. package/dist/cjs/src/components/chart/depth-chart/utils.d.ts +19 -0
  51. package/dist/cjs/src/components/chart/depth-chart-v2/index.d.ts +10 -0
  52. package/dist/cjs/src/components/chart/depth-chart-v2/index.styled.d.ts +15 -0
  53. package/dist/cjs/src/components/chart/hooks/usePreventWheel.d.ts +9 -0
  54. package/dist/cjs/src/components/chart/i18n.d.ts +1 -0
  55. package/dist/cjs/src/components/chart/liquidity-chart/LiquidityChartKonva.d.ts +28 -0
  56. package/dist/cjs/src/components/chart/liquidity-chart/__tests__/helper.test.d.ts +1 -0
  57. package/dist/cjs/src/components/chart/liquidity-chart/helper.d.ts +47 -0
  58. package/dist/cjs/src/components/chart/liquidity-chart/index.d.ts +17 -0
  59. package/dist/cjs/src/components/chart/liquidity-chart/index.styled.d.ts +9 -0
  60. package/dist/cjs/src/components/chart/liquidity-chart/useGridLine.d.ts +8 -0
  61. package/dist/cjs/src/components/chart/liquidity-chart/useHorizontalLabel.d.ts +10 -0
  62. package/dist/cjs/src/components/chart/liquidity-chart/useLiquidityLine.d.ts +18 -0
  63. package/dist/cjs/src/components/chart/liquidity-chart/useMiddleLine.d.ts +6 -0
  64. package/dist/cjs/src/components/chart/liquidity-chart/usePoints.d.ts +39 -0
  65. package/dist/cjs/src/components/chart/utils.d.ts +3 -0
  66. package/dist/cjs/src/constants/api.d.ts +5 -0
  67. package/dist/cjs/src/constants/chainList.d.ts +1 -0
  68. package/dist/cjs/src/constants/chains.d.ts +24 -31
  69. package/dist/cjs/src/constants/localstorage.d.ts +2 -0
  70. package/dist/cjs/src/constants/pool.d.ts +5 -0
  71. package/dist/cjs/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +2 -1
  72. package/dist/cjs/src/hooks/Submission/types.d.ts +31 -2
  73. package/dist/cjs/src/hooks/Submission/useExecution.d.ts +3 -2
  74. package/dist/cjs/src/hooks/Swap/useFetchFiatPrice.d.ts +3 -3
  75. package/dist/cjs/src/hooks/Token/useTokenList.d.ts +9 -3
  76. package/dist/cjs/src/hooks/Token/useTokenListDefaultToken.d.ts +30 -0
  77. package/dist/cjs/src/hooks/Token/useTokenListFetchBalance.d.ts +5 -2
  78. package/dist/cjs/src/hooks/Token/useTokenStatus.d.ts +4 -1
  79. package/dist/cjs/src/hooks/contract/index.d.ts +0 -2
  80. package/dist/cjs/src/hooks/contract/useFetchETHBalance.d.ts +21 -1
  81. package/dist/cjs/src/hooks/contract/useFetchTokens.d.ts +4 -10
  82. package/dist/cjs/src/hooks/contract/wallet.d.ts +1 -1
  83. package/dist/cjs/src/index.d.ts +6 -0
  84. package/dist/cjs/src/providers/GlobalConfigContext.d.ts +14 -0
  85. package/dist/cjs/src/router/index.d.ts +2 -0
  86. package/dist/cjs/src/router/types.d.ts +17 -4
  87. package/dist/cjs/src/store/actions/token.d.ts +1 -8
  88. package/dist/cjs/src/store/actions/wallet.d.ts +2 -0
  89. package/dist/cjs/src/store/index.d.ts +7 -1
  90. package/dist/cjs/src/store/reducers/token.d.ts +0 -7
  91. package/dist/cjs/src/store/reducers/wallet.d.ts +4 -0
  92. package/dist/cjs/src/store/selectors/token.d.ts +0 -10
  93. package/dist/cjs/src/store/selectors/wallet.d.ts +5 -2
  94. package/dist/cjs/src/utils/address.d.ts +2 -2
  95. package/dist/cjs/src/utils/bytes.d.ts +3 -0
  96. package/dist/cjs/src/utils/formatter.d.ts +24 -1
  97. package/dist/cjs/src/utils/token.d.ts +21 -0
  98. package/dist/cjs/src/widgets/MiningWidget/LpTokenMiningOperate/index.d.ts +7 -0
  99. package/dist/cjs/src/widgets/MiningWidget/OperateArea/AssociateMine.d.ts +20 -0
  100. package/dist/cjs/src/widgets/MiningWidget/OperateArea/ClaimButton.d.ts +5 -0
  101. package/dist/cjs/src/widgets/MiningWidget/OperateArea/GetLpLink.d.ts +5 -0
  102. package/dist/cjs/src/widgets/MiningWidget/OperateArea/RewardListCard.d.ts +8 -0
  103. package/dist/cjs/src/widgets/MiningWidget/OperateArea/StakeButton.d.ts +9 -0
  104. package/dist/cjs/src/widgets/MiningWidget/OperateArea/UnstakeButton.d.ts +8 -0
  105. package/dist/cjs/src/widgets/MiningWidget/OperateArea/index.d.ts +13 -0
  106. package/dist/cjs/src/widgets/MiningWidget/helper.d.ts +2 -0
  107. package/dist/cjs/src/widgets/MiningWidget/hooks/useClaimMiningSubmit.d.ts +4 -0
  108. package/dist/cjs/src/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +17 -0
  109. package/dist/cjs/src/widgets/MiningWidget/hooks/useStakeMiningSubmit.d.ts +5 -0
  110. package/dist/cjs/src/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +13 -0
  111. package/dist/cjs/src/widgets/MiningWidget/hooks/useUnstakeMiningSubmit.d.ts +5 -0
  112. package/dist/cjs/src/widgets/MiningWidget/types.d.ts +58 -0
  113. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.d.ts +10 -0
  114. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/DepthAndLiquidityChart.d.ts +11 -0
  115. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/DepthChartWrapper.d.ts +11 -0
  116. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/EmptyChart.d.ts +5 -0
  117. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +6 -0
  118. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/FixedInitPriceConfirm.d.ts +6 -0
  119. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +13 -0
  120. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/RadioButton.d.ts +12 -0
  121. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/RadioButtonIcon.d.ts +4 -0
  122. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/RadioButtonTag.d.ts +6 -0
  123. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/SectionTitle.d.ts +7 -0
  124. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/SelectAndInput.d.ts +8 -0
  125. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/StepTitle.d.ts +5 -0
  126. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +6 -0
  127. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/contract/useCreatePoolSubmit.d.ts +14 -0
  128. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +26 -0
  129. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +6 -0
  130. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useFeeRateList.d.ts +13 -0
  131. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useSlippageCoefficientList.d.ts +8 -0
  132. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useValidation.d.ts +4 -0
  133. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +5 -0
  134. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/index.d.ts +2 -0
  135. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.d.ts +6 -0
  136. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/FeeRateSetting.d.ts +7 -0
  137. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +12 -0
  138. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/SlippageCoefficientSetting.d.ts +8 -0
  139. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +6 -0
  140. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/reducer.d.ts +78 -0
  141. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/types.d.ts +35 -0
  142. package/dist/cjs/src/widgets/PoolWidget/PoolCreate/utils.d.ts +18 -0
  143. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/BaseQuotePie.d.ts +24 -0
  144. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/ChartInfo.d.ts +6 -0
  145. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/LiquidityProvidersTable.d.ts +5 -0
  146. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/ParametersTable.d.ts +15 -0
  147. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/SwapsTable.d.ts +6 -0
  148. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +5 -0
  149. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +5 -0
  150. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/StatBarChart.d.ts +10 -0
  151. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/TitleInfo.d.ts +6 -0
  152. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +5 -0
  153. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +159 -0
  154. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +290 -0
  155. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +166 -0
  156. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +245 -0
  157. package/dist/cjs/src/widgets/PoolWidget/PoolDetail/index.d.ts +2 -0
  158. package/dist/cjs/src/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +12 -0
  159. package/dist/cjs/src/widgets/PoolWidget/PoolList/MyCreated.d.ts +11 -0
  160. package/dist/cjs/src/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +11 -0
  161. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/AddingOrRemovingBtn.d.ts +5 -0
  162. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/FilterAddressTags.d.ts +8 -0
  163. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.d.ts +8 -0
  164. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -0
  165. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/LoadingCard.d.ts +5 -0
  166. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/PoolApyTooltip.d.ts +18 -0
  167. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/TokenAndPoolFilter.d.ts +9 -0
  168. package/dist/cjs/src/widgets/PoolWidget/PoolList/components/TokenListPoolItem.d.ts +6 -0
  169. package/dist/cjs/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +6 -0
  170. package/dist/cjs/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +48 -0
  171. package/dist/cjs/src/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +15 -0
  172. package/dist/cjs/src/widgets/PoolWidget/PoolList/index.d.ts +2 -0
  173. package/dist/cjs/src/widgets/PoolWidget/PoolModify/SectionTitle.d.ts +4 -0
  174. package/dist/cjs/src/widgets/PoolWidget/PoolModify/index.d.ts +2 -0
  175. package/dist/cjs/src/widgets/PoolWidget/PoolModify/operate-widgets/BottomButtonGroup.d.ts +8 -0
  176. package/dist/cjs/src/widgets/PoolWidget/PoolModify/operate-widgets/FeeRateSetting.d.ts +7 -0
  177. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +3 -2
  178. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -1
  179. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +9 -0
  180. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/ComparePrice.d.ts +9 -0
  181. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/LiquidityInfo.d.ts +10 -0
  182. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/OperateBtn.d.ts +6 -0
  183. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +8 -0
  184. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/SliderPercentageCard.d.ts +8 -0
  185. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +18 -0
  186. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/components/TokenList.d.ts +12 -0
  187. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useCheckToken.d.ts +13 -0
  188. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useComparePrice.d.ts +19 -0
  189. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +4 -2
  190. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePercentageRemove.d.ts +26 -0
  191. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +1 -1
  192. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +3 -1
  193. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +33 -0
  194. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/index.d.ts +9 -3
  195. package/dist/cjs/src/widgets/PoolWidget/PoolOperate/types.d.ts +0 -2
  196. package/dist/cjs/src/widgets/PoolWidget/hooks/contract/getModifyDPPPoolParams.d.ts +86 -0
  197. package/dist/cjs/src/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +22 -0
  198. package/dist/cjs/src/widgets/PoolWidget/hooks/contract/useOperateLiquidity.d.ts +36 -0
  199. package/dist/cjs/src/widgets/PoolWidget/hooks/contract/useWithdrawInfo.d.ts +33 -0
  200. package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +8 -3
  201. package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolDetail.d.ts +341 -0
  202. package/dist/cjs/src/widgets/PoolWidget/hooks/usePoolTypeTag.d.ts +16 -0
  203. package/dist/cjs/src/widgets/PoolWidget/utils.d.ts +4 -7
  204. package/dist/helper-7cc29594.js +1 -0
  205. package/dist/index-ae19eed4.js +12 -0
  206. package/dist/index-d9d9a2cd.js +78 -0
  207. package/dist/index-db2c9b8f.js +58 -0
  208. package/dist/index.js +1 -45
  209. package/dist/locales/en-US.js +1 -1
  210. package/dist/locales/zh-CN.js +1 -1
  211. package/dist/lottie-f76894b7.js +1 -0
  212. package/dist/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +1 -2
  213. package/dist/src/components/Confirm.d.ts +15 -0
  214. package/dist/src/components/ConnectWallet/NeedConnectButton.d.ts +2 -1
  215. package/dist/src/components/GoBack.d.ts +6 -0
  216. package/dist/src/components/HowItWorks.d.ts +11 -0
  217. package/dist/src/components/RiskDialog.d.ts +7 -0
  218. package/dist/src/components/Swap/components/ConnectWallet/index.d.ts +1 -3
  219. package/dist/src/components/Swap/components/Dialog.d.ts +2 -1
  220. package/dist/src/components/Swap/components/TokenCard/BalanceText.d.ts +4 -2
  221. package/dist/src/components/Swap/components/TokenCard/NumberInput.d.ts +12 -9
  222. package/dist/src/components/Swap/components/TokenCard/PercentageSelectButtonGroup.d.ts +7 -0
  223. package/dist/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +4 -3
  224. package/dist/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +6 -1
  225. package/dist/src/components/Swap/components/TokenCard/index.d.ts +16 -3
  226. package/dist/src/components/Swap/index.d.ts +1 -3
  227. package/dist/src/components/Token/TokenItem.d.ts +9 -0
  228. package/dist/src/components/TokenLogo.d.ts +3 -1
  229. package/dist/src/components/TokenLogoPair.d.ts +3 -2
  230. package/dist/src/components/TokenPicker/TokenItem.d.ts +3 -1
  231. package/dist/src/components/TokenPicker/index.d.ts +8 -3
  232. package/dist/src/components/TokenStatusButton.d.ts +7 -0
  233. package/dist/src/components/Widget/index.d.ts +3 -1
  234. package/dist/src/components/WidgetConfirm.d.ts +15 -0
  235. package/dist/src/components/WidgetContainer.d.ts +3 -0
  236. package/dist/src/components/WidgetDialog.d.ts +15 -0
  237. package/dist/src/components/chart/components/BaseButton.d.ts +5 -0
  238. package/dist/src/components/chart/components/Display.d.ts +9 -0
  239. package/dist/src/components/chart/components/Input.d.ts +7 -0
  240. package/dist/src/components/chart/components/NumberInput.d.ts +6 -0
  241. package/dist/src/components/chart/components/TogglePriceIcon.d.ts +8 -0
  242. package/dist/src/components/chart/components/TokenLogo.d.ts +5 -0
  243. package/dist/src/components/chart/depth-chart/DepthChartKonva.d.ts +30 -0
  244. package/dist/src/components/chart/depth-chart/__tests__/utils.test.d.ts +1 -0
  245. package/dist/src/components/chart/depth-chart/helper.d.ts +125 -0
  246. package/dist/src/components/chart/depth-chart/index.d.ts +18 -0
  247. package/dist/src/components/chart/depth-chart/index.styled.d.ts +29 -0
  248. package/dist/src/components/chart/depth-chart/useDepthLinePoints.d.ts +21 -0
  249. package/dist/src/components/chart/depth-chart/useGridLinePoints.d.ts +9 -0
  250. package/dist/src/components/chart/depth-chart/useHorizontalLabelPoints.d.ts +15 -0
  251. package/dist/src/components/chart/depth-chart/utils.d.ts +19 -0
  252. package/dist/src/components/chart/depth-chart-v2/index.d.ts +10 -0
  253. package/dist/src/components/chart/depth-chart-v2/index.styled.d.ts +15 -0
  254. package/dist/src/components/chart/hooks/usePreventWheel.d.ts +9 -0
  255. package/dist/src/components/chart/i18n.d.ts +1 -0
  256. package/dist/src/components/chart/liquidity-chart/LiquidityChartKonva.d.ts +28 -0
  257. package/dist/src/components/chart/liquidity-chart/__tests__/helper.test.d.ts +1 -0
  258. package/dist/src/components/chart/liquidity-chart/helper.d.ts +47 -0
  259. package/dist/src/components/chart/liquidity-chart/index.d.ts +17 -0
  260. package/dist/src/components/chart/liquidity-chart/index.styled.d.ts +9 -0
  261. package/dist/src/components/chart/liquidity-chart/useGridLine.d.ts +8 -0
  262. package/dist/src/components/chart/liquidity-chart/useHorizontalLabel.d.ts +10 -0
  263. package/dist/src/components/chart/liquidity-chart/useLiquidityLine.d.ts +18 -0
  264. package/dist/src/components/chart/liquidity-chart/useMiddleLine.d.ts +6 -0
  265. package/dist/src/components/chart/liquidity-chart/usePoints.d.ts +39 -0
  266. package/dist/src/components/chart/utils.d.ts +3 -0
  267. package/dist/src/constants/api.d.ts +5 -0
  268. package/dist/src/constants/chainList.d.ts +1 -0
  269. package/dist/src/constants/chains.d.ts +24 -31
  270. package/dist/src/constants/localstorage.d.ts +2 -0
  271. package/dist/src/constants/pool.d.ts +5 -0
  272. package/dist/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +2 -1
  273. package/dist/src/hooks/Submission/types.d.ts +31 -2
  274. package/dist/src/hooks/Submission/useExecution.d.ts +3 -2
  275. package/dist/src/hooks/Swap/useFetchFiatPrice.d.ts +3 -3
  276. package/dist/src/hooks/Token/useTokenList.d.ts +9 -3
  277. package/dist/src/hooks/Token/useTokenListDefaultToken.d.ts +30 -0
  278. package/dist/src/hooks/Token/useTokenListFetchBalance.d.ts +5 -2
  279. package/dist/src/hooks/Token/useTokenStatus.d.ts +4 -1
  280. package/dist/src/hooks/contract/index.d.ts +0 -2
  281. package/dist/src/hooks/contract/useFetchETHBalance.d.ts +21 -1
  282. package/dist/src/hooks/contract/useFetchTokens.d.ts +4 -10
  283. package/dist/src/hooks/contract/wallet.d.ts +1 -1
  284. package/dist/src/index.d.ts +6 -0
  285. package/dist/src/providers/GlobalConfigContext.d.ts +14 -0
  286. package/dist/src/router/index.d.ts +2 -0
  287. package/dist/src/router/types.d.ts +17 -4
  288. package/dist/src/store/actions/token.d.ts +1 -8
  289. package/dist/src/store/actions/wallet.d.ts +2 -0
  290. package/dist/src/store/index.d.ts +7 -1
  291. package/dist/src/store/reducers/token.d.ts +0 -7
  292. package/dist/src/store/reducers/wallet.d.ts +4 -0
  293. package/dist/src/store/selectors/token.d.ts +0 -10
  294. package/dist/src/store/selectors/wallet.d.ts +5 -2
  295. package/dist/src/utils/address.d.ts +2 -2
  296. package/dist/src/utils/bytes.d.ts +3 -0
  297. package/dist/src/utils/formatter.d.ts +24 -1
  298. package/dist/src/utils/token.d.ts +21 -0
  299. package/dist/src/widgets/MiningWidget/LpTokenMiningOperate/index.d.ts +7 -0
  300. package/dist/src/widgets/MiningWidget/OperateArea/AssociateMine.d.ts +20 -0
  301. package/dist/src/widgets/MiningWidget/OperateArea/ClaimButton.d.ts +5 -0
  302. package/dist/src/widgets/MiningWidget/OperateArea/GetLpLink.d.ts +5 -0
  303. package/dist/src/widgets/MiningWidget/OperateArea/RewardListCard.d.ts +8 -0
  304. package/dist/src/widgets/MiningWidget/OperateArea/StakeButton.d.ts +9 -0
  305. package/dist/src/widgets/MiningWidget/OperateArea/UnstakeButton.d.ts +8 -0
  306. package/dist/src/widgets/MiningWidget/OperateArea/index.d.ts +13 -0
  307. package/dist/src/widgets/MiningWidget/helper.d.ts +2 -0
  308. package/dist/src/widgets/MiningWidget/hooks/useClaimMiningSubmit.d.ts +4 -0
  309. package/dist/src/widgets/MiningWidget/hooks/useRewardListAmount.d.ts +17 -0
  310. package/dist/src/widgets/MiningWidget/hooks/useStakeMiningSubmit.d.ts +5 -0
  311. package/dist/src/widgets/MiningWidget/hooks/useStatusAndStartBlockNumber.d.ts +13 -0
  312. package/dist/src/widgets/MiningWidget/hooks/useUnstakeMiningSubmit.d.ts +5 -0
  313. package/dist/src/widgets/MiningWidget/types.d.ts +58 -0
  314. package/dist/src/widgets/PoolWidget/PoolCreate/components/ConfirmInfoDialog.d.ts +10 -0
  315. package/dist/src/widgets/PoolWidget/PoolCreate/components/DepthAndLiquidityChart.d.ts +11 -0
  316. package/dist/src/widgets/PoolWidget/PoolCreate/components/DepthChartWrapper.d.ts +11 -0
  317. package/dist/src/widgets/PoolWidget/PoolCreate/components/EmptyChart.d.ts +5 -0
  318. package/dist/src/widgets/PoolWidget/PoolCreate/components/FeeRateCard.d.ts +6 -0
  319. package/dist/src/widgets/PoolWidget/PoolCreate/components/FixedInitPriceConfirm.d.ts +6 -0
  320. package/dist/src/widgets/PoolWidget/PoolCreate/components/LqSettingsShow.d.ts +13 -0
  321. package/dist/src/widgets/PoolWidget/PoolCreate/components/RadioButton.d.ts +12 -0
  322. package/dist/src/widgets/PoolWidget/PoolCreate/components/RadioButtonIcon.d.ts +4 -0
  323. package/dist/src/widgets/PoolWidget/PoolCreate/components/RadioButtonTag.d.ts +6 -0
  324. package/dist/src/widgets/PoolWidget/PoolCreate/components/SectionTitle.d.ts +7 -0
  325. package/dist/src/widgets/PoolWidget/PoolCreate/components/SelectAndInput.d.ts +8 -0
  326. package/dist/src/widgets/PoolWidget/PoolCreate/components/StepTitle.d.ts +5 -0
  327. package/dist/src/widgets/PoolWidget/PoolCreate/components/VersionChartExample.d.ts +6 -0
  328. package/dist/src/widgets/PoolWidget/PoolCreate/hooks/contract/useCreatePoolSubmit.d.ts +14 -0
  329. package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useCreatePmm.d.ts +26 -0
  330. package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useDefaultTokens.d.ts +6 -0
  331. package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useFeeRateList.d.ts +13 -0
  332. package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useSlippageCoefficientList.d.ts +8 -0
  333. package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useValidation.d.ts +4 -0
  334. package/dist/src/widgets/PoolWidget/PoolCreate/hooks/useVersionList.d.ts +5 -0
  335. package/dist/src/widgets/PoolWidget/PoolCreate/index.d.ts +2 -0
  336. package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/BottomButtonGroup.d.ts +6 -0
  337. package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/FeeRateSetting.d.ts +7 -0
  338. package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/InitPriceSetting.d.ts +12 -0
  339. package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/SlippageCoefficientSetting.d.ts +8 -0
  340. package/dist/src/widgets/PoolWidget/PoolCreate/operate-widgets/VersionSelect.d.ts +6 -0
  341. package/dist/src/widgets/PoolWidget/PoolCreate/reducer.d.ts +78 -0
  342. package/dist/src/widgets/PoolWidget/PoolCreate/types.d.ts +35 -0
  343. package/dist/src/widgets/PoolWidget/PoolCreate/utils.d.ts +18 -0
  344. package/dist/src/widgets/PoolWidget/PoolDetail/components/BaseQuotePie.d.ts +24 -0
  345. package/dist/src/widgets/PoolWidget/PoolDetail/components/ChartInfo.d.ts +6 -0
  346. package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/LiquidityProvidersTable.d.ts +5 -0
  347. package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/ParametersTable.d.ts +15 -0
  348. package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/SwapsTable.d.ts +6 -0
  349. package/dist/src/widgets/PoolWidget/PoolDetail/components/MoreDetail/index.d.ts +5 -0
  350. package/dist/src/widgets/PoolWidget/PoolDetail/components/Overview.d.ts +5 -0
  351. package/dist/src/widgets/PoolWidget/PoolDetail/components/StatBarChart.d.ts +10 -0
  352. package/dist/src/widgets/PoolWidget/PoolDetail/components/TitleInfo.d.ts +6 -0
  353. package/dist/src/widgets/PoolWidget/PoolDetail/components/TotalLiquidity.d.ts +5 -0
  354. package/dist/src/widgets/PoolWidget/PoolDetail/hooks/useLiquidityProviders.d.ts +159 -0
  355. package/dist/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDashboard.d.ts +290 -0
  356. package/dist/src/widgets/PoolWidget/PoolDetail/hooks/usePoolDayData.d.ts +166 -0
  357. package/dist/src/widgets/PoolWidget/PoolDetail/hooks/usePoolSwapList.d.ts +245 -0
  358. package/dist/src/widgets/PoolWidget/PoolDetail/index.d.ts +2 -0
  359. package/dist/src/widgets/PoolWidget/PoolList/AddLiquidity.d.ts +12 -0
  360. package/dist/src/widgets/PoolWidget/PoolList/MyCreated.d.ts +11 -0
  361. package/dist/src/widgets/PoolWidget/PoolList/MyLiquidity.d.ts +11 -0
  362. package/dist/src/widgets/PoolWidget/PoolList/components/AddingOrRemovingBtn.d.ts +5 -0
  363. package/dist/src/widgets/PoolWidget/PoolList/components/FilterAddressTags.d.ts +8 -0
  364. package/dist/src/widgets/PoolWidget/PoolList/components/FilterTokenTags.d.ts +8 -0
  365. package/dist/src/widgets/PoolWidget/PoolList/components/LiquidityTable.d.ts +3 -0
  366. package/dist/src/widgets/PoolWidget/PoolList/components/LoadingCard.d.ts +5 -0
  367. package/dist/src/widgets/PoolWidget/PoolList/components/PoolApyTooltip.d.ts +18 -0
  368. package/dist/src/widgets/PoolWidget/PoolList/components/TokenAndPoolFilter.d.ts +9 -0
  369. package/dist/src/widgets/PoolWidget/PoolList/components/TokenListPoolItem.d.ts +6 -0
  370. package/dist/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterChainId.d.ts +6 -0
  371. package/dist/src/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +48 -0
  372. package/dist/src/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +15 -0
  373. package/dist/src/widgets/PoolWidget/PoolList/index.d.ts +2 -0
  374. package/dist/src/widgets/PoolWidget/PoolModify/SectionTitle.d.ts +4 -0
  375. package/dist/src/widgets/PoolWidget/PoolModify/index.d.ts +2 -0
  376. package/dist/src/widgets/PoolWidget/PoolModify/operate-widgets/BottomButtonGroup.d.ts +8 -0
  377. package/dist/src/widgets/PoolWidget/PoolModify/operate-widgets/FeeRateSetting.d.ts +7 -0
  378. package/dist/src/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +3 -2
  379. package/dist/src/widgets/PoolWidget/PoolOperate/PoolOperateInner.d.ts +4 -1
  380. package/dist/src/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +9 -0
  381. package/dist/src/widgets/PoolWidget/PoolOperate/components/ComparePrice.d.ts +9 -0
  382. package/dist/src/widgets/PoolWidget/PoolOperate/components/LiquidityInfo.d.ts +10 -0
  383. package/dist/src/widgets/PoolWidget/PoolOperate/components/OperateBtn.d.ts +6 -0
  384. package/dist/src/widgets/PoolWidget/PoolOperate/components/Ratio.d.ts +8 -0
  385. package/dist/src/widgets/PoolWidget/PoolOperate/components/SliderPercentageCard.d.ts +8 -0
  386. package/dist/src/widgets/PoolWidget/PoolOperate/components/SlippageSetting.d.ts +18 -0
  387. package/dist/src/widgets/PoolWidget/PoolOperate/components/TokenList.d.ts +12 -0
  388. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useCheckToken.d.ts +13 -0
  389. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useComparePrice.d.ts +19 -0
  390. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useLiquidityOperateAmount.d.ts +4 -2
  391. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePercentageRemove.d.ts +26 -0
  392. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOperateTabs.d.ts +1 -1
  393. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/usePoolOrMiningTabs.d.ts +3 -1
  394. package/dist/src/widgets/PoolWidget/PoolOperate/hooks/useRemoveLiquidityTokenStatus.d.ts +33 -0
  395. package/dist/src/widgets/PoolWidget/PoolOperate/index.d.ts +9 -3
  396. package/dist/src/widgets/PoolWidget/PoolOperate/types.d.ts +0 -2
  397. package/dist/src/widgets/PoolWidget/hooks/contract/getModifyDPPPoolParams.d.ts +86 -0
  398. package/dist/src/widgets/PoolWidget/hooks/contract/useModifyDppPool.d.ts +22 -0
  399. package/dist/src/widgets/PoolWidget/hooks/contract/useOperateLiquidity.d.ts +36 -0
  400. package/dist/src/widgets/PoolWidget/hooks/contract/useWithdrawInfo.d.ts +33 -0
  401. package/dist/src/widgets/PoolWidget/hooks/usePoolBalanceInfo.d.ts +8 -3
  402. package/dist/src/widgets/PoolWidget/hooks/usePoolDetail.d.ts +341 -0
  403. package/dist/src/widgets/PoolWidget/hooks/usePoolTypeTag.d.ts +16 -0
  404. package/dist/src/widgets/PoolWidget/utils.d.ts +4 -7
  405. package/package.json +12 -2
@@ -0,0 +1,21 @@
1
+ import { PMMModel } from '@dodoex/api';
2
+ import BigNumber from 'bignumber.js';
3
+ import { BaseMinAndZoomMultiples } from './helper';
4
+ export declare function useDepthLinePoints({ chartHeight, chartWidth, midPrice, xPoints, pmmModel, baseMinAndZoomMultiples, buyYPortion, sellYPortion, }: {
5
+ chartHeight: number;
6
+ chartWidth: number;
7
+ xPoints: number;
8
+ midPrice: BigNumber;
9
+ baseMinAndZoomMultiples: BaseMinAndZoomMultiples;
10
+ buyYPortion: BigNumber;
11
+ sellYPortion: BigNumber;
12
+ pmmModel: PMMModel;
13
+ }): {
14
+ quoteLinePoints: number[];
15
+ quoteLineAreaPoints: number[];
16
+ quoteLineAreaLinearGradientEndPointY: number;
17
+ baseLinePoints: number[];
18
+ baseLineAreaPoints: number[];
19
+ baseLineAreaLinearGradientEndPointY: number;
20
+ midPriceLinePoints: number[];
21
+ };
@@ -0,0 +1,9 @@
1
+ export declare function useGridLinePoints({ chartHeight, chartWidth, horizontalLineCount, verticalLineCount, }: {
2
+ chartHeight: number;
3
+ chartWidth: number;
4
+ horizontalLineCount: number;
5
+ verticalLineCount: number;
6
+ }): {
7
+ horizontalGridLines: number[][];
8
+ verticalGridLines: number[][];
9
+ };
@@ -0,0 +1,15 @@
1
+ import { BaseMinAndZoomMultiples } from './helper';
2
+ export declare function useHorizontalLabelPoints({ chartHeight, chartWidth, xAxisPoints, oneXPx, baseMinAndZoomMultiples, }: {
3
+ chartHeight: number;
4
+ chartWidth: number;
5
+ xAxisPoints: number;
6
+ oneXPx: number;
7
+ baseMinAndZoomMultiples: BaseMinAndZoomMultiples;
8
+ }): {
9
+ horizontalLabelTickPoints: number[][];
10
+ horizontalLabelTextPoints: {
11
+ x: number;
12
+ y: number;
13
+ text: string;
14
+ }[];
15
+ };
@@ -0,0 +1,19 @@
1
+ import { PmmModelParams } from '@dodoex/api';
2
+ import BigNumber from 'bignumber.js';
3
+ /**
4
+ * Calculate marginPrice for buying or selling target baseToken
5
+ * @param param0
6
+ * @returns
7
+ */
8
+ export declare function computeMarginPrice({ params, target, isBuy, }: {
9
+ params: PmmModelParams;
10
+ target: BigNumber;
11
+ isBuy?: boolean;
12
+ }): BigNumber;
13
+ /**
14
+ * Calculate the margin price for selling target baseTokens
15
+ */
16
+ export declare function computeSellMarginPrice({ params, target, }: {
17
+ params: PmmModelParams;
18
+ target: BigNumber;
19
+ }): BigNumber;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ declare function DepthChartV2({ title, titleColor, description, descriptionColor, buttonColor, placeholder, }: {
3
+ title: string;
4
+ titleColor: string;
5
+ description: string;
6
+ descriptionColor: string;
7
+ buttonColor: string;
8
+ placeholder: React.ReactElement;
9
+ }): JSX.Element;
10
+ export default DepthChartV2;
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ export declare const Title: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const Description: import("@emotion/styled").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any> | undefined;
9
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
10
+ export declare const OptButton: import("@emotion/styled").StyledComponent<{
11
+ theme?: import("@emotion/react").Theme | undefined;
12
+ as?: import("react").ElementType<any> | undefined;
13
+ } & import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & {
14
+ theme?: import("@emotion/react").Theme | undefined;
15
+ }, {}, {}>;
@@ -0,0 +1,9 @@
1
+ declare type Props = {
2
+ id: string;
3
+ };
4
+ /**
5
+ * 防止鼠标在图上滚动滚轮时页面上下滑动
6
+ * @param param0
7
+ */
8
+ export declare const usePreventWheel: ({ id }: Props) => void;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare function chartT(key: string, params: any): string;
@@ -0,0 +1,28 @@
1
+ /// <reference types="react" />
2
+ import { PMMModel, PmmModelParams } from '@dodoex/api';
3
+ import BigNumber from 'bignumber.js';
4
+ export declare const bgColor = "rgba(38, 39, 41, 0.3)";
5
+ export interface ColorMap {
6
+ grid?: string;
7
+ midPriceLine?: string;
8
+ leftBg?: (string | number)[];
9
+ leftLine?: string;
10
+ leftColor?: string;
11
+ rightBg?: (string | number)[];
12
+ rightLine?: string;
13
+ rightColor?: string;
14
+ tooltipBg?: string;
15
+ tooltipColor?: string;
16
+ textColor?: string;
17
+ }
18
+ export declare type Props = {
19
+ width: number;
20
+ height: number;
21
+ params: PmmModelParams;
22
+ midPrice: BigNumber;
23
+ pmmModel: PMMModel;
24
+ baseTokenSymbol: string;
25
+ quoteTokenSymbol: string;
26
+ colorMap?: ColorMap;
27
+ };
28
+ export declare function LiquidityChartKonva({ width, height, params, baseTokenSymbol, quoteTokenSymbol, colorMap, }: Props): JSX.Element;
@@ -0,0 +1,47 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { StatAreaPoint } from './usePoints';
3
+ export declare function computePointYByHeight({ maxHeight, gridAreaHeight, value, }: {
4
+ maxHeight: BigNumber;
5
+ gridAreaHeight: number;
6
+ value: BigNumber;
7
+ }): number;
8
+ export declare function computeHeightByPointY({ maxY, gridAreaHeight, y, }: {
9
+ maxY: BigNumber;
10
+ gridAreaHeight: number;
11
+ y: number;
12
+ }): BigNumber;
13
+ /**
14
+ * Obtain the closest data point from the data point collection through the coordinate point x and a series of point data subsets from the point to the center line.
15
+ */
16
+ export declare function getStatAreaPointByX({ targetPrice, areaPoints, isLeft, }: {
17
+ targetPrice: BigNumber;
18
+ areaPoints: StatAreaPoint[];
19
+ isLeft: boolean;
20
+ }): {
21
+ targetAreaStatPoint: StatAreaPoint | null;
22
+ targetAreaStatPoints: StatAreaPoint[];
23
+ };
24
+ /**
25
+ * Given a pixel's x-coordinate, width, logarithm of the minimum value of the abscissa, and logarithm of the maximum value of the abscissa, calculate the logarithmic coordinate corresponding to the point
26
+ */
27
+ export declare function computeTargetPrice({ x, width, minXLN10, maxXLN10, }: {
28
+ x: number;
29
+ width: number;
30
+ minXLN10: BigNumber;
31
+ maxXLN10: BigNumber;
32
+ }): BigNumber;
33
+ /**
34
+ * Given the logarithm of a coordinate, the width, the logarithm of the minimum value of the abscissa, and the logarithm of the maximum value of the abscissa, calculate the x coordinate corresponding to the point
35
+ */
36
+ export declare function computeTargetX({ width, targetLN10, minXLN10, maxXLN10, }: {
37
+ width: number;
38
+ targetLN10: BigNumber;
39
+ minXLN10: BigNumber;
40
+ maxXLN10: BigNumber;
41
+ }): number;
42
+ /**
43
+ * Calculate logarithm
44
+ */
45
+ export declare function computeTargetLN({ target }: {
46
+ target: BigNumber;
47
+ }): BigNumber;
@@ -0,0 +1,17 @@
1
+ /// <reference types="react" />
2
+ import { PMMModel, PmmModelParams } from '@dodoex/api';
3
+ import BigNumber from 'bignumber.js';
4
+ import { ColorMap } from './LiquidityChartKonva';
5
+ declare type Props = {
6
+ width?: number;
7
+ height?: number;
8
+ baseTokenSymbol: string;
9
+ quoteTokenSymbol: string;
10
+ pmmModel?: PMMModel;
11
+ pmmParams?: PmmModelParams;
12
+ midPrice?: BigNumber;
13
+ notShowTipText?: boolean;
14
+ colorMap?: ColorMap;
15
+ };
16
+ declare const LiquidityChart: React.FC<Props>;
17
+ export default LiquidityChart;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ export declare const Container: import("@emotion/styled").StyledComponent<{
3
+ theme?: import("@emotion/react").Theme | undefined;
4
+ as?: import("react").ElementType<any> | undefined;
5
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
6
+ export declare const TipWrapper: import("@emotion/styled").StyledComponent<{
7
+ theme?: import("@emotion/react").Theme | undefined;
8
+ as?: import("react").ElementType<any> | undefined;
9
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ export declare function useGridLine({ gridAreaHeight, gridAreaWidth, horizontalLineCount, verticalLineCount, color, }: {
3
+ gridAreaHeight: number;
4
+ gridAreaWidth: number;
5
+ horizontalLineCount: number;
6
+ verticalLineCount: number;
7
+ color?: string;
8
+ }): JSX.Element;
@@ -0,0 +1,10 @@
1
+ /// <reference types="react" />
2
+ import BigNumber from 'bignumber.js';
3
+ export declare function useHorizontalLabel({ minXLN10, maxXLN10, labelCount, gridAreaHeight, gridAreaWidth, color, }: {
4
+ minXLN10: BigNumber;
5
+ maxXLN10: BigNumber;
6
+ labelCount: number;
7
+ gridAreaHeight: number;
8
+ gridAreaWidth: number;
9
+ color?: string;
10
+ }): JSX.Element;
@@ -0,0 +1,18 @@
1
+ /// <reference types="react" />
2
+ import BigNumber from 'bignumber.js';
3
+ import { ColorMap } from './LiquidityChartKonva';
4
+ import { StatAreaPoint } from './usePoints';
5
+ export declare function useLiquidityLine({ leftStatAreaPoints, rightStatAreaPoints, minXLN10, maxXLN10, maxLeftHeight, maxRightHeight, gridAreaWidth, gridAreaHeight, colorMap, }: {
6
+ leftStatAreaPoints: Array<StatAreaPoint>;
7
+ rightStatAreaPoints: Array<StatAreaPoint>;
8
+ minXLN10: BigNumber;
9
+ maxXLN10: BigNumber;
10
+ maxLeftHeight: BigNumber;
11
+ maxRightHeight: BigNumber;
12
+ gridAreaWidth: number;
13
+ gridAreaHeight: number;
14
+ colorMap: ColorMap;
15
+ }): {
16
+ leftLine: JSX.Element;
17
+ rightLine: JSX.Element;
18
+ };
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ export declare function useMiddleLine({ gridAreaHeight, gridAreaWidth, color, }: {
3
+ gridAreaHeight: number;
4
+ gridAreaWidth: number;
5
+ color?: string;
6
+ }): JSX.Element;
@@ -0,0 +1,39 @@
1
+ import { PmmModelParams } from '@dodoex/api';
2
+ import BigNumber from 'bignumber.js';
3
+ /**
4
+ * data point
5
+ */
6
+ export declare type StatPoint = {
7
+ giveAmount: BigNumber;
8
+ getAmount: BigNumber;
9
+ price: BigNumber;
10
+ };
11
+ /**
12
+ * Drawing method:
13
+ Substitute the minimum value to get the height of the center point, which is the bottom edge of the area chart. Substitute the maximum value to get the vertex of the area chart. The length of the bottom edge from the vertex is the price range.
14
+
15
+ Divide the total area into one hundred equal parts. Calculate each part on the basis of the previous part. Substitute the new area into the formula to get a new price. The difference from the previous price is the width of the rectangle. The area is divided by The width is the height of the rectangle, which is the ordinate.
16
+
17
+ First, calculate a series of points as a point set based on the rectangular accumulation method.
18
+
19
+ When the mouse hovers, the abscissa is the price. Find the closest price in the point set. Use this price as the end point and the center line as the starting point to get a subset of the point set. You can draw a line by combining the center line and the abscissa. The area of ​​the trapezoid can be drawn.
20
+
21
+ Update: Taking Δl as the ordinate, Δl = (the difference between the quantity passed in from the previous point and the next point) * (the difference between the quantity obtained from the previous point and the next point)
22
+ */
23
+ export declare type StatAreaPoint = {
24
+ area: BigNumber;
25
+ price: BigNumber;
26
+ middlePrice: BigNumber;
27
+ rectangleHeight: BigNumber;
28
+ };
29
+ export declare function usePoints({ params }: {
30
+ params: PmmModelParams;
31
+ }): {
32
+ leftStatAreaPoints: StatAreaPoint[];
33
+ rightStatAreaPoints: StatAreaPoint[];
34
+ maxLeftHeight: BigNumber;
35
+ maxRightHeight: BigNumber;
36
+ minXLN10: BigNumber;
37
+ maxXLN10: BigNumber;
38
+ middlePriceLN10: BigNumber;
39
+ };
@@ -0,0 +1,3 @@
1
+ export declare const labelPadding = 12;
2
+ export declare const toolTipMarginBottom = 6;
3
+ export declare const chartOffsetYBCToolTip: number;
@@ -1,3 +1,4 @@
1
+ import { ContractRequests, GraphQLRequests, TokenApi } from '@dodoex/api';
1
2
  import { ChainId } from './chains';
2
3
  export declare enum APIServiceKey {
3
4
  routePrice = "routePrice",
@@ -14,3 +15,7 @@ export declare const getCGTokenListAPI: (chainId: ChainId) => any;
14
15
  export declare const RoutePriceAPI = "https://api.dodoex.io/route-service/v2/widget/getdodoroute";
15
16
  export declare const FiatPriceAPI = "https://api.dodoex.io/frontend-price-api/current/batch";
16
17
  export declare function getAPIService(key: APIServiceKey, serviceProps?: Partial<APIServices>): string;
18
+ export declare const contractRequests: ContractRequests;
19
+ export declare const tokenContractRequests: ContractRequests;
20
+ export declare const tokenApi: TokenApi;
21
+ export declare const graphQLRequests: GraphQLRequests;
@@ -7,3 +7,4 @@ export interface ChainListItem {
7
7
  mainnet?: ChainId;
8
8
  }
9
9
  export declare const chainListMap: Map<ChainId, ChainListItem>;
10
+ export declare const isTestNet: (chainId: ChainId) => boolean;
@@ -1,36 +1,27 @@
1
- export declare enum ChainId {
2
- MAINNET = 1,
3
- GOERLI = 5,
4
- BSC = 56,
5
- POLYGON = 137,
6
- ARBITRUM_ONE = 42161,
7
- AURORA = 1313161554,
8
- OKCHAIN = 66,
9
- OPTIMISM = 10,
10
- AVALANCHE = 43114,
11
- CONFLUX = 1030,
12
- BASE = 8453,
13
- LINEA = 59144,
14
- SCROLL = 534352,
15
- MANTA = 169,
16
- MANTLE = 5000
17
- }
1
+ import { ChainId } from '@dodoex/api';
2
+ export { ChainId, etherTokenAddress, basicTokenMap } from '@dodoex/api';
18
3
  export declare const rpcServerMap: {
19
4
  [key in ChainId]: Array<string>;
20
5
  };
21
- export declare const etherTokenAddress = "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE";
22
- declare const DEFAULT_BASIC_TOKEN: {
23
- symbol: string;
24
- address: string;
25
- name: string;
26
- decimals: number;
27
- showDecimals: number;
28
- wrappedTokenSymbol: string;
29
- };
30
- export declare const basicTokenMap: {
31
- [key in ChainId]: typeof DEFAULT_BASIC_TOKEN & {
32
- wrappedTokenAddress: string;
33
- };
6
+ export declare const getRpcSingleUrlMap: (newRpcServerMap?: {
7
+ [chainId: number]: string[];
8
+ } | undefined) => {
9
+ 1: string;
10
+ 5: string;
11
+ 11155111: string;
12
+ 56: string;
13
+ 137: string;
14
+ 42161: string;
15
+ 1313161554: string;
16
+ 66: string;
17
+ 10: string;
18
+ 43114: string;
19
+ 1030: string;
20
+ 8453: string;
21
+ 59144: string;
22
+ 534352: string;
23
+ 169: string;
24
+ 5000: string;
34
25
  };
35
26
  export declare const platformIdMap: {
36
27
  [key in ChainId]: string;
@@ -38,4 +29,6 @@ export declare const platformIdMap: {
38
29
  export declare const scanUrlDomainMap: {
39
30
  [key in ChainId]: string;
40
31
  };
41
- export {};
32
+ export declare const ThegraphKeyMap: {
33
+ [key in ChainId]: string;
34
+ };
@@ -10,3 +10,5 @@ export declare function getLastToken(side: TokenInfo['side']): LastTokenCache |
10
10
  export declare function setLastToken(side: TokenInfo['side'], token: LastTokenCache | null): void;
11
11
  export declare function getLastSlippage(isBridge: boolean): number | null;
12
12
  export declare function setLastSlippage(isBridge: boolean, slippage: number | string | null): void;
13
+ export declare const RiskOncePageLocalStorage: Record<string, string>;
14
+ export declare function getIsPoolEditRiskWarningOpen(): boolean;
@@ -1,2 +1,7 @@
1
1
  export declare const AUTO_SWAP_SLIPPAGE_PROTECTION = "auto";
2
2
  export declare const AUTO_LIQUIDITY_SLIPPAGE_PROTECTION = "0.1";
3
+ /**
4
+ * slippage protection
5
+ * First read out the reserve of the pool base and quote. If the slippage is 1%, then it is reserve * 0.99 and pass in func.
6
+ */
7
+ export declare const SLIPPAGE_PROTECTION = 0.01;
@@ -1,6 +1,7 @@
1
1
  import { BridgeTXRequest } from '../../components/Bridge/BridgeSummaryDialog';
2
2
  import { BridgeRouteI } from './useFetchRoutePriceBridge';
3
+ import { Metadata } from '../Submission/types';
3
4
  export default function useExecuteBridgeRoute({ route, bridgeOrderTxRequest, }: {
4
5
  route?: BridgeRouteI;
5
6
  bridgeOrderTxRequest?: BridgeTXRequest;
6
- }): () => Promise<import("../Submission/types").ExecutionResult> | undefined;
7
+ }): (metadata?: Metadata) => Promise<import("../Submission/types").ExecutionResult> | undefined;
@@ -7,12 +7,30 @@ export declare enum State {
7
7
  Failed = 2,
8
8
  Warning = 3
9
9
  }
10
+ export declare enum MetadataFlag {
11
+ addLiquidity = "addLiquidity",
12
+ removeLiquidity = "removeLiquidity",
13
+ createDPPPool = "createDPPPool",
14
+ createDSPPool = "createDSPPool",
15
+ createDVMPool = "createDVMPool",
16
+ stakeMining = "stakeMining",
17
+ unstakeMining = "unstakeMining",
18
+ claimMining = "claimMining"
19
+ }
20
+ export declare type Metadata = Record<string, any>;
10
21
  export declare type Request = {
11
22
  brief: string;
12
23
  spec: StepSpec;
13
24
  subtitle?: string | React.ReactNode | null;
25
+ metadata?: Metadata;
14
26
  tx: string;
15
27
  nonce?: number;
28
+ doneTime?: number;
29
+ };
30
+ export declare type TextUpdater = (request: Request) => null | {
31
+ brief: string;
32
+ subtitle?: string;
33
+ metadata?: Metadata;
16
34
  };
17
35
  export declare type Requests = Map<string, [Request, State]>;
18
36
  export declare enum ExecutionResult {
@@ -34,13 +52,24 @@ export declare type ExecutionCtx = {
34
52
  * @param subtitle: Additional hint text. e.g.: "10 USDT to 10 USDC"
35
53
  * @param early: When given, the returned promise resolves when user confirmed in their wallet.
36
54
  * @param mixpanelProps: mixpanel properties
37
- * @param submittedConfirmBack: dismiss callback
55
+ * @param submittedConfirmBack: submittedConfirmBack
56
+ * @param successBack: successBack
57
+ * @param metadata: metadata
38
58
  */
39
- execute: (brief: string, spec: StepSpec, subtitle?: string | React.ReactNode | null, early?: boolean, submittedBack?: () => void, mixpanelProps?: Record<string, any>, submittedConfirmBack?: () => void, successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void) => Promise<ExecutionResult>;
59
+ execute: (brief: string, spec: StepSpec, params?: {
60
+ subtitle?: string | React.ReactNode | null;
61
+ early?: boolean;
62
+ submittedBack?: () => void;
63
+ mixpanelProps?: Record<string, any>;
64
+ submittedConfirmBack?: () => void;
65
+ successBack?: (tx: string, callback?: ExecutionProps['onTxSuccess']) => void;
66
+ metadata?: Metadata;
67
+ }) => Promise<ExecutionResult>;
40
68
  /**
41
69
  * order
42
70
  */
43
71
  requests?: Requests;
72
+ updateText: (upd: TextUpdater) => void;
44
73
  setShowing?: React.Dispatch<React.SetStateAction<Showing | null>>;
45
74
  waitingSubmit: boolean;
46
75
  };
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { Step as StepSpec } from './spec';
3
- import { ExecutionResult, State, Request, Showing } from './types';
3
+ import { ExecutionResult, State, Request, Showing, ExecutionCtx, TextUpdater } from './types';
4
4
  export interface ExecutionProps {
5
5
  onTxFail?: (error: Error, data: any) => void;
6
6
  onTxSubmit?: (tx: string, data: any) => void;
@@ -22,8 +22,9 @@ export default function useExecution({ onTxFail, onTxSubmit, onTxSuccess, }?: Ex
22
22
  setErrorMessage: import("react").Dispatch<import("react").SetStateAction<string | null>>;
23
23
  closeShowing: () => void;
24
24
  ctxVal: {
25
- execute: (brief: string, spec: StepSpec, subtitle?: string | React.ReactNode | null, early?: boolean, submittedBack?: () => void, mixpanelProps?: Record<string, any>, submittedConfirmBack?: () => void, successBack?: ((tx: string, callback?: ExecutionProps['onTxSuccess']) => void) | undefined) => Promise<ExecutionResult.Failed | ExecutionResult.Success | ExecutionResult.Submitted>;
25
+ execute: (brief: string, spec: StepSpec, options?: Parameters<ExecutionCtx['execute']>[2]) => Promise<ExecutionResult.Failed | ExecutionResult.Success | ExecutionResult.Submitted>;
26
26
  requests: Map<string, [Request, State]>;
27
+ updateText: (upd: TextUpdater) => void;
27
28
  setShowing: import("react").Dispatch<import("react").SetStateAction<Showing | null>>;
28
29
  waitingSubmit: boolean;
29
30
  };
@@ -1,13 +1,13 @@
1
- import { ChainId } from '../../constants/chains';
2
1
  import { TokenInfo } from '../Token';
3
2
  export interface FetchFiatPriceProps {
4
- chainId: ChainId | undefined;
5
3
  fromToken: TokenInfo | null;
6
4
  toToken: TokenInfo | null;
7
5
  }
8
- export declare function useFetchFiatPrice({ fromToken, toToken, chainId, }: FetchFiatPriceProps): {
6
+ export declare function useFetchFiatPrice({ fromToken, toToken }: FetchFiatPriceProps): {
9
7
  loading: boolean;
8
+ isLoading: boolean;
10
9
  refetch: () => void;
10
+ error: Error | null;
11
11
  toFiatPrice: string;
12
12
  fromFiatPrice: string;
13
13
  };
@@ -1,12 +1,13 @@
1
1
  /// <reference types="react" />
2
+ import BigNumber from 'bignumber.js';
2
3
  import { TokenInfo, TokenList } from './type';
3
4
  import { ChainId } from '../../constants/chains';
4
5
  export declare const getFuzzySearchTokenSort: (token: TokenInfo, search: string, { matchAddress, }?: {
5
6
  matchAddress?: boolean | undefined;
6
7
  }) => number;
7
- export default function useTokenList({ value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, side, chainId: chainIdProps, visible, defaultLoadBalance, }: {
8
- value?: TokenInfo | null;
9
- onChange: (token: TokenInfo, isOccupied: boolean) => void;
8
+ export default function useTokenList({ value, onChange, occupiedAddrs, occupiedChainId, hiddenAddrs, showAddrs, side, chainId: chainIdProps, visible, defaultLoadBalance, multiple, }: {
9
+ value?: TokenInfo | null | Array<TokenInfo>;
10
+ onChange: (token: TokenInfo | Array<TokenInfo>, isOccupied: boolean) => void;
10
11
  /** token pair usage */
11
12
  occupiedAddrs?: string[];
12
13
  /** token pair usage */
@@ -21,10 +22,15 @@ export default function useTokenList({ value, onChange, occupiedAddrs, occupiedC
21
22
  /** Token Picker visible */
22
23
  visible?: boolean;
23
24
  defaultLoadBalance?: boolean;
25
+ multiple?: boolean;
24
26
  }): {
25
27
  filter: string;
26
28
  setFilter: import("react").Dispatch<import("react").SetStateAction<string>>;
27
29
  showTokenList: TokenList;
28
30
  onSelectToken: (token: TokenInfo) => void;
29
31
  popularTokenList: TokenInfo[];
32
+ tokenInfoMap: Map<string, {
33
+ balance: BigNumber;
34
+ allowance: BigNumber;
35
+ }>;
30
36
  };
@@ -0,0 +1,30 @@
1
+ import { ChainId } from '@dodoex/api';
2
+ import { TokenInfo, TokenList } from './type';
3
+ interface SimpleToken {
4
+ chainId: ChainId;
5
+ address: string;
6
+ }
7
+ export declare function getDefaultToken({ side, tokenList, occupyToken, needFindToken, chainId, }: {
8
+ side: TokenInfo['side'];
9
+ tokenList: TokenList;
10
+ occupyToken?: TokenInfo | null;
11
+ needFindToken?: SimpleToken;
12
+ chainId?: number;
13
+ }): {
14
+ findToken: TokenInfo | null;
15
+ defaultToken: TokenInfo | null;
16
+ };
17
+ export declare function useTokenListDefaultToken({ chainId, account, defaultBaseToken: defaultBaseSimpleToken, defaultQuoteToken: defaultQuoteSimpleToken, tokenListInclude, }?: {
18
+ chainId?: number;
19
+ account?: string;
20
+ defaultBaseToken?: SimpleToken;
21
+ defaultQuoteToken?: SimpleToken;
22
+ /** Must exist in tokenList */
23
+ tokenListInclude?: boolean;
24
+ }): {
25
+ defaultBaseToken: TokenInfo | null;
26
+ defaultQuoteToken: TokenInfo | null;
27
+ defaultBaseTokenLoading: boolean | undefined;
28
+ defaultQuoteTokenLoading: boolean | undefined;
29
+ };
30
+ export {};
@@ -1,9 +1,12 @@
1
1
  import { TokenInfo, TokenList } from './type';
2
2
  export default function useTokenListFetchBalance({ chainId, value, tokenList, popularTokenList, visible, defaultLoadBalance, }: {
3
3
  chainId: number;
4
- value?: TokenInfo | null;
4
+ value?: TokenInfo | null | Array<TokenInfo>;
5
5
  tokenList: TokenList;
6
6
  popularTokenList?: TokenList;
7
7
  visible?: boolean;
8
8
  defaultLoadBalance?: boolean;
9
- }): void;
9
+ }): Map<string, {
10
+ balance: import("bignumber.js").BigNumber;
11
+ allowance: import("bignumber.js").BigNumber;
12
+ }>;
@@ -1,17 +1,20 @@
1
1
  import BigNumber from 'bignumber.js';
2
2
  import { TokenInfo } from './type';
3
- export declare function useTokenStatus(token: TokenInfo | undefined | null, { amount, contractAddress, offset, overrideBalance, }?: {
3
+ export declare function useTokenStatus(token: TokenInfo | undefined | null, { amount, contractAddress, offset, overrideBalance, skip, }?: {
4
4
  amount?: string | number | BigNumber;
5
5
  contractAddress?: string;
6
6
  offset?: BigNumber;
7
7
  overrideBalance?: BigNumber | null;
8
+ skip?: boolean;
8
9
  }): {
9
10
  isApproving: boolean;
10
11
  isGetApproveLoading: boolean;
11
12
  needApprove: boolean;
12
13
  needReset: boolean | undefined;
14
+ needShowTokenStatusButton: boolean;
13
15
  insufficientBalance: boolean;
14
16
  loading: boolean;
17
+ approveTitle: string;
15
18
  submitApprove: () => Promise<void>;
16
19
  getMaxBalance: () => string;
17
20
  };
@@ -1,5 +1,3 @@
1
- export { default as useMultiContract, getContract } from './useMultiContract';
2
1
  export { default as useFetchTokens } from './useFetchTokens';
3
2
  export { default as useFetchETHBalance } from './useFetchETHBalance';
4
3
  export { default as useFetchBlockNumber } from './useFetchBlockNumber';
5
- export * from './token';