@dodoex/widgets 3.0.0-beta.31 → 3.0.0-beta.32

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 (327) hide show
  1. package/dist/cjs/e2e/connect.test.d.ts +6 -0
  2. package/dist/cjs/e2e/constants.d.ts +87 -0
  3. package/dist/cjs/e2e/default.test.d.ts +6 -0
  4. package/dist/cjs/e2e/setup.d.ts +4 -0
  5. package/dist/cjs/helper-DNaeIBQY.cjs +1 -0
  6. package/dist/cjs/index-BZtt1iuv.cjs +12 -0
  7. package/dist/cjs/index-CULtuKOC.cjs +78 -0
  8. package/dist/cjs/index-DWLX0NSs.cjs +53 -0
  9. package/dist/cjs/index.cjs +1 -1
  10. package/dist/cjs/lottie-4VzKv4A8.cjs +1 -0
  11. package/dist/cjs/src/components/Bridge/BridgeRouteShortCard.d.ts +6 -0
  12. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.d.ts +5 -0
  13. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/index.d.ts +18 -0
  14. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/CrossStep.d.ts +16 -0
  15. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/EtherscanLinkButton.d.ts +6 -0
  16. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/RouteSteps.d.ts +6 -0
  17. package/dist/cjs/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/SwapStep.d.ts +14 -0
  18. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/BridgeLogo.d.ts +10 -0
  19. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/DirectionLine.d.ts +4 -0
  20. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +21 -0
  21. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/RouteTagList.d.ts +12 -0
  22. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/TokenWithChain.d.ts +11 -0
  23. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/index.d.ts +9 -0
  24. package/dist/cjs/src/components/Bridge/SelectBridgeDialog/productList.d.ts +8 -0
  25. package/dist/cjs/src/components/ErrorMessageDialog.d.ts +5 -0
  26. package/dist/cjs/src/components/Swap/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
  27. package/dist/cjs/src/components/Swap/components/ConnectWallet/index.d.ts +9 -0
  28. package/dist/cjs/src/components/Swap/components/Dialog.d.ts +14 -0
  29. package/dist/cjs/src/components/Swap/components/ReviewDialog.d.ts +22 -0
  30. package/dist/cjs/src/components/Swap/components/SettingsDialog/NumberInput.d.ts +8 -0
  31. package/dist/cjs/src/components/Swap/components/SettingsDialog/index.d.ts +7 -0
  32. package/dist/cjs/src/components/Swap/components/SwitchBox.d.ts +5 -0
  33. package/dist/cjs/src/components/Swap/components/TokenCard/BalanceText.d.ts +9 -0
  34. package/dist/cjs/src/components/Swap/components/TokenCard/NumberInput.d.ts +13 -0
  35. package/dist/cjs/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +7 -0
  36. package/dist/cjs/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +13 -0
  37. package/dist/cjs/src/components/Swap/components/TokenCard/index.d.ts +23 -0
  38. package/dist/cjs/src/components/Swap/components/TokenPairPriceWithToggle.d.ts +10 -0
  39. package/dist/cjs/src/components/Swap/index.d.ts +9 -0
  40. package/dist/cjs/src/components/SwitchChainDialog/index.d.ts +7 -0
  41. package/dist/cjs/src/components/TokenLogo.d.ts +16 -0
  42. package/dist/cjs/src/components/TokenPicker/PopularToken.d.ts +7 -0
  43. package/dist/cjs/src/components/TokenPicker/SelectChainItem.d.ts +7 -0
  44. package/dist/cjs/src/components/TokenPicker/TokenItem.d.ts +8 -0
  45. package/dist/cjs/src/components/TokenPicker/index.d.ts +19 -0
  46. package/dist/cjs/src/components/Tooltip/QuestionTooltip.d.ts +3 -0
  47. package/dist/cjs/src/components/Tooltip/index.d.ts +1 -0
  48. package/dist/cjs/src/components/Widget/i18n.d.ts +9 -0
  49. package/dist/cjs/src/components/Widget/index.d.ts +34 -0
  50. package/dist/cjs/src/components/WithExecutionDialog/index.d.ts +5 -0
  51. package/dist/cjs/src/constants/address.d.ts +1 -0
  52. package/dist/cjs/src/constants/api.d.ts +16 -0
  53. package/dist/cjs/src/constants/chainList.d.ts +9 -0
  54. package/dist/cjs/src/constants/chains.d.ts +42 -0
  55. package/dist/cjs/src/constants/locales.d.ts +3 -0
  56. package/dist/cjs/src/constants/localstorage.d.ts +12 -0
  57. package/dist/cjs/src/constants/swap.d.ts +7 -0
  58. package/dist/cjs/src/constants/testId.d.ts +10 -0
  59. package/dist/cjs/src/constants/token.d.ts +2 -0
  60. package/dist/cjs/src/constants/tokenList.d.ts +18 -0
  61. package/dist/cjs/src/constants/wallet.d.ts +23 -0
  62. package/dist/cjs/src/hooks/Bridge/createBridgeOrder.d.ts +28 -0
  63. package/dist/cjs/src/hooks/Bridge/index.d.ts +4 -0
  64. package/dist/cjs/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +6 -0
  65. package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +113 -0
  66. package/dist/cjs/src/hooks/Bridge/useFetchRoutePriceBridge.test.d.ts +1 -0
  67. package/dist/cjs/src/hooks/Bridge/useSendRoute.d.ts +16 -0
  68. package/dist/cjs/src/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +1 -0
  69. package/dist/cjs/src/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +9 -0
  70. package/dist/cjs/src/hooks/ConnectWallet/TonConnect/index.d.ts +26 -0
  71. package/dist/cjs/src/hooks/ConnectWallet/index.d.ts +3 -0
  72. package/dist/cjs/src/hooks/ConnectWallet/useCurrentChainId.d.ts +2 -0
  73. package/dist/cjs/src/hooks/ConnectWallet/useSwitchChain.d.ts +10 -0
  74. package/dist/cjs/src/hooks/ConnectWallet/useWalletState.d.ts +24 -0
  75. package/dist/cjs/src/hooks/ConnectWallet/useWeb3Connectors.d.ts +17 -0
  76. package/dist/cjs/src/hooks/ConnectWallet/web3.d.ts +10 -0
  77. package/dist/cjs/src/hooks/Submission/getExecutionErrorMsg.d.ts +2 -0
  78. package/dist/cjs/src/hooks/Submission/index.d.ts +10 -0
  79. package/dist/cjs/src/hooks/Submission/spec.d.ts +56 -0
  80. package/dist/cjs/src/hooks/Submission/types.d.ts +50 -0
  81. package/dist/cjs/src/hooks/Submission/useExecution.d.ts +31 -0
  82. package/dist/cjs/src/hooks/Submission/useInflights.d.ts +5 -0
  83. package/dist/cjs/src/hooks/Swap/index.d.ts +5 -0
  84. package/dist/cjs/src/hooks/Swap/useExecuteSwap.d.ts +12 -0
  85. package/dist/cjs/src/hooks/Swap/useFetchFiatPrice.d.ts +13 -0
  86. package/dist/cjs/src/hooks/Swap/useFetchFiatPrice.test.d.ts +1 -0
  87. package/dist/cjs/src/hooks/Swap/useFetchRoutePrice.d.ts +37 -0
  88. package/dist/cjs/src/hooks/Swap/useFetchRoutePrice.test.d.ts +1 -0
  89. package/dist/cjs/src/hooks/Swap/useInitDefaultToken.d.ts +10 -0
  90. package/dist/cjs/src/hooks/Swap/useMarginAmount.d.ts +8 -0
  91. package/dist/cjs/src/hooks/Swap/useMarginAmount.test.d.ts +1 -0
  92. package/dist/cjs/src/hooks/Swap/usePriceTimer.d.ts +5 -0
  93. package/dist/cjs/src/hooks/Swap/useSlippageLimit.d.ts +2 -0
  94. package/dist/cjs/src/hooks/Token/index.d.ts +4 -0
  95. package/dist/cjs/src/hooks/Token/type.d.ts +26 -0
  96. package/dist/cjs/src/hooks/Token/useDisabledTokenSwitch.d.ts +5 -0
  97. package/dist/cjs/src/hooks/Token/useFetchTokenAllowance.d.ts +13 -0
  98. package/dist/cjs/src/hooks/Token/useFindTokenByAddress.d.ts +1 -0
  99. package/dist/cjs/src/hooks/Token/useFindTokenByAddress.test.d.ts +1 -0
  100. package/dist/cjs/src/hooks/Token/useGetAllowance.d.ts +3 -0
  101. package/dist/cjs/src/hooks/Token/useGetAllowance.test.d.ts +1 -0
  102. package/dist/cjs/src/hooks/Token/useGetBalance.d.ts +2 -0
  103. package/dist/cjs/src/hooks/Token/useGetBalance.test.d.ts +1 -0
  104. package/dist/cjs/src/hooks/Token/useGetCGTokenList.d.ts +15 -0
  105. package/dist/cjs/src/hooks/Token/useGetTokenStatus.d.ts +13 -0
  106. package/dist/cjs/src/hooks/Token/useGetTokenStatus.test.d.ts +1 -0
  107. package/dist/cjs/src/hooks/Token/useInitTokenList.d.ts +8 -0
  108. package/dist/cjs/src/hooks/Token/useSelectChainList.d.ts +7 -0
  109. package/dist/cjs/src/hooks/Token/useSelectChainList.test.d.ts +1 -0
  110. package/dist/cjs/src/hooks/Token/useTokenList.d.ts +30 -0
  111. package/dist/cjs/src/hooks/Token/useTokenList.test.d.ts +1 -0
  112. package/dist/cjs/src/hooks/Token/useTokenListFetchBalance.d.ts +9 -0
  113. package/dist/cjs/src/hooks/Widget/useInitPropsToRedux.d.ts +2 -0
  114. package/dist/cjs/src/hooks/contract/abis/OrbiterV3ABI.d.ts +85 -0
  115. package/dist/cjs/src/hooks/contract/abis/erc20ABI.d.ts +30 -0
  116. package/dist/cjs/src/hooks/contract/abis/erc20Helper.d.ts +16 -0
  117. package/dist/cjs/src/hooks/contract/abis/multicallABI.d.ts +34 -0
  118. package/dist/cjs/src/hooks/contract/batch.d.ts +18 -0
  119. package/dist/cjs/src/hooks/contract/contractConfig.d.ts +9 -0
  120. package/dist/cjs/src/hooks/contract/index.d.ts +5 -0
  121. package/dist/cjs/src/hooks/contract/orbiter/constants.d.ts +3 -0
  122. package/dist/cjs/src/hooks/contract/orbiter/encodeOrbiterBridge.d.ts +12 -0
  123. package/dist/cjs/src/hooks/contract/orbiter/useOrbiterContractMap.d.ts +5 -0
  124. package/dist/cjs/src/hooks/contract/orbiter/useOrbiterRouters.d.ts +21 -0
  125. package/dist/cjs/src/hooks/contract/provider.d.ts +2 -0
  126. package/dist/cjs/src/hooks/contract/token.d.ts +10 -0
  127. package/dist/cjs/src/hooks/contract/useFetchBlockNumber.d.ts +3 -0
  128. package/dist/cjs/src/hooks/contract/useFetchETHBalance.d.ts +1 -0
  129. package/dist/cjs/src/hooks/contract/useFetchTokens.d.ts +19 -0
  130. package/dist/cjs/src/hooks/contract/useMultiContract.d.ts +14 -0
  131. package/dist/cjs/src/hooks/contract/wallet.d.ts +16 -0
  132. package/dist/cjs/src/hooks/setting/useDefaultSlippage.d.ts +4 -0
  133. package/dist/cjs/src/hooks/setting/useGetAPIService.d.ts +2 -0
  134. package/dist/cjs/src/hooks/setting/useSetAutoSlippage.d.ts +13 -0
  135. package/dist/cjs/src/index.d.ts +6 -0
  136. package/dist/cjs/src/store/actions/globals.d.ts +9 -0
  137. package/dist/cjs/src/store/actions/index.d.ts +4 -0
  138. package/dist/cjs/src/store/actions/settings.d.ts +6 -0
  139. package/dist/cjs/src/store/actions/token.d.ts +15 -0
  140. package/dist/cjs/src/store/actions/wallet.d.ts +5 -0
  141. package/dist/cjs/src/store/index.d.ts +6 -0
  142. package/dist/cjs/src/store/reducers/globals.d.ts +23 -0
  143. package/dist/cjs/src/store/reducers/index.d.ts +17 -0
  144. package/dist/cjs/src/store/reducers/settings.d.ts +13 -0
  145. package/dist/cjs/src/store/reducers/token.d.ts +31 -0
  146. package/dist/cjs/src/store/reducers/wallet.d.ts +10 -0
  147. package/dist/cjs/src/store/selectors/globals.d.ts +7 -0
  148. package/dist/cjs/src/store/selectors/settings.d.ts +4 -0
  149. package/dist/cjs/src/store/selectors/token.d.ts +19 -0
  150. package/dist/cjs/src/store/selectors/wallet.d.ts +4 -0
  151. package/dist/cjs/src/utils/address.d.ts +15 -0
  152. package/dist/cjs/src/utils/address.test.d.ts +1 -0
  153. package/dist/cjs/src/utils/chains.d.ts +2 -0
  154. package/dist/cjs/src/utils/chains.test.d.ts +1 -0
  155. package/dist/cjs/src/utils/formatter.d.ts +25 -0
  156. package/dist/cjs/src/utils/formatter.test.d.ts +1 -0
  157. package/dist/cjs/src/utils/index.d.ts +5 -0
  158. package/dist/cjs/src/utils/time.d.ts +9 -0
  159. package/dist/cjs/src/utils/time.test.d.ts +1 -0
  160. package/dist/cjs/src/utils/token.d.ts +9 -0
  161. package/dist/cjs/src/utils/token.test.d.ts +1 -0
  162. package/dist/cjs/src/utils/wallet.d.ts +8 -0
  163. package/dist/cjs/src/utils/wallet.test.d.ts +1 -0
  164. package/dist/e2e/connect.test.d.ts +6 -0
  165. package/dist/e2e/constants.d.ts +87 -0
  166. package/dist/e2e/default.test.d.ts +6 -0
  167. package/dist/e2e/setup.d.ts +4 -0
  168. package/dist/helper-D1mp2p4F.js +1 -0
  169. package/dist/index-CE6izMXy.js +12 -0
  170. package/dist/index-CEwSZbo5.js +53 -0
  171. package/dist/index-Duga8SDh.js +78 -0
  172. package/dist/index.js +1 -1
  173. package/dist/lottie-DMZ5X1eY.js +1 -0
  174. package/dist/src/components/Bridge/BridgeRouteShortCard.d.ts +6 -0
  175. package/dist/src/components/Bridge/BridgeSummaryDialog/BridgeSummaryDetail.d.ts +5 -0
  176. package/dist/src/components/Bridge/BridgeSummaryDialog/index.d.ts +18 -0
  177. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/CrossStep.d.ts +16 -0
  178. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/EtherscanLinkButton.d.ts +6 -0
  179. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/RouteSteps.d.ts +6 -0
  180. package/dist/src/components/Bridge/BridgeSummaryDialog/orderInfoModal/SwapStep.d.ts +14 -0
  181. package/dist/src/components/Bridge/SelectBridgeDialog/BridgeLogo.d.ts +10 -0
  182. package/dist/src/components/Bridge/SelectBridgeDialog/DirectionLine.d.ts +4 -0
  183. package/dist/src/components/Bridge/SelectBridgeDialog/RouteCard.d.ts +21 -0
  184. package/dist/src/components/Bridge/SelectBridgeDialog/RouteTagList.d.ts +12 -0
  185. package/dist/src/components/Bridge/SelectBridgeDialog/TokenWithChain.d.ts +11 -0
  186. package/dist/src/components/Bridge/SelectBridgeDialog/index.d.ts +9 -0
  187. package/dist/src/components/Bridge/SelectBridgeDialog/productList.d.ts +8 -0
  188. package/dist/src/components/ErrorMessageDialog.d.ts +5 -0
  189. package/dist/src/components/Swap/components/ConnectWallet/ConnectWalletDialog.d.ts +5 -0
  190. package/dist/src/components/Swap/components/ConnectWallet/index.d.ts +9 -0
  191. package/dist/src/components/Swap/components/Dialog.d.ts +14 -0
  192. package/dist/src/components/Swap/components/ReviewDialog.d.ts +22 -0
  193. package/dist/src/components/Swap/components/SettingsDialog/NumberInput.d.ts +8 -0
  194. package/dist/src/components/Swap/components/SettingsDialog/index.d.ts +7 -0
  195. package/dist/src/components/Swap/components/SwitchBox.d.ts +5 -0
  196. package/dist/src/components/Swap/components/TokenCard/BalanceText.d.ts +9 -0
  197. package/dist/src/components/Swap/components/TokenCard/NumberInput.d.ts +13 -0
  198. package/dist/src/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +7 -0
  199. package/dist/src/components/Swap/components/TokenCard/TokenPickerDialog.d.ts +13 -0
  200. package/dist/src/components/Swap/components/TokenCard/index.d.ts +23 -0
  201. package/dist/src/components/Swap/components/TokenPairPriceWithToggle.d.ts +10 -0
  202. package/dist/src/components/Swap/index.d.ts +9 -0
  203. package/dist/src/components/SwitchChainDialog/index.d.ts +7 -0
  204. package/dist/src/components/TokenLogo.d.ts +16 -0
  205. package/dist/src/components/TokenPicker/PopularToken.d.ts +7 -0
  206. package/dist/src/components/TokenPicker/SelectChainItem.d.ts +7 -0
  207. package/dist/src/components/TokenPicker/TokenItem.d.ts +8 -0
  208. package/dist/src/components/TokenPicker/index.d.ts +19 -0
  209. package/dist/src/components/Tooltip/QuestionTooltip.d.ts +3 -0
  210. package/dist/src/components/Tooltip/index.d.ts +1 -0
  211. package/dist/src/components/Widget/i18n.d.ts +9 -0
  212. package/dist/src/components/Widget/index.d.ts +34 -0
  213. package/dist/src/components/WithExecutionDialog/index.d.ts +5 -0
  214. package/dist/src/constants/address.d.ts +1 -0
  215. package/dist/src/constants/api.d.ts +16 -0
  216. package/dist/src/constants/chainList.d.ts +9 -0
  217. package/dist/src/constants/chains.d.ts +42 -0
  218. package/dist/src/constants/locales.d.ts +3 -0
  219. package/dist/src/constants/localstorage.d.ts +12 -0
  220. package/dist/src/constants/swap.d.ts +7 -0
  221. package/dist/src/constants/testId.d.ts +10 -0
  222. package/dist/src/constants/token.d.ts +2 -0
  223. package/dist/src/constants/tokenList.d.ts +18 -0
  224. package/dist/src/constants/wallet.d.ts +23 -0
  225. package/dist/src/hooks/Bridge/createBridgeOrder.d.ts +28 -0
  226. package/dist/src/hooks/Bridge/index.d.ts +4 -0
  227. package/dist/src/hooks/Bridge/useExecuteBridgeRoute.d.ts +6 -0
  228. package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.d.ts +113 -0
  229. package/dist/src/hooks/Bridge/useFetchRoutePriceBridge.test.d.ts +1 -0
  230. package/dist/src/hooks/Bridge/useSendRoute.d.ts +16 -0
  231. package/dist/src/hooks/Bridge/useSwitchBridgeOrSwapSlippage.d.ts +1 -0
  232. package/dist/src/hooks/ConnectWallet/Connectors/JsonRpcConnector.d.ts +9 -0
  233. package/dist/src/hooks/ConnectWallet/TonConnect/index.d.ts +26 -0
  234. package/dist/src/hooks/ConnectWallet/index.d.ts +3 -0
  235. package/dist/src/hooks/ConnectWallet/useCurrentChainId.d.ts +2 -0
  236. package/dist/src/hooks/ConnectWallet/useSwitchChain.d.ts +10 -0
  237. package/dist/src/hooks/ConnectWallet/useWalletState.d.ts +24 -0
  238. package/dist/src/hooks/ConnectWallet/useWeb3Connectors.d.ts +17 -0
  239. package/dist/src/hooks/ConnectWallet/web3.d.ts +10 -0
  240. package/dist/src/hooks/Submission/getExecutionErrorMsg.d.ts +2 -0
  241. package/dist/src/hooks/Submission/index.d.ts +10 -0
  242. package/dist/src/hooks/Submission/spec.d.ts +56 -0
  243. package/dist/src/hooks/Submission/types.d.ts +50 -0
  244. package/dist/src/hooks/Submission/useExecution.d.ts +31 -0
  245. package/dist/src/hooks/Submission/useInflights.d.ts +5 -0
  246. package/dist/src/hooks/Swap/index.d.ts +5 -0
  247. package/dist/src/hooks/Swap/useExecuteSwap.d.ts +12 -0
  248. package/dist/src/hooks/Swap/useFetchFiatPrice.d.ts +13 -0
  249. package/dist/src/hooks/Swap/useFetchFiatPrice.test.d.ts +1 -0
  250. package/dist/src/hooks/Swap/useFetchRoutePrice.d.ts +37 -0
  251. package/dist/src/hooks/Swap/useFetchRoutePrice.test.d.ts +1 -0
  252. package/dist/src/hooks/Swap/useInitDefaultToken.d.ts +10 -0
  253. package/dist/src/hooks/Swap/useMarginAmount.d.ts +8 -0
  254. package/dist/src/hooks/Swap/useMarginAmount.test.d.ts +1 -0
  255. package/dist/src/hooks/Swap/usePriceTimer.d.ts +5 -0
  256. package/dist/src/hooks/Swap/useSlippageLimit.d.ts +2 -0
  257. package/dist/src/hooks/Token/index.d.ts +4 -0
  258. package/dist/src/hooks/Token/type.d.ts +26 -0
  259. package/dist/src/hooks/Token/useDisabledTokenSwitch.d.ts +5 -0
  260. package/dist/src/hooks/Token/useFetchTokenAllowance.d.ts +13 -0
  261. package/dist/src/hooks/Token/useFindTokenByAddress.d.ts +1 -0
  262. package/dist/src/hooks/Token/useFindTokenByAddress.test.d.ts +1 -0
  263. package/dist/src/hooks/Token/useGetAllowance.d.ts +3 -0
  264. package/dist/src/hooks/Token/useGetAllowance.test.d.ts +1 -0
  265. package/dist/src/hooks/Token/useGetBalance.d.ts +2 -0
  266. package/dist/src/hooks/Token/useGetBalance.test.d.ts +1 -0
  267. package/dist/src/hooks/Token/useGetCGTokenList.d.ts +15 -0
  268. package/dist/src/hooks/Token/useGetTokenStatus.d.ts +13 -0
  269. package/dist/src/hooks/Token/useGetTokenStatus.test.d.ts +1 -0
  270. package/dist/src/hooks/Token/useInitTokenList.d.ts +8 -0
  271. package/dist/src/hooks/Token/useSelectChainList.d.ts +7 -0
  272. package/dist/src/hooks/Token/useSelectChainList.test.d.ts +1 -0
  273. package/dist/src/hooks/Token/useTokenList.d.ts +30 -0
  274. package/dist/src/hooks/Token/useTokenList.test.d.ts +1 -0
  275. package/dist/src/hooks/Token/useTokenListFetchBalance.d.ts +9 -0
  276. package/dist/src/hooks/Widget/useInitPropsToRedux.d.ts +2 -0
  277. package/dist/src/hooks/contract/abis/OrbiterV3ABI.d.ts +85 -0
  278. package/dist/src/hooks/contract/abis/erc20ABI.d.ts +30 -0
  279. package/dist/src/hooks/contract/abis/erc20Helper.d.ts +16 -0
  280. package/dist/src/hooks/contract/abis/multicallABI.d.ts +34 -0
  281. package/dist/src/hooks/contract/batch.d.ts +18 -0
  282. package/dist/src/hooks/contract/contractConfig.d.ts +9 -0
  283. package/dist/src/hooks/contract/index.d.ts +5 -0
  284. package/dist/src/hooks/contract/orbiter/constants.d.ts +3 -0
  285. package/dist/src/hooks/contract/orbiter/encodeOrbiterBridge.d.ts +12 -0
  286. package/dist/src/hooks/contract/orbiter/useOrbiterContractMap.d.ts +5 -0
  287. package/dist/src/hooks/contract/orbiter/useOrbiterRouters.d.ts +21 -0
  288. package/dist/src/hooks/contract/provider.d.ts +2 -0
  289. package/dist/src/hooks/contract/token.d.ts +10 -0
  290. package/dist/src/hooks/contract/useFetchBlockNumber.d.ts +3 -0
  291. package/dist/src/hooks/contract/useFetchETHBalance.d.ts +1 -0
  292. package/dist/src/hooks/contract/useFetchTokens.d.ts +19 -0
  293. package/dist/src/hooks/contract/useMultiContract.d.ts +14 -0
  294. package/dist/src/hooks/contract/wallet.d.ts +16 -0
  295. package/dist/src/hooks/setting/useDefaultSlippage.d.ts +4 -0
  296. package/dist/src/hooks/setting/useGetAPIService.d.ts +2 -0
  297. package/dist/src/hooks/setting/useSetAutoSlippage.d.ts +13 -0
  298. package/dist/src/index.d.ts +6 -0
  299. package/dist/src/store/actions/globals.d.ts +9 -0
  300. package/dist/src/store/actions/index.d.ts +4 -0
  301. package/dist/src/store/actions/settings.d.ts +6 -0
  302. package/dist/src/store/actions/token.d.ts +15 -0
  303. package/dist/src/store/actions/wallet.d.ts +5 -0
  304. package/dist/src/store/index.d.ts +6 -0
  305. package/dist/src/store/reducers/globals.d.ts +23 -0
  306. package/dist/src/store/reducers/index.d.ts +17 -0
  307. package/dist/src/store/reducers/settings.d.ts +13 -0
  308. package/dist/src/store/reducers/token.d.ts +31 -0
  309. package/dist/src/store/reducers/wallet.d.ts +10 -0
  310. package/dist/src/store/selectors/globals.d.ts +7 -0
  311. package/dist/src/store/selectors/settings.d.ts +4 -0
  312. package/dist/src/store/selectors/token.d.ts +19 -0
  313. package/dist/src/store/selectors/wallet.d.ts +4 -0
  314. package/dist/src/utils/address.d.ts +15 -0
  315. package/dist/src/utils/address.test.d.ts +1 -0
  316. package/dist/src/utils/chains.d.ts +2 -0
  317. package/dist/src/utils/chains.test.d.ts +1 -0
  318. package/dist/src/utils/formatter.d.ts +25 -0
  319. package/dist/src/utils/formatter.test.d.ts +1 -0
  320. package/dist/src/utils/index.d.ts +5 -0
  321. package/dist/src/utils/time.d.ts +9 -0
  322. package/dist/src/utils/time.test.d.ts +1 -0
  323. package/dist/src/utils/token.d.ts +9 -0
  324. package/dist/src/utils/token.test.d.ts +1 -0
  325. package/dist/src/utils/wallet.d.ts +8 -0
  326. package/dist/src/utils/wallet.test.d.ts +1 -0
  327. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ import { TokenInfo } from './type';
