@mento-protocol/mento-sdk 3.2.7-beta.0 → 3.2.7

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 (302) hide show
  1. package/package.json +1 -1
  2. package/dist/cache/routes.d.ts +0 -13
  3. package/dist/cache/routes.js +0 -14649
  4. package/dist/cache/tokens.d.ts +0 -68
  5. package/dist/cache/tokens.js +0 -488
  6. package/dist/core/abis/activePool.d.ts +0 -2
  7. package/dist/core/abis/activePool.js +0 -14
  8. package/dist/core/abis/addressesRegistry.d.ts +0 -2
  9. package/dist/core/abis/addressesRegistry.js +0 -26
  10. package/dist/core/abis/bipoolmanager.d.ts +0 -34
  11. package/dist/core/abis/bipoolmanager.js +0 -72
  12. package/dist/core/abis/borrowerOperations.d.ts +0 -9
  13. package/dist/core/abis/borrowerOperations.js +0 -89
  14. package/dist/core/abis/breakerbox.d.ts +0 -13
  15. package/dist/core/abis/breakerbox.js +0 -8
  16. package/dist/core/abis/broker.d.ts +0 -2
  17. package/dist/core/abis/broker.js +0 -9
  18. package/dist/core/abis/erc20.d.ts +0 -9
  19. package/dist/core/abis/erc20.js +0 -21
  20. package/dist/core/abis/fpmm.d.ts +0 -270
  21. package/dist/core/abis/fpmm.js +0 -49
  22. package/dist/core/abis/fpmmFactory.d.ts +0 -85
  23. package/dist/core/abis/fpmmFactory.js +0 -26
  24. package/dist/core/abis/hintHelpers.d.ts +0 -2
  25. package/dist/core/abis/hintHelpers.js +0 -14
  26. package/dist/core/abis/index.d.ts +0 -22
  27. package/dist/core/abis/index.js +0 -38
  28. package/dist/core/abis/liquidityStrategy.d.ts +0 -132
  29. package/dist/core/abis/liquidityStrategy.js +0 -10
  30. package/dist/core/abis/multiTroveGetter.d.ts +0 -8
  31. package/dist/core/abis/multiTroveGetter.js +0 -15
  32. package/dist/core/abis/priceFeed.d.ts +0 -7
  33. package/dist/core/abis/priceFeed.js +0 -16
  34. package/dist/core/abis/pricingmodule.d.ts +0 -2
  35. package/dist/core/abis/pricingmodule.js +0 -6
  36. package/dist/core/abis/reserve.d.ts +0 -3
  37. package/dist/core/abis/reserve.js +0 -18
  38. package/dist/core/abis/router.d.ts +0 -521
  39. package/dist/core/abis/router.js +0 -45
  40. package/dist/core/abis/sortedTroves.d.ts +0 -2
  41. package/dist/core/abis/sortedTroves.js +0 -15
  42. package/dist/core/abis/systemParams.d.ts +0 -2
  43. package/dist/core/abis/systemParams.js +0 -14
  44. package/dist/core/abis/troveManager.d.ts +0 -2
  45. package/dist/core/abis/troveManager.js +0 -27
  46. package/dist/core/abis/troveNFT.d.ts +0 -2
  47. package/dist/core/abis/troveNFT.js +0 -9
  48. package/dist/core/abis/virtualPool.d.ts +0 -50
  49. package/dist/core/abis/virtualPool.js +0 -11
  50. package/dist/core/abis/virtualPoolFactory.d.ts +0 -59
  51. package/dist/core/abis/virtualPoolFactory.js +0 -17
  52. package/dist/core/constants/addresses.d.ts +0 -18
  53. package/dist/core/constants/addresses.js +0 -113
  54. package/dist/core/constants/borrowConstants.d.ts +0 -10
  55. package/dist/core/constants/borrowConstants.js +0 -16
  56. package/dist/core/constants/borrowRegistries.d.ts +0 -7
  57. package/dist/core/constants/borrowRegistries.js +0 -34
  58. package/dist/core/constants/chainId.d.ts +0 -7
  59. package/dist/core/constants/chainId.js +0 -11
  60. package/dist/core/constants/contractNames.d.ts +0 -21
  61. package/dist/core/constants/contractNames.js +0 -24
  62. package/dist/core/constants/index.d.ts +0 -6
  63. package/dist/core/constants/index.js +0 -22
  64. package/dist/core/errors/base.d.ts +0 -8
  65. package/dist/core/errors/base.js +0 -17
  66. package/dist/core/errors/index.d.ts +0 -4
  67. package/dist/core/errors/index.js +0 -20
  68. package/dist/core/errors/oracle.d.ts +0 -9
  69. package/dist/core/errors/oracle.js +0 -15
  70. package/dist/core/errors/router.d.ts +0 -14
  71. package/dist/core/errors/router.js +0 -24
  72. package/dist/core/types/borrow.d.ts +0 -87
  73. package/dist/core/types/borrow.js +0 -3
  74. package/dist/core/types/contractAddresses.d.ts +0 -42
  75. package/dist/core/types/contractAddresses.js +0 -3
  76. package/dist/core/types/index.d.ts +0 -10
  77. package/dist/core/types/index.js +0 -26
  78. package/dist/core/types/liquidity.d.ts +0 -194
  79. package/dist/core/types/liquidity.js +0 -3
  80. package/dist/core/types/pool.d.ts +0 -208
  81. package/dist/core/types/pool.js +0 -14
  82. package/dist/core/types/provider.d.ts +0 -45
  83. package/dist/core/types/provider.js +0 -3
  84. package/dist/core/types/route.d.ts +0 -62
  85. package/dist/core/types/route.js +0 -3
  86. package/dist/core/types/token.d.ts +0 -21
  87. package/dist/core/types/token.js +0 -3
  88. package/dist/core/types/tradingLimits.d.ts +0 -91
  89. package/dist/core/types/tradingLimits.js +0 -3
  90. package/dist/core/types/tradingMode.d.ts +0 -24
  91. package/dist/core/types/tradingMode.js +0 -31
  92. package/dist/core/types/transaction.d.ts +0 -45
  93. package/dist/core/types/transaction.js +0 -3
  94. package/dist/esm/cache/routes.js +0 -14644
  95. package/dist/esm/cache/tokens.js +0 -480
  96. package/dist/esm/core/abis/activePool.js +0 -10
  97. package/dist/esm/core/abis/addressesRegistry.js +0 -22
  98. package/dist/esm/core/abis/bipoolmanager.js +0 -68
  99. package/dist/esm/core/abis/borrowerOperations.js +0 -85
  100. package/dist/esm/core/abis/breakerbox.js +0 -4
  101. package/dist/esm/core/abis/broker.js +0 -5
  102. package/dist/esm/core/abis/erc20.js +0 -17
  103. package/dist/esm/core/abis/fpmm.js +0 -45
  104. package/dist/esm/core/abis/fpmmFactory.js +0 -22
  105. package/dist/esm/core/abis/hintHelpers.js +0 -10
  106. package/dist/esm/core/abis/index.js +0 -21
  107. package/dist/esm/core/abis/liquidityStrategy.js +0 -6
  108. package/dist/esm/core/abis/multiTroveGetter.js +0 -11
  109. package/dist/esm/core/abis/priceFeed.js +0 -12
  110. package/dist/esm/core/abis/pricingmodule.js +0 -2
  111. package/dist/esm/core/abis/reserve.js +0 -14
  112. package/dist/esm/core/abis/router.js +0 -41
  113. package/dist/esm/core/abis/sortedTroves.js +0 -11
  114. package/dist/esm/core/abis/systemParams.js +0 -10
  115. package/dist/esm/core/abis/troveManager.js +0 -23
  116. package/dist/esm/core/abis/troveNFT.js +0 -5
  117. package/dist/esm/core/abis/virtualPool.js +0 -7
  118. package/dist/esm/core/abis/virtualPoolFactory.js +0 -13
  119. package/dist/esm/core/constants/addresses.js +0 -107
  120. package/dist/esm/core/constants/borrowConstants.js +0 -12
  121. package/dist/esm/core/constants/borrowRegistries.js +0 -29
  122. package/dist/esm/core/constants/chainId.js +0 -7
  123. package/dist/esm/core/constants/contractNames.js +0 -20
  124. package/dist/esm/core/constants/index.js +0 -5
  125. package/dist/esm/core/errors/base.js +0 -12
  126. package/dist/esm/core/errors/index.js +0 -3
  127. package/dist/esm/core/errors/oracle.js +0 -10
  128. package/dist/esm/core/errors/router.js +0 -18
  129. package/dist/esm/core/types/borrow.js +0 -1
  130. package/dist/esm/core/types/contractAddresses.js +0 -1
  131. package/dist/esm/core/types/index.js +0 -9
  132. package/dist/esm/core/types/liquidity.js +0 -1
  133. package/dist/esm/core/types/pool.js +0 -10
  134. package/dist/esm/core/types/provider.js +0 -1
  135. package/dist/esm/core/types/route.js +0 -1
  136. package/dist/esm/core/types/token.js +0 -1
  137. package/dist/esm/core/types/tradingLimits.js +0 -1
  138. package/dist/esm/core/types/tradingMode.js +0 -26
  139. package/dist/esm/core/types/transaction.js +0 -1
  140. package/dist/esm/index.js +0 -139
  141. package/dist/esm/package.json +0 -1
  142. package/dist/esm/services/borrow/BorrowService.js +0 -455
  143. package/dist/esm/services/borrow/borrowHelpers.js +0 -3
  144. package/dist/esm/services/borrow/borrowMath.js +0 -127
  145. package/dist/esm/services/borrow/index.js +0 -3
  146. package/dist/esm/services/borrow/internal/borrowApprovalService.js +0 -48
  147. package/dist/esm/services/borrow/internal/borrowContextStore.js +0 -35
  148. package/dist/esm/services/borrow/internal/borrowErc20.js +0 -38
  149. package/dist/esm/services/borrow/internal/borrowHints.js +0 -27
  150. package/dist/esm/services/borrow/internal/borrowPositionParser.js +0 -82
  151. package/dist/esm/services/borrow/internal/borrowReadService.js +0 -271
  152. package/dist/esm/services/borrow/internal/borrowRegistryReader.js +0 -108
  153. package/dist/esm/services/borrow/internal/borrowTransactionService.js +0 -271
  154. package/dist/esm/services/borrow/internal/borrowTypes.js +0 -1
  155. package/dist/esm/services/borrow/internal/borrowValidation.js +0 -89
  156. package/dist/esm/services/index.js +0 -8
  157. package/dist/esm/services/liquidity/LiquidityService.js +0 -163
  158. package/dist/esm/services/liquidity/basicLiquidity.js +0 -162
  159. package/dist/esm/services/liquidity/index.js +0 -1
  160. package/dist/esm/services/liquidity/liquidityHelpers.js +0 -95
  161. package/dist/esm/services/liquidity/rebalance.js +0 -59
  162. package/dist/esm/services/liquidity/zapHelpers.js +0 -181
  163. package/dist/esm/services/liquidity/zapIn.js +0 -131
  164. package/dist/esm/services/liquidity/zapOut.js +0 -248
  165. package/dist/esm/services/pools/PoolService.js +0 -204
  166. package/dist/esm/services/pools/index.js +0 -1
  167. package/dist/esm/services/pools/poolDetails.js +0 -209
  168. package/dist/esm/services/pools/poolDiscovery.js +0 -112
  169. package/dist/esm/services/pools/rebalancePreview.js +0 -181
  170. package/dist/esm/services/quotes/QuoteService.js +0 -85
  171. package/dist/esm/services/quotes/index.js +0 -1
  172. package/dist/esm/services/routes/RouteService.js +0 -268
  173. package/dist/esm/services/routes/index.js +0 -1
  174. package/dist/esm/services/swap/SwapService.js +0 -247
  175. package/dist/esm/services/swap/index.js +0 -1
  176. package/dist/esm/services/tokens/index.js +0 -1
  177. package/dist/esm/services/tokens/tokenService.js +0 -285
  178. package/dist/esm/services/trading/TradingLimitsService.js +0 -154
  179. package/dist/esm/services/trading/TradingService.js +0 -222
  180. package/dist/esm/services/trading/index.js +0 -2
  181. package/dist/esm/utils/chainConfig.js +0 -118
  182. package/dist/esm/utils/costUtils.js +0 -56
  183. package/dist/esm/utils/deadline.js +0 -22
  184. package/dist/esm/utils/index.js +0 -9
  185. package/dist/esm/utils/multicall.js +0 -47
  186. package/dist/esm/utils/pathEncoder.js +0 -69
  187. package/dist/esm/utils/rateFeed.js +0 -23
  188. package/dist/esm/utils/retry.js +0 -24
  189. package/dist/esm/utils/routeUtils.js +0 -361
  190. package/dist/esm/utils/routes.js +0 -2
  191. package/dist/esm/utils/sortUtils.js +0 -33
  192. package/dist/esm/utils/tokens.js +0 -2
  193. package/dist/esm/utils/tradingLimits.js +0 -163
  194. package/dist/esm/utils/validation.js +0 -30
  195. package/dist/index.d.ts +0 -101
  196. package/dist/index.js +0 -158
  197. package/dist/services/borrow/BorrowService.d.ts +0 -381
  198. package/dist/services/borrow/BorrowService.js +0 -460
  199. package/dist/services/borrow/borrowHelpers.d.ts +0 -4
  200. package/dist/services/borrow/borrowHelpers.js +0 -13
  201. package/dist/services/borrow/borrowMath.d.ts +0 -21
  202. package/dist/services/borrow/borrowMath.js +0 -137
  203. package/dist/services/borrow/index.d.ts +0 -4
  204. package/dist/services/borrow/index.js +0 -20
  205. package/dist/services/borrow/internal/borrowApprovalService.d.ts +0 -14
  206. package/dist/services/borrow/internal/borrowApprovalService.js +0 -53
  207. package/dist/services/borrow/internal/borrowContextStore.d.ts +0 -11
  208. package/dist/services/borrow/internal/borrowContextStore.js +0 -40
  209. package/dist/services/borrow/internal/borrowErc20.d.ts +0 -5
  210. package/dist/services/borrow/internal/borrowErc20.js +0 -43
  211. package/dist/services/borrow/internal/borrowHints.d.ts +0 -7
  212. package/dist/services/borrow/internal/borrowHints.js +0 -31
  213. package/dist/services/borrow/internal/borrowPositionParser.d.ts +0 -4
  214. package/dist/services/borrow/internal/borrowPositionParser.js +0 -87
  215. package/dist/services/borrow/internal/borrowReadService.d.ts +0 -31
  216. package/dist/services/borrow/internal/borrowReadService.js +0 -276
  217. package/dist/services/borrow/internal/borrowRegistryReader.d.ts +0 -5
  218. package/dist/services/borrow/internal/borrowRegistryReader.js +0 -113
  219. package/dist/services/borrow/internal/borrowTransactionService.d.ts +0 -23
  220. package/dist/services/borrow/internal/borrowTransactionService.js +0 -276
  221. package/dist/services/borrow/internal/borrowTypes.d.ts +0 -15
  222. package/dist/services/borrow/internal/borrowTypes.js +0 -3
  223. package/dist/services/borrow/internal/borrowValidation.d.ts +0 -14
  224. package/dist/services/borrow/internal/borrowValidation.js +0 -104
  225. package/dist/services/index.d.ts +0 -9
  226. package/dist/services/index.js +0 -25
  227. package/dist/services/liquidity/LiquidityService.d.ts +0 -139
  228. package/dist/services/liquidity/LiquidityService.js +0 -168
  229. package/dist/services/liquidity/basicLiquidity.d.ts +0 -11
  230. package/dist/services/liquidity/basicLiquidity.js +0 -172
  231. package/dist/services/liquidity/index.d.ts +0 -2
  232. package/dist/services/liquidity/index.js +0 -18
  233. package/dist/services/liquidity/liquidityHelpers.d.ts +0 -19
  234. package/dist/services/liquidity/liquidityHelpers.js +0 -104
  235. package/dist/services/liquidity/rebalance.d.ts +0 -6
  236. package/dist/services/liquidity/rebalance.js +0 -64
  237. package/dist/services/liquidity/zapHelpers.d.ts +0 -100
  238. package/dist/services/liquidity/zapHelpers.js +0 -192
  239. package/dist/services/liquidity/zapIn.d.ts +0 -18
  240. package/dist/services/liquidity/zapIn.js +0 -138
  241. package/dist/services/liquidity/zapOut.d.ts +0 -9
  242. package/dist/services/liquidity/zapOut.js +0 -255
  243. package/dist/services/pools/PoolService.d.ts +0 -69
  244. package/dist/services/pools/PoolService.js +0 -209
  245. package/dist/services/pools/index.d.ts +0 -2
  246. package/dist/services/pools/index.js +0 -18
  247. package/dist/services/pools/poolDetails.d.ts +0 -13
  248. package/dist/services/pools/poolDetails.js +0 -216
  249. package/dist/services/pools/poolDiscovery.d.ts +0 -12
  250. package/dist/services/pools/poolDiscovery.js +0 -117
  251. package/dist/services/pools/rebalancePreview.d.ts +0 -5
  252. package/dist/services/pools/rebalancePreview.js +0 -186
  253. package/dist/services/quotes/QuoteService.d.ts +0 -51
  254. package/dist/services/quotes/QuoteService.js +0 -91
  255. package/dist/services/quotes/index.d.ts +0 -2
  256. package/dist/services/quotes/index.js +0 -18
  257. package/dist/services/routes/RouteService.d.ts +0 -117
  258. package/dist/services/routes/RouteService.js +0 -306
  259. package/dist/services/routes/index.d.ts +0 -2
  260. package/dist/services/routes/index.js +0 -18
  261. package/dist/services/swap/SwapService.d.ts +0 -198
  262. package/dist/services/swap/SwapService.js +0 -252
  263. package/dist/services/swap/index.d.ts +0 -2
  264. package/dist/services/swap/index.js +0 -18
  265. package/dist/services/tokens/index.d.ts +0 -2
  266. package/dist/services/tokens/index.js +0 -18
  267. package/dist/services/tokens/tokenService.d.ts +0 -55
  268. package/dist/services/tokens/tokenService.js +0 -290
  269. package/dist/services/trading/TradingLimitsService.d.ts +0 -38
  270. package/dist/services/trading/TradingLimitsService.js +0 -159
  271. package/dist/services/trading/TradingService.d.ts +0 -115
  272. package/dist/services/trading/TradingService.js +0 -227
  273. package/dist/services/trading/index.d.ts +0 -3
  274. package/dist/services/trading/index.js +0 -19
  275. package/dist/utils/chainConfig.d.ts +0 -16
  276. package/dist/utils/chainConfig.js +0 -123
  277. package/dist/utils/costUtils.d.ts +0 -12
  278. package/dist/utils/costUtils.js +0 -60
  279. package/dist/utils/deadline.d.ts +0 -21
  280. package/dist/utils/deadline.js +0 -26
  281. package/dist/utils/index.d.ts +0 -10
  282. package/dist/utils/index.js +0 -26
  283. package/dist/utils/multicall.d.ts +0 -30
  284. package/dist/utils/multicall.js +0 -52
  285. package/dist/utils/pathEncoder.d.ts +0 -34
  286. package/dist/utils/pathEncoder.js +0 -73
  287. package/dist/utils/rateFeed.d.ts +0 -18
  288. package/dist/utils/rateFeed.js +0 -27
  289. package/dist/utils/retry.d.ts +0 -12
  290. package/dist/utils/retry.js +0 -28
  291. package/dist/utils/routeUtils.d.ts +0 -295
  292. package/dist/utils/routeUtils.js +0 -371
  293. package/dist/utils/routes.d.ts +0 -3
  294. package/dist/utils/routes.js +0 -8
  295. package/dist/utils/sortUtils.d.ts +0 -24
  296. package/dist/utils/sortUtils.js +0 -39
  297. package/dist/utils/tokens.d.ts +0 -2
  298. package/dist/utils/tokens.js +0 -13
  299. package/dist/utils/tradingLimits.d.ts +0 -41
  300. package/dist/utils/tradingLimits.js +0 -171
  301. package/dist/utils/validation.d.ts +0 -19
  302. package/dist/utils/validation.js +0 -34
