@curvefi/api 1.25.1 → 2.1.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 (213) hide show
  1. package/README.md +797 -590
  2. package/docs/v1/README.md +916 -0
  3. package/lib/boosting.d.ts +12 -12
  4. package/lib/boosting.js +23 -23
  5. package/lib/constants/abis/{json/2pool → 2pool}/swap.json +0 -0
  6. package/lib/constants/abis/{json/3pool → 3pool}/swap.json +0 -0
  7. package/lib/constants/abis/{json/4pool → 4pool}/swap.json +0 -0
  8. package/lib/constants/abis/{json/ERC20.json → ERC20.json} +0 -0
  9. package/lib/constants/abis/{json/aave → aave}/rewards.json +0 -0
  10. package/lib/constants/abis/{json/aave → aave}/swap.json +0 -0
  11. package/lib/constants/abis/{json/address_provider.json → address_provider.json} +0 -0
  12. package/lib/constants/abis/{json/ankreth → ankreth}/sCurveRewards.json +0 -0
  13. package/lib/constants/abis/{json/ankreth → ankreth}/swap.json +0 -0
  14. package/lib/constants/abis/{json/atricrypto3 → atricrypto3}/swap.json +0 -0
  15. package/lib/constants/abis/{json/atricrypto3 → atricrypto3}/zap.json +0 -0
  16. package/lib/constants/abis/{json/bbtc → bbtc}/deposit.json +0 -0
  17. package/lib/constants/abis/{json/bbtc → bbtc}/swap.json +0 -0
  18. package/lib/constants/abis/{json/busd → busd}/deposit.json +0 -0
  19. package/lib/constants/abis/{json/busd → busd}/swap.json +0 -0
  20. package/lib/constants/abis/{json/cERC20.json → cERC20.json} +0 -0
  21. package/lib/constants/abis/{json/compound → compound}/deposit.json +0 -0
  22. package/lib/constants/abis/{json/compound → compound}/swap.json +0 -0
  23. package/lib/constants/abis/{json/crveth → crveth}/swap.json +0 -0
  24. package/lib/constants/abis/{json/deposit_and_stake.json → deposit_and_stake.json} +0 -0
  25. package/lib/constants/abis/{json/dusd → dusd}/deposit.json +0 -0
  26. package/lib/constants/abis/{json/dusd → dusd}/sCurveRewards.json +0 -0
  27. package/lib/constants/abis/{json/dusd → dusd}/swap.json +0 -0
  28. package/lib/constants/abis/{json/eurs → eurs}/sCurveRewards.json +0 -0
  29. package/lib/constants/abis/{json/eurs → eurs}/swap.json +0 -0
  30. package/lib/constants/abis/{json/eursusd → eursusd}/swap.json +0 -0
  31. package/lib/constants/abis/{json/eurt → eurt}/swap.json +0 -0
  32. package/lib/constants/abis/{json/eurtusd → eurtusd}/deposit.json +0 -0
  33. package/lib/constants/abis/{json/eurtusd → eurtusd}/swap.json +0 -0
  34. package/lib/constants/abis/{json/factory-crypto → factory-crypto}/factory-crypto-pool-2.json +0 -0
  35. package/lib/constants/abis/{json/factory-crypto.json → factory-crypto.json} +0 -0
  36. package/lib/constants/abis/{json/factory-v2 → factory-v2}/DepositZapMetaBtcPolygon.json +0 -0
  37. package/lib/constants/abis/{json/factory-v2 → factory-v2}/DepositZapMetaUsdPolygon.json +0 -0
  38. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTC.json +0 -0
  39. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCBalances.json +0 -0
  40. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCBalancesRen.json +0 -0
  41. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaBTCRen.json +0 -0
  42. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaUSD.json +0 -0
  43. package/lib/constants/abis/{json/factory-v2 → factory-v2}/MetaUSDBalances.json +0 -0
  44. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Balances.json +0 -0
  45. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Basic.json +0 -0
  46. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2ETH.json +0 -0
  47. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain2Optimized.json +0 -0
  48. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Balances.json +0 -0
  49. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Basic.json +0 -0
  50. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3ETH.json +0 -0
  51. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain3Optimized.json +0 -0
  52. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Balances.json +0 -0
  53. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Basic.json +0 -0
  54. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4ETH.json +0 -0
  55. package/lib/constants/abis/{json/factory-v2 → factory-v2}/Plain4Optimized.json +0 -0
  56. package/lib/constants/abis/{json/factory.json → factory.json} +0 -0
  57. package/lib/constants/abis/{json/factoryPools → factoryPools}/deposit.json +0 -0
  58. package/lib/constants/abis/{json/factoryPools → factoryPools}/rewards.json +0 -0
  59. package/lib/constants/abis/{json/factoryPools → factoryPools}/swap.json +0 -0
  60. package/lib/constants/abis/{json/gauge.json → gauge.json} +0 -0
  61. package/lib/constants/abis/{json/gauge_factory.json → gauge_factory.json} +0 -0
  62. package/lib/constants/abis/{json/gauge_rewards_only.json → gauge_rewards_only.json} +0 -0
  63. package/lib/constants/abis/{json/gauge_synthetix.json → gauge_synthetix.json} +0 -0
  64. package/lib/constants/abis/{json/gauge_v2.json → gauge_v2.json} +0 -0
  65. package/lib/constants/abis/{json/gauge_v3.json → gauge_v3.json} +0 -0
  66. package/lib/constants/abis/{json/gauge_v4.json → gauge_v4.json} +0 -0
  67. package/lib/constants/abis/{json/gauge_v5.json → gauge_v5.json} +0 -0
  68. package/lib/constants/abis/{json/gaugecontroller.json → gaugecontroller.json} +0 -0
  69. package/lib/constants/abis/{json/gusd → gusd}/deposit.json +0 -0
  70. package/lib/constants/abis/{json/gusd → gusd}/swap.json +0 -0
  71. package/lib/constants/abis/{json/hbtc → hbtc}/swap.json +0 -0
  72. package/lib/constants/abis/{json/husd → husd}/deposit.json +0 -0
  73. package/lib/constants/abis/{json/husd → husd}/swap.json +0 -0
  74. package/lib/constants/abis/{json/ib → ib}/swap.json +0 -0
  75. package/lib/constants/abis/{json/iearn → iearn}/deposit.json +0 -0
  76. package/lib/constants/abis/{json/iearn → iearn}/sCurveRewards.json +0 -0
  77. package/lib/constants/abis/{json/iearn → iearn}/swap.json +0 -0
  78. package/lib/constants/abis/{json/link → link}/swap.json +0 -0
  79. package/lib/constants/abis/{json/minter.json → minter.json} +0 -0
  80. package/lib/constants/abis/{json/musd → musd}/deposit.json +0 -0
  81. package/lib/constants/abis/{json/musd → musd}/sCurveRewards.json +0 -0
  82. package/lib/constants/abis/{json/musd → musd}/swap.json +0 -0
  83. package/lib/constants/abis/{json/obtc → obtc}/deposit.json +0 -0
  84. package/lib/constants/abis/{json/obtc → obtc}/sCurveRewards.json +0 -0
  85. package/lib/constants/abis/{json/obtc → obtc}/swap.json +0 -0
  86. package/lib/constants/abis/{json/paave → paave}/rewards.json +0 -0
  87. package/lib/constants/abis/{json/pax → pax}/deposit.json +0 -0
  88. package/lib/constants/abis/{json/pax → pax}/swap.json +0 -0
  89. package/lib/constants/abis/{json/pbtc → pbtc}/deposit.json +0 -0
  90. package/lib/constants/abis/{json/pbtc → pbtc}/sCurveRewards.json +0 -0
  91. package/lib/constants/abis/{json/pbtc → pbtc}/swap.json +0 -0
  92. package/lib/constants/abis/{json/rai → rai}/deposit.json +0 -0
  93. package/lib/constants/abis/{json/rai → rai}/swap.json +0 -0
  94. package/lib/constants/abis/{json/registry_exchange.json → registry_exchange.json} +0 -0
  95. package/lib/constants/abis/{json/ren → ren}/swap.json +0 -0
  96. package/lib/constants/abis/{json/ren-polygon → ren-polygon}/swap.json +0 -0
  97. package/lib/constants/abis/{json/reth → reth}/swap.json +0 -0
  98. package/lib/constants/abis/{json/router.json → router.json} +0 -0
  99. package/lib/constants/abis/{json/rsv → rsv}/deposit.json +0 -0
  100. package/lib/constants/abis/{json/rsv → rsv}/sCurveRewards.json +0 -0
  101. package/lib/constants/abis/{json/rsv → rsv}/swap.json +0 -0
  102. package/lib/constants/abis/{json/saave → saave}/swap.json +0 -0
  103. package/lib/constants/abis/{json/sbtc → sbtc}/sCurveRewards.json +0 -0
  104. package/lib/constants/abis/{json/sbtc → sbtc}/swap.json +0 -0
  105. package/lib/constants/abis/{json/seth → seth}/swap.json +0 -0
  106. package/lib/constants/abis/{json/steth → steth}/sCurveRewards.json +0 -0
  107. package/lib/constants/abis/{json/steth → steth}/swap.json +0 -0
  108. package/lib/constants/abis/{json/streamer.json → streamer.json} +0 -0
  109. package/lib/constants/abis/{json/susdv2 → susdv2}/deposit.json +0 -0
  110. package/lib/constants/abis/{json/susdv2 → susdv2}/sCurveRewards.json +0 -0
  111. package/lib/constants/abis/{json/susdv2 → susdv2}/swap.json +0 -0
  112. package/lib/constants/abis/{json/tbtc → tbtc}/deposit.json +0 -0
  113. package/lib/constants/abis/{json/tbtc → tbtc}/sCurveRewards.json +0 -0
  114. package/lib/constants/abis/{json/tbtc → tbtc}/swap.json +0 -0
  115. package/lib/constants/abis/{json/tricrypto2 → tricrypto2}/deposit.json +0 -0
  116. package/lib/constants/abis/{json/tricrypto2 → tricrypto2}/swap.json +0 -0
  117. package/lib/constants/abis/{json/usdk → usdk}/deposit.json +0 -0
  118. package/lib/constants/abis/{json/usdk → usdk}/swap.json +0 -0
  119. package/lib/constants/abis/{json/usdn → usdn}/deposit.json +0 -0
  120. package/lib/constants/abis/{json/usdn → usdn}/swap.json +0 -0
  121. package/lib/constants/abis/{json/usdp → usdp}/deposit.json +0 -0
  122. package/lib/constants/abis/{json/usdp → usdp}/swap.json +0 -0
  123. package/lib/constants/abis/{json/usdt → usdt}/deposit.json +0 -0
  124. package/lib/constants/abis/{json/usdt → usdt}/swap.json +0 -0
  125. package/lib/constants/abis/{json/ust → ust}/deposit.json +0 -0
  126. package/lib/constants/abis/{json/ust → ust}/swap.json +0 -0
  127. package/lib/constants/abis/{json/votingescrow.json → votingescrow.json} +0 -0
  128. package/lib/constants/abis/{json/yERC20.json → yERC20.json} +0 -0
  129. package/lib/constants/aliases.d.ts +2 -24
  130. package/lib/constants/aliases.js +5 -4
  131. package/lib/constants/{coins-ethereum.d.ts → coins/ethereum.d.ts} +0 -9
  132. package/lib/constants/{coins-ethereum.js → coins/ethereum.js} +12 -23
  133. package/lib/constants/{coins-polygon.d.ts → coins/polygon.d.ts} +0 -12
  134. package/lib/constants/{coins-polygon.js → coins/polygon.js} +8 -20
  135. package/lib/constants/pools/ethereum.d.ts +2 -0
  136. package/lib/constants/{abis/abis-ethereum.js → pools/ethereum.js} +517 -1012
  137. package/lib/constants/pools/index.d.ts +3 -0
  138. package/lib/constants/pools/index.js +7 -0
  139. package/lib/constants/pools/polygon.d.ts +4 -0
  140. package/lib/constants/{abis/abis-polygon.js → pools/polygon.js} +53 -81
  141. package/lib/constants/utils.d.ts +5 -0
  142. package/lib/constants/utils.js +69 -0
  143. package/lib/curve.d.ts +10 -32
  144. package/lib/curve.js +188 -232
  145. package/lib/external-api.d.ts +3 -1
  146. package/lib/external-api.js +34 -1
  147. package/lib/factory/constants.d.ts +15 -15
  148. package/lib/factory/constants.js +19 -19
  149. package/lib/factory/factory-api.d.ts +2 -2
  150. package/lib/factory/factory-api.js +52 -45
  151. package/lib/factory/factory-crypto.d.ts +2 -2
  152. package/lib/factory/factory-crypto.js +23 -31
  153. package/lib/factory/factory.d.ts +2 -2
  154. package/lib/factory/factory.js +53 -66
  155. package/lib/index.d.ts +37 -53
  156. package/lib/index.js +28 -35
  157. package/lib/interfaces.d.ts +35 -72
  158. package/lib/pools/PoolTemplate.d.ts +212 -0
  159. package/lib/pools/PoolTemplate.js +2371 -0
  160. package/lib/pools/index.d.ts +3 -0
  161. package/lib/pools/index.js +7 -0
  162. package/lib/pools/mixins/common.d.ts +3 -0
  163. package/lib/pools/mixins/common.js +77 -0
  164. package/lib/pools/mixins/depositBalancedAmountsMixins.d.ts +5 -0
  165. package/lib/pools/mixins/depositBalancedAmountsMixins.js +145 -0
  166. package/lib/pools/mixins/depositBonusMixins.d.ts +5 -0
  167. package/lib/pools/mixins/depositBonusMixins.js +164 -0
  168. package/lib/pools/mixins/depositMixins.d.ts +5 -0
  169. package/lib/pools/mixins/depositMixins.js +373 -0
  170. package/lib/pools/mixins/depositWrappedMixins.d.ts +3 -0
  171. package/lib/pools/mixins/depositWrappedMixins.js +243 -0
  172. package/lib/pools/mixins/poolBalancesMixin.d.ts +4 -0
  173. package/lib/pools/mixins/poolBalancesMixin.js +129 -0
  174. package/lib/pools/mixins/swapMixins.d.ts +4 -0
  175. package/lib/pools/mixins/swapMixins.js +313 -0
  176. package/lib/pools/mixins/swapWrappedMixins.d.ts +4 -0
  177. package/lib/pools/mixins/swapWrappedMixins.js +297 -0
  178. package/lib/pools/mixins/withdrawExpectedMixins.d.ts +6 -0
  179. package/lib/pools/mixins/withdrawExpectedMixins.js +164 -0
  180. package/lib/pools/mixins/withdrawImbalanceMixins.d.ts +5 -0
  181. package/lib/pools/mixins/withdrawImbalanceMixins.js +348 -0
  182. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.d.ts +3 -0
  183. package/lib/pools/mixins/withdrawImbalanceWrappedMixins.js +207 -0
  184. package/lib/pools/mixins/withdrawMixins.d.ts +5 -0
  185. package/lib/pools/mixins/withdrawMixins.js +347 -0
  186. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.d.ts +5 -0
  187. package/lib/pools/mixins/withdrawOneCoinExpectedMixins.js +104 -0
  188. package/lib/pools/mixins/withdrawOneCoinMixins.d.ts +5 -0
  189. package/lib/pools/mixins/withdrawOneCoinMixins.js +347 -0
  190. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.d.ts +3 -0
  191. package/lib/pools/mixins/withdrawOneCoinWrappedExpectedMixins.js +72 -0
  192. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.d.ts +3 -0
  193. package/lib/pools/mixins/withdrawOneCoinWrappedMixins.js +205 -0
  194. package/lib/pools/mixins/withdrawWrappedMixins.d.ts +3 -0
  195. package/lib/pools/mixins/withdrawWrappedMixins.js +206 -0
  196. package/lib/pools/poolConstructor.d.ts +2 -0
  197. package/lib/pools/poolConstructor.js +228 -0
  198. package/lib/pools/utils.d.ts +4 -0
  199. package/lib/pools/utils.js +85 -0
  200. package/lib/router.d.ts +13 -0
  201. package/lib/router.js +651 -0
  202. package/lib/utils.d.ts +11 -16
  203. package/lib/utils.js +47 -130
  204. package/package.json +1 -1
  205. package/lib/constants/abis/abis-ethereum.d.ts +0 -4
  206. package/lib/constants/abis/abis-polygon.d.ts +0 -4
  207. package/lib/constants/abis/json/aRewards.json +0 -1
  208. package/lib/constants/abis/json/compound/migration.json +0 -57
  209. package/lib/constants/abis/json/compound/oldSwap.json +0 -688
  210. package/lib/constants/abis/json/ren/adapter.json +0 -1
  211. package/lib/constants/abis/json/sbtc/adapter.json +0 -1
  212. package/lib/pools.d.ts +0 -267
  213. package/lib/pools.js +0 -4742