2
+ import BigNumber from 'bignumber.js';
3
+ export default function useGetAllowance(contract: string | null): (token: TokenInfo) => BigNumber | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { TokenInfo } from './type';
2
+ export default function useGetBalance(): (token: TokenInfo) => import("bignumber.js").BigNumber | null;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import { TokenList } from './type';
2
+ export declare enum FetchStatus {
3
+ Initial = "Initial",
4
+ Loading = "Loading",
5
+ Failed = "Failed",
6
+ Success = "Success"
7
+ }
8
+ export declare function useGetCGTokenList({ chainId, skip, }: {
9
+ chainId: number;
10
+ skip?: boolean;
11
+ }): {
12
+ cgTokenList: TokenList;
13
+ loading: boolean;
14
+ refetch: () => Promise<void>;
15
+ };
@@ -0,0 +1,13 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { TokenInfo, ApprovalState } from './type';
3
+ export declare const useGetTokenStatus: ({ account, chainId, offset, contractAddress, }: {
4
+ account?: string | undefined;
5
+ chainId: number | undefined;
6
+ offset?: BigNumber | undefined;
7
+ contractAddress?: string | undefined;
8
+ }) => {
9
+ getApprovalState: (token: TokenInfo | null, value: string | number | BigNumber, overrideBalance?: BigNumber) => ApprovalState;
10
+ getPendingRest: (token?: TokenInfo | null) => boolean;
11
+ getMaxBalance: (token: TokenInfo | null) => string;
12
+ submitApprove: (token: TokenInfo | null, isReset?: boolean) => Promise<void>;
13
+ };
@@ -0,0 +1,8 @@
1
+ import { TokenList, TokenListType } from './type';
2
+ export interface InitTokenListProps {
3
+ tokenList?: TokenList | TokenListType;
4
+ popularTokenList?: TokenList;
5
+ }
6
+ export default function useInitTokenList({ tokenList, popularTokenList, isTon, }: InitTokenListProps & {
7
+ isTon: boolean;
8
+ }): void;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { ChainListItem } from '../../constants/chainList';
3
+ export declare function useSelectChainList(side?: 'from' | 'to'): {
4
+ chainList: ChainListItem[];
5
+ selectChainId: number | undefined;
6
+ setSelectChainId: import("react").Dispatch<import("react").SetStateAction<number | undefined>>;
7
+ };
@@ -0,0 +1,30 @@
1
+ /// <reference types="react" />
2
+ import { TokenInfo, TokenList } from './type';
3
+ import { ChainId } from '../../constants/chains';
4
+ export declare const getFuzzySearchTokenSort: (token: TokenInfo, search: string, { matchAddress, }?: {
5
+ matchAddress?: boolean | undefined;
6
+ }) => 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;
10
+ /** token pair usage */
11
+ occupiedAddrs?: string[];
12
+ /** token pair usage */
13
+ occupiedChainId?: ChainId;
14
+ /** hide props */
15
+ hiddenAddrs?: string[];
16
+ /** only show props */
17
+ showAddrs?: string[];
18
+ /** token field control */
19
+ side?: 'from' | 'to';
20
+ chainId?: number;
21
+ /** Token Picker visible */
22
+ visible?: boolean;
23
+ defaultLoadBalance?: boolean;
24
+ }): {
25
+ filter: string;
26
+ setFilter: import("react").Dispatch<import("react").SetStateAction<string>>;
27
+ showTokenList: TokenList;
28
+ onSelectToken: (token: TokenInfo) => void;
29
+ popularTokenList: TokenInfo[];
30
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { TokenInfo, TokenList } from './type';
2
+ export default function useTokenListFetchBalance({ chainId, value, tokenList, popularTokenList, visible, defaultLoadBalance, }: {
3
+ chainId: number;
4
+ value?: TokenInfo | null;
5
+ tokenList: TokenList;
6
+ popularTokenList?: TokenList;
7
+ visible?: boolean;
8
+ defaultLoadBalance?: boolean;
9
+ }): void;
@@ -0,0 +1,2 @@
1
+ import { WidgetProps } from '../../components/Widget/';
2
+ export declare function useInitPropsToRedux({ width, height, feeRate, rebateTo, colorMode, apikey, defaultChainId, defaultToToken, defaultFromToken, jsonRpcUrlMap, swapSlippage, bridgeSlippage, apiServices, crossChain, noPowerBy, tonConnect, }: WidgetProps): void;
@@ -0,0 +1,85 @@
1
+ declare const Orbiter_V3_ABI_EVM: ({
2
+ anonymous: boolean;
3
+ inputs: {
4
+ indexed: boolean;
5
+ internalType: string;
6
+ name: string;
7
+ type: string;
8
+ }[];
9
+ name: string;
10
+ type: string;
11
+ outputs?: undefined;
12
+ stateMutability?: undefined;
13
+ } | {
14
+ inputs: {
15
+ internalType: string;
16
+ name: string;
17
+ type: string;
18
+ }[];
19
+ name: string;
20
+ outputs: never[];
21
+ stateMutability: string;
22
+ type: string;
23
+ anonymous?: undefined;
24
+ })[];
25
+ declare const Orbiter_V3_ABI_STARKNET_GOERLI: ({
26
+ members: {
27
+ name: string;
28
+ offset: number;
29
+ type: string;
30
+ }[];
31
+ name: string;
32
+ size: number;
33
+ type: string;
34
+ inputs?: undefined;
35
+ outputs?: undefined;
36
+ } | {
37
+ inputs: {
38
+ name: string;
39
+ type: string;
40
+ }[];
41
+ name: string;
42
+ outputs: never[];
43
+ type: string;
44
+ members?: undefined;
45
+ size?: undefined;
46
+ })[];
47
+ declare const Orbiter_V3_ABI_STARKNET: ({
48
+ members: {
49
+ name: string;
50
+ offset: number;
51
+ type: string;
52
+ }[];
53
+ name: string;
54
+ size: number;
55
+ type: string;
56
+ data?: undefined;
57
+ keys?: undefined;
58
+ inputs?: undefined;
59
+ outputs?: undefined;
60
+ } | {
61
+ data: {
62
+ name: string;
63
+ type: string;
64
+ }[];
65
+ keys: never[];
66
+ name: string;
67
+ type: string;
68
+ members?: undefined;
69
+ size?: undefined;
70
+ inputs?: undefined;
71
+ outputs?: undefined;
72
+ } | {
73
+ inputs: {
74
+ name: string;
75
+ type: string;
76
+ }[];
77
+ name: string;
78
+ outputs: never[];
79
+ type: string;
80
+ members?: undefined;
81
+ size?: undefined;
82
+ data?: undefined;
83
+ keys?: undefined;
84
+ })[];
85
+ export { Orbiter_V3_ABI_EVM, Orbiter_V3_ABI_STARKNET, Orbiter_V3_ABI_STARKNET_GOERLI, };
@@ -0,0 +1,30 @@
1
+ declare const _default: ({
2
+ constant: boolean;
3
+ inputs: {
4
+ name: string;
5
+ type: string;
6
+ }[];
7
+ name: string;
8
+ outputs: {
9
+ name: string;
10
+ type: string;
11
+ }[];
12
+ payable: boolean;
13
+ stateMutability: "nonpayable";
14
+ type: "function";
15
+ } | {
16
+ constant: boolean;
17
+ inputs: {
18
+ name: string;
19
+ type: string;
20
+ }[];
21
+ name: string;
22
+ outputs: {
23
+ name: string;
24
+ type: string;
25
+ }[];
26
+ payable: boolean;
27
+ stateMutability: "view";
28
+ type: "function";
29
+ })[];
30
+ export default _default;
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ inputs: {
3
+ internalType: string;
4
+ name: string;
5
+ type: string;
6
+ }[];
7
+ name: string;
8
+ outputs: {
9
+ internalType: string;
10
+ name: string;
11
+ type: string;
12
+ }[];
13
+ stateMutability: string;
14
+ type: string;
15
+ }[];
16
+ export default _default;
@@ -0,0 +1,34 @@
1
+ declare const _default: ({
2
+ constant: boolean;
3
+ inputs: {
4
+ components: {
5
+ name: string;
6
+ type: string;
7
+ }[];
8
+ name: string;
9
+ type: string;
10
+ }[];
11
+ name: string;
12
+ outputs: {
13
+ name: string;
14
+ type: string;
15
+ }[];
16
+ payable: boolean;
17
+ stateMutability: string;
18
+ type: string;
19
+ } | {
20
+ constant: boolean;
21
+ inputs: {
22
+ name: string;
23
+ type: string;
24
+ }[];
25
+ name: string;
26
+ outputs: {
27
+ name: string;
28
+ type: string;
29
+ }[];
30
+ payable: boolean;
31
+ stateMutability: string;
32
+ type: string;
33
+ })[];
34
+ export default _default;
@@ -0,0 +1,18 @@
1
+ import { Contract } from '@ethersproject/contracts';
2
+ interface Web3CallData {
3
+ to: string;
4
+ data: string;
5
+ }
6
+ interface RequestThunk<T> {
7
+ callData: Web3CallData | null;
8
+ processor: (_: any, index: number) => T;
9
+ }
10
+ export declare type BatchThunk<T> = RequestThunk<T>[];
11
+ declare type BatchThunkAll<Ts extends any[]> = {
12
+ [Tidx in keyof Ts]: Ts[Tidx] extends Ts[number] ? BatchThunk<Ts[Tidx]> : never;
13
+ };
14
+ declare type BatchThunkAllResult<Ts extends any[]> = {
15
+ [Tidx in keyof Ts]: Ts[Tidx] extends Ts[number] ? Array<Ts[Tidx]> : never;
16
+ };
17
+ export declare function runAll<Ts extends any[]>(contract: Contract, contractAddress: string, ...batches: BatchThunkAll<Ts>): Promise<BatchThunkAllResult<Ts>>;
18
+ export {};
@@ -0,0 +1,9 @@
1
+ import { ChainId } from '../../constants/chains';
2
+ declare const contractMap: {
3
+ [key in ChainId]: {
4
+ MULTI_CALL: string;
5
+ DODO_APPROVE: string;
6
+ ERC20_HELPER: string;
7
+ };
8
+ };
9
+ export default contractMap;
@@ -0,0 +1,5 @@
1
+ export { default as useMultiContract, getContract } from './useMultiContract';
2
+ export { default as useFetchTokens } from './useFetchTokens';
3
+ export { default as useFetchETHBalance } from './useFetchETHBalance';
4
+ export { default as useFetchBlockNumber } from './useFetchBlockNumber';
5
+ export * from './token';
@@ -0,0 +1,3 @@
1
+ export declare const ORBITER_SDK_URL = "https://api.orbiter.finance/sdk";
2
+ export declare const ORBITER_ROUTERS_URL: string;
3
+ export declare const ORBITER_CHAINS_URL: string;
@@ -0,0 +1,12 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { BridgeRouteI } from '../../Bridge';
3
+ import { TokenInfo } from '../../Token';
4
+ import { useOrbiterRouters } from './useOrbiterRouters';
5
+ export declare function encodeOrbiterBridge({ route, fromAddress, toAddress, fromAmount, fromToken, contractAddress, }: {
6
+ route: Exclude<ReturnType<typeof useOrbiterRouters>['data'], undefined>[0];
7
+ fromAddress: string;
8
+ toAddress: string;
9
+ fromAmount: BigNumber;
10
+ fromToken: TokenInfo;
11
+ contractAddress: string;
12
+ }): Exclude<BridgeRouteI['encodeResultData'], undefined>;
@@ -0,0 +1,5 @@
1
+ export declare function useOrbiterContractMap({ skip }?: {
2
+ skip?: boolean;
3
+ }): import("@tanstack/react-query/build/legacy/types").UseQueryResult<{
4
+ bridgeContractMap: Map<number, string>;
5
+ }, Error>;
@@ -0,0 +1,21 @@
1
+ import { ChainId } from '../../../constants/chains';
2
+ interface OrbiterRoute {
3
+ key: string;
4
+ id: string;
5
+ fromChainId: ChainId;
6
+ toChainId: ChainId;
7
+ fromTokenAddress: string;
8
+ toTokenAddress: string;
9
+ product: string;
10
+ endpoint: string;
11
+ minAmt: string;
12
+ maxAmt: string;
13
+ withholdingFee: string;
14
+ tradeFee: string;
15
+ spentTime: string;
16
+ vc: string;
17
+ }
18
+ export declare function useOrbiterRouters({ skip }?: {
19
+ skip?: boolean;
20
+ }): import("@tanstack/react-query/build/legacy/types").UseQueryResult<OrbiterRoute[], Error>;
21
+ export {};
@@ -0,0 +1,2 @@
1
+ import { StaticJsonRpcProvider } from '@ethersproject/providers';
2
+ export declare function getStaticJsonRpcProvider(rpcUrl: string, chainId: number): StaticJsonRpcProvider;
@@ -0,0 +1,10 @@
1
+ import { JsonRpcProvider } from '@ethersproject/providers';
2
+ import BigNumber from 'bignumber.js';
3
+ export declare function fetchTokenAllowance({ account, tokenAddress, tokenDecimals, chainId, approveAddress, provider, }: {
4
+ account?: string;
5
+ tokenAddress: string;
6
+ tokenDecimals: number;
7
+ chainId: number;
8
+ approveAddress?: string;
9
+ provider: JsonRpcProvider;
10
+ }): Promise<BigNumber | undefined>;
@@ -0,0 +1,3 @@
1
+ export default function useFetchBlockNumber(): {
2
+ updateBlockNumber: () => Promise<void>;
3
+ };
@@ -0,0 +1 @@
1
+ export default function useFetchETHBalance(chainId?: number): void;
@@ -0,0 +1,19 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { TokenList } from '../Token';
3
+ declare type TokenResult = {
4
+ address: string;
5
+ balance: BigNumber;
6
+ allowance: BigNumber;
7
+ decimals?: number;
8
+ symbol?: string;
9
+ name?: string;
10
+ };
11
+ export default function useFetchTokens({ tokenList, blockNumber, chainId, skip, }: {
12
+ tokenList?: TokenList;
13
+ blockNumber?: number;
14
+ chainId?: number;
15
+ skip?: boolean;
16
+ }): {
17
+ data: TokenResult[] | undefined;
18
+ };
19
+ export {};
@@ -0,0 +1,14 @@
1
+ import { Contract } from '@ethersproject/contracts';
2
+ import { JsonRpcProvider } from '@ethersproject/providers';
3
+ import { BatchThunk } from './batch';
4
+ export declare function getContract(address: string, ABI: any, provider: JsonRpcProvider, account?: string): Contract;
5
+ export default function useMultiContract(chainIdProps?: number): {
6
+ getContract: (contractAddress: string, ABI: any) => Contract | undefined;
7
+ contractConfig: {
8
+ MULTI_CALL: string;
9
+ DODO_APPROVE: string;
10
+ ERC20_HELPER: string;
11
+ };
12
+ call: <T>(thunk: BatchThunk<T>) => Promise<unknown[] | undefined> | undefined;
13
+ loading: boolean;
14
+ };
@@ -0,0 +1,16 @@
1
+ import { JsonRpcProvider } from '@ethersproject/providers';
2
+ import type { TransactionRequest } from '@ethersproject/abstract-provider';
3
+ import { BigNumber as EthersBigNumber } from '@ethersproject/bignumber';
4
+ import BigNumber from 'bignumber.js';
5
+ export declare type Deferrable<T> = {
6
+ [K in keyof T]: T[K] | Promise<T[K]>;
7
+ };
8
+ export declare enum WatchResult {
9
+ Failed = 0,
10
+ Success = 1,
11
+ Warning = 2
12
+ }
13
+ export declare const getEstimateGas: (params: any, provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
14
+ export declare const getGasPrice: (provider: JsonRpcProvider) => Promise<EthersBigNumber | null>;
15
+ export declare const sendTransaction: (params: Deferrable<TransactionRequest>, provider: JsonRpcProvider) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
16
+ export declare const approve: (tokenAddress: string, accountAddress: string, contractAddress: string, allowance: BigNumber, provider: JsonRpcProvider, account?: string) => Promise<import("@ethersproject/abstract-provider").TransactionResponse>;
@@ -0,0 +1,4 @@
1
+ export declare function useDefaultSlippage(isBridge: boolean | undefined): {
2
+ defaultSlippage: number;
3
+ loading: boolean | undefined;
4
+ };
@@ -0,0 +1,2 @@
1
+ import { APIServiceKey } from '../../constants/api';
2
+ export declare function useGetAPIService(key: APIServiceKey): string;
@@ -0,0 +1,13 @@
1
+ import { TokenInfo } from '../Token';
2
+ export declare type GetAutoSlippage = (options: {
3
+ fromToken: TokenInfo | null;
4
+ toToken: TokenInfo | null;
5
+ }) => Promise<number | undefined> | number | undefined;
6
+ /**
7
+ * Sets the slippage based on the incoming getAutoSlippage method. If there is an interface error or no data is returned, the default data with a lower priority will be used.
8
+ */
9
+ export declare function useSetAutoSlippage({ fromToken, toToken, getAutoSlippage, }: {
10
+ fromToken: TokenInfo | null;
11
+ toToken: TokenInfo | null;
12
+ getAutoSlippage?: GetAutoSlippage;
13
+ }): void;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ import { WidgetProps } from './components/Widget';
3
+ export declare type SwapWidgetProps = WidgetProps;
4
+ export type { TokenInfo } from './hooks/Token/type';
5
+ export declare function SwapWidget(props: SwapWidgetProps): JSX.Element;
6
+ export declare function InitSwapWidget(props: SwapWidgetProps): void;
@@ -0,0 +1,9 @@
1
+ import { AppThunkAction } from '.';
2
+ import { State } from '../reducers/globals';
3
+ export declare const setGlobalProps: (globalProps: Partial<State>) => AppThunkAction;
4
+ export declare const setAutoConnectLoading: (loading: boolean) => AppThunkAction;
5
+ export declare const setAutoSlippage: (autoSlippage: {
6
+ loading: boolean;
7
+ value: number | null;
8
+ }) => AppThunkAction;
9
+ export declare const setAutoSlippageLoading: (loading: boolean) => AppThunkAction;
@@ -0,0 +1,4 @@
1
+ import { Action, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit';
2
+ import { RootState } from '../reducers';
3
+ export declare type AppThunkAction<Ret = void> = ThunkAction<Ret, RootState, unknown, Action<string>>;
4
+ export declare type AppThunkDispatch = ThunkDispatch<RootState, unknown, Action<string>>;
@@ -0,0 +1,6 @@
1
+ import { AppThunkAction } from '.';
2
+ import { Slippage, TxDdl } from '../reducers/settings';
3
+ import { ColorMode } from '../reducers/settings';
4
+ export declare const setColorMode: (colorMode: ColorMode) => AppThunkAction;
5
+ export declare const setSlippage: (slippage: Slippage) => AppThunkAction;
6
+ export declare const setTxDdl: (ddl: TxDdl) => AppThunkAction;
@@ -0,0 +1,15 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { AppThunkAction } from '.';
3
+ import { TokenList, TokenInfo } from '../../hooks/Token';
4
+ import { AccountBalances, SlippageWithToken } from '../reducers/token';
5
+ export declare const setTokenList: (tokenList: TokenList) => AppThunkAction;
6
+ export declare const setPopularTokenList: (popularTokenList: TokenList) => AppThunkAction;
7
+ export declare const setSlippageWithTokens: (slippageWithTokens: SlippageWithToken[]) => AppThunkAction;
8
+ export declare const setDefaultFromToken: (token: TokenInfo) => AppThunkAction;
9
+ export declare const setDefaultToToken: (token: TokenInfo) => AppThunkAction;
10
+ export declare const setEthBalance: (chainId: number, balance: BigNumber) => AppThunkAction;
11
+ export declare const setTokenBalances: (accountBalances: AccountBalances) => AppThunkAction;
12
+ export declare const setTokenAllowances: (allowance: BigNumber) => AppThunkAction;
13
+ export declare const setBalanceLoadings: (balanceLoadings: {
14
+ [x: string]: boolean;
15
+ }) => AppThunkAction;
@@ -0,0 +1,5 @@
1
+ import { AppThunkAction } from '.';
2
+ import { ChainId } from '../../constants/chains';
3
+ export declare const setDefaultChainId: (chainId: ChainId) => AppThunkAction;
4
+ export declare const setFromTokenChainId: (chainId: ChainId | undefined) => AppThunkAction;
5
+ export declare const setBlockNumber: (blockNumber: number) => AppThunkAction;
@@ -0,0 +1,6 @@
1
+ export declare const store: import("@reduxjs/toolkit").EnhancedStore<import("redux").CombinedState<{
2
+ settings: import("./reducers/settings").State;
3
+ wallet: import("./reducers/wallet").State;
4
+ token: import("./reducers/token").State;
5
+ globals: import("./reducers/globals").State;
6
+ }>, import("redux").AnyAction, any>;
@@ -0,0 +1,23 @@
1
+ import { AnyAction } from 'redux';
2
+ import { SwapWidgetProps } from '../..';
3
+ export declare enum ContractStatus {
4
+ Initial = "Initial",
5
+ Pending = "Pending",
6
+ ApproveSuccess = "ApproveSuccess",
7
+ TxSuccess = "TxSuccess",
8
+ Failed = "Failed"
9
+ }
10
+ export interface State extends SwapWidgetProps {
11
+ isReverseRouting?: boolean;
12
+ contractStatus?: ContractStatus;
13
+ autoConnectLoading?: boolean;
14
+ showCoingecko?: boolean;
15
+ /** source: props.getAutoSlippage */
16
+ autoSlippage?: {
17
+ loading: boolean;
18
+ value: number | null;
19
+ };
20
+ }
21
+ export declare const initialState: State;
22
+ declare const _default: (state: State | undefined, action: AnyAction) => State;
23
+ export default _default;
@@ -0,0 +1,17 @@
1
+ import { State as settingsState } from './settings';
2
+ import { State as walletState } from './wallet';
3
+ import { State as tokenState } from './token';
4
+ import { State as globalState } from './globals';
5
+ export interface RootState {
6
+ settings: settingsState;
7
+ wallet: walletState;
8
+ token: tokenState;
9
+ globals: globalState;
10
+ }
11
+ declare const _default: () => import("redux").Reducer<import("redux").CombinedState<{
12
+ settings: settingsState;
13
+ wallet: walletState;
14
+ token: tokenState;
15
+ globals: globalState;
16
+ }>, import("redux").AnyAction>;
17
+ export default _default;
@@ -0,0 +1,13 @@
1
+ import { AnyAction } from 'redux';
2
+ import { PaletteMode } from '@dodoex/components';
3
+ export declare type ColorMode = PaletteMode | 'system';
4
+ export declare type Slippage = string | null;
5
+ export declare type TxDdl = number | '';
6
+ export declare type State = {
7
+ colorMode: ColorMode;
8
+ slippage: Slippage;
9
+ ddl: TxDdl;
10
+ };
11
+ export declare const initialState: State;
12
+ declare const _default: (state: State | undefined, action: AnyAction) => State;
13
+ export default _default;
@@ -0,0 +1,31 @@
1
+ import BigNumber from 'bignumber.js';
2
+ import { AnyAction } from 'redux';
3
+ import type { TokenList, DefaultTokenInfo } from '../../hooks/Token';
4
+ export declare type AccountBalance = {
5
+ tokenBalances?: BigNumber;
6
+ tokenAllowances?: BigNumber;
7
+ };
8
+ export declare type AccountBalances = {
9
+ [key in string]: AccountBalance;
10
+ };
11
+ export declare type SlippageWithToken = {
12
+ slippage: string;
13
+ tokens: string[];
14
+ };
15
+ export declare type State = {
16
+ tokenList: TokenList;
17
+ popularTokenList: TokenList;
18
+ ethBalance: {
19
+ [key: number]: BigNumber;
20
+ };
21
+ accountBalances: AccountBalances;
22
+ balanceLoadings: {
23
+ [key in string]: boolean;
24
+ };
25
+ slippageWithTokens: SlippageWithToken[];
26
+ defaultFromToken?: DefaultTokenInfo;
27
+ defaultToToken?: DefaultTokenInfo;
28
+ };
29
+ export declare const initialState: State;
30
+ declare const _default: (state: State | undefined, action: AnyAction) => State;
31
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { AnyAction } from 'redux';
2
+ import { ChainId } from '../../constants/chains';
3
+ export declare type State = {
4
+ chainId: ChainId;
5
+ fromTokenChainId?: ChainId;
6
+ latestBlockNumber: number;
7
+ };
8
+ export declare const initialState: State;
9
+ declare const _default: (state: State | undefined, action: AnyAction) => State;
10
+ export default _default;