@@ -1,64 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildRebalanceParamsInternal = buildRebalanceParamsInternal;
4
- exports.buildRebalanceTransactionInternal = buildRebalanceTransactionInternal;
5
- const viem_1 = require("viem");
6
- const abis_1 = require("../../core/abis");
7
- const validation_1 = require("../../utils/validation");
8
- const liquidityHelpers_1 = require("./liquidityHelpers");
9
- function getRebalanceUnavailableError(poolAddress) {
10
- return new Error(`Pool ${poolAddress} is not currently rebalanceable or does not have a supported liquidity strategy.`);
11
- }
12
- function assertRebalanceActionAmounts(poolAddress, amountRequired, amountTransferred) {
13
- if (amountRequired <= 0n || amountTransferred <= 0n) {
14
- throw new Error(`Rebalance action for pool ${poolAddress} has zero amounts and cannot be executed.`);
15
- }
16
- }
17
- async function buildRebalanceParamsInternal(publicClient, chainId, poolService, poolAddress) {
18
- (0, validation_1.validateAddress)(poolAddress, 'poolAddress');
19
- const preview = await poolService.getPoolRebalancePreview(poolAddress);
20
- if (!preview) {
21
- throw getRebalanceUnavailableError(poolAddress);
22
- }
23
- assertRebalanceActionAmounts(poolAddress, preview.amountRequired.amount, preview.amountTransferred.amount);
24
- const data = (0, viem_1.encodeFunctionData)({
25
- abi: abis_1.LIQUIDITY_STRATEGY_ABI,
26
- functionName: 'rebalance',
27
- args: [poolAddress],
28
- });
29
- return {
30
- params: {
31
- to: preview.strategyAddress,
32
- data,
33
- value: '0',
34
- },
35
- poolAddress,
36
- strategyAddress: preview.strategyAddress,
37
- inputToken: preview.inputToken,
38
- outputToken: preview.outputToken,
39
- amountRequired: preview.amountRequired.amount,
40
- expectedAmountTransferred: preview.amountTransferred.amount,
41
- expectedProtocolIncentive: preview.protocolIncentive.amount,
42
- expectedLiquiditySourceIncentive: preview.liquiditySourceIncentive.amount,
43
- approvalToken: preview.approvalToken,
44
- approvalSpender: preview.approvalSpender,
45
- approvalAmount: preview.approvalAmount,
46
- direction: preview.direction,
47
- };
48
- }
49
- async function buildRebalanceTransactionInternal(publicClient, chainId, poolService, poolAddress, owner) {
50
- (0, validation_1.validateAddress)(owner, 'owner');
51
- const rebalance = await buildRebalanceParamsInternal(publicClient, chainId, poolService, poolAddress);
52
- const approvalToken = rebalance.approvalToken;
53
- const approvalSpender = rebalance.approvalSpender;
54
- const currentAllowance = await (0, liquidityHelpers_1.getAllowance)(publicClient, approvalToken, owner, chainId, approvalSpender);
55
- const approval = currentAllowance < rebalance.approvalAmount
56
- ? {
57
- token: rebalance.approvalToken,
58
- amount: rebalance.approvalAmount,
59
- params: (0, liquidityHelpers_1.buildApprovalParams)(chainId, approvalToken, rebalance.approvalAmount, approvalSpender),
60
- }
61
- : null;
62
- return { approval, rebalance };
63
- }
64
- //# sourceMappingURL=rebalance.js.map
@@ -1,100 +0,0 @@
1
- import { Address } from 'viem';
2
- import { RouteService } from '../routes';
3
- import { ZapParams } from '../../core/types';
4
- import { RouterRoute } from '../../utils/pathEncoder';
5
- /**
6
- * Encodes the zapIn function call for the Router contract
7
- */
8
- export declare function encodeZapInCall(tokenIn: Address, amountInA: bigint, amountInB: bigint, zapParams: ZapParams, routesA: RouterRoute[], routesB: RouterRoute[], recipient: Address): string;
9
- /**
10
- * Encodes the zapOut function call for the Router contract
11
- */
12
- export declare function encodeZapOutCall(tokenOut: Address, liquidity: bigint, zapParams: ZapParams, routesA: RouterRoute[], routesB: RouterRoute[]): string;
13
- /**
14
- * Finds routes for zap in operations (from tokenIn to both pool tokens)
15
- *
16
- * @param routeService - Route service for finding swap paths
17
- * @param tokenIn - Input token address
18
- * @param token0 - Pool's token0 address
19
- * @param token1 - Pool's token1 address
20
- * @returns Routes from tokenIn to token0 and token1
21
- */
22
- export declare function findZapInRoutes(routeService: RouteService, tokenIn: string, token0: string, token1: string): Promise<{
23
- routesA: RouterRoute[];
24
- routesB: RouterRoute[];
25
- }>;
26
- /**
27
- * Finds routes for zap out operations (from both pool tokens to tokenOut)
28
- *
29
- * @param routeService - Route service for finding swap paths
30
- * @param token0 - Pool's token0 address
31
- * @param token1 - Pool's token1 address
32
- * @param tokenOut - Output token address
33
- * @returns Routes from token0 and token1 to tokenOut
34
- */
35
- export declare function findZapOutRoutes(routeService: RouteService, token0: string, token1: string, tokenOut: string): Promise<{
36
- routesA: RouterRoute[];
37
- routesB: RouterRoute[];
38
- }>;
39
- /**
40
- * Splits an amount into two parts based on a ratio
41
- *
42
- * @param amountIn - Total input amount
43
- * @param splitRatio - Ratio for splitting (0-1, e.g., 0.5 for 50/50)
44
- * @returns Split amounts for each part
45
- */
46
- export declare function splitAmount(amountIn: bigint, splitRatio: number): {
47
- amountA: bigint;
48
- amountB: bigint;
49
- };
50
- /**
51
- * Off-chain mirror of Router.sol's quoteAddLiquidity / _quoteZapLiquidity logic.
52
- *
53
- * Given desired amounts and pool reserves, returns the (amountA, amountB) the
54
- * router will actually deposit when adding liquidity. Used to predict the exact
55
- * `amountAMin` / `amountBMin` the contract will check against post-swap reserves.
56
- *
57
- * @param amountADesired - Desired amount of tokenA
58
- * @param amountBDesired - Desired amount of tokenB
59
- * @param reserveA - Reserve of tokenA at the moment liquidity is added
60
- * @param reserveB - Reserve of tokenB at the moment liquidity is added
61
- */
62
- export declare function quoteAddLiquidityFromReserves(amountADesired: bigint, amountBDesired: bigint, reserveA: bigint, reserveB: bigint): {
63
- amountA: bigint;
64
- amountB: bigint;
65
- };
66
- /**
67
- * Computes the net delta a single-hop zap swap applies to a target pool's
68
- * reserves. Returns `{delta0, delta1}` to add to the pool's pre-swap reserves
69
- * to obtain the reserves the router will see when it runs `_quoteZapLiquidity`.
70
- *
71
- * Only single-hop routes whose factory matches the target pool's factory and
72
- * whose `(from, to)` are `(token0, token1)` (in either direction) are
73
- * considered. Multi-hop routes and routes through other pools have no effect
74
- * on the target pool's reserves and return `{0, 0}`.
75
- *
76
- * Note: Multi-hop routes that traverse the target pool as an intermediate hop
77
- * are intentionally not handled here — they are uncommon for single-sided zaps
78
- * and would require per-hop amounts from `getAmountsOut`.
79
- */
80
- export declare function computeTargetPoolImpact(routes: RouterRoute[], amountIn: bigint, amountOut: bigint, token0: Address, token1: Address, factoryAddr: Address): {
81
- delta0: bigint;
82
- delta1: bigint;
83
- };
84
- /**
85
- * Estimates minimum LP tokens from zap in amounts.
86
- *
87
- * This is a conservative lower-bound estimate. The inputs are slippage-adjusted
88
- * minimums, not expected amounts. Actual LP tokens minted on-chain may be higher
89
- * because the router uses balanceOf(address(this)) after swaps, which can exceed
90
- * the pre-calculated minimums.
91
- *
92
- * @param amountOutA - Minimum amount of token0 after swap (slippage-adjusted)
93
- * @param amountOutB - Minimum amount of token1 after swap (slippage-adjusted)
94
- * @param reserve0 - Current reserve of token0 in pool
95
- * @param reserve1 - Current reserve of token1 in pool
96
- * @param totalSupply - Total LP token supply
97
- * @returns Conservative estimate of minimum LP tokens to be minted
98
- */
99
- export declare function estimateLiquidityFromZapIn(amountOutA: bigint, amountOutB: bigint, reserve0: bigint, reserve1: bigint, totalSupply: bigint): bigint;
100
- //# sourceMappingURL=zapHelpers.d.ts.map
@@ -1,192 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.encodeZapInCall = encodeZapInCall;
4
- exports.encodeZapOutCall = encodeZapOutCall;
5
- exports.findZapInRoutes = findZapInRoutes;
6
- exports.findZapOutRoutes = findZapOutRoutes;
7
- exports.splitAmount = splitAmount;
8
- exports.quoteAddLiquidityFromReserves = quoteAddLiquidityFromReserves;
9
- exports.computeTargetPoolImpact = computeTargetPoolImpact;
10
- exports.estimateLiquidityFromZapIn = estimateLiquidityFromZapIn;
11
- const viem_1 = require("viem");
12
- const abis_1 = require("../../core/abis");
13
- const pathEncoder_1 = require("../../utils/pathEncoder");
14
- // ========== ENCODING FUNCTIONS ==========
15
- /**
16
- * Encodes the zapIn function call for the Router contract
17
- */
18
- function encodeZapInCall(tokenIn, amountInA, amountInB, zapParams, routesA, routesB, recipient) {
19
- return (0, viem_1.encodeFunctionData)({
20
- abi: abis_1.ROUTER_ABI,
21
- functionName: 'zapIn',
22
- args: [tokenIn, amountInA, amountInB, zapParams, routesA, routesB, recipient],
23
- });
24
- }
25
- /**
26
- * Encodes the zapOut function call for the Router contract
27
- */
28
- function encodeZapOutCall(tokenOut, liquidity, zapParams, routesA, routesB) {
29
- return (0, viem_1.encodeFunctionData)({
30
- abi: abis_1.ROUTER_ABI,
31
- functionName: 'zapOut',
32
- args: [tokenOut, liquidity, zapParams, routesA, routesB],
33
- });
34
- }
35
- // ========== ROUTING FUNCTIONS ==========
36
- /**
37
- * Finds routes for zap in operations (from tokenIn to both pool tokens)
38
- *
39
- * @param routeService - Route service for finding swap paths
40
- * @param tokenIn - Input token address
41
- * @param token0 - Pool's token0 address
42
- * @param token1 - Pool's token1 address
43
- * @returns Routes from tokenIn to token0 and token1
44
- */
45
- async function findZapInRoutes(routeService, tokenIn, token0, token1) {
46
- const [routeA, routeB] = await Promise.all([
47
- tokenIn.toLowerCase() !== token0.toLowerCase()
48
- ? routeService.findRoute(tokenIn, token0)
49
- : Promise.resolve(null),
50
- tokenIn.toLowerCase() !== token1.toLowerCase()
51
- ? routeService.findRoute(tokenIn, token1)
52
- : Promise.resolve(null),
53
- ]);
54
- const routesA = routeA ? (0, pathEncoder_1.encodeRoutePath)(routeA.path, tokenIn, token0) : [];
55
- const routesB = routeB ? (0, pathEncoder_1.encodeRoutePath)(routeB.path, tokenIn, token1) : [];
56
- return { routesA, routesB };
57
- }
58
- /**
59
- * Finds routes for zap out operations (from both pool tokens to tokenOut)
60
- *
61
- * @param routeService - Route service for finding swap paths
62
- * @param token0 - Pool's token0 address
63
- * @param token1 - Pool's token1 address
64
- * @param tokenOut - Output token address
65
- * @returns Routes from token0 and token1 to tokenOut
66
- */
67
- async function findZapOutRoutes(routeService, token0, token1, tokenOut) {
68
- const [routeA, routeB] = await Promise.all([
69
- token0.toLowerCase() !== tokenOut.toLowerCase()
70
- ? routeService.findRoute(token0, tokenOut)
71
- : Promise.resolve(null),
72
- token1.toLowerCase() !== tokenOut.toLowerCase()
73
- ? routeService.findRoute(token1, tokenOut)
74
- : Promise.resolve(null),
75
- ]);
76
- const routesA = routeA ? (0, pathEncoder_1.encodeRoutePath)(routeA.path, token0, tokenOut) : [];
77
- const routesB = routeB ? (0, pathEncoder_1.encodeRoutePath)(routeB.path, token1, tokenOut) : [];
78
- return { routesA, routesB };
79
- }
80
- // ========== CALCULATION FUNCTIONS ==========
81
- /**
82
- * Splits an amount into two parts based on a ratio
83
- *
84
- * @param amountIn - Total input amount
85
- * @param splitRatio - Ratio for splitting (0-1, e.g., 0.5 for 50/50)
86
- * @returns Split amounts for each part
87
- */
88
- function splitAmount(amountIn, splitRatio) {
89
- if (splitRatio < 0 || splitRatio > 1) {
90
- throw new Error('Split ratio must be between 0 and 1');
91
- }
92
- const amountA = (amountIn * BigInt(Math.floor(splitRatio * 10000))) / 10000n;
93
- const amountB = amountIn - amountA;
94
- return { amountA, amountB };
95
- }
96
- /**
97
- * Off-chain mirror of Router.sol's quoteAddLiquidity / _quoteZapLiquidity logic.
98
- *
99
- * Given desired amounts and pool reserves, returns the (amountA, amountB) the
100
- * router will actually deposit when adding liquidity. Used to predict the exact
101
- * `amountAMin` / `amountBMin` the contract will check against post-swap reserves.
102
- *
103
- * @param amountADesired - Desired amount of tokenA
104
- * @param amountBDesired - Desired amount of tokenB
105
- * @param reserveA - Reserve of tokenA at the moment liquidity is added
106
- * @param reserveB - Reserve of tokenB at the moment liquidity is added
107
- */
108
- function quoteAddLiquidityFromReserves(amountADesired, amountBDesired, reserveA, reserveB) {
109
- if (reserveA === 0n && reserveB === 0n) {
110
- return { amountA: amountADesired, amountB: amountBDesired };
111
- }
112
- if (reserveA === 0n || reserveB === 0n) {
113
- // Mirrors Router.sol's InsufficientLiquidity revert. Caller can fall back.
114
- return { amountA: 0n, amountB: 0n };
115
- }
116
- const amountBOptimal = (amountADesired * reserveB) / reserveA;
117
- if (amountBOptimal <= amountBDesired) {
118
- return { amountA: amountADesired, amountB: amountBOptimal };
119
- }
120
- const amountAOptimal = (amountBDesired * reserveA) / reserveB;
121
- return { amountA: amountAOptimal, amountB: amountBDesired };
122
- }
123
- /**
124
- * Computes the net delta a single-hop zap swap applies to a target pool's
125
- * reserves. Returns `{delta0, delta1}` to add to the pool's pre-swap reserves
126
- * to obtain the reserves the router will see when it runs `_quoteZapLiquidity`.
127
- *
128
- * Only single-hop routes whose factory matches the target pool's factory and
129
- * whose `(from, to)` are `(token0, token1)` (in either direction) are
130
- * considered. Multi-hop routes and routes through other pools have no effect
131
- * on the target pool's reserves and return `{0, 0}`.
132
- *
133
- * Note: Multi-hop routes that traverse the target pool as an intermediate hop
134
- * are intentionally not handled here — they are uncommon for single-sided zaps
135
- * and would require per-hop amounts from `getAmountsOut`.
136
- */
137
- function computeTargetPoolImpact(routes, amountIn, amountOut, token0, token1, factoryAddr) {
138
- if (routes.length !== 1) {
139
- return { delta0: 0n, delta1: 0n };
140
- }
141
- const route = routes[0];
142
- if (route.factory.toLowerCase() !== factoryAddr.toLowerCase()) {
143
- return { delta0: 0n, delta1: 0n };
144
- }
145
- const fromLower = route.from.toLowerCase();
146
- const toLower = route.to.toLowerCase();
147
- const t0 = token0.toLowerCase();
148
- const t1 = token1.toLowerCase();
149
- if (fromLower === t0 && toLower === t1) {
150
- return { delta0: amountIn, delta1: -amountOut };
151
- }
152
- if (fromLower === t1 && toLower === t0) {
153
- return { delta0: -amountOut, delta1: amountIn };
154
- }
155
- return { delta0: 0n, delta1: 0n };
156
- }
157
- /**
158
- * Estimates minimum LP tokens from zap in amounts.
159
- *
160
- * This is a conservative lower-bound estimate. The inputs are slippage-adjusted
161
- * minimums, not expected amounts. Actual LP tokens minted on-chain may be higher
162
- * because the router uses balanceOf(address(this)) after swaps, which can exceed
163
- * the pre-calculated minimums.
164
- *
165
- * @param amountOutA - Minimum amount of token0 after swap (slippage-adjusted)
166
- * @param amountOutB - Minimum amount of token1 after swap (slippage-adjusted)
167
- * @param reserve0 - Current reserve of token0 in pool
168
- * @param reserve1 - Current reserve of token1 in pool
169
- * @param totalSupply - Total LP token supply
170
- * @returns Conservative estimate of minimum LP tokens to be minted
171
- */
172
- function estimateLiquidityFromZapIn(amountOutA, amountOutB, reserve0, reserve1, totalSupply) {
173
- if (totalSupply === 0n) {
174
- // First liquidity provision - use geometric mean with BigInt sqrt
175
- // to avoid precision loss from Number() conversion on 18-decimal values
176
- const product = amountOutA * amountOutB;
177
- if (product === 0n)
178
- return 0n;
179
- let x = product;
180
- let y = (x + 1n) / 2n;
181
- while (y < x) {
182
- x = y;
183
- y = (x + product / x) / 2n;
184
- }
185
- return x;
186
- }
187
- // Existing pool - calculate based on smaller ratio
188
- const liquidityA = (amountOutA * totalSupply) / reserve0;
189
- const liquidityB = (amountOutB * totalSupply) / reserve1;
190
- return liquidityA < liquidityB ? liquidityA : liquidityB;
191
- }
192
- //# sourceMappingURL=zapHelpers.js.map
@@ -1,18 +0,0 @@
1
- import { PublicClient } from 'viem';
2
- import { PoolService } from '../pools';
3
- import { RouteService } from '../routes';
4
- import { LiquidityOptions, PreparedZapIn, ZapInQuote, ZapInDetails, ZapInTransaction } from '../../core/types';
5
- /**
6
- * Builds a complete zap in transaction including approval if needed
7
- */
8
- export declare function buildZapInTransactionInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenIn: string, amountIn: bigint, amountInSplit: number, recipient: string, owner: string, options: LiquidityOptions): Promise<ZapInTransaction>;
9
- /**
10
- * Builds zap in transaction parameters without checking approval
11
- */
12
- export declare function buildZapInParamsInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenIn: string, amountIn: bigint, amountInSplit: number, recipient: string, options: LiquidityOptions): Promise<ZapInDetails>;
13
- /**
14
- * Quotes a zap in operation (read-only)
15
- */
16
- export declare function quoteZapInInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenIn: string, amountIn: bigint, amountInSplit: number, options: LiquidityOptions): Promise<ZapInQuote>;
17
- export declare function prepareZapInInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenIn: string, amountIn: bigint, amountInSplit: number, recipient: string, owner: string | undefined, options: LiquidityOptions): Promise<PreparedZapIn>;
18
- //# sourceMappingURL=zapIn.d.ts.map
@@ -1,138 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildZapInTransactionInternal = buildZapInTransactionInternal;
4
- exports.buildZapInParamsInternal = buildZapInParamsInternal;
5
- exports.quoteZapInInternal = quoteZapInInternal;
6
- exports.prepareZapInInternal = prepareZapInInternal;
7
- const abis_1 = require("../../core/abis");
8
- const constants_1 = require("../../core/constants");
9
- const validation_1 = require("../../utils/validation");
10
- const liquidityHelpers_1 = require("./liquidityHelpers");
11
- const zapHelpers_1 = require("./zapHelpers");
12
- // ========== ZAP IN OPERATIONS ==========
13
- /**
14
- * Builds a complete zap in transaction including approval if needed
15
- */
16
- async function buildZapInTransactionInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, recipient, owner, options) {
17
- const prepared = await prepareZapInInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, recipient, owner, options);
18
- return {
19
- approval: prepared.approval ?? null,
20
- zapIn: prepared.details,
21
- };
22
- }
23
- /**
24
- * Builds zap in transaction parameters without checking approval
25
- */
26
- async function buildZapInParamsInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, recipient, options) {
27
- const prepared = await prepareZapInInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, recipient, undefined, options);
28
- return prepared.details;
29
- }
30
- /**
31
- * Quotes a zap in operation (read-only)
32
- */
33
- async function quoteZapInInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, options) {
34
- const prepared = await prepareZapInInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, tokenIn, undefined, options);
35
- return prepared.quote;
36
- }
37
- async function prepareZapInInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, recipient, owner, options) {
38
- if (owner) {
39
- (0, validation_1.validateAddress)(owner, 'owner');
40
- }
41
- const [context, currentAllowance] = await Promise.all([
42
- prepareZapInContextInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, recipient, options),
43
- owner ? (0, liquidityHelpers_1.getAllowance)(publicClient, tokenIn, owner, chainId) : Promise.resolve(null),
44
- ]);
45
- const approval = owner && currentAllowance !== null && currentAllowance < amountIn
46
- ? { token: tokenIn, amount: amountIn, params: (0, liquidityHelpers_1.buildApprovalParams)(chainId, tokenIn, amountIn) }
47
- : owner
48
- ? null
49
- : undefined;
50
- return {
51
- routesA: context.routesA,
52
- routesB: context.routesB,
53
- quote: context.quote,
54
- approval,
55
- details: context.details,
56
- };
57
- }
58
- async function prepareZapInContextInternal(publicClient, chainId, poolService, routeService, poolAddress, tokenIn, amountIn, amountInSplit, recipient, options) {
59
- (0, validation_1.validateAddress)(poolAddress, 'poolAddress');
60
- (0, validation_1.validateAddress)(tokenIn, 'tokenIn');
61
- (0, validation_1.validateAddress)(recipient, 'recipient');
62
- const { token0, token1, factoryAddr } = await (0, liquidityHelpers_1.getPoolInfo)(poolService, poolAddress);
63
- const { amountA: amountInA, amountB: amountInB } = (0, zapHelpers_1.splitAmount)(amountIn, amountInSplit);
64
- const [{ routesA, routesB }, poolSnapshot] = await Promise.all([
65
- (0, zapHelpers_1.findZapInRoutes)(routeService, tokenIn, token0, token1),
66
- (0, liquidityHelpers_1.getPoolSnapshot)(publicClient, poolAddress),
67
- ]);
68
- const routerAddress = (0, constants_1.getContractAddress)(chainId, 'Router');
69
- const [amountOutMinA, amountOutMinB, amountAMin, amountBMin] = (await publicClient.readContract({
70
- address: routerAddress,
71
- abi: abis_1.ROUTER_ABI,
72
- functionName: 'generateZapInParams',
73
- args: [token0, token1, factoryAddr, amountInA, amountInB, routesA, routesB],
74
- }));
75
- // Re-quote amountAMin / amountBMin against POST-swap reserves.
76
- //
77
- // `generateZapInParams` calls `quoteAddLiquidity` with the pool's *current*
78
- // reserves, but on-chain `_quoteZapLiquidity` runs *after* the zap's internal
79
- // swap, which moves the same pool when tokenIn is one of the pool tokens.
80
- // Applying user slippage on top of a pre-swap minimum makes the contract
81
- // reject any non-trivial amount because the deterministic price impact of
82
- // the swap alone exceeds the slippage budget. Predict the post-swap reserves
83
- // and re-derive the minimums so that user slippage only covers real drift
84
- // between quote-time and execution.
85
- const impactA = (0, zapHelpers_1.computeTargetPoolImpact)(routesA, amountInA, amountOutMinA, token0, token1, factoryAddr);
86
- const impactB = (0, zapHelpers_1.computeTargetPoolImpact)(routesB, amountInB, amountOutMinB, token0, token1, factoryAddr);
87
- const projectedReserveA = poolSnapshot.reserve0 + impactA.delta0 + impactB.delta0;
88
- const projectedReserveB = poolSnapshot.reserve1 + impactA.delta1 + impactB.delta1;
89
- const useReserveA = projectedReserveA > 0n ? projectedReserveA : poolSnapshot.reserve0;
90
- const useReserveB = projectedReserveB > 0n ? projectedReserveB : poolSnapshot.reserve1;
91
- const projected = (0, zapHelpers_1.quoteAddLiquidityFromReserves)(amountOutMinA, amountOutMinB, useReserveA, useReserveB);
92
- const baselineAmountAMin = projected.amountA > 0n ? projected.amountA : amountAMin;
93
- const baselineAmountBMin = projected.amountB > 0n ? projected.amountB : amountBMin;
94
- const finalAmountAMin = (0, liquidityHelpers_1.calculateMinAmount)(baselineAmountAMin, options.slippageTolerance);
95
- const finalAmountBMin = (0, liquidityHelpers_1.calculateMinAmount)(baselineAmountBMin, options.slippageTolerance);
96
- const finalAmountOutMinA = (0, liquidityHelpers_1.calculateMinAmount)(amountOutMinA, options.slippageTolerance);
97
- const finalAmountOutMinB = (0, liquidityHelpers_1.calculateMinAmount)(amountOutMinB, options.slippageTolerance);
98
- const expectedLiquidity = (0, zapHelpers_1.estimateLiquidityFromZapIn)(finalAmountOutMinA, finalAmountOutMinB, poolSnapshot.reserve0, poolSnapshot.reserve1, poolSnapshot.totalSupply);
99
- const quote = {
100
- amountOutFromA: finalAmountOutMinA,
101
- amountOutFromB: finalAmountOutMinB,
102
- amountAMin: finalAmountAMin,
103
- amountBMin: finalAmountBMin,
104
- estimatedMinLiquidity: expectedLiquidity,
105
- };
106
- const zapParams = {
107
- tokenA: token0,
108
- tokenB: token1,
109
- factory: factoryAddr,
110
- amountAMin: finalAmountAMin,
111
- amountBMin: finalAmountBMin,
112
- amountOutMinA: finalAmountOutMinA,
113
- amountOutMinB: finalAmountOutMinB,
114
- };
115
- const data = (0, zapHelpers_1.encodeZapInCall)(tokenIn, amountInA, amountInB, zapParams, routesA, routesB, recipient);
116
- return {
117
- routesA,
118
- routesB,
119
- quote,
120
- details: {
121
- params: {
122
- to: routerAddress,
123
- data,
124
- value: '0',
125
- },
126
- poolAddress,
127
- tokenIn,
128
- amountIn,
129
- amountInA,
130
- amountInB,
131
- routesA,
132
- routesB,
133
- zapParams,
134
- estimatedMinLiquidity: expectedLiquidity,
135
- },
136
- };
137
- }
138
- //# sourceMappingURL=zapIn.js.map
@@ -1,9 +0,0 @@
1
- import { PublicClient } from 'viem';
2
- import { PoolService } from '../pools';
3
- import { RouteService } from '../routes';
4
- import { LiquidityOptions, PreparedZapOut, ZapOutQuote, ZapOutDetails, ZapOutTransaction } from '../../core/types';
5
- export declare function buildZapOutTransactionInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenOut: string, liquidity: bigint, recipient: string, owner: string, options: LiquidityOptions): Promise<ZapOutTransaction>;
6
- export declare function buildZapOutParamsInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenOut: string, liquidity: bigint, recipient: string, options: LiquidityOptions): Promise<ZapOutDetails>;
7
- export declare function quoteZapOutInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenOut: string, liquidity: bigint, options: LiquidityOptions): Promise<ZapOutQuote>;
8
- export declare function prepareZapOutInternal(publicClient: PublicClient, chainId: number, poolService: PoolService, routeService: RouteService, poolAddress: string, tokenOut: string, liquidity: bigint, recipient: string, owner: string | undefined, options: LiquidityOptions): Promise<PreparedZapOut>;
9
- //# sourceMappingURL=zapOut.d.ts.map