@@ -1 +0,0 @@
1
- [{ "inputs": [{ "internalType": "contract ICurveExchange", "name": "_exchange", "type": "address" }, { "internalType": "contract IGatewayRegistry", "name": "_registry", "type": "address" }, { "internalType": "contract IERC20", "name": "_wbtc", "type": "address" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "burnAmount", "type": "uint256" }], "name": "Burn", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "curveAmount", "type": "uint256" }], "name": "DepositMintedCurve", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" }], "name": "MetaTransactionExecuted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "renAmount", "type": "uint256" }], "name": "ReceiveRen", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "wbtcAmount", "type": "uint256" }], "name": "SwapReceived", "type": "event" }, { "stateMutability": "payable", "type": "fallback" }, { "inputs": [], "name": "chi", "outputs": [{ "internalType": "contract IFreeFromUpTo", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "exchange", "outputs": [{ "internalType": "contract ICurveExchange", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "userAddress", "type": "address" }, { "internalType": "bytes", "name": "functionSignature", "type": "bytes" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "executeMetaTransaction", "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "getChainID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "getNonce", "outputs": [{ "internalType": "uint256", "name": "nonce", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256[2]", "name": "_amounts", "type": "uint256[2]" }, { "internalType": "uint256", "name": "_min_mint_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_new_min_mint_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintNoDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_minExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_newMinExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" }, { "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintNoSwap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256[2]", "name": "_amounts", "type": "uint256[2]" }, { "internalType": "uint256", "name": "_min_mint_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_new_min_mint_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_minExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_newMinExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" }, { "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenSwap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "encoded", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "recoverStuck", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "registry", "outputs": [{ "internalType": "contract IGatewayRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256[2]", "name": "amounts", "type": "uint256[2]" }, { "internalType": "uint256", "name": "max_burn_amount", "type": "uint256" }], "name": "removeLiquidityImbalanceThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_token_amounts", "type": "uint256" }, { "internalType": "uint256", "name": "min_amount", "type": "uint256" }], "name": "removeLiquidityOneCoinThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256[2]", "name": "min_amounts", "type": "uint256[2]" }], "name": "removeLiquidityThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_minRenbtcAmount", "type": "uint256" }], "name": "swapThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "chainID", "type": "uint256" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "verify", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "pure", "type": "function" }, { "stateMutability": "payable", "type": "receive" }]
@@ -1 +0,0 @@
1
- [{ "inputs": [{ "internalType": "contract ICurveExchange", "name": "_exchange", "type": "address" }, { "internalType": "address", "name": "_curveTokenAddress", "type": "address" }, { "internalType": "contract IGatewayRegistry", "name": "_registry", "type": "address" }, { "internalType": "contract IERC20[3]", "name": "_coins", "type": "address[3]" }], "stateMutability": "nonpayable", "type": "constructor" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "burnAmount", "type": "uint256" }], "name": "Burn", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "curveAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256[3]", "name": "amounts", "type": "uint256[3]" }], "name": "DepositMintedCurve", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "address", "name": "userAddress", "type": "address" }, { "indexed": false, "internalType": "address payable", "name": "relayerAddress", "type": "address" }, { "indexed": false, "internalType": "bytes", "name": "functionSignature", "type": "bytes" }], "name": "MetaTransactionExecuted", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "renAmount", "type": "uint256" }], "name": "ReceiveRen", "type": "event" }, { "anonymous": false, "inputs": [{ "indexed": false, "internalType": "uint256", "name": "mintedAmount", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "erc20BTCAmount", "type": "uint256" }, { "indexed": false, "internalType": "int128", "name": "j", "type": "int128" }], "name": "SwapReceived", "type": "event" }, { "stateMutability": "payable", "type": "fallback" }, { "inputs": [], "name": "chi", "outputs": [{ "internalType": "contract IFreeFromUpTo", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "exchange", "outputs": [{ "internalType": "contract ICurveExchange", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "userAddress", "type": "address" }, { "internalType": "bytes", "name": "functionSignature", "type": "bytes" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "executeMetaTransaction", "outputs": [{ "internalType": "bytes", "name": "", "type": "bytes" }], "stateMutability": "payable", "type": "function" }, { "inputs": [], "name": "getChainID", "outputs": [{ "internalType": "uint256", "name": "", "type": "uint256" }], "stateMutability": "pure", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "user", "type": "address" }], "name": "getNonce", "outputs": [{ "internalType": "uint256", "name": "nonce", "type": "uint256" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "address payable", "name": "_wbtcDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256[3]", "name": "_amounts", "type": "uint256[3]" }, { "internalType": "uint256", "name": "_min_mint_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_new_min_mint_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenDeposit", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "uint256", "name": "_minExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_newMinExchangeRate", "type": "uint256" }, { "internalType": "uint256", "name": "_slippage", "type": "uint256" }, { "internalType": "int128", "name": "_j", "type": "int128" }, { "internalType": "address payable", "name": "_coinDestination", "type": "address" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "mintThenSwap", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "encoded", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "bytes32", "name": "_nHash", "type": "bytes32" }, { "internalType": "bytes", "name": "_sig", "type": "bytes" }], "name": "recoverStuck", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "registry", "outputs": [{ "internalType": "contract IGatewayRegistry", "name": "", "type": "address" }], "stateMutability": "view", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "address", "name": "_coinDestination", "type": "address" }, { "internalType": "uint256[3]", "name": "amounts", "type": "uint256[3]" }, { "internalType": "uint256", "name": "max_burn_amount", "type": "uint256" }], "name": "removeLiquidityImbalanceThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_token_amounts", "type": "uint256" }, { "internalType": "uint256", "name": "min_amount", "type": "uint256" }, { "internalType": "uint8", "name": "_i", "type": "uint8" }], "name": "removeLiquidityOneCoinThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "address", "name": "_coinDestination", "type": "address" }, { "internalType": "uint256", "name": "amount", "type": "uint256" }, { "internalType": "uint256[3]", "name": "min_amounts", "type": "uint256[3]" }], "name": "removeLiquidityThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "bytes", "name": "_btcDestination", "type": "bytes" }, { "internalType": "uint256", "name": "_amount", "type": "uint256" }, { "internalType": "uint256", "name": "_minRenbtcAmount", "type": "uint256" }, { "internalType": "uint8", "name": "_i", "type": "uint8" }], "name": "swapThenBurn", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [{ "internalType": "address", "name": "owner", "type": "address" }, { "internalType": "string", "name": "message", "type": "string" }, { "internalType": "string", "name": "length", "type": "string" }, { "internalType": "uint256", "name": "nonce", "type": "uint256" }, { "internalType": "uint256", "name": "chainID", "type": "uint256" }, { "internalType": "bytes32", "name": "sigR", "type": "bytes32" }, { "internalType": "bytes32", "name": "sigS", "type": "bytes32" }, { "internalType": "uint8", "name": "sigV", "type": "uint8" }], "name": "verify", "outputs": [{ "internalType": "bool", "name": "", "type": "bool" }], "stateMutability": "pure", "type": "function" }, { "stateMutability": "payable", "type": "receive" }]
package/lib/pools.d.ts DELETED
@@ -1,267 +0,0 @@
1
- import { ethers } from "ethers";
2
- import BigNumber from 'bignumber.js';
3
- import { DictInterface, IRouteStep, RewardsApyInterface } from './interfaces';
4
- export declare class Pool {
5
- id: string;
6
- name: string;
7
- fullName: string;
8
- symbol: string;
9
- referenceAsset: string;
10
- swap: string;
11
- zap: string | null;
12
- lpToken: string;
13
- gauge: string;
14
- rewardContract: string | null;
15
- underlyingCoins: string[];
16
- coins: string[];
17
- underlyingCoinAddresses: string[];
18
- coinAddresses: string[];
19
- underlyingDecimals: number[];
20
- decimals: number[];
21
- useLending: boolean[];
22
- isMeta: boolean;
23
- isFake: boolean;
24
- isCrypto: boolean;
25
- basePool: string;
26
- isFactory: boolean;
27
- isMetaFactory: boolean;
28
- isPlainFactory: boolean;
29
- isCryptoFactory: boolean;
30
- rewardTokens: string[];
31
- estimateGas: {
32
- addLiquidityApprove: (amounts: string[]) => Promise<number>;
33
- addLiquidity: (amounts: string[]) => Promise<number>;
34
- depositAndStakeApprove: (amounts: string[]) => Promise<number>;
35
- depositAndStake: (amounts: string[]) => Promise<number>;
36
- addLiquidityWrappedApprove: (amounts: string[]) => Promise<number>;
37
- addLiquidityWrapped: (amounts: string[]) => Promise<number>;
38
- depositAndStakeWrappedApprove: (amounts: string[]) => Promise<number>;
39
- depositAndStakeWrapped: (amounts: string[]) => Promise<number>;
40
- gaugeDepositApprove: (lpTokenAmount: string) => Promise<number>;
41
- gaugeDeposit: (lpTokenAmount: string) => Promise<number>;
42
- gaugeWithdraw: (lpTokenAmount: string) => Promise<number>;
43
- removeLiquidityApprove: (lpTokenAmount: string) => Promise<number>;
44
- removeLiquidity: (lpTokenAmount: string) => Promise<number>;
45
- removeLiquidityWrapped: (lpTokenAmount: string) => Promise<number>;
46
- removeLiquidityImbalanceApprove: (amounts: string[]) => Promise<number>;
47
- removeLiquidityImbalance: (amounts: string[]) => Promise<number>;
48
- removeLiquidityImbalanceWrapped: (amounts: string[]) => Promise<number>;
49
- removeLiquidityOneCoinApprove: (lpTokenAmount: string, coin: string | number) => Promise<number>;
50
- removeLiquidityOneCoin: (lpTokenAmount: string, coin: string | number) => Promise<number>;
51
- removeLiquidityOneCoinWrapped: (lpTokenAmount: string, coin: string | number) => Promise<number>;
52
- exchangeApprove: (inputCoin: string | number, amount: string) => Promise<number>;
53
- exchange: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number) => Promise<number>;
54
- exchangeWrappedApprove: (inputCoin: string | number, amount: string) => Promise<number>;
55
- exchangeWrapped: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage: number) => Promise<number>;
56
- };
57
- stats: {
58
- getParameters: () => Promise<{
59
- virtualPrice: string;
60
- fee: string;
61
- adminFee: string;
62
- A: string;
63
- gamma?: string;
64
- }>;
65
- getPoolBalances: () => Promise<string[]>;
66
- getPoolWrappedBalances: () => Promise<string[]>;
67
- getTotalLiquidity: (useApi?: boolean) => Promise<string>;
68
- getVolume: () => Promise<string>;
69
- getBaseApy: () => Promise<{
70
- day: string;
71
- week: string;
72
- month: string;
73
- total: string;
74
- }>;
75
- getTokenApy: () => Promise<[baseApy: string, boostedApy: string]>;
76
- getRewardsApy: () => Promise<RewardsApyInterface[]>;
77
- };
78
- constructor(id: string);
79
- calcLpTokenAmount: (amounts: string[], isDeposit?: boolean) => Promise<string>;
80
- calcLpTokenAmountWrapped: (amounts: string[], isDeposit?: boolean) => Promise<string>;
81
- private getParameters;
82
- private getPoolBalances;
83
- private getPoolWrappedBalances;
84
- private getTotalLiquidity;
85
- private _getPoolStats;
86
- private getVolume;
87
- private getBaseApy;
88
- private getTokenApy;
89
- private getRewardsApy;
90
- addLiquidityExpected: (amounts: string[]) => Promise<string>;
91
- addLiquiditySlippage: (amounts: string[]) => Promise<string>;
92
- addLiquidityIsApproved: (amounts: string[]) => Promise<boolean>;
93
- private addLiquidityApproveEstimateGas;
94
- addLiquidityApprove: (amounts: string[]) => Promise<string[]>;
95
- private addLiquidityEstimateGas;
96
- balancedAmounts: () => Promise<string[]>;
97
- addLiquidity: (amounts: string[]) => Promise<string>;
98
- depositAndStakeExpected: (amounts: string[]) => Promise<string>;
99
- depositAndStakeSlippage: (amounts: string[]) => Promise<string>;
100
- depositAndStakeIsApproved: (amounts: string[]) => Promise<boolean>;
101
- private depositAndStakeApproveEstimateGas;
102
- depositAndStakeApprove: (amounts: string[]) => Promise<string[]>;
103
- private depositAndStakeEstimateGas;
104
- depositAndStake: (amounts: string[]) => Promise<string>;
105
- private _depositAndStake;
106
- balancedWrappedAmounts: () => Promise<string[]>;
107
- addLiquidityWrappedExpected: (amounts: string[]) => Promise<string>;
108
- addLiquidityWrappedSlippage: (amounts: string[]) => Promise<string>;
109
- addLiquidityWrappedIsApproved: (amounts: string[]) => Promise<boolean>;
110
- private addLiquidityWrappedApproveEstimateGas;
111
- addLiquidityWrappedApprove: (amounts: string[]) => Promise<string[]>;
112
- private addLiquidityWrappedEstimateGas;
113
- addLiquidityWrapped: (amounts: string[]) => Promise<string>;
114
- depositAndStakeWrappedExpected: (amounts: string[]) => Promise<string>;
115
- depositAndStakeWrappedSlippage: (amounts: string[]) => Promise<string>;
116
- depositAndStakeWrappedIsApproved: (amounts: string[]) => Promise<boolean>;
117
- private depositAndStakeWrappedApproveEstimateGas;
118
- depositAndStakeWrappedApprove: (amounts: string[]) => Promise<string[]>;
119
- private depositAndStakeWrappedEstimateGas;
120
- depositAndStakeWrapped: (amounts: string[]) => Promise<string>;
121
- removeLiquidityExpected: (lpTokenAmount: string) => Promise<string[]>;
122
- removeLiquidityIsApproved: (lpTokenAmount: string) => Promise<boolean>;
123
- private removeLiquidityApproveEstimateGas;
124
- removeLiquidityApprove: (lpTokenAmount: string) => Promise<string[]>;
125
- private removeLiquidityEstimateGas;
126
- removeLiquidity: (lpTokenAmount: string) => Promise<string>;
127
- removeLiquidityWrappedExpected: (lpTokenAmount: string) => Promise<string[]>;
128
- private removeLiquidityWrappedEstimateGas;
129
- removeLiquidityWrapped: (lpTokenAmount: string) => Promise<string>;
130
- removeLiquidityImbalanceExpected: (amounts: string[]) => Promise<string>;
131
- removeLiquidityImbalanceSlippage: (amounts: string[]) => Promise<string>;
132
- removeLiquidityImbalanceIsApproved: (amounts: string[]) => Promise<boolean>;
133
- private removeLiquidityImbalanceApproveEstimateGas;
134
- removeLiquidityImbalanceApprove: (amounts: string[]) => Promise<string[]>;
135
- private removeLiquidityImbalanceEstimateGas;
136
- removeLiquidityImbalance: (amounts: string[]) => Promise<string>;
137
- removeLiquidityImbalanceWrappedExpected: (amounts: string[]) => Promise<string>;
138
- removeLiquidityImbalanceWrappedSlippage: (amounts: string[]) => Promise<string>;
139
- private removeLiquidityImbalanceWrappedEstimateGas;
140
- removeLiquidityImbalanceWrapped: (amounts: string[], estimateGas?: boolean) => Promise<string | number>;
141
- removeLiquidityOneCoinExpected: (lpTokenAmount: string, coin: string | number) => Promise<string>;
142
- removeLiquidityOneCoinSlippage: (lpTokenAmount: string, coin: string | number) => Promise<string>;
143
- removeLiquidityOneCoinIsApproved: (lpTokenAmount: string) => Promise<boolean>;
144
- private removeLiquidityOneCoinApproveEstimateGas;
145
- removeLiquidityOneCoinApprove: (lpTokenAmount: string) => Promise<string[]>;
146
- private removeLiquidityOneCoinEstimateGas;
147
- removeLiquidityOneCoin: (lpTokenAmount: string, coin: string | number) => Promise<string>;
148
- removeLiquidityOneCoinWrappedExpected: (lpTokenAmount: string, coin: string | number) => Promise<string>;
149
- removeLiquidityOneCoinWrappedSlippage: (lpTokenAmount: string, coin: string | number) => Promise<string>;
150
- private removeLiquidityOneCoinWrappedEstimateGas;
151
- removeLiquidityOneCoinWrapped: (lpTokenAmount: string, coin: string | number) => Promise<string>;
152
- gaugeDepositIsApproved: (lpTokenAmount: string) => Promise<boolean>;
153
- private gaugeDepositApproveEstimateGas;
154
- gaugeDepositApprove: (lpTokenAmount: string) => Promise<string[]>;
155
- private gaugeDepositEstimateGas;
156
- gaugeDeposit: (lpTokenAmount: string) => Promise<string>;
157
- private gaugeWithdrawEstimateGas;
158
- gaugeWithdraw: (lpTokenAmount: string) => Promise<string>;
159
- gaugeClaimableTokens: (address?: string) => Promise<string>;
160
- gaugeClaimTokens: () => Promise<string>;
161
- gaugeClaimableRewards: (address?: string) => Promise<{
162
- token: string;
163
- symbol: string;
164
- amount: string;
165
- }[]>;
166
- gaugeClaimRewards: () => Promise<string>;
167
- balances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
168
- lpTokenBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
169
- underlyingCoinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
170
- coinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
171
- allCoinBalances: (...addresses: string[] | string[][]) => Promise<DictInterface<DictInterface<string>> | DictInterface<string>>;
172
- exchangeExpected: (inputCoin: string | number, outputCoin: string | number, amount: string) => Promise<string>;
173
- exchangeIsApproved: (inputCoin: string | number, amount: string) => Promise<boolean>;
174
- private exchangeApproveEstimateGas;
175
- exchangeApprove: (inputCoin: string | number, amount: string) => Promise<string[]>;
176
- private exchangeEstimateGas;
177
- exchange: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage?: number) => Promise<string>;
178
- exchangeWrappedExpected: (inputCoin: string | number, outputCoin: string | number, amount: string) => Promise<string>;
179
- exchangeWrappedIsApproved: (inputCoin: string | number, amount: string) => Promise<boolean>;
180
- private exchangeWrappedApproveEstimateGas;
181
- exchangeWrappedApprove: (inputCoin: string | number, amount: string) => Promise<string[]>;
182
- private exchangeWrappedEstimateGas;
183
- exchangeWrapped: (inputCoin: string | number, outputCoin: string | number, amount: string, maxSlippage?: number) => Promise<string>;
184
- gaugeMaxBoostedDeposit: (...addresses: string[]) => Promise<DictInterface<string>>;
185
- gaugeOptimalDeposits: (...accounts: string[]) => Promise<DictInterface<string>>;
186
- boost: (address: string) => Promise<string>;
187
- private _getCoinIdx;
188
- private _getRates;
189
- private _balances;
190
- private _underlyingPrices;
191
- private _wrappedPrices;
192
- private _addLiquidityCryptoSlippage;
193
- private _addLiquiditySlippage;
194
- private _removeLiquidityCryptoSlippage;
195
- private _removeLiquiditySlippage;
196
- private _balancedAmounts;
197
- private _calcLpTokenAmount;
198
- private _calcLpTokenAmountZap;
199
- private _calcLpTokenAmountWithUnderlying;
200
- private _addLiquiditySwap;
201
- private _addLiquidityZap;
202
- private _addLiquidityMetaZap;
203
- private _addLiquidity;
204
- private _calcExpectedAmounts;
205
- private _calcMinAmounts;
206
- private _calcExpectedUnderlyingAmounts;
207
- private _calcMinUnderlyingAmounts;
208
- private _calcExpectedUnderlyingAmountsMeta;
209
- private _calcMinUnderlyingAmountsMeta;
210
- private _removeLiquiditySwap;
211
- private _removeLiquidityZap;
212
- private _removeLiquidityMetaZap;
213
- private _removeLiquidity;
214
- private _removeLiquidityImbalanceSwap;
215
- private _removeLiquidityImbalanceZap;
216
- private _removeLiquidityImbalanceMetaZap;
217
- private _removeLiquidityImbalance;
218
- private _calcWithdrawOneCoinSwap;
219
- private _calcWithdrawOneCoinZap;
220
- private _calcWithdrawOneCoin;
221
- private _removeLiquidityOneCoinSwap;
222
- private _removeLiquidityOneCoinZap;
223
- private _removeLiquidityOneCoin;
224
- private _getExchangeOutput;
225
- private _getExchangeOutputWrapped;
226
- }
227
- export declare const getBestPoolAndOutput: (inputCoin: string, outputCoin: string, amount: string) => Promise<{
228
- poolName: string;
229
- poolAddress: string;
230
- output: string;
231
- }>;
232
- export declare const exchangeExpected: (inputCoin: string, outputCoin: string, amount: string) => Promise<string>;
233
- export declare const exchangeIsApproved: (inputCoin: string, outputCoin: string, amount: string) => Promise<boolean>;
234
- export declare const exchangeApproveEstimateGas: (inputCoin: string, outputCoin: string, amount: string) => Promise<number>;
235
- export declare const exchangeApprove: (inputCoin: string, outputCoin: string, amount: string) => Promise<string[]>;
236
- export declare const exchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<number>;
237
- export declare const exchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;
238
- export declare const crossAssetExchangeAvailable: (inputCoin: string, outputCoin: string) => Promise<boolean>;
239
- export declare const _getSmallAmountForCoin: (coinAddress: string) => string;
240
- export declare const _crossAssetExchangeInfo: (inputCoinAddress: string, outputCoinAddress: string, inputCoinDecimals: number, outputCoinDecimals: number, amount: string) => Promise<{
241
- route: string[];
242
- indices: ethers.BigNumber[];
243
- _expected: ethers.BigNumber;
244
- slippage: number;
245
- }>;
246
- export declare const crossAssetExchangeOutputAndSlippage: (inputCoin: string, outputCoin: string, amount: string) => Promise<{
247
- slippage: number;
248
- output: string;
249
- }>;
250
- export declare const crossAssetExchangeExpected: (inputCoin: string, outputCoin: string, amount: string) => Promise<string>;
251
- export declare const crossAssetExchangeIsApproved: (inputCoin: string, amount: string) => Promise<boolean>;
252
- export declare const crossAssetExchangeApproveEstimateGas: (inputCoin: string, amount: string) => Promise<number>;
253
- export declare const crossAssetExchangeApprove: (inputCoin: string, amount: string) => Promise<string[]>;
254
- export declare const crossAssetExchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<number>;
255
- export declare const crossAssetExchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;
256
- export declare const getUserPoolList: (address?: string | undefined) => Promise<string[]>;
257
- export declare const _findAllRoutes: (inputCoinAddress: string, outputCoinAddress: string) => Promise<IRouteStep[][]>;
258
- export declare const getBestRouteAndOutput: (inputCoin: string, outputCoin: string, amount: string) => Promise<{
259
- route: IRouteStep[];
260
- output: string;
261
- }>;
262
- export declare const routerExchangeExpected: (inputCoin: string, outputCoin: string, amount: string) => Promise<string>;
263
- export declare const routerExchangeIsApproved: (inputCoin: string, amount: string) => Promise<boolean>;
264
- export declare const routerExchangeApproveEstimateGas: (inputCoin: string, amount: string) => Promise<number>;
265
- export declare const routerExchangeApprove: (inputCoin: string, amount: string) => Promise<string[]>;
266
- export declare const routerExchangeEstimateGas: (inputCoin: string, outputCoin: string, amount: string) => Promise<number>;
267
- export declare const routerExchange: (inputCoin: string, outputCoin: string, amount: string, maxSlippage?: number) => Promise<string>;