@alphafi/alphafi-sdk 0.0.107 → 1.0.1

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 (1203) hide show
  1. package/README.md +378 -130
  2. package/dist/cjs/core/index.d.ts +159 -0
  3. package/dist/cjs/core/index.d.ts.map +1 -0
  4. package/dist/cjs/core/index.js +253 -0
  5. package/dist/cjs/core/index.js.map +1 -0
  6. package/dist/cjs/core/types.d.ts +135 -0
  7. package/dist/cjs/core/types.d.ts.map +1 -0
  8. package/dist/cjs/core/types.js +7 -0
  9. package/dist/cjs/core/types.js.map +1 -0
  10. package/dist/cjs/index.d.ts +7 -46
  11. package/dist/cjs/index.d.ts.map +1 -1
  12. package/dist/cjs/index.js +8 -166
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/models/blockchain.d.ts +45 -0
  15. package/dist/cjs/models/blockchain.d.ts.map +1 -0
  16. package/dist/cjs/models/blockchain.js +237 -0
  17. package/dist/cjs/models/blockchain.js.map +1 -0
  18. package/dist/cjs/models/coinInfoProvider.d.ts +23 -0
  19. package/dist/cjs/models/coinInfoProvider.d.ts.map +1 -0
  20. package/dist/cjs/models/coinInfoProvider.js +87 -0
  21. package/dist/cjs/models/coinInfoProvider.js.map +1 -0
  22. package/dist/cjs/models/index.d.ts +3 -0
  23. package/dist/cjs/models/index.d.ts.map +1 -0
  24. package/dist/cjs/models/index.js +8 -0
  25. package/dist/cjs/models/index.js.map +1 -0
  26. package/dist/cjs/models/portfolio.d.ts +21 -0
  27. package/dist/cjs/models/portfolio.d.ts.map +1 -0
  28. package/dist/cjs/models/portfolio.js +173 -0
  29. package/dist/cjs/models/portfolio.js.map +1 -0
  30. package/dist/cjs/models/protocol.d.ts +25 -0
  31. package/dist/cjs/models/protocol.d.ts.map +1 -0
  32. package/dist/cjs/models/protocol.js +141 -0
  33. package/dist/cjs/models/protocol.js.map +1 -0
  34. package/dist/cjs/models/strategyContext.d.ts +150 -0
  35. package/dist/cjs/models/strategyContext.d.ts.map +1 -0
  36. package/dist/cjs/models/strategyContext.js +829 -0
  37. package/dist/cjs/models/strategyContext.js.map +1 -0
  38. package/dist/cjs/models/swap.d.ts +11 -0
  39. package/dist/cjs/models/swap.d.ts.map +1 -0
  40. package/dist/cjs/models/swap.js +60 -0
  41. package/dist/cjs/models/swap.js.map +1 -0
  42. package/dist/cjs/models/types.d.ts +145 -0
  43. package/dist/cjs/models/types.d.ts.map +1 -0
  44. package/dist/cjs/models/types.js.map +1 -0
  45. package/dist/cjs/strategies/alphaVault.d.ts +279 -0
  46. package/dist/cjs/strategies/alphaVault.d.ts.map +1 -0
  47. package/dist/cjs/strategies/alphaVault.js +891 -0
  48. package/dist/cjs/strategies/alphaVault.js.map +1 -0
  49. package/dist/cjs/strategies/autobalanceLp.d.ts +197 -0
  50. package/dist/cjs/strategies/autobalanceLp.d.ts.map +1 -0
  51. package/dist/cjs/strategies/autobalanceLp.js +567 -0
  52. package/dist/cjs/strategies/autobalanceLp.js.map +1 -0
  53. package/dist/cjs/strategies/fungibleLending.d.ts +98 -0
  54. package/dist/cjs/strategies/fungibleLending.d.ts.map +1 -0
  55. package/dist/cjs/strategies/fungibleLending.js +204 -0
  56. package/dist/cjs/strategies/fungibleLending.js.map +1 -0
  57. package/dist/cjs/strategies/fungibleLp.d.ts +165 -0
  58. package/dist/cjs/strategies/fungibleLp.d.ts.map +1 -0
  59. package/dist/cjs/strategies/fungibleLp.js +398 -0
  60. package/dist/cjs/strategies/fungibleLp.js.map +1 -0
  61. package/dist/cjs/strategies/index.d.ts +26 -0
  62. package/dist/cjs/strategies/index.d.ts.map +1 -0
  63. package/dist/cjs/strategies/index.js +24 -0
  64. package/dist/cjs/strategies/index.js.map +1 -0
  65. package/dist/cjs/strategies/lending.d.ts +155 -0
  66. package/dist/cjs/strategies/lending.d.ts.map +1 -0
  67. package/dist/cjs/strategies/lending.js +828 -0
  68. package/dist/cjs/strategies/lending.js.map +1 -0
  69. package/dist/cjs/strategies/looping.d.ts +176 -0
  70. package/dist/cjs/strategies/looping.d.ts.map +1 -0
  71. package/dist/cjs/strategies/looping.js +978 -0
  72. package/dist/cjs/strategies/looping.js.map +1 -0
  73. package/dist/cjs/strategies/lp.d.ts +207 -0
  74. package/dist/cjs/strategies/lp.d.ts.map +1 -0
  75. package/dist/cjs/strategies/lp.js +1452 -0
  76. package/dist/cjs/strategies/lp.js.map +1 -0
  77. package/dist/cjs/strategies/lyf.d.ts +207 -0
  78. package/dist/cjs/strategies/lyf.d.ts.map +1 -0
  79. package/dist/cjs/strategies/lyf.js +649 -0
  80. package/dist/cjs/strategies/lyf.js.map +1 -0
  81. package/dist/cjs/strategies/singleAssetLooping.d.ts +152 -0
  82. package/dist/cjs/strategies/singleAssetLooping.d.ts.map +1 -0
  83. package/dist/cjs/strategies/singleAssetLooping.js +631 -0
  84. package/dist/cjs/strategies/singleAssetLooping.js.map +1 -0
  85. package/dist/cjs/strategies/slushLending.d.ts +131 -0
  86. package/dist/cjs/strategies/slushLending.d.ts.map +1 -0
  87. package/dist/cjs/strategies/slushLending.js +392 -0
  88. package/dist/cjs/strategies/slushLending.js.map +1 -0
  89. package/dist/cjs/strategies/strategy.d.ts +198 -0
  90. package/dist/cjs/strategies/strategy.d.ts.map +1 -0
  91. package/dist/cjs/strategies/strategy.js +196 -0
  92. package/dist/cjs/strategies/strategy.js.map +1 -0
  93. package/dist/cjs/utils/cache.d.ts +98 -0
  94. package/dist/cjs/utils/cache.d.ts.map +1 -0
  95. package/dist/cjs/utils/cache.js +203 -0
  96. package/dist/cjs/utils/cache.js.map +1 -0
  97. package/dist/cjs/utils/constants.d.ts +236 -2
  98. package/dist/cjs/utils/constants.d.ts.map +1 -1
  99. package/dist/cjs/utils/constants.js +244 -107
  100. package/dist/cjs/utils/constants.js.map +1 -1
  101. package/dist/cjs/utils/poolMap.d.ts +20 -0
  102. package/dist/cjs/utils/poolMap.d.ts.map +1 -0
  103. package/dist/cjs/utils/poolMap.js +237 -0
  104. package/dist/cjs/utils/poolMap.js.map +1 -0
  105. package/dist/cjs/utils/testing-pools.d.ts +3 -0
  106. package/dist/cjs/utils/testing-pools.d.ts.map +1 -0
  107. package/dist/cjs/utils/testing-pools.js +27 -0
  108. package/dist/cjs/utils/testing-pools.js.map +1 -0
  109. package/dist/esm/core/index.d.ts +159 -0
  110. package/dist/esm/core/index.d.ts.map +1 -0
  111. package/dist/esm/core/index.js +249 -0
  112. package/dist/esm/core/index.js.map +1 -0
  113. package/dist/esm/core/types.d.ts +135 -0
  114. package/dist/esm/core/types.d.ts.map +1 -0
  115. package/dist/esm/core/types.js +6 -0
  116. package/dist/esm/core/types.js.map +1 -0
  117. package/dist/esm/index.d.ts +7 -46
  118. package/dist/esm/index.d.ts.map +1 -1
  119. package/dist/esm/index.js +8 -49
  120. package/dist/esm/index.js.map +1 -1
  121. package/dist/esm/models/blockchain.d.ts +45 -0
  122. package/dist/esm/models/blockchain.d.ts.map +1 -0
  123. package/dist/esm/models/blockchain.js +233 -0
  124. package/dist/esm/models/blockchain.js.map +1 -0
  125. package/dist/esm/models/coinInfoProvider.d.ts +23 -0
  126. package/dist/esm/models/coinInfoProvider.d.ts.map +1 -0
  127. package/dist/esm/models/coinInfoProvider.js +83 -0
  128. package/dist/esm/models/coinInfoProvider.js.map +1 -0
  129. package/dist/esm/models/index.d.ts +3 -0
  130. package/dist/esm/models/index.d.ts.map +1 -0
  131. package/dist/esm/models/index.js +3 -0
  132. package/dist/esm/models/index.js.map +1 -0
  133. package/dist/esm/models/portfolio.d.ts +21 -0
  134. package/dist/esm/models/portfolio.d.ts.map +1 -0
  135. package/dist/esm/models/portfolio.js +169 -0
  136. package/dist/esm/models/portfolio.js.map +1 -0
  137. package/dist/esm/models/protocol.d.ts +25 -0
  138. package/dist/esm/models/protocol.d.ts.map +1 -0
  139. package/dist/esm/models/protocol.js +137 -0
  140. package/dist/esm/models/protocol.js.map +1 -0
  141. package/dist/esm/models/strategyContext.d.ts +150 -0
  142. package/dist/esm/models/strategyContext.d.ts.map +1 -0
  143. package/dist/esm/models/strategyContext.js +825 -0
  144. package/dist/esm/models/strategyContext.js.map +1 -0
  145. package/dist/esm/models/swap.d.ts +11 -0
  146. package/dist/esm/models/swap.d.ts.map +1 -0
  147. package/dist/esm/models/swap.js +58 -0
  148. package/dist/esm/models/swap.js.map +1 -0
  149. package/dist/esm/models/types.d.ts +145 -0
  150. package/dist/esm/models/types.d.ts.map +1 -0
  151. package/dist/esm/models/types.js.map +1 -0
  152. package/dist/esm/strategies/alphaVault.d.ts +279 -0
  153. package/dist/esm/strategies/alphaVault.d.ts.map +1 -0
  154. package/dist/esm/strategies/alphaVault.js +887 -0
  155. package/dist/esm/strategies/alphaVault.js.map +1 -0
  156. package/dist/esm/strategies/autobalanceLp.d.ts +197 -0
  157. package/dist/esm/strategies/autobalanceLp.d.ts.map +1 -0
  158. package/dist/esm/strategies/autobalanceLp.js +562 -0
  159. package/dist/esm/strategies/autobalanceLp.js.map +1 -0
  160. package/dist/esm/strategies/fungibleLending.d.ts +98 -0
  161. package/dist/esm/strategies/fungibleLending.d.ts.map +1 -0
  162. package/dist/esm/strategies/fungibleLending.js +200 -0
  163. package/dist/esm/strategies/fungibleLending.js.map +1 -0
  164. package/dist/esm/strategies/fungibleLp.d.ts +165 -0
  165. package/dist/esm/strategies/fungibleLp.d.ts.map +1 -0
  166. package/dist/esm/strategies/fungibleLp.js +393 -0
  167. package/dist/esm/strategies/fungibleLp.js.map +1 -0
  168. package/dist/esm/strategies/index.d.ts +26 -0
  169. package/dist/esm/strategies/index.d.ts.map +1 -0
  170. package/dist/esm/strategies/index.js +18 -0
  171. package/dist/esm/strategies/index.js.map +1 -0
  172. package/dist/esm/strategies/lending.d.ts +155 -0
  173. package/dist/esm/strategies/lending.d.ts.map +1 -0
  174. package/dist/esm/strategies/lending.js +824 -0
  175. package/dist/esm/strategies/lending.js.map +1 -0
  176. package/dist/esm/strategies/looping.d.ts +176 -0
  177. package/dist/esm/strategies/looping.d.ts.map +1 -0
  178. package/dist/esm/strategies/looping.js +974 -0
  179. package/dist/esm/strategies/looping.js.map +1 -0
  180. package/dist/esm/strategies/lp.d.ts +207 -0
  181. package/dist/esm/strategies/lp.d.ts.map +1 -0
  182. package/dist/esm/strategies/lp.js +1447 -0
  183. package/dist/esm/strategies/lp.js.map +1 -0
  184. package/dist/esm/strategies/lyf.d.ts +207 -0
  185. package/dist/esm/strategies/lyf.d.ts.map +1 -0
  186. package/dist/esm/strategies/lyf.js +644 -0
  187. package/dist/esm/strategies/lyf.js.map +1 -0
  188. package/dist/esm/strategies/singleAssetLooping.d.ts +152 -0
  189. package/dist/esm/strategies/singleAssetLooping.d.ts.map +1 -0
  190. package/dist/esm/strategies/singleAssetLooping.js +627 -0
  191. package/dist/esm/strategies/singleAssetLooping.js.map +1 -0
  192. package/dist/esm/strategies/slushLending.d.ts +131 -0
  193. package/dist/esm/strategies/slushLending.d.ts.map +1 -0
  194. package/dist/esm/strategies/slushLending.js +388 -0
  195. package/dist/esm/strategies/slushLending.js.map +1 -0
  196. package/dist/esm/strategies/strategy.d.ts +198 -0
  197. package/dist/esm/strategies/strategy.d.ts.map +1 -0
  198. package/dist/esm/strategies/strategy.js +192 -0
  199. package/dist/esm/strategies/strategy.js.map +1 -0
  200. package/dist/esm/utils/cache.d.ts +98 -0
  201. package/dist/esm/utils/cache.d.ts.map +1 -0
  202. package/dist/esm/utils/cache.js +198 -0
  203. package/dist/esm/utils/cache.js.map +1 -0
  204. package/dist/esm/utils/constants.d.ts +236 -2
  205. package/dist/esm/utils/constants.d.ts.map +1 -1
  206. package/dist/esm/utils/constants.js +243 -106
  207. package/dist/esm/utils/constants.js.map +1 -1
  208. package/dist/esm/utils/poolMap.d.ts +20 -0
  209. package/dist/esm/utils/poolMap.d.ts.map +1 -0
  210. package/dist/esm/utils/poolMap.js +233 -0
  211. package/dist/esm/utils/poolMap.js.map +1 -0
  212. package/dist/esm/utils/testing-pools.d.ts +3 -0
  213. package/dist/esm/utils/testing-pools.d.ts.map +1 -0
  214. package/dist/esm/utils/testing-pools.js +24 -0
  215. package/dist/esm/utils/testing-pools.js.map +1 -0
  216. package/package.json +45 -72
  217. package/dist/cjs/adminFunctions.d.ts +0 -33
  218. package/dist/cjs/adminFunctions.d.ts.map +0 -1
  219. package/dist/cjs/adminFunctions.js +0 -306
  220. package/dist/cjs/adminFunctions.js.map +0 -1
  221. package/dist/cjs/common/alphaTypes.d.ts +0 -110
  222. package/dist/cjs/common/alphaTypes.d.ts.map +0 -1
  223. package/dist/cjs/common/alphaTypes.js +0 -3
  224. package/dist/cjs/common/alphaTypes.js.map +0 -1
  225. package/dist/cjs/common/cetus_mainnet_config.d.ts +0 -3
  226. package/dist/cjs/common/cetus_mainnet_config.d.ts.map +0 -1
  227. package/dist/cjs/common/cetus_mainnet_config.js +0 -50
  228. package/dist/cjs/common/cetus_mainnet_config.js.map +0 -1
  229. package/dist/cjs/common/coins.d.ts +0 -6
  230. package/dist/cjs/common/coins.d.ts.map +0 -1
  231. package/dist/cjs/common/coins.js +0 -313
  232. package/dist/cjs/common/coins.js.map +0 -1
  233. package/dist/cjs/common/constants.d.ts +0 -3187
  234. package/dist/cjs/common/constants.d.ts.map +0 -1
  235. package/dist/cjs/common/constants.js +0 -2564
  236. package/dist/cjs/common/constants.js.map +0 -1
  237. package/dist/cjs/common/maps.d.ts +0 -120
  238. package/dist/cjs/common/maps.d.ts.map +0 -1
  239. package/dist/cjs/common/maps.js +0 -2527
  240. package/dist/cjs/common/maps.js.map +0 -1
  241. package/dist/cjs/common/pyth.d.ts +0 -7
  242. package/dist/cjs/common/pyth.d.ts.map +0 -1
  243. package/dist/cjs/common/pyth.js +0 -3
  244. package/dist/cjs/common/pyth.js.map +0 -1
  245. package/dist/cjs/common/types.d.ts +0 -736
  246. package/dist/cjs/common/types.d.ts.map +0 -1
  247. package/dist/cjs/common/types.js.map +0 -1
  248. package/dist/cjs/example.d.ts +0 -3
  249. package/dist/cjs/example.d.ts.map +0 -1
  250. package/dist/cjs/example.js +0 -42
  251. package/dist/cjs/example.js.map +0 -1
  252. package/dist/cjs/getAirdropShare.d.ts +0 -3
  253. package/dist/cjs/getAirdropShare.d.ts.map +0 -1
  254. package/dist/cjs/getAirdropShare.js +0 -10
  255. package/dist/cjs/getAirdropShare.js.map +0 -1
  256. package/dist/cjs/getAllVaults.d.ts +0 -7
  257. package/dist/cjs/getAllVaults.d.ts.map +0 -1
  258. package/dist/cjs/getAllVaults.js +0 -39
  259. package/dist/cjs/getAllVaults.js.map +0 -1
  260. package/dist/cjs/getAlphaUnlocks.d.ts +0 -15
  261. package/dist/cjs/getAlphaUnlocks.d.ts.map +0 -1
  262. package/dist/cjs/getAlphaUnlocks.js +0 -21
  263. package/dist/cjs/getAlphaUnlocks.js.map +0 -1
  264. package/dist/cjs/getAprs.d.ts +0 -14
  265. package/dist/cjs/getAprs.d.ts.map +0 -1
  266. package/dist/cjs/getAprs.js +0 -306
  267. package/dist/cjs/getAprs.js.map +0 -1
  268. package/dist/cjs/getLastAutoCompoundTime.d.ts +0 -4
  269. package/dist/cjs/getLastAutoCompoundTime.d.ts.map +0 -1
  270. package/dist/cjs/getLastAutoCompoundTime.js +0 -18
  271. package/dist/cjs/getLastAutoCompoundTime.js.map +0 -1
  272. package/dist/cjs/getRebalanceHistory.d.ts +0 -6
  273. package/dist/cjs/getRebalanceHistory.d.ts.map +0 -1
  274. package/dist/cjs/getRebalanceHistory.js +0 -26
  275. package/dist/cjs/getRebalanceHistory.js.map +0 -1
  276. package/dist/cjs/getTvls.d.ts +0 -10
  277. package/dist/cjs/getTvls.d.ts.map +0 -1
  278. package/dist/cjs/getTvls.js +0 -137
  279. package/dist/cjs/getTvls.js.map +0 -1
  280. package/dist/cjs/getVaultBalances.d.ts +0 -13
  281. package/dist/cjs/getVaultBalances.d.ts.map +0 -1
  282. package/dist/cjs/getVaultBalances.js +0 -103
  283. package/dist/cjs/getVaultBalances.js.map +0 -1
  284. package/dist/cjs/getVaults.d.ts +0 -8
  285. package/dist/cjs/getVaults.d.ts.map +0 -1
  286. package/dist/cjs/getVaults.js +0 -34
  287. package/dist/cjs/getVaults.js.map +0 -1
  288. package/dist/cjs/graphql/client.d.ts +0 -4
  289. package/dist/cjs/graphql/client.d.ts.map +0 -1
  290. package/dist/cjs/graphql/client.js +0 -14
  291. package/dist/cjs/graphql/client.js.map +0 -1
  292. package/dist/cjs/graphql/executeMutations.d.ts +0 -19
  293. package/dist/cjs/graphql/executeMutations.d.ts.map +0 -1
  294. package/dist/cjs/graphql/executeMutations.js +0 -40
  295. package/dist/cjs/graphql/executeMutations.js.map +0 -1
  296. package/dist/cjs/graphql/fetchAutoCompoundingEventsGql.d.ts +0 -28
  297. package/dist/cjs/graphql/fetchAutoCompoundingEventsGql.d.ts.map +0 -1
  298. package/dist/cjs/graphql/fetchAutoCompoundingEventsGql.js +0 -120
  299. package/dist/cjs/graphql/fetchAutoCompoundingEventsGql.js.map +0 -1
  300. package/dist/cjs/graphql/fetchData.d.ts +0 -35
  301. package/dist/cjs/graphql/fetchData.d.ts.map +0 -1
  302. package/dist/cjs/graphql/fetchData.js +0 -103
  303. package/dist/cjs/graphql/fetchData.js.map +0 -1
  304. package/dist/cjs/graphql/fetchNftHolders.d.ts +0 -4
  305. package/dist/cjs/graphql/fetchNftHolders.d.ts.map +0 -1
  306. package/dist/cjs/graphql/fetchNftHolders.js +0 -37
  307. package/dist/cjs/graphql/fetchNftHolders.js.map +0 -1
  308. package/dist/cjs/graphql/fetchReceipts.d.ts +0 -4
  309. package/dist/cjs/graphql/fetchReceipts.d.ts.map +0 -1
  310. package/dist/cjs/graphql/fetchReceipts.js +0 -38
  311. package/dist/cjs/graphql/fetchReceipts.js.map +0 -1
  312. package/dist/cjs/graphql/getMultiReceipts.d.ts +0 -4
  313. package/dist/cjs/graphql/getMultiReceipts.d.ts.map +0 -1
  314. package/dist/cjs/graphql/getMultiReceipts.js +0 -117
  315. package/dist/cjs/graphql/getMultiReceipts.js.map +0 -1
  316. package/dist/cjs/graphql/mutations.d.ts +0 -4
  317. package/dist/cjs/graphql/mutations.d.ts.map +0 -1
  318. package/dist/cjs/graphql/mutations.js +0 -33
  319. package/dist/cjs/graphql/mutations.js.map +0 -1
  320. package/dist/cjs/graphql/parseData.d.ts +0 -3
  321. package/dist/cjs/graphql/parseData.d.ts.map +0 -1
  322. package/dist/cjs/graphql/parseData.js +0 -10
  323. package/dist/cjs/graphql/parseData.js.map +0 -1
  324. package/dist/cjs/graphql/parseLockedTableId.d.ts +0 -8
  325. package/dist/cjs/graphql/parseLockedTableId.d.ts.map +0 -1
  326. package/dist/cjs/graphql/parseLockedTableId.js +0 -16
  327. package/dist/cjs/graphql/parseLockedTableId.js.map +0 -1
  328. package/dist/cjs/graphql/queries/autoCompoundEvents.d.ts +0 -2
  329. package/dist/cjs/graphql/queries/autoCompoundEvents.d.ts.map +0 -1
  330. package/dist/cjs/graphql/queries/autoCompoundEvents.js +0 -19
  331. package/dist/cjs/graphql/queries/autoCompoundEvents.js.map +0 -1
  332. package/dist/cjs/graphql/queries/cetusPools.d.ts +0 -2
  333. package/dist/cjs/graphql/queries/cetusPools.d.ts.map +0 -1
  334. package/dist/cjs/graphql/queries/cetusPools.js +0 -39
  335. package/dist/cjs/graphql/queries/cetusPools.js.map +0 -1
  336. package/dist/cjs/graphql/queries/getMultiReceipts.d.ts +0 -3
  337. package/dist/cjs/graphql/queries/getMultiReceipts.d.ts.map +0 -1
  338. package/dist/cjs/graphql/queries/getMultiReceipts.js +0 -59
  339. package/dist/cjs/graphql/queries/getMultiReceipts.js.map +0 -1
  340. package/dist/cjs/graphql/queries/investors.d.ts +0 -2
  341. package/dist/cjs/graphql/queries/investors.d.ts.map +0 -1
  342. package/dist/cjs/graphql/queries/investors.js +0 -39
  343. package/dist/cjs/graphql/queries/investors.js.map +0 -1
  344. package/dist/cjs/graphql/queries/lockedTableData.d.ts +0 -2
  345. package/dist/cjs/graphql/queries/lockedTableData.d.ts.map +0 -1
  346. package/dist/cjs/graphql/queries/lockedTableData.js +0 -30
  347. package/dist/cjs/graphql/queries/lockedTableData.js.map +0 -1
  348. package/dist/cjs/graphql/queries/lockedTableDataFragment.d.ts +0 -2
  349. package/dist/cjs/graphql/queries/lockedTableDataFragment.d.ts.map +0 -1
  350. package/dist/cjs/graphql/queries/lockedTableDataFragment.js +0 -24
  351. package/dist/cjs/graphql/queries/lockedTableDataFragment.js.map +0 -1
  352. package/dist/cjs/graphql/queries/nftHolders.d.ts +0 -2
  353. package/dist/cjs/graphql/queries/nftHolders.d.ts.map +0 -1
  354. package/dist/cjs/graphql/queries/nftHolders.js +0 -23
  355. package/dist/cjs/graphql/queries/nftHolders.js.map +0 -1
  356. package/dist/cjs/graphql/queries/pools.d.ts +0 -2
  357. package/dist/cjs/graphql/queries/pools.d.ts.map +0 -1
  358. package/dist/cjs/graphql/queries/pools.js +0 -57
  359. package/dist/cjs/graphql/queries/pools.js.map +0 -1
  360. package/dist/cjs/graphql/queries/receiptData.d.ts +0 -2
  361. package/dist/cjs/graphql/queries/receiptData.d.ts.map +0 -1
  362. package/dist/cjs/graphql/queries/receiptData.js +0 -21
  363. package/dist/cjs/graphql/queries/receiptData.js.map +0 -1
  364. package/dist/cjs/graphql/queries/userVaultBalances.d.ts +0 -2
  365. package/dist/cjs/graphql/queries/userVaultBalances.d.ts.map +0 -1
  366. package/dist/cjs/graphql/queries/userVaultBalances.js +0 -62
  367. package/dist/cjs/graphql/queries/userVaultBalances.js.map +0 -1
  368. package/dist/cjs/graphql/queries/userVaults.d.ts +0 -2
  369. package/dist/cjs/graphql/queries/userVaults.d.ts.map +0 -1
  370. package/dist/cjs/graphql/queries/userVaults.js +0 -62
  371. package/dist/cjs/graphql/queries/userVaults.js.map +0 -1
  372. package/dist/cjs/graphql/queries.d.ts +0 -15
  373. package/dist/cjs/graphql/queries.d.ts.map +0 -1
  374. package/dist/cjs/graphql/queries.js +0 -86
  375. package/dist/cjs/graphql/queries.js.map +0 -1
  376. package/dist/cjs/graphql/types.d.ts +0 -112
  377. package/dist/cjs/graphql/types.d.ts.map +0 -1
  378. package/dist/cjs/graphql/types.js +0 -3
  379. package/dist/cjs/graphql/types.js.map +0 -1
  380. package/dist/cjs/sui-sdk/client.d.ts +0 -44
  381. package/dist/cjs/sui-sdk/client.d.ts.map +0 -1
  382. package/dist/cjs/sui-sdk/client.js +0 -90
  383. package/dist/cjs/sui-sdk/client.js.map +0 -1
  384. package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.d.ts +0 -10
  385. package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.d.ts.map +0 -1
  386. package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.js +0 -128
  387. package/dist/cjs/sui-sdk/events/fetchAfterTransactionEvents.js.map +0 -1
  388. package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.d.ts +0 -4
  389. package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.d.ts.map +0 -1
  390. package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.js +0 -20
  391. package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.js.map +0 -1
  392. package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.d.ts +0 -9
  393. package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.d.ts.map +0 -1
  394. package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.js +0 -406
  395. package/dist/cjs/sui-sdk/events/fetchAutoCompoundingEvents.js.map +0 -1
  396. package/dist/cjs/sui-sdk/events/fetchCheckRatioEvents.d.ts +0 -4
  397. package/dist/cjs/sui-sdk/events/fetchCheckRatioEvents.d.ts.map +0 -1
  398. package/dist/cjs/sui-sdk/events/fetchCheckRatioEvents.js +0 -47
  399. package/dist/cjs/sui-sdk/events/fetchCheckRatioEvents.js.map +0 -1
  400. package/dist/cjs/sui-sdk/events/fetchEvents.d.ts +0 -4
  401. package/dist/cjs/sui-sdk/events/fetchEvents.d.ts.map +0 -1
  402. package/dist/cjs/sui-sdk/events/fetchEvents.js +0 -453
  403. package/dist/cjs/sui-sdk/events/fetchEvents.js.map +0 -1
  404. package/dist/cjs/sui-sdk/events/fetchLiquidityChangeEvents.d.ts +0 -4
  405. package/dist/cjs/sui-sdk/events/fetchLiquidityChangeEvents.d.ts.map +0 -1
  406. package/dist/cjs/sui-sdk/events/fetchLiquidityChangeEvents.js +0 -45
  407. package/dist/cjs/sui-sdk/events/fetchLiquidityChangeEvents.js.map +0 -1
  408. package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.d.ts +0 -9
  409. package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.d.ts.map +0 -1
  410. package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.js +0 -41
  411. package/dist/cjs/sui-sdk/events/fetchMultiCategoryEvents.js.map +0 -1
  412. package/dist/cjs/sui-sdk/events/fetchRebalanceEvents.d.ts +0 -7
  413. package/dist/cjs/sui-sdk/events/fetchRebalanceEvents.d.ts.map +0 -1
  414. package/dist/cjs/sui-sdk/events/fetchRebalanceEvents.js +0 -91
  415. package/dist/cjs/sui-sdk/events/fetchRebalanceEvents.js.map +0 -1
  416. package/dist/cjs/sui-sdk/events/fetchWithdrawV2Events.d.ts +0 -4
  417. package/dist/cjs/sui-sdk/events/fetchWithdrawV2Events.d.ts.map +0 -1
  418. package/dist/cjs/sui-sdk/events/fetchWithdrawV2Events.js +0 -28
  419. package/dist/cjs/sui-sdk/events/fetchWithdrawV2Events.js.map +0 -1
  420. package/dist/cjs/sui-sdk/events/parseData.d.ts +0 -6
  421. package/dist/cjs/sui-sdk/events/parseData.d.ts.map +0 -1
  422. package/dist/cjs/sui-sdk/events/parseData.js +0 -33
  423. package/dist/cjs/sui-sdk/events/parseData.js.map +0 -1
  424. package/dist/cjs/sui-sdk/events/types.d.ts +0 -238
  425. package/dist/cjs/sui-sdk/events/types.d.ts.map +0 -1
  426. package/dist/cjs/sui-sdk/events/types.js +0 -9
  427. package/dist/cjs/sui-sdk/events/types.js.map +0 -1
  428. package/dist/cjs/sui-sdk/functions/fetchTableData.d.ts +0 -50
  429. package/dist/cjs/sui-sdk/functions/fetchTableData.d.ts.map +0 -1
  430. package/dist/cjs/sui-sdk/functions/fetchTableData.js +0 -77
  431. package/dist/cjs/sui-sdk/functions/fetchTableData.js.map +0 -1
  432. package/dist/cjs/sui-sdk/functions/fetchUserVaultBalances.d.ts +0 -3
  433. package/dist/cjs/sui-sdk/functions/fetchUserVaultBalances.d.ts.map +0 -1
  434. package/dist/cjs/sui-sdk/functions/fetchUserVaultBalances.js +0 -73
  435. package/dist/cjs/sui-sdk/functions/fetchUserVaultBalances.js.map +0 -1
  436. package/dist/cjs/sui-sdk/functions/fetchUserVaults.d.ts +0 -3
  437. package/dist/cjs/sui-sdk/functions/fetchUserVaults.d.ts.map +0 -1
  438. package/dist/cjs/sui-sdk/functions/fetchUserVaults.js +0 -50
  439. package/dist/cjs/sui-sdk/functions/fetchUserVaults.js.map +0 -1
  440. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.d.ts +0 -19
  441. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.d.ts.map +0 -1
  442. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js +0 -314
  443. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js.map +0 -1
  444. package/dist/cjs/sui-sdk/functions/getPositionRange.d.ts +0 -12
  445. package/dist/cjs/sui-sdk/functions/getPositionRange.d.ts.map +0 -1
  446. package/dist/cjs/sui-sdk/functions/getPositionRange.js +0 -88
  447. package/dist/cjs/sui-sdk/functions/getPositionRange.js.map +0 -1
  448. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts +0 -69
  449. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts.map +0 -1
  450. package/dist/cjs/sui-sdk/functions/getReceipts.js +0 -768
  451. package/dist/cjs/sui-sdk/functions/getReceipts.js.map +0 -1
  452. package/dist/cjs/sui-sdk/transactions/constants.d.ts +0 -4
  453. package/dist/cjs/sui-sdk/transactions/constants.d.ts.map +0 -1
  454. package/dist/cjs/sui-sdk/transactions/constants.js +0 -90
  455. package/dist/cjs/sui-sdk/transactions/constants.js.map +0 -1
  456. package/dist/cjs/sui-sdk/transactions/fetchTransactions.d.ts +0 -5
  457. package/dist/cjs/sui-sdk/transactions/fetchTransactions.d.ts.map +0 -1
  458. package/dist/cjs/sui-sdk/transactions/fetchTransactions.js +0 -65
  459. package/dist/cjs/sui-sdk/transactions/fetchTransactions.js.map +0 -1
  460. package/dist/cjs/sui-sdk/transactions/types.d.ts +0 -9
  461. package/dist/cjs/sui-sdk/transactions/types.d.ts.map +0 -1
  462. package/dist/cjs/sui-sdk/transactions/types.js +0 -3
  463. package/dist/cjs/sui-sdk/transactions/types.js.map +0 -1
  464. package/dist/cjs/transactions/7k.d.ts +0 -8
  465. package/dist/cjs/transactions/7k.d.ts.map +0 -1
  466. package/dist/cjs/transactions/7k.js +0 -34
  467. package/dist/cjs/transactions/7k.js.map +0 -1
  468. package/dist/cjs/transactions/alpha.d.ts +0 -6
  469. package/dist/cjs/transactions/alpha.d.ts.map +0 -1
  470. package/dist/cjs/transactions/alpha.js +0 -110
  471. package/dist/cjs/transactions/alpha.js.map +0 -1
  472. package/dist/cjs/transactions/alphaVault.d.ts +0 -33
  473. package/dist/cjs/transactions/alphaVault.d.ts.map +0 -1
  474. package/dist/cjs/transactions/alphaVault.js +0 -449
  475. package/dist/cjs/transactions/alphaVault.js.map +0 -1
  476. package/dist/cjs/transactions/alphalend.d.ts +0 -30
  477. package/dist/cjs/transactions/alphalend.d.ts.map +0 -1
  478. package/dist/cjs/transactions/alphalend.js +0 -286
  479. package/dist/cjs/transactions/alphalend.js.map +0 -1
  480. package/dist/cjs/transactions/blueRewards.d.ts +0 -15
  481. package/dist/cjs/transactions/blueRewards.d.ts.map +0 -1
  482. package/dist/cjs/transactions/blueRewards.js +0 -395
  483. package/dist/cjs/transactions/blueRewards.js.map +0 -1
  484. package/dist/cjs/transactions/bluefin.d.ts +0 -60
  485. package/dist/cjs/transactions/bluefin.d.ts.map +0 -1
  486. package/dist/cjs/transactions/bluefin.js +0 -3078
  487. package/dist/cjs/transactions/bluefin.js.map +0 -1
  488. package/dist/cjs/transactions/bucket.d.ts +0 -8
  489. package/dist/cjs/transactions/bucket.d.ts.map +0 -1
  490. package/dist/cjs/transactions/bucket.js +0 -144
  491. package/dist/cjs/transactions/bucket.js.map +0 -1
  492. package/dist/cjs/transactions/cetus.d.ts +0 -27
  493. package/dist/cjs/transactions/cetus.d.ts.map +0 -1
  494. package/dist/cjs/transactions/cetus.js +0 -466
  495. package/dist/cjs/transactions/cetus.js.map +0 -1
  496. package/dist/cjs/transactions/cetusSwap.d.ts +0 -15
  497. package/dist/cjs/transactions/cetusSwap.d.ts.map +0 -1
  498. package/dist/cjs/transactions/cetusSwap.js +0 -74
  499. package/dist/cjs/transactions/cetusSwap.js.map +0 -1
  500. package/dist/cjs/transactions/collect_rewards.d.ts +0 -11
  501. package/dist/cjs/transactions/collect_rewards.d.ts.map +0 -1
  502. package/dist/cjs/transactions/collect_rewards.js +0 -1292
  503. package/dist/cjs/transactions/collect_rewards.js.map +0 -1
  504. package/dist/cjs/transactions/deposit.d.ts +0 -15
  505. package/dist/cjs/transactions/deposit.d.ts.map +0 -1
  506. package/dist/cjs/transactions/deposit.js +0 -194
  507. package/dist/cjs/transactions/deposit.js.map +0 -1
  508. package/dist/cjs/transactions/get_navi_rewards.d.ts +0 -11
  509. package/dist/cjs/transactions/get_navi_rewards.d.ts.map +0 -1
  510. package/dist/cjs/transactions/get_navi_rewards.js +0 -39
  511. package/dist/cjs/transactions/get_navi_rewards.js.map +0 -1
  512. package/dist/cjs/transactions/navi-looping.d.ts +0 -55
  513. package/dist/cjs/transactions/navi-looping.d.ts.map +0 -1
  514. package/dist/cjs/transactions/navi-looping.js +0 -1718
  515. package/dist/cjs/transactions/navi-looping.js.map +0 -1
  516. package/dist/cjs/transactions/navi.d.ts +0 -9
  517. package/dist/cjs/transactions/navi.d.ts.map +0 -1
  518. package/dist/cjs/transactions/navi.js +0 -2541
  519. package/dist/cjs/transactions/navi.js.map +0 -1
  520. package/dist/cjs/transactions/naviOracle.d.ts +0 -5
  521. package/dist/cjs/transactions/naviOracle.d.ts.map +0 -1
  522. package/dist/cjs/transactions/naviOracle.js +0 -28
  523. package/dist/cjs/transactions/naviOracle.js.map +0 -1
  524. package/dist/cjs/transactions/newZapDeposit.d.ts +0 -19
  525. package/dist/cjs/transactions/newZapDeposit.d.ts.map +0 -1
  526. package/dist/cjs/transactions/newZapDeposit.js +0 -1622
  527. package/dist/cjs/transactions/newZapDeposit.js.map +0 -1
  528. package/dist/cjs/transactions/slush.d.ts +0 -16
  529. package/dist/cjs/transactions/slush.d.ts.map +0 -1
  530. package/dist/cjs/transactions/slush.js +0 -219
  531. package/dist/cjs/transactions/slush.js.map +0 -1
  532. package/dist/cjs/transactions/types.d.ts +0 -17
  533. package/dist/cjs/transactions/types.d.ts.map +0 -1
  534. package/dist/cjs/transactions/types.js +0 -3
  535. package/dist/cjs/transactions/types.js.map +0 -1
  536. package/dist/cjs/transactions/withdraw.d.ts +0 -9
  537. package/dist/cjs/transactions/withdraw.d.ts.map +0 -1
  538. package/dist/cjs/transactions/withdraw.js +0 -132
  539. package/dist/cjs/transactions/withdraw.js.map +0 -1
  540. package/dist/cjs/transactions/zapDeposit.d.ts +0 -6
  541. package/dist/cjs/transactions/zapDeposit.d.ts.map +0 -1
  542. package/dist/cjs/transactions/zapDeposit.js +0 -1731
  543. package/dist/cjs/transactions/zapDeposit.js.map +0 -1
  544. package/dist/cjs/types.d.ts +0 -201
  545. package/dist/cjs/types.d.ts.map +0 -1
  546. package/dist/cjs/types.js +0 -3
  547. package/dist/cjs/types.js.map +0 -1
  548. package/dist/cjs/utils/clmm/prices.d.ts +0 -20
  549. package/dist/cjs/utils/clmm/prices.d.ts.map +0 -1
  550. package/dist/cjs/utils/clmm/prices.js +0 -321
  551. package/dist/cjs/utils/clmm/prices.js.map +0 -1
  552. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.d.ts +0 -15
  553. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.d.ts.map +0 -1
  554. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.js +0 -200
  555. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.js.map +0 -1
  556. package/dist/cjs/utils/clmm/types.d.ts +0 -25
  557. package/dist/cjs/utils/clmm/types.d.ts.map +0 -1
  558. package/dist/cjs/utils/clmm/types.js +0 -3
  559. package/dist/cjs/utils/clmm/types.js.map +0 -1
  560. package/dist/cjs/utils/getReceipts.d.ts +0 -4
  561. package/dist/cjs/utils/getReceipts.d.ts.map +0 -1
  562. package/dist/cjs/utils/getReceipts.js +0 -47
  563. package/dist/cjs/utils/getReceipts.js.map +0 -1
  564. package/dist/cjs/utils/hop.d.ts +0 -16
  565. package/dist/cjs/utils/hop.d.ts.map +0 -1
  566. package/dist/cjs/utils/hop.js +0 -130
  567. package/dist/cjs/utils/hop.js.map +0 -1
  568. package/dist/cjs/utils/prices.d.ts +0 -15
  569. package/dist/cjs/utils/prices.d.ts.map +0 -1
  570. package/dist/cjs/utils/prices.js +0 -168
  571. package/dist/cjs/utils/prices.js.map +0 -1
  572. package/dist/cjs/utils/simpleCache.d.ts +0 -14
  573. package/dist/cjs/utils/simpleCache.d.ts.map +0 -1
  574. package/dist/cjs/utils/simpleCache.js +0 -92
  575. package/dist/cjs/utils/simpleCache.js.map +0 -1
  576. package/dist/cjs/utils/types.d.ts +0 -5
  577. package/dist/cjs/utils/types.d.ts.map +0 -1
  578. package/dist/cjs/utils/types.js +0 -3
  579. package/dist/cjs/utils/types.js.map +0 -1
  580. package/dist/cjs/utils/userHoldings.d.ts +0 -10
  581. package/dist/cjs/utils/userHoldings.d.ts.map +0 -1
  582. package/dist/cjs/utils/userHoldings.js +0 -229
  583. package/dist/cjs/utils/userHoldings.js.map +0 -1
  584. package/dist/cjs/vaultFunctions.d.ts +0 -8
  585. package/dist/cjs/vaultFunctions.d.ts.map +0 -1
  586. package/dist/cjs/vaultFunctions.js +0 -36
  587. package/dist/cjs/vaultFunctions.js.map +0 -1
  588. package/dist/esm/adminFunctions.d.ts +0 -33
  589. package/dist/esm/adminFunctions.d.ts.map +0 -1
  590. package/dist/esm/adminFunctions.js +0 -290
  591. package/dist/esm/adminFunctions.js.map +0 -1
  592. package/dist/esm/common/alphaTypes.d.ts +0 -110
  593. package/dist/esm/common/alphaTypes.d.ts.map +0 -1
  594. package/dist/esm/common/alphaTypes.js +0 -2
  595. package/dist/esm/common/alphaTypes.js.map +0 -1
  596. package/dist/esm/common/cetus_mainnet_config.d.ts +0 -3
  597. package/dist/esm/common/cetus_mainnet_config.d.ts.map +0 -1
  598. package/dist/esm/common/cetus_mainnet_config.js +0 -47
  599. package/dist/esm/common/cetus_mainnet_config.js.map +0 -1
  600. package/dist/esm/common/coins.d.ts +0 -6
  601. package/dist/esm/common/coins.d.ts.map +0 -1
  602. package/dist/esm/common/coins.js +0 -310
  603. package/dist/esm/common/coins.js.map +0 -1
  604. package/dist/esm/common/constants.d.ts +0 -3187
  605. package/dist/esm/common/constants.d.ts.map +0 -1
  606. package/dist/esm/common/constants.js +0 -2560
  607. package/dist/esm/common/constants.js.map +0 -1
  608. package/dist/esm/common/maps.d.ts +0 -120
  609. package/dist/esm/common/maps.d.ts.map +0 -1
  610. package/dist/esm/common/maps.js +0 -2516
  611. package/dist/esm/common/maps.js.map +0 -1
  612. package/dist/esm/common/pyth.d.ts +0 -7
  613. package/dist/esm/common/pyth.d.ts.map +0 -1
  614. package/dist/esm/common/pyth.js +0 -2
  615. package/dist/esm/common/pyth.js.map +0 -1
  616. package/dist/esm/common/types.d.ts +0 -736
  617. package/dist/esm/common/types.d.ts.map +0 -1
  618. package/dist/esm/common/types.js.map +0 -1
  619. package/dist/esm/example.d.ts +0 -3
  620. package/dist/esm/example.d.ts.map +0 -1
  621. package/dist/esm/example.js +0 -38
  622. package/dist/esm/example.js.map +0 -1
  623. package/dist/esm/getAirdropShare.d.ts +0 -3
  624. package/dist/esm/getAirdropShare.d.ts.map +0 -1
  625. package/dist/esm/getAirdropShare.js +0 -7
  626. package/dist/esm/getAirdropShare.js.map +0 -1
  627. package/dist/esm/getAllVaults.d.ts +0 -7
  628. package/dist/esm/getAllVaults.d.ts.map +0 -1
  629. package/dist/esm/getAllVaults.js +0 -34
  630. package/dist/esm/getAllVaults.js.map +0 -1
  631. package/dist/esm/getAlphaUnlocks.d.ts +0 -15
  632. package/dist/esm/getAlphaUnlocks.d.ts.map +0 -1
  633. package/dist/esm/getAlphaUnlocks.js +0 -18
  634. package/dist/esm/getAlphaUnlocks.js.map +0 -1
  635. package/dist/esm/getAprs.d.ts +0 -14
  636. package/dist/esm/getAprs.d.ts.map +0 -1
  637. package/dist/esm/getAprs.js +0 -297
  638. package/dist/esm/getAprs.js.map +0 -1
  639. package/dist/esm/getLastAutoCompoundTime.d.ts +0 -4
  640. package/dist/esm/getLastAutoCompoundTime.d.ts.map +0 -1
  641. package/dist/esm/getLastAutoCompoundTime.js +0 -15
  642. package/dist/esm/getLastAutoCompoundTime.js.map +0 -1
  643. package/dist/esm/getRebalanceHistory.d.ts +0 -6
  644. package/dist/esm/getRebalanceHistory.d.ts.map +0 -1
  645. package/dist/esm/getRebalanceHistory.js +0 -22
  646. package/dist/esm/getRebalanceHistory.js.map +0 -1
  647. package/dist/esm/getTvls.d.ts +0 -10
  648. package/dist/esm/getTvls.d.ts.map +0 -1
  649. package/dist/esm/getTvls.js +0 -130
  650. package/dist/esm/getTvls.js.map +0 -1
  651. package/dist/esm/getVaultBalances.d.ts +0 -13
  652. package/dist/esm/getVaultBalances.d.ts.map +0 -1
  653. package/dist/esm/getVaultBalances.js +0 -96
  654. package/dist/esm/getVaultBalances.js.map +0 -1
  655. package/dist/esm/getVaults.d.ts +0 -8
  656. package/dist/esm/getVaults.d.ts.map +0 -1
  657. package/dist/esm/getVaults.js +0 -29
  658. package/dist/esm/getVaults.js.map +0 -1
  659. package/dist/esm/graphql/client.d.ts +0 -4
  660. package/dist/esm/graphql/client.d.ts.map +0 -1
  661. package/dist/esm/graphql/client.js +0 -12
  662. package/dist/esm/graphql/client.js.map +0 -1
  663. package/dist/esm/graphql/executeMutations.d.ts +0 -19
  664. package/dist/esm/graphql/executeMutations.d.ts.map +0 -1
  665. package/dist/esm/graphql/executeMutations.js +0 -34
  666. package/dist/esm/graphql/executeMutations.js.map +0 -1
  667. package/dist/esm/graphql/fetchAutoCompoundingEventsGql.d.ts +0 -28
  668. package/dist/esm/graphql/fetchAutoCompoundingEventsGql.d.ts.map +0 -1
  669. package/dist/esm/graphql/fetchAutoCompoundingEventsGql.js +0 -117
  670. package/dist/esm/graphql/fetchAutoCompoundingEventsGql.js.map +0 -1
  671. package/dist/esm/graphql/fetchData.d.ts +0 -35
  672. package/dist/esm/graphql/fetchData.d.ts.map +0 -1
  673. package/dist/esm/graphql/fetchData.js +0 -89
  674. package/dist/esm/graphql/fetchData.js.map +0 -1
  675. package/dist/esm/graphql/fetchNftHolders.d.ts +0 -4
  676. package/dist/esm/graphql/fetchNftHolders.d.ts.map +0 -1
  677. package/dist/esm/graphql/fetchNftHolders.js +0 -33
  678. package/dist/esm/graphql/fetchNftHolders.js.map +0 -1
  679. package/dist/esm/graphql/fetchReceipts.d.ts +0 -4
  680. package/dist/esm/graphql/fetchReceipts.d.ts.map +0 -1
  681. package/dist/esm/graphql/fetchReceipts.js +0 -34
  682. package/dist/esm/graphql/fetchReceipts.js.map +0 -1
  683. package/dist/esm/graphql/getMultiReceipts.d.ts +0 -4
  684. package/dist/esm/graphql/getMultiReceipts.d.ts.map +0 -1
  685. package/dist/esm/graphql/getMultiReceipts.js +0 -114
  686. package/dist/esm/graphql/getMultiReceipts.js.map +0 -1
  687. package/dist/esm/graphql/mutations.d.ts +0 -4
  688. package/dist/esm/graphql/mutations.d.ts.map +0 -1
  689. package/dist/esm/graphql/mutations.js +0 -30
  690. package/dist/esm/graphql/mutations.js.map +0 -1
  691. package/dist/esm/graphql/parseData.d.ts +0 -3
  692. package/dist/esm/graphql/parseData.d.ts.map +0 -1
  693. package/dist/esm/graphql/parseData.js +0 -7
  694. package/dist/esm/graphql/parseData.js.map +0 -1
  695. package/dist/esm/graphql/parseLockedTableId.d.ts +0 -8
  696. package/dist/esm/graphql/parseLockedTableId.d.ts.map +0 -1
  697. package/dist/esm/graphql/parseLockedTableId.js +0 -13
  698. package/dist/esm/graphql/parseLockedTableId.js.map +0 -1
  699. package/dist/esm/graphql/queries/autoCompoundEvents.d.ts +0 -2
  700. package/dist/esm/graphql/queries/autoCompoundEvents.d.ts.map +0 -1
  701. package/dist/esm/graphql/queries/autoCompoundEvents.js +0 -16
  702. package/dist/esm/graphql/queries/autoCompoundEvents.js.map +0 -1
  703. package/dist/esm/graphql/queries/cetusPools.d.ts +0 -2
  704. package/dist/esm/graphql/queries/cetusPools.d.ts.map +0 -1
  705. package/dist/esm/graphql/queries/cetusPools.js +0 -36
  706. package/dist/esm/graphql/queries/cetusPools.js.map +0 -1
  707. package/dist/esm/graphql/queries/getMultiReceipts.d.ts +0 -3
  708. package/dist/esm/graphql/queries/getMultiReceipts.d.ts.map +0 -1
  709. package/dist/esm/graphql/queries/getMultiReceipts.js +0 -56
  710. package/dist/esm/graphql/queries/getMultiReceipts.js.map +0 -1
  711. package/dist/esm/graphql/queries/investors.d.ts +0 -2
  712. package/dist/esm/graphql/queries/investors.d.ts.map +0 -1
  713. package/dist/esm/graphql/queries/investors.js +0 -36
  714. package/dist/esm/graphql/queries/investors.js.map +0 -1
  715. package/dist/esm/graphql/queries/lockedTableData.d.ts +0 -2
  716. package/dist/esm/graphql/queries/lockedTableData.d.ts.map +0 -1
  717. package/dist/esm/graphql/queries/lockedTableData.js +0 -27
  718. package/dist/esm/graphql/queries/lockedTableData.js.map +0 -1
  719. package/dist/esm/graphql/queries/lockedTableDataFragment.d.ts +0 -2
  720. package/dist/esm/graphql/queries/lockedTableDataFragment.d.ts.map +0 -1
  721. package/dist/esm/graphql/queries/lockedTableDataFragment.js +0 -21
  722. package/dist/esm/graphql/queries/lockedTableDataFragment.js.map +0 -1
  723. package/dist/esm/graphql/queries/nftHolders.d.ts +0 -2
  724. package/dist/esm/graphql/queries/nftHolders.d.ts.map +0 -1
  725. package/dist/esm/graphql/queries/nftHolders.js +0 -20
  726. package/dist/esm/graphql/queries/nftHolders.js.map +0 -1
  727. package/dist/esm/graphql/queries/pools.d.ts +0 -2
  728. package/dist/esm/graphql/queries/pools.d.ts.map +0 -1
  729. package/dist/esm/graphql/queries/pools.js +0 -54
  730. package/dist/esm/graphql/queries/pools.js.map +0 -1
  731. package/dist/esm/graphql/queries/receiptData.d.ts +0 -2
  732. package/dist/esm/graphql/queries/receiptData.d.ts.map +0 -1
  733. package/dist/esm/graphql/queries/receiptData.js +0 -18
  734. package/dist/esm/graphql/queries/receiptData.js.map +0 -1
  735. package/dist/esm/graphql/queries/userVaultBalances.d.ts +0 -2
  736. package/dist/esm/graphql/queries/userVaultBalances.d.ts.map +0 -1
  737. package/dist/esm/graphql/queries/userVaultBalances.js +0 -59
  738. package/dist/esm/graphql/queries/userVaultBalances.js.map +0 -1
  739. package/dist/esm/graphql/queries/userVaults.d.ts +0 -2
  740. package/dist/esm/graphql/queries/userVaults.d.ts.map +0 -1
  741. package/dist/esm/graphql/queries/userVaults.js +0 -59
  742. package/dist/esm/graphql/queries/userVaults.js.map +0 -1
  743. package/dist/esm/graphql/queries.d.ts +0 -15
  744. package/dist/esm/graphql/queries.d.ts.map +0 -1
  745. package/dist/esm/graphql/queries.js +0 -83
  746. package/dist/esm/graphql/queries.js.map +0 -1
  747. package/dist/esm/graphql/types.d.ts +0 -112
  748. package/dist/esm/graphql/types.d.ts.map +0 -1
  749. package/dist/esm/graphql/types.js +0 -2
  750. package/dist/esm/graphql/types.js.map +0 -1
  751. package/dist/esm/sui-sdk/client.d.ts +0 -44
  752. package/dist/esm/sui-sdk/client.d.ts.map +0 -1
  753. package/dist/esm/sui-sdk/client.js +0 -82
  754. package/dist/esm/sui-sdk/client.js.map +0 -1
  755. package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.d.ts +0 -10
  756. package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.d.ts.map +0 -1
  757. package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.js +0 -125
  758. package/dist/esm/sui-sdk/events/fetchAfterTransactionEvents.js.map +0 -1
  759. package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.d.ts +0 -4
  760. package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.d.ts.map +0 -1
  761. package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.js +0 -17
  762. package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.js.map +0 -1
  763. package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.d.ts +0 -9
  764. package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.d.ts.map +0 -1
  765. package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.js +0 -401
  766. package/dist/esm/sui-sdk/events/fetchAutoCompoundingEvents.js.map +0 -1
  767. package/dist/esm/sui-sdk/events/fetchCheckRatioEvents.d.ts +0 -4
  768. package/dist/esm/sui-sdk/events/fetchCheckRatioEvents.d.ts.map +0 -1
  769. package/dist/esm/sui-sdk/events/fetchCheckRatioEvents.js +0 -44
  770. package/dist/esm/sui-sdk/events/fetchCheckRatioEvents.js.map +0 -1
  771. package/dist/esm/sui-sdk/events/fetchEvents.d.ts +0 -4
  772. package/dist/esm/sui-sdk/events/fetchEvents.d.ts.map +0 -1
  773. package/dist/esm/sui-sdk/events/fetchEvents.js +0 -450
  774. package/dist/esm/sui-sdk/events/fetchEvents.js.map +0 -1
  775. package/dist/esm/sui-sdk/events/fetchLiquidityChangeEvents.d.ts +0 -4
  776. package/dist/esm/sui-sdk/events/fetchLiquidityChangeEvents.d.ts.map +0 -1
  777. package/dist/esm/sui-sdk/events/fetchLiquidityChangeEvents.js +0 -42
  778. package/dist/esm/sui-sdk/events/fetchLiquidityChangeEvents.js.map +0 -1
  779. package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.d.ts +0 -9
  780. package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.d.ts.map +0 -1
  781. package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.js +0 -38
  782. package/dist/esm/sui-sdk/events/fetchMultiCategoryEvents.js.map +0 -1
  783. package/dist/esm/sui-sdk/events/fetchRebalanceEvents.d.ts +0 -7
  784. package/dist/esm/sui-sdk/events/fetchRebalanceEvents.d.ts.map +0 -1
  785. package/dist/esm/sui-sdk/events/fetchRebalanceEvents.js +0 -86
  786. package/dist/esm/sui-sdk/events/fetchRebalanceEvents.js.map +0 -1
  787. package/dist/esm/sui-sdk/events/fetchWithdrawV2Events.d.ts +0 -4
  788. package/dist/esm/sui-sdk/events/fetchWithdrawV2Events.d.ts.map +0 -1
  789. package/dist/esm/sui-sdk/events/fetchWithdrawV2Events.js +0 -25
  790. package/dist/esm/sui-sdk/events/fetchWithdrawV2Events.js.map +0 -1
  791. package/dist/esm/sui-sdk/events/parseData.d.ts +0 -6
  792. package/dist/esm/sui-sdk/events/parseData.d.ts.map +0 -1
  793. package/dist/esm/sui-sdk/events/parseData.js +0 -29
  794. package/dist/esm/sui-sdk/events/parseData.js.map +0 -1
  795. package/dist/esm/sui-sdk/events/types.d.ts +0 -238
  796. package/dist/esm/sui-sdk/events/types.d.ts.map +0 -1
  797. package/dist/esm/sui-sdk/events/types.js +0 -6
  798. package/dist/esm/sui-sdk/events/types.js.map +0 -1
  799. package/dist/esm/sui-sdk/functions/fetchTableData.d.ts +0 -50
  800. package/dist/esm/sui-sdk/functions/fetchTableData.d.ts.map +0 -1
  801. package/dist/esm/sui-sdk/functions/fetchTableData.js +0 -73
  802. package/dist/esm/sui-sdk/functions/fetchTableData.js.map +0 -1
  803. package/dist/esm/sui-sdk/functions/fetchUserVaultBalances.d.ts +0 -3
  804. package/dist/esm/sui-sdk/functions/fetchUserVaultBalances.d.ts.map +0 -1
  805. package/dist/esm/sui-sdk/functions/fetchUserVaultBalances.js +0 -70
  806. package/dist/esm/sui-sdk/functions/fetchUserVaultBalances.js.map +0 -1
  807. package/dist/esm/sui-sdk/functions/fetchUserVaults.d.ts +0 -3
  808. package/dist/esm/sui-sdk/functions/fetchUserVaults.d.ts.map +0 -1
  809. package/dist/esm/sui-sdk/functions/fetchUserVaults.js +0 -47
  810. package/dist/esm/sui-sdk/functions/fetchUserVaults.js.map +0 -1
  811. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.d.ts +0 -19
  812. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.d.ts.map +0 -1
  813. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js +0 -303
  814. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js.map +0 -1
  815. package/dist/esm/sui-sdk/functions/getPositionRange.d.ts +0 -12
  816. package/dist/esm/sui-sdk/functions/getPositionRange.d.ts.map +0 -1
  817. package/dist/esm/sui-sdk/functions/getPositionRange.js +0 -84
  818. package/dist/esm/sui-sdk/functions/getPositionRange.js.map +0 -1
  819. package/dist/esm/sui-sdk/functions/getReceipts.d.ts +0 -69
  820. package/dist/esm/sui-sdk/functions/getReceipts.d.ts.map +0 -1
  821. package/dist/esm/sui-sdk/functions/getReceipts.js +0 -751
  822. package/dist/esm/sui-sdk/functions/getReceipts.js.map +0 -1
  823. package/dist/esm/sui-sdk/transactions/constants.d.ts +0 -4
  824. package/dist/esm/sui-sdk/transactions/constants.d.ts.map +0 -1
  825. package/dist/esm/sui-sdk/transactions/constants.js +0 -87
  826. package/dist/esm/sui-sdk/transactions/constants.js.map +0 -1
  827. package/dist/esm/sui-sdk/transactions/fetchTransactions.d.ts +0 -5
  828. package/dist/esm/sui-sdk/transactions/fetchTransactions.d.ts.map +0 -1
  829. package/dist/esm/sui-sdk/transactions/fetchTransactions.js +0 -62
  830. package/dist/esm/sui-sdk/transactions/fetchTransactions.js.map +0 -1
  831. package/dist/esm/sui-sdk/transactions/types.d.ts +0 -9
  832. package/dist/esm/sui-sdk/transactions/types.d.ts.map +0 -1
  833. package/dist/esm/sui-sdk/transactions/types.js +0 -2
  834. package/dist/esm/sui-sdk/transactions/types.js.map +0 -1
  835. package/dist/esm/transactions/7k.d.ts +0 -8
  836. package/dist/esm/transactions/7k.d.ts.map +0 -1
  837. package/dist/esm/transactions/7k.js +0 -30
  838. package/dist/esm/transactions/7k.js.map +0 -1
  839. package/dist/esm/transactions/alpha.d.ts +0 -6
  840. package/dist/esm/transactions/alpha.d.ts.map +0 -1
  841. package/dist/esm/transactions/alpha.js +0 -105
  842. package/dist/esm/transactions/alpha.js.map +0 -1
  843. package/dist/esm/transactions/alphaVault.d.ts +0 -33
  844. package/dist/esm/transactions/alphaVault.d.ts.map +0 -1
  845. package/dist/esm/transactions/alphaVault.js +0 -441
  846. package/dist/esm/transactions/alphaVault.js.map +0 -1
  847. package/dist/esm/transactions/alphalend.d.ts +0 -30
  848. package/dist/esm/transactions/alphalend.d.ts.map +0 -1
  849. package/dist/esm/transactions/alphalend.js +0 -277
  850. package/dist/esm/transactions/alphalend.js.map +0 -1
  851. package/dist/esm/transactions/blueRewards.d.ts +0 -15
  852. package/dist/esm/transactions/blueRewards.d.ts.map +0 -1
  853. package/dist/esm/transactions/blueRewards.js +0 -357
  854. package/dist/esm/transactions/blueRewards.js.map +0 -1
  855. package/dist/esm/transactions/bluefin.d.ts +0 -60
  856. package/dist/esm/transactions/bluefin.d.ts.map +0 -1
  857. package/dist/esm/transactions/bluefin.js +0 -3060
  858. package/dist/esm/transactions/bluefin.js.map +0 -1
  859. package/dist/esm/transactions/bucket.d.ts +0 -8
  860. package/dist/esm/transactions/bucket.d.ts.map +0 -1
  861. package/dist/esm/transactions/bucket.js +0 -140
  862. package/dist/esm/transactions/bucket.js.map +0 -1
  863. package/dist/esm/transactions/cetus.d.ts +0 -27
  864. package/dist/esm/transactions/cetus.d.ts.map +0 -1
  865. package/dist/esm/transactions/cetus.js +0 -457
  866. package/dist/esm/transactions/cetus.js.map +0 -1
  867. package/dist/esm/transactions/cetusSwap.d.ts +0 -15
  868. package/dist/esm/transactions/cetusSwap.d.ts.map +0 -1
  869. package/dist/esm/transactions/cetusSwap.js +0 -72
  870. package/dist/esm/transactions/cetusSwap.js.map +0 -1
  871. package/dist/esm/transactions/collect_rewards.d.ts +0 -11
  872. package/dist/esm/transactions/collect_rewards.d.ts.map +0 -1
  873. package/dist/esm/transactions/collect_rewards.js +0 -1286
  874. package/dist/esm/transactions/collect_rewards.js.map +0 -1
  875. package/dist/esm/transactions/deposit.d.ts +0 -15
  876. package/dist/esm/transactions/deposit.d.ts.map +0 -1
  877. package/dist/esm/transactions/deposit.js +0 -185
  878. package/dist/esm/transactions/deposit.js.map +0 -1
  879. package/dist/esm/transactions/get_navi_rewards.d.ts +0 -11
  880. package/dist/esm/transactions/get_navi_rewards.d.ts.map +0 -1
  881. package/dist/esm/transactions/get_navi_rewards.js +0 -36
  882. package/dist/esm/transactions/get_navi_rewards.js.map +0 -1
  883. package/dist/esm/transactions/navi-looping.d.ts +0 -55
  884. package/dist/esm/transactions/navi-looping.d.ts.map +0 -1
  885. package/dist/esm/transactions/navi-looping.js +0 -1703
  886. package/dist/esm/transactions/navi-looping.js.map +0 -1
  887. package/dist/esm/transactions/navi.d.ts +0 -9
  888. package/dist/esm/transactions/navi.d.ts.map +0 -1
  889. package/dist/esm/transactions/navi.js +0 -2537
  890. package/dist/esm/transactions/navi.js.map +0 -1
  891. package/dist/esm/transactions/naviOracle.d.ts +0 -5
  892. package/dist/esm/transactions/naviOracle.d.ts.map +0 -1
  893. package/dist/esm/transactions/naviOracle.js +0 -25
  894. package/dist/esm/transactions/naviOracle.js.map +0 -1
  895. package/dist/esm/transactions/newZapDeposit.d.ts +0 -19
  896. package/dist/esm/transactions/newZapDeposit.d.ts.map +0 -1
  897. package/dist/esm/transactions/newZapDeposit.js +0 -1617
  898. package/dist/esm/transactions/newZapDeposit.js.map +0 -1
  899. package/dist/esm/transactions/slush.d.ts +0 -16
  900. package/dist/esm/transactions/slush.d.ts.map +0 -1
  901. package/dist/esm/transactions/slush.js +0 -213
  902. package/dist/esm/transactions/slush.js.map +0 -1
  903. package/dist/esm/transactions/types.d.ts +0 -17
  904. package/dist/esm/transactions/types.d.ts.map +0 -1
  905. package/dist/esm/transactions/types.js +0 -2
  906. package/dist/esm/transactions/types.js.map +0 -1
  907. package/dist/esm/transactions/withdraw.d.ts +0 -9
  908. package/dist/esm/transactions/withdraw.d.ts.map +0 -1
  909. package/dist/esm/transactions/withdraw.js +0 -127
  910. package/dist/esm/transactions/withdraw.js.map +0 -1
  911. package/dist/esm/transactions/zapDeposit.d.ts +0 -6
  912. package/dist/esm/transactions/zapDeposit.d.ts.map +0 -1
  913. package/dist/esm/transactions/zapDeposit.js +0 -1727
  914. package/dist/esm/transactions/zapDeposit.js.map +0 -1
  915. package/dist/esm/types.d.ts +0 -201
  916. package/dist/esm/types.d.ts.map +0 -1
  917. package/dist/esm/types.js +0 -2
  918. package/dist/esm/types.js.map +0 -1
  919. package/dist/esm/utils/clmm/prices.d.ts +0 -20
  920. package/dist/esm/utils/clmm/prices.d.ts.map +0 -1
  921. package/dist/esm/utils/clmm/prices.js +0 -313
  922. package/dist/esm/utils/clmm/prices.js.map +0 -1
  923. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.d.ts +0 -15
  924. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.d.ts.map +0 -1
  925. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.js +0 -192
  926. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.js.map +0 -1
  927. package/dist/esm/utils/clmm/types.d.ts +0 -25
  928. package/dist/esm/utils/clmm/types.d.ts.map +0 -1
  929. package/dist/esm/utils/clmm/types.js +0 -2
  930. package/dist/esm/utils/clmm/types.js.map +0 -1
  931. package/dist/esm/utils/getReceipts.d.ts +0 -4
  932. package/dist/esm/utils/getReceipts.d.ts.map +0 -1
  933. package/dist/esm/utils/getReceipts.js +0 -44
  934. package/dist/esm/utils/getReceipts.js.map +0 -1
  935. package/dist/esm/utils/hop.d.ts +0 -16
  936. package/dist/esm/utils/hop.d.ts.map +0 -1
  937. package/dist/esm/utils/hop.js +0 -122
  938. package/dist/esm/utils/hop.js.map +0 -1
  939. package/dist/esm/utils/prices.d.ts +0 -15
  940. package/dist/esm/utils/prices.d.ts.map +0 -1
  941. package/dist/esm/utils/prices.js +0 -161
  942. package/dist/esm/utils/prices.js.map +0 -1
  943. package/dist/esm/utils/simpleCache.d.ts +0 -14
  944. package/dist/esm/utils/simpleCache.d.ts.map +0 -1
  945. package/dist/esm/utils/simpleCache.js +0 -88
  946. package/dist/esm/utils/simpleCache.js.map +0 -1
  947. package/dist/esm/utils/types.d.ts +0 -5
  948. package/dist/esm/utils/types.d.ts.map +0 -1
  949. package/dist/esm/utils/types.js +0 -2
  950. package/dist/esm/utils/types.js.map +0 -1
  951. package/dist/esm/utils/userHoldings.d.ts +0 -10
  952. package/dist/esm/utils/userHoldings.d.ts.map +0 -1
  953. package/dist/esm/utils/userHoldings.js +0 -223
  954. package/dist/esm/utils/userHoldings.js.map +0 -1
  955. package/dist/esm/vaultFunctions.d.ts +0 -8
  956. package/dist/esm/vaultFunctions.d.ts.map +0 -1
  957. package/dist/esm/vaultFunctions.js +0 -31
  958. package/dist/esm/vaultFunctions.js.map +0 -1
  959. package/docs/assets/hierarchy.js +0 -1
  960. package/docs/assets/highlight.css +0 -78
  961. package/docs/assets/icons.js +0 -18
  962. package/docs/assets/icons.svg +0 -1
  963. package/docs/assets/main.js +0 -60
  964. package/docs/assets/navigation.js +0 -1
  965. package/docs/assets/search.js +0 -1
  966. package/docs/assets/style.css +0 -1633
  967. package/docs/functions/addAirdropCoin.html +0 -1
  968. package/docs/functions/alphaLpBreakdown.html +0 -1
  969. package/docs/functions/cetusLpBreakdown.html +0 -1
  970. package/docs/functions/claimAirdropTx.html +0 -1
  971. package/docs/functions/claimRewardTxb.html +0 -1
  972. package/docs/functions/claimRewardsTxb.html +0 -1
  973. package/docs/functions/claimWithdrawAlphaTx.html +0 -1
  974. package/docs/functions/coinAmountToXTokensDoubleAsset.html +0 -1
  975. package/docs/functions/coinAmountToXTokensSingleAsset.html +0 -1
  976. package/docs/functions/coinsInPool.html +0 -1
  977. package/docs/functions/collectAndSwapRewardsLyf.html +0 -1
  978. package/docs/functions/collectAndSwapRewardsSingleLoop.html +0 -1
  979. package/docs/functions/collectRewardTxb.html +0 -1
  980. package/docs/functions/collectRewards.html +0 -1
  981. package/docs/functions/collectRewardsAndSwapSlush.html +0 -1
  982. package/docs/functions/collectUnsuppliedBalance.html +0 -1
  983. package/docs/functions/deposit.html +0 -1
  984. package/docs/functions/depositAlphaTx.html +0 -1
  985. package/docs/functions/depositDoubleAssetTxb.html +0 -1
  986. package/docs/functions/depositSingleAssetTxb.html +0 -1
  987. package/docs/functions/fetchAfterTransactionEvents.html +0 -1
  988. package/docs/functions/fetchAirdropClaimEvents.html +0 -1
  989. package/docs/functions/fetchAutoCompoundingEvents.html +0 -1
  990. package/docs/functions/fetchAutoCompoundingEventsGql.html +0 -1
  991. package/docs/functions/fetchCetusPools.html +0 -1
  992. package/docs/functions/fetchChainIdentifier.html +0 -1
  993. package/docs/functions/fetchCheckRatioEvents.html +0 -1
  994. package/docs/functions/fetchEvents.html +0 -1
  995. package/docs/functions/fetchLiquidityChangeEvents.html +0 -1
  996. package/docs/functions/fetchMultiCategoryEvents.html +0 -1
  997. package/docs/functions/fetchMultiReceipts.html +0 -1
  998. package/docs/functions/fetchNftHolders.html +0 -1
  999. package/docs/functions/fetchPools.html +0 -1
  1000. package/docs/functions/fetchPortfolioData.html +0 -1
  1001. package/docs/functions/fetchProtocolData.html +0 -1
  1002. package/docs/functions/fetchRequiredPrices.html +0 -1
  1003. package/docs/functions/fetchTVL.html +0 -1
  1004. package/docs/functions/fetchTransactions.html +0 -1
  1005. package/docs/functions/fetchUserVaultBalances.html +0 -1
  1006. package/docs/functions/fetchUserVaults.html +0 -1
  1007. package/docs/functions/fetchUserWalletData.html +0 -1
  1008. package/docs/functions/fetchVoloExchangeRate.html +0 -1
  1009. package/docs/functions/fetchWithdrawV2Events.html +0 -1
  1010. package/docs/functions/getAirdropShare.html +0 -1
  1011. package/docs/functions/getAllDoubleAssetVaults.html +0 -1
  1012. package/docs/functions/getAllSingleAssetVaults.html +0 -1
  1013. package/docs/functions/getAllVaultBalances.html +0 -1
  1014. package/docs/functions/getAllVaults.html +0 -1
  1015. package/docs/functions/getAlphaUnlocks.html +0 -1
  1016. package/docs/functions/getAlphaVaultBalance.html +0 -1
  1017. package/docs/functions/getAmounts.html +0 -1
  1018. package/docs/functions/getApr.html +0 -1
  1019. package/docs/functions/getAprs.html +0 -1
  1020. package/docs/functions/getApy.html +0 -1
  1021. package/docs/functions/getApys.html +0 -1
  1022. package/docs/functions/getCetusInvestorTicksMap.html +0 -1
  1023. package/docs/functions/getCetusPool.html +0 -1
  1024. package/docs/functions/getCetusSqrtPriceMap.html +0 -1
  1025. package/docs/functions/getCoinAmountsFromLiquidity.html +0 -1
  1026. package/docs/functions/getConf.html +0 -1
  1027. package/docs/functions/getCurrentTick.html +0 -1
  1028. package/docs/functions/getDistributor.html +0 -1
  1029. package/docs/functions/getDoubleAssetVaultBalance.html +0 -1
  1030. package/docs/functions/getDoubleAssetVaults.html +0 -1
  1031. package/docs/functions/getInvestor.html +0 -1
  1032. package/docs/functions/getInvestorPoolMap.html +0 -1
  1033. package/docs/functions/getLastAutoCompoundTime.html +0 -1
  1034. package/docs/functions/getLatestPrices.html +0 -1
  1035. package/docs/functions/getLiquidity.html +0 -1
  1036. package/docs/functions/getMultiCetusPool.html +0 -1
  1037. package/docs/functions/getMultiInvestor.html +0 -1
  1038. package/docs/functions/getMultiLatestPrices.html +0 -1
  1039. package/docs/functions/getMultiParentPool.html +0 -1
  1040. package/docs/functions/getMultiPool.html +0 -1
  1041. package/docs/functions/getMultiReceipts.html +0 -1
  1042. package/docs/functions/getParentPool.html +0 -1
  1043. package/docs/functions/getPool.html +0 -1
  1044. package/docs/functions/getPoolExchangeRate.html +0 -1
  1045. package/docs/functions/getPoolExchangeRateMap.html +0 -1
  1046. package/docs/functions/getPoolsWeightDistribution.html +0 -1
  1047. package/docs/functions/getPositionRange.html +0 -1
  1048. package/docs/functions/getPositionRanges.html +0 -1
  1049. package/docs/functions/getPositionTicks.html +0 -1
  1050. package/docs/functions/getPriceToTick.html +0 -1
  1051. package/docs/functions/getRebalanceCap.html +0 -1
  1052. package/docs/functions/getRebalanceHistories.html +0 -1
  1053. package/docs/functions/getRebalanceHistory.html +0 -1
  1054. package/docs/functions/getReceipts.html +0 -1
  1055. package/docs/functions/getSingleAssetVaultBalance.html +0 -1
  1056. package/docs/functions/getSingleAssetVaults.html +0 -1
  1057. package/docs/functions/getSlushUserTotalXtokens.html +0 -1
  1058. package/docs/functions/getSuiClient.html +0 -3
  1059. package/docs/functions/getSuiNodeUrl.html +0 -3
  1060. package/docs/functions/getTVLs-1.html +0 -1
  1061. package/docs/functions/getTickSpacing.html +0 -1
  1062. package/docs/functions/getTickToPrice.html +0 -1
  1063. package/docs/functions/getTvls.html +0 -1
  1064. package/docs/functions/getVaultBalance.html +0 -1
  1065. package/docs/functions/getVaults.html +0 -1
  1066. package/docs/functions/getWithdrawRequestsAndUnsuppliedAmount.html +0 -1
  1067. package/docs/functions/initiateWithdrawAlpha.html +0 -1
  1068. package/docs/functions/lastAutocompoundTime.html +0 -1
  1069. package/docs/functions/liquidityToTokens.html +0 -1
  1070. package/docs/functions/migrateBoostedToLoop.html +0 -1
  1071. package/docs/functions/multiLiquidityToTokens.html +0 -1
  1072. package/docs/functions/multiTokensToUsd.html +0 -1
  1073. package/docs/functions/multiXTokensToLiquidity.html +0 -1
  1074. package/docs/functions/parseUserWalletData.html +0 -1
  1075. package/docs/functions/pendingRewardAmount.html +0 -1
  1076. package/docs/functions/processWithdrawRequestsManual.html +0 -1
  1077. package/docs/functions/setCustomSuiClient.html +0 -5
  1078. package/docs/functions/setSuiClient.html +0 -7
  1079. package/docs/functions/setSuiNodeUrl.html +0 -5
  1080. package/docs/functions/setWeights.html +0 -1
  1081. package/docs/functions/slushDeposit.html +0 -1
  1082. package/docs/functions/slushWithdraw.html +0 -1
  1083. package/docs/functions/updateSingleTokenPrice.html +0 -1
  1084. package/docs/functions/withdraw.html +0 -1
  1085. package/docs/functions/withdrawAlphaTxb.html +0 -1
  1086. package/docs/functions/withdrawTxb.html +0 -1
  1087. package/docs/functions/zapDepositQuoteTxb.html +0 -1
  1088. package/docs/functions/zapDepositTxb.html +0 -1
  1089. package/docs/hierarchy.html +0 -1
  1090. package/docs/index.html +0 -82
  1091. package/docs/interfaces/Coin.html +0 -12
  1092. package/docs/interfaces/CoinPair.html +0 -3
  1093. package/docs/interfaces/CommonEventAttributes.html +0 -7
  1094. package/docs/interfaces/NaviVoloData.html +0 -3
  1095. package/docs/interfaces/PoolData.html +0 -8
  1096. package/docs/interfaces/PoolWeightDistribution.html +0 -4
  1097. package/docs/interfaces/RebalanceHistoryType.html +0 -9
  1098. package/docs/modules.html +0 -1
  1099. package/docs/types/AfterTransactionEventNode.html +0 -1
  1100. package/docs/types/AirdropClaimEventNode.html +0 -1
  1101. package/docs/types/Allocator.html +0 -3
  1102. package/docs/types/AlphaFiDoubleAssetVault.html +0 -9
  1103. package/docs/types/AlphaFiMultiVaultBalance.html +0 -1
  1104. package/docs/types/AlphaFiSingleAssetVault.html +0 -7
  1105. package/docs/types/AlphaFiVault.html +0 -1
  1106. package/docs/types/AlphaFiVaultBalance.html +0 -1
  1107. package/docs/types/AlphaLendInvestor.html +0 -1
  1108. package/docs/types/AlphaPoolType.html +0 -5
  1109. package/docs/types/AlphaReceipt.html +0 -4
  1110. package/docs/types/AlphaReceiptFields.html +0 -11
  1111. package/docs/types/AlphaVaultBalance.html +0 -7
  1112. package/docs/types/AutoBalancePoolNames.html +0 -1
  1113. package/docs/types/AutoCompoundingEventNode.html +0 -1
  1114. package/docs/types/Bag.html +0 -3
  1115. package/docs/types/BluefinInvestor.html +0 -1
  1116. package/docs/types/BluefinLyfInvestor.html +0 -1
  1117. package/docs/types/BluefinPoolType.html +0 -5
  1118. package/docs/types/BucketInvestor.html +0 -2
  1119. package/docs/types/CetusInvestor.html +0 -2
  1120. package/docs/types/CetusPoolType.html +0 -5
  1121. package/docs/types/CetusSwapOptions.html +0 -1
  1122. package/docs/types/CoinAmounts.html +0 -3
  1123. package/docs/types/CoinName.html +0 -1
  1124. package/docs/types/CoinType.html +0 -1
  1125. package/docs/types/CommonInvestorFields.html +0 -6
  1126. package/docs/types/CreatePoolOptions.html +0 -8
  1127. package/docs/types/Distributor.html +0 -6
  1128. package/docs/types/DoubleAssetMultiVaultBalance.html +0 -6
  1129. package/docs/types/DoubleAssetPoolNames.html +0 -1
  1130. package/docs/types/DoubleAssetTokenHoldings.html +0 -5
  1131. package/docs/types/DoubleAssetVaultBalance.html +0 -4
  1132. package/docs/types/EventCategory.html +0 -1
  1133. package/docs/types/EventNode.html +0 -1
  1134. package/docs/types/GetHoldersParams.html +0 -4
  1135. package/docs/types/GetTokenHoldingsParams.html +0 -4
  1136. package/docs/types/GetUserTokensFromTransactionsParams.html +0 -5
  1137. package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +0 -6
  1138. package/docs/types/GetVaultBalanceParams.html +0 -1
  1139. package/docs/types/HoldingsObj.html +0 -4
  1140. package/docs/types/Icon.html +0 -1
  1141. package/docs/types/Investor.html +0 -1
  1142. package/docs/types/LiquidityChangeEventNode.html +0 -1
  1143. package/docs/types/LiquidityToTokensParams.html +0 -3
  1144. package/docs/types/LiquidityToUsdParams.html +0 -6
  1145. package/docs/types/LoopingDebt.html +0 -5
  1146. package/docs/types/LoopingPoolNames.html +0 -1
  1147. package/docs/types/LpBreakdownType.html +0 -6
  1148. package/docs/types/MemberPoolDataType.html +0 -3
  1149. package/docs/types/MemberType.html +0 -3
  1150. package/docs/types/MultiGetVaultBalancesParams.html +0 -4
  1151. package/docs/types/NaviInvestor.html +0 -2
  1152. package/docs/types/ObjectTable.html +0 -1
  1153. package/docs/types/OtherReceiptFields.html +0 -9
  1154. package/docs/types/PoolName.html +0 -1
  1155. package/docs/types/PoolReceipt.html +0 -1
  1156. package/docs/types/PoolType.html +0 -5
  1157. package/docs/types/Receipt.html +0 -5
  1158. package/docs/types/ReceiptGQL.html +0 -6
  1159. package/docs/types/SingleAssetMultiVaultBalance.html +0 -5
  1160. package/docs/types/SingleAssetPoolNames.html +0 -1
  1161. package/docs/types/SingleAssetTokenHoldings.html +0 -4
  1162. package/docs/types/SingleAssetVaultBalance.html +0 -3
  1163. package/docs/types/SingleGetVaultBalancesParams.html +0 -3
  1164. package/docs/types/StrategyType.html +0 -1
  1165. package/docs/types/SuiNetwork.html +0 -1
  1166. package/docs/types/SwapOptions.html +0 -1
  1167. package/docs/types/TickSpacing.html +0 -1
  1168. package/docs/types/TotalWeightType.html +0 -3
  1169. package/docs/types/TransactionBlockType.html +0 -6
  1170. package/docs/types/UserPoolLiquidity.html +0 -4
  1171. package/docs/types/UserPoolTokenHoldings.html +0 -1
  1172. package/docs/types/UserUsdHoldings.html +0 -4
  1173. package/docs/types/VaultBalance.html +0 -1
  1174. package/docs/types/VecMap.html +0 -3
  1175. package/docs/types/VoteCastEvent.html +0 -1
  1176. package/docs/types/WithdrawV2EventNode.html +0 -1
  1177. package/docs/variables/AUTOBALANCE_SUI_FIRST_POOLS.html +0 -1
  1178. package/docs/variables/AUTOBALANCE_SUI_SECOND_POOLS.html +0 -1
  1179. package/docs/variables/AUTOBALANCE_TYPE_1_POOLS.html +0 -1
  1180. package/docs/variables/alphalendMarketIdMap.html +0 -1
  1181. package/docs/variables/bluefinPoolMap.html +0 -1
  1182. package/docs/variables/cetusPoolMap.html +0 -1
  1183. package/docs/variables/coinsList.html +0 -1
  1184. package/docs/variables/defunctPoolsSet.html +0 -1
  1185. package/docs/variables/doubleAssetPoolCoinMap.html +0 -1
  1186. package/docs/variables/eventCategories.html +0 -1
  1187. package/docs/variables/ignoredWalletsForDailyRevenue.html +0 -1
  1188. package/docs/variables/loopingAccountAddresses.html +0 -1
  1189. package/docs/variables/loopingPoolCoinMap.html +0 -1
  1190. package/docs/variables/naviAssetMap.html +0 -1
  1191. package/docs/variables/naviPriceFeedMap.html +0 -1
  1192. package/docs/variables/poolIdPoolNameMap.html +0 -1
  1193. package/docs/variables/poolInfo.html +0 -1
  1194. package/docs/variables/singleAssetPoolCoinMap.html +0 -1
  1195. package/docs/variables/stableCoins.html +0 -1
  1196. package/eslint.config.js +0 -53
  1197. package/prettier.config.js +0 -3
  1198. package/scripts/package-lock.json +0 -2506
  1199. package/scripts/package.json +0 -30
  1200. package/scripts/testRun.ts +0 -117
  1201. package/scripts/utils.ts +0 -108
  1202. /package/dist/cjs/{common → models}/types.js +0 -0
  1203. /package/dist/esm/{common → models}/types.js +0 -0
@@ -0,0 +1,1452 @@
1
+ "use strict";
2
+ /**
3
+ * LP Strategy
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LpStrategy = void 0;
7
+ const tslib_1 = require("tslib");
8
+ const decimal_js_1 = require("decimal.js");
9
+ const strategy_js_1 = require("./strategy.js");
10
+ const bn_js_1 = tslib_1.__importDefault(require("bn.js"));
11
+ const cetus_sui_clmm_sdk_1 = require("@cetusprotocol/cetus-sui-clmm-sdk");
12
+ const constants_js_1 = require("../utils/constants.js");
13
+ /**
14
+ * LP Strategy for dual-asset liquidity pools
15
+ */
16
+ class LpStrategy extends strategy_js_1.BaseStrategy {
17
+ poolLabel;
18
+ poolObject;
19
+ investorObject;
20
+ parentPoolObject;
21
+ receiptObjects = [];
22
+ context;
23
+ constructor(poolLabel, poolObject, investorObject, parentPoolObject, context) {
24
+ super();
25
+ this.poolLabel = poolLabel;
26
+ this.poolObject = this.parsePoolObject(poolObject);
27
+ this.investorObject = this.parseInvestorObject(investorObject);
28
+ this.context = context;
29
+ this.parentPoolObject = this.parseParentPoolObject(parentPoolObject);
30
+ }
31
+ getPoolLabel() {
32
+ return this.poolLabel;
33
+ }
34
+ updateReceipts(receipts) {
35
+ this.receiptObjects = this.parseReceiptObjects(receipts);
36
+ }
37
+ /**
38
+ * Get alpha mining data including pool and receipt information
39
+ */
40
+ getAlphaMiningData() {
41
+ const receipt = this.receiptObjects.length > 0 ? this.receiptObjects[0] : null;
42
+ return {
43
+ poolId: this.poolLabel.poolId,
44
+ accRewardsPerXtoken: this.poolObject.accRewardsPerXtoken,
45
+ xTokenSupply: this.poolObject.xTokenSupply,
46
+ receipt: receipt
47
+ ? {
48
+ lastAccRewardPerXtoken: receipt.lastAccRewardPerXtoken,
49
+ pendingRewards: receipt.pendingRewards,
50
+ xTokenBalance: receipt.xTokenBalance,
51
+ }
52
+ : null,
53
+ };
54
+ }
55
+ /**
56
+ * Get the exchange rate for xtoken to underlying token ratio
57
+ * Calculated as tokens_invested / xtoken_supply
58
+ */
59
+ exchangeRate() {
60
+ const tokensInvested = new decimal_js_1.Decimal(this.poolObject.tokensInvested);
61
+ const xtokenSupply = new decimal_js_1.Decimal(this.poolObject.xTokenSupply);
62
+ if (xtokenSupply.isZero()) {
63
+ return new decimal_js_1.Decimal(1); // Default exchange rate when no tokens are supplied
64
+ }
65
+ return tokensInvested.div(xtokenSupply);
66
+ }
67
+ /**
68
+ * Get comprehensive pool data including TVL, LP breakdown, price, and position range
69
+ */
70
+ async getData() {
71
+ const [alphafi, parent, lpBreakdown, parentLpBreakdown, currentLPPoolPrice, positionRange, apr,] = await Promise.all([
72
+ this.getTvl(),
73
+ this.getParentTvl(),
74
+ this.getLpBreakdown(),
75
+ this.getParentLpBreakdown(),
76
+ this.getCurrentLPPoolPrice(),
77
+ this.getPositionRange(),
78
+ this.context.getAprData(this.poolLabel.poolId),
79
+ ]);
80
+ return {
81
+ poolId: this.poolLabel.poolId,
82
+ strategyType: this.poolLabel.strategyType,
83
+ coinAType: this.poolLabel.assetA.type,
84
+ coinBType: this.poolLabel.assetB.type,
85
+ poolName: this.poolLabel.poolName,
86
+ apr,
87
+ tvl: {
88
+ alphafi,
89
+ parent,
90
+ },
91
+ lpBreakdown,
92
+ parentLpBreakdown,
93
+ currentLPPoolPrice,
94
+ positionRange,
95
+ };
96
+ }
97
+ /**
98
+ * Calculate total value locked using current asset prices and token amounts
99
+ */
100
+ async getTvl() {
101
+ const coinTypeA = this.poolLabel.assetA.type;
102
+ const coinTypeB = this.poolLabel.assetB.type;
103
+ const priceA = await this.context.getCoinPrice(coinTypeA);
104
+ const priceB = await this.context.getCoinPrice(coinTypeB);
105
+ const { amountA, amountB } = await this.getTokenAmounts(this.poolObject.tokensInvested);
106
+ const usdValue = amountA.mul(priceA).add(amountB.mul(priceB));
107
+ return { tokenAmountA: amountA, tokenAmountB: amountB, usdValue };
108
+ }
109
+ /**
110
+ * Calculate parent pool TVL from underlying protocol reserves
111
+ */
112
+ async getParentTvl() {
113
+ const coinTypeA = this.poolLabel.assetA.type;
114
+ const coinTypeB = this.poolLabel.assetB.type;
115
+ const decimalsA = await this.context.getCoinDecimals(coinTypeA);
116
+ const decimalsB = await this.context.getCoinDecimals(coinTypeB);
117
+ const priceA = await this.context.getCoinPrice(coinTypeA);
118
+ const priceB = await this.context.getCoinPrice(coinTypeB);
119
+ const tokenAmountA = new decimal_js_1.Decimal(this.parentPoolObject.coinA).div(new decimal_js_1.Decimal(10).pow(decimalsA));
120
+ const tokenAmountB = new decimal_js_1.Decimal(this.parentPoolObject.coinB).div(new decimal_js_1.Decimal(10).pow(decimalsB));
121
+ const usdValue = tokenAmountA.mul(priceA).add(tokenAmountB.mul(priceB));
122
+ return { tokenAmountA, tokenAmountB, usdValue };
123
+ }
124
+ /**
125
+ * Get LP token breakdown showing individual asset amounts and total liquidity
126
+ */
127
+ async getLpBreakdown() {
128
+ const liquidity = this.poolObject.tokensInvested;
129
+ const { amountA, amountB } = await this.getTokenAmounts(liquidity);
130
+ const totalLiquidity = new decimal_js_1.Decimal(liquidity).div(new decimal_js_1.Decimal(1e9));
131
+ return {
132
+ token1Amount: amountA,
133
+ token2Amount: amountB,
134
+ totalLiquidity,
135
+ };
136
+ }
137
+ /**
138
+ * Get parent pool LP breakdown from underlying protocol
139
+ */
140
+ async getParentLpBreakdown() {
141
+ const coinTypeA = this.poolLabel.assetA.type;
142
+ const coinTypeB = this.poolLabel.assetB.type;
143
+ const decimalsA = await this.context.getCoinDecimals(coinTypeA);
144
+ const decimalsB = await this.context.getCoinDecimals(coinTypeB);
145
+ const token1Amount = new decimal_js_1.Decimal(this.parentPoolObject.coinA).div(new decimal_js_1.Decimal(10).pow(decimalsA));
146
+ const token2Amount = new decimal_js_1.Decimal(this.parentPoolObject.coinB).div(new decimal_js_1.Decimal(10).pow(decimalsB));
147
+ const totalLiquidity = new decimal_js_1.Decimal(this.parentPoolObject.liquidity).div(new decimal_js_1.Decimal(1e9));
148
+ return { token1Amount, token2Amount, totalLiquidity };
149
+ }
150
+ /**
151
+ * Get current LP pool price from tick index
152
+ */
153
+ async getCurrentLPPoolPrice() {
154
+ const coinTypeA = this.poolLabel.assetA.type;
155
+ const coinTypeB = this.poolLabel.assetB.type;
156
+ const decimalsA = await this.context.getCoinDecimals(coinTypeA);
157
+ const decimalsB = await this.context.getCoinDecimals(coinTypeB);
158
+ let currentTick = this.parentPoolObject.currentTickIndex;
159
+ const upperBound = 443636;
160
+ if (currentTick > upperBound) {
161
+ currentTick = -~(currentTick - 1);
162
+ }
163
+ const price = cetus_sui_clmm_sdk_1.TickMath.tickIndexToPrice(currentTick, decimalsA, decimalsB);
164
+ return new decimal_js_1.Decimal(price.toString());
165
+ }
166
+ /**
167
+ * Get position price range from lower and upper tick bounds
168
+ */
169
+ async getPositionRange() {
170
+ const coinTypeA = this.poolLabel.assetA.type;
171
+ const coinTypeB = this.poolLabel.assetB.type;
172
+ const decimalsA = await this.context.getCoinDecimals(coinTypeA);
173
+ const decimalsB = await this.context.getCoinDecimals(coinTypeB);
174
+ const upperBound = 443636;
175
+ let lowerTick = this.investorObject.lowerTick;
176
+ let upperTick = this.investorObject.upperTick;
177
+ if (lowerTick > upperBound) {
178
+ lowerTick = -~(lowerTick - 1);
179
+ }
180
+ if (upperTick > upperBound) {
181
+ upperTick = -~(upperTick - 1);
182
+ }
183
+ const lower = cetus_sui_clmm_sdk_1.TickMath.tickIndexToPrice(lowerTick, decimalsA, decimalsB);
184
+ const upper = cetus_sui_clmm_sdk_1.TickMath.tickIndexToPrice(upperTick, decimalsA, decimalsB);
185
+ return { lowerPrice: new decimal_js_1.Decimal(lower.toString()), upperPrice: new decimal_js_1.Decimal(upper.toString()) };
186
+ }
187
+ /**
188
+ * Calculate user's current pool balance from receipt objects
189
+ * Converts xToken balance to underlying assets and USD value
190
+ */
191
+ async getBalance(_userAddress) {
192
+ if (this.receiptObjects.length === 0 || this.receiptObjects[0].xTokenBalance === '0') {
193
+ return {
194
+ tokenAAmount: new decimal_js_1.Decimal(0),
195
+ tokenBAmount: new decimal_js_1.Decimal(0),
196
+ usdValue: new decimal_js_1.Decimal(0),
197
+ };
198
+ }
199
+ const xTokens = new decimal_js_1.Decimal(this.receiptObjects[0].xTokenBalance);
200
+ const exchangeRate = this.exchangeRate();
201
+ const coinTypeA = this.poolLabel.assetA.type;
202
+ const coinTypeB = this.poolLabel.assetB.type;
203
+ const [priceA, priceB] = await Promise.all([
204
+ this.context.getCoinPrice(coinTypeA),
205
+ this.context.getCoinPrice(coinTypeB),
206
+ ]);
207
+ const tokens = xTokens.mul(exchangeRate);
208
+ const { amountA, amountB } = await this.getTokenAmounts(tokens.floor().toString());
209
+ const usdValue = amountA.mul(priceA).add(amountB.mul(priceB));
210
+ return { tokenAAmount: amountA, tokenBAmount: amountB, usdValue };
211
+ }
212
+ /**
213
+ * Calculate token A and B amounts from liquidity using Cetus CLMM SDK
214
+ */
215
+ async getTokenAmounts(liquidity) {
216
+ const coinTypeA = this.poolLabel.assetA.type;
217
+ const coinTypeB = this.poolLabel.assetB.type;
218
+ const scalingA = new decimal_js_1.Decimal(10).pow(await this.context.getCoinDecimals(coinTypeA));
219
+ const scalingB = new decimal_js_1.Decimal(10).pow(await this.context.getCoinDecimals(coinTypeB));
220
+ const liquidityBN = new bn_js_1.default(new decimal_js_1.Decimal(liquidity).toFixed(0));
221
+ const currentSqrtPriceBN = new bn_js_1.default(this.parentPoolObject.currentSqrtPrice);
222
+ const upperBound = 443636;
223
+ let lowerTick = this.investorObject.lowerTick;
224
+ let upperTick = this.investorObject.upperTick;
225
+ if (lowerTick > upperBound) {
226
+ lowerTick = -~(lowerTick - 1);
227
+ }
228
+ if (upperTick > upperBound) {
229
+ upperTick = -~(upperTick - 1);
230
+ }
231
+ const lowerSqrtPriceBN = cetus_sui_clmm_sdk_1.TickMath.tickIndexToSqrtPriceX64(lowerTick);
232
+ const upperSqrtPriceBN = cetus_sui_clmm_sdk_1.TickMath.tickIndexToSqrtPriceX64(upperTick);
233
+ const amounts = cetus_sui_clmm_sdk_1.ClmmPoolUtil.getCoinAmountFromLiquidity(liquidityBN, currentSqrtPriceBN, lowerSqrtPriceBN, upperSqrtPriceBN, false);
234
+ const amountA = new decimal_js_1.Decimal(amounts.coinA.toString()).div(scalingA);
235
+ const amountB = new decimal_js_1.Decimal(amounts.coinB.toString()).div(scalingB);
236
+ return { amountA, amountB };
237
+ }
238
+ getLiquidity(amount, isAmountA) {
239
+ const upperBound = 443636;
240
+ let lowerTick = this.investorObject.lowerTick;
241
+ let upperTick = this.investorObject.upperTick;
242
+ if (lowerTick > upperBound) {
243
+ lowerTick = -~(lowerTick - 1);
244
+ }
245
+ if (upperTick > upperBound) {
246
+ upperTick = -~(upperTick - 1);
247
+ }
248
+ const currentSqrtPriceBN = new bn_js_1.default(this.parentPoolObject.currentSqrtPrice);
249
+ return cetus_sui_clmm_sdk_1.ClmmPoolUtil.estLiquidityAndcoinAmountFromOneAmounts(lowerTick, upperTick, new bn_js_1.default(`${Math.floor(parseFloat(amount))}`), isAmountA, false, 0.5, currentSqrtPriceBN);
250
+ }
251
+ getOtherAmount(amount, isAmountA) {
252
+ const liquidity = this.getLiquidity(amount, isAmountA);
253
+ return [liquidity.coinAmountA.toString(), liquidity.coinAmountB.toString()];
254
+ }
255
+ coinAmountToXToken(amount, isAmountA) {
256
+ const liquidity = new decimal_js_1.Decimal(this.getLiquidity(amount, isAmountA).liquidityAmount.toString());
257
+ const exchangeRate = this.exchangeRate();
258
+ return liquidity.div(exchangeRate).floor().toString();
259
+ }
260
+ /**
261
+ * Parse pool object from blockchain response
262
+ */
263
+ parsePoolObject(response) {
264
+ return this.safeParseObject(() => {
265
+ const fields = this.extractFields(response);
266
+ return {
267
+ accRewardsPerXtoken: this.parseVecMap(fields.acc_rewards_per_xtoken || {}),
268
+ depositFee: this.getStringField(fields, 'deposit_fee'),
269
+ depositFeeMaxCap: this.getStringField(fields, 'deposit_fee_max_cap'),
270
+ id: this.getStringField(fields, 'id'),
271
+ imageUrl: this.getStringField(fields, 'image_url'),
272
+ name: this.getStringField(fields, 'name'),
273
+ paused: this.getBooleanField(fields, 'paused', false),
274
+ rewards: (() => {
275
+ const idVal = this.getNestedField(fields, 'rewards.id');
276
+ const sizeVal = this.getNestedField(fields, 'rewards.size');
277
+ return { id: String(idVal), size: String(sizeVal) };
278
+ })(),
279
+ tokensInvested: this.getStringField(fields, 'tokensInvested'),
280
+ withdrawFeeMaxCap: this.getStringField(fields, 'withdraw_fee_max_cap'),
281
+ withdrawalFee: this.getStringField(fields, 'withdrawal_fee'),
282
+ xTokenSupply: this.getStringField(fields, 'xTokenSupply'),
283
+ };
284
+ }, `Failed to parse LP pool object (poolId=${this.poolLabel.poolId})`);
285
+ }
286
+ /**
287
+ * Parse investor object from blockchain response
288
+ */
289
+ parseInvestorObject(response) {
290
+ return this.safeParseObject(() => {
291
+ const fields = this.extractFields(response);
292
+ return {
293
+ emergencyBalanceA: this.getStringField(fields, 'emergency_balance_a'),
294
+ emergencyBalanceB: this.getStringField(fields, 'emergency_balance_b'),
295
+ freeBalanceA: this.getStringField(fields, 'free_balance_a'),
296
+ freeBalanceB: this.getStringField(fields, 'free_balance_b'),
297
+ freeRewards: (() => {
298
+ const idVal = this.getNestedField(fields, 'free_rewards.id');
299
+ const sizeVal = this.getNestedField(fields, 'free_rewards.size');
300
+ return { id: String(idVal), size: String(sizeVal) };
301
+ })(),
302
+ id: this.getStringField(fields, 'id'),
303
+ isEmergency: this.getBooleanField(fields, 'is_emergency', false),
304
+ lowerTick: this.getNumberField(fields, 'lower_tick'),
305
+ minimumSwapAmount: this.getStringField(fields, 'minimum_swap_amount'),
306
+ performanceFee: this.getStringField(fields, 'performance_fee'),
307
+ performanceFeeMaxCap: this.getStringField(fields, 'performance_fee_max_cap'),
308
+ upperTick: this.getNumberField(fields, 'upper_tick'),
309
+ };
310
+ }, `Failed to parse LP investor object (poolId=${this.poolLabel.poolId})`);
311
+ }
312
+ /**
313
+ * Parse parent pool object from blockchain response
314
+ */
315
+ parseParentPoolObject(response) {
316
+ return this.safeParseObject(() => {
317
+ const fields = this.extractFields(response);
318
+ return {
319
+ coinA: this.getStringField(fields, 'coin_a'),
320
+ coinB: this.getStringField(fields, 'coin_b'),
321
+ currentSqrtPrice: this.getStringField(fields, 'current_sqrt_price'),
322
+ currentTickIndex: this.getNestedField(fields, 'current_tick_index.bits'),
323
+ id: this.getStringField(fields, 'id'),
324
+ liquidity: this.getStringField(fields, 'liquidity'),
325
+ };
326
+ }, `Failed to parse LP parent pool object (poolId=${this.poolLabel.poolId})`);
327
+ }
328
+ /**
329
+ * Parse receipt objects from blockchain responses
330
+ */
331
+ parseReceiptObjects(responses) {
332
+ return responses
333
+ .map((response, index) => {
334
+ return this.safeParseObject(() => {
335
+ const fields = this.extractFields(response);
336
+ return {
337
+ id: this.getStringField(fields, 'id'),
338
+ imageUrl: this.getStringField(fields, 'image_url'),
339
+ lastAccRewardPerXtoken: this.parseVecMap(fields.last_acc_reward_per_xtoken || {}),
340
+ owner: this.getStringField(fields, 'owner'),
341
+ name: this.getStringField(fields, 'name'),
342
+ pendingRewards: this.parseVecMap(fields.pending_rewards || {}),
343
+ poolId: this.getStringField(fields, 'pool_id'),
344
+ xTokenBalance: this.getStringField(fields, 'xTokenBalance'),
345
+ };
346
+ }, `Failed to parse LP receipt object at index ${index}`);
347
+ })
348
+ .filter((receipt) => receipt.poolId === this.poolLabel.poolId);
349
+ }
350
+ async depositBluefinSuiFirstTx(tx, receiptOption, depositCoinA, depositCoinB) {
351
+ const [blueCoin, suiCoin] = await this.context.getCoinsBySymbols(['BLUE', 'SUI']);
352
+ tx.moveCall({
353
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_sui_first_pool::user_deposit_v2`,
354
+ typeArguments: [
355
+ this.poolLabel.assetA.type,
356
+ this.poolLabel.assetB.type,
357
+ blueCoin.coinType,
358
+ suiCoin.coinType,
359
+ ],
360
+ arguments: [
361
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
362
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
363
+ receiptOption,
364
+ tx.object(this.poolLabel.poolId),
365
+ depositCoinA,
366
+ depositCoinB,
367
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
368
+ tx.object(this.poolLabel.investorId),
369
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
370
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
371
+ tx.object(this.poolLabel.parentPoolId),
372
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
373
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
374
+ tx.object(constants_js_1.STSUI.LST_INFO),
375
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
376
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
377
+ ],
378
+ });
379
+ }
380
+ async withdrawBluefinSuiFirstTx(tx, noneAlphaReceipt, xTokensAmount) {
381
+ const [blueCoin, suiCoin] = await this.context.getCoinsBySymbols(['BLUE', 'SUI']);
382
+ tx.moveCall({
383
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw_v2`,
384
+ typeArguments: [
385
+ this.poolLabel.assetA.type,
386
+ this.poolLabel.assetB.type,
387
+ blueCoin.coinType,
388
+ suiCoin.coinType,
389
+ ],
390
+ arguments: [
391
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
392
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
393
+ tx.object(this.receiptObjects[0].id),
394
+ noneAlphaReceipt,
395
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
396
+ tx.object(this.poolLabel.poolId),
397
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
398
+ tx.object(this.poolLabel.investorId),
399
+ tx.pure.u128(xTokensAmount),
400
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
401
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
402
+ tx.object(this.poolLabel.parentPoolId),
403
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
404
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
405
+ tx.object(constants_js_1.STSUI.LST_INFO),
406
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
407
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
408
+ ],
409
+ });
410
+ }
411
+ async depositBluefinSuiSecondTx(tx, receiptOption, depositCoinA, depositCoinB) {
412
+ const [deepCoin, blueCoin, suiCoin] = await this.context.getCoinsBySymbols([
413
+ 'DEEP',
414
+ 'BLUE',
415
+ 'SUI',
416
+ ]);
417
+ if (this.poolLabel.poolName === 'BLUEFIN-STSUI-SUI') {
418
+ tx.moveCall({
419
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_stsui_sui_pool::user_deposit`,
420
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type, blueCoin.coinType],
421
+ arguments: [
422
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
423
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
424
+ receiptOption,
425
+ tx.object(this.poolLabel.poolId),
426
+ depositCoinA,
427
+ depositCoinB,
428
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
429
+ tx.object(this.poolLabel.investorId),
430
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
431
+ tx.object(this.poolLabel.parentPoolId),
432
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
433
+ tx.object(constants_js_1.STSUI.LST_INFO),
434
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
435
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
436
+ ],
437
+ });
438
+ }
439
+ else {
440
+ tx.moveCall({
441
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_sui_second_pool::user_deposit_v2`,
442
+ typeArguments: [
443
+ this.poolLabel.assetA.type,
444
+ this.poolLabel.assetB.type,
445
+ this.poolLabel.assetA.name === 'BLUE' ? deepCoin.coinType : blueCoin.coinType,
446
+ suiCoin.coinType,
447
+ ],
448
+ arguments: [
449
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
450
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
451
+ receiptOption,
452
+ tx.object(this.poolLabel.poolId),
453
+ depositCoinA,
454
+ depositCoinB,
455
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
456
+ tx.object(this.poolLabel.investorId),
457
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
458
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
459
+ tx.object(this.poolLabel.parentPoolId),
460
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name === 'BLUE' ? 'DEEP' : 'BLUE', 'bluefin')),
461
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
462
+ tx.object(constants_js_1.STSUI.LST_INFO),
463
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
464
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
465
+ ],
466
+ });
467
+ }
468
+ }
469
+ async withdrawBluefinSuiSecondTx(tx, noneAlphaReceipt, xTokensAmount) {
470
+ const [blueCoin, suiCoin, deepCoin] = await this.context.getCoinsBySymbols([
471
+ 'BLUE',
472
+ 'SUI',
473
+ 'DEEP',
474
+ ]);
475
+ if (this.poolLabel.poolName === 'BLUEFIN-STSUI-SUI') {
476
+ tx.moveCall({
477
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_stsui_sui_pool::user_withdraw`,
478
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type, blueCoin.coinType],
479
+ arguments: [
480
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
481
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
482
+ tx.object(this.receiptObjects[0].id),
483
+ noneAlphaReceipt,
484
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
485
+ tx.object(this.poolLabel.poolId),
486
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
487
+ tx.object(this.poolLabel.investorId),
488
+ tx.pure.u128(xTokensAmount),
489
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
490
+ tx.object(this.poolLabel.parentPoolId),
491
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
492
+ tx.object(constants_js_1.STSUI.LST_INFO),
493
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
494
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
495
+ ],
496
+ });
497
+ }
498
+ else {
499
+ tx.moveCall({
500
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw_v2`,
501
+ typeArguments: [
502
+ this.poolLabel.assetA.type,
503
+ this.poolLabel.assetB.type,
504
+ this.poolLabel.assetA.name === 'BLUE' ? deepCoin.coinType : blueCoin.coinType,
505
+ suiCoin.coinType,
506
+ ],
507
+ arguments: [
508
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
509
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
510
+ tx.object(this.receiptObjects[0].id),
511
+ noneAlphaReceipt,
512
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
513
+ tx.object(this.poolLabel.poolId),
514
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
515
+ tx.object(this.poolLabel.investorId),
516
+ tx.pure.u128(xTokensAmount),
517
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
518
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
519
+ tx.object(this.poolLabel.parentPoolId),
520
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name === 'BLUE' ? 'DEEP' : 'BLUE', 'bluefin')),
521
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
522
+ tx.object(constants_js_1.STSUI.LST_INFO),
523
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
524
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
525
+ ],
526
+ });
527
+ }
528
+ }
529
+ async depositBluefinType1Tx(tx, receiptOption, depositCoinA, depositCoinB) {
530
+ const [blueCoin, suiCoin, deepCoin] = await this.context.getCoinsBySymbols([
531
+ 'BLUE',
532
+ 'SUI',
533
+ 'DEEP',
534
+ ]);
535
+ if (this.poolLabel.poolName === 'BLUEFIN-STSUI-USDC') {
536
+ tx.moveCall({
537
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::user_deposit`,
538
+ typeArguments: [
539
+ this.poolLabel.assetA.type,
540
+ this.poolLabel.assetB.type,
541
+ blueCoin.coinType,
542
+ suiCoin.coinType,
543
+ ],
544
+ arguments: [
545
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
546
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
547
+ receiptOption,
548
+ tx.object(this.poolLabel.poolId),
549
+ depositCoinA,
550
+ depositCoinB,
551
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
552
+ tx.object(this.poolLabel.investorId),
553
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
554
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
555
+ tx.object(this.poolLabel.parentPoolId),
556
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
557
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
558
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'USDC', 'cetus')),
559
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
560
+ ],
561
+ });
562
+ }
563
+ else if (this.poolLabel.poolName === 'BLUEFIN-SUIBTC-USDC' ||
564
+ this.poolLabel.poolName === 'BLUEFIN-LBTC-SUIBTC') {
565
+ tx.moveCall({
566
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
567
+ typeArguments: [
568
+ this.poolLabel.assetA.type,
569
+ this.poolLabel.assetB.type,
570
+ blueCoin.coinType,
571
+ suiCoin.coinType,
572
+ deepCoin.coinType,
573
+ ],
574
+ arguments: [
575
+ tx.object(constants_js_1.VERSIONS.BLUEFIN_V2),
576
+ tx.object(this.poolLabel.investorId),
577
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
578
+ tx.object(this.poolLabel.parentPoolId),
579
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
580
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'DEEP', 'bluefin')),
581
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'bluefin')),
582
+ tx.object(constants_js_1.STSUI.LST_INFO),
583
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
584
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
585
+ ],
586
+ });
587
+ tx.moveCall({
588
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::user_deposit`,
589
+ typeArguments: [
590
+ this.poolLabel.assetA.type,
591
+ this.poolLabel.assetB.type,
592
+ blueCoin.coinType,
593
+ suiCoin.coinType,
594
+ deepCoin.coinType,
595
+ ],
596
+ arguments: [
597
+ tx.object(constants_js_1.VERSIONS.BLUEFIN_V2),
598
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
599
+ receiptOption,
600
+ tx.object(this.poolLabel.poolId),
601
+ depositCoinA,
602
+ depositCoinB,
603
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
604
+ tx.object(this.poolLabel.investorId),
605
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
606
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
607
+ tx.object(this.poolLabel.parentPoolId),
608
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
609
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'DEEP', 'bluefin')),
610
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
611
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')),
612
+ tx.object(constants_js_1.STSUI.LST_INFO),
613
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
614
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
615
+ ],
616
+ });
617
+ }
618
+ else {
619
+ tx.moveCall({
620
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
621
+ typeArguments: [
622
+ this.poolLabel.assetA.type,
623
+ this.poolLabel.assetB.type,
624
+ blueCoin.coinType,
625
+ suiCoin.coinType,
626
+ ],
627
+ arguments: [
628
+ tx.object(this.poolLabel.investorId),
629
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
630
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
631
+ tx.object(this.poolLabel.parentPoolId),
632
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
633
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'USDC', 'bluefin')),
634
+ tx.object(constants_js_1.STSUI.LST_INFO),
635
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
636
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
637
+ ],
638
+ });
639
+ tx.moveCall({
640
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::user_deposit_v2`,
641
+ typeArguments: [
642
+ this.poolLabel.assetA.type,
643
+ this.poolLabel.assetB.type,
644
+ blueCoin.coinType,
645
+ suiCoin.coinType,
646
+ ],
647
+ arguments: [
648
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
649
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
650
+ receiptOption,
651
+ tx.object(this.poolLabel.poolId),
652
+ depositCoinA,
653
+ depositCoinB,
654
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
655
+ tx.object(this.poolLabel.investorId),
656
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
657
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
658
+ tx.object(this.poolLabel.parentPoolId),
659
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
660
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')), // cetus pool with same tokens
661
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
662
+ tx.object(constants_js_1.STSUI.LST_INFO),
663
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
664
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
665
+ ],
666
+ });
667
+ }
668
+ }
669
+ async withdrawBluefinType1Tx(tx, noneAlphaReceipt, xTokensAmount) {
670
+ const [blueCoin, suiCoin, deepCoin] = await this.context.getCoinsBySymbols([
671
+ 'BLUE',
672
+ 'SUI',
673
+ 'DEEP',
674
+ ]);
675
+ if (this.poolLabel.poolName === 'BLUEFIN-STSUI-USDC') {
676
+ tx.moveCall({
677
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::user_withdraw`,
678
+ typeArguments: [
679
+ this.poolLabel.assetA.type,
680
+ this.poolLabel.assetB.type,
681
+ blueCoin.coinType,
682
+ suiCoin.coinType,
683
+ ],
684
+ arguments: [
685
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
686
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
687
+ tx.object(this.receiptObjects[0].id),
688
+ noneAlphaReceipt,
689
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
690
+ tx.object(this.poolLabel.poolId),
691
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
692
+ tx.object(this.poolLabel.investorId),
693
+ tx.pure.u128(xTokensAmount),
694
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
695
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
696
+ tx.object(this.poolLabel.parentPoolId),
697
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
698
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
699
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'USDC', 'cetus')),
700
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
701
+ ],
702
+ });
703
+ }
704
+ else if (this.poolLabel.poolName === 'BLUEFIN-SUIBTC-USDC' ||
705
+ this.poolLabel.poolName === 'BLUEFIN-LBTC-SUIBTC') {
706
+ tx.moveCall({
707
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
708
+ typeArguments: [
709
+ this.poolLabel.assetA.type,
710
+ this.poolLabel.assetB.type,
711
+ blueCoin.coinType,
712
+ suiCoin.coinType,
713
+ deepCoin.coinType,
714
+ ],
715
+ arguments: [
716
+ tx.object(constants_js_1.VERSIONS.BLUEFIN_V2),
717
+ tx.object(this.poolLabel.investorId),
718
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
719
+ tx.object(this.poolLabel.parentPoolId),
720
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
721
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'DEEP', 'bluefin')),
722
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'bluefin')),
723
+ tx.object(constants_js_1.STSUI.LST_INFO),
724
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
725
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
726
+ ],
727
+ });
728
+ tx.moveCall({
729
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::user_withdraw`,
730
+ typeArguments: [
731
+ this.poolLabel.assetA.type,
732
+ this.poolLabel.assetB.type,
733
+ blueCoin.coinType,
734
+ suiCoin.coinType,
735
+ deepCoin.coinType,
736
+ ],
737
+ arguments: [
738
+ tx.object(constants_js_1.VERSIONS.BLUEFIN_V2),
739
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
740
+ tx.object(this.receiptObjects[0].id),
741
+ noneAlphaReceipt,
742
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
743
+ tx.object(this.poolLabel.poolId),
744
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
745
+ tx.object(this.poolLabel.investorId),
746
+ tx.pure.u128(xTokensAmount),
747
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
748
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
749
+ tx.object(this.poolLabel.parentPoolId),
750
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
751
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'DEEP', 'bluefin')),
752
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
753
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')),
754
+ tx.object(constants_js_1.STSUI.LST_INFO),
755
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
756
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
757
+ ],
758
+ });
759
+ }
760
+ else {
761
+ tx.moveCall({
762
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
763
+ typeArguments: [
764
+ this.poolLabel.assetA.type,
765
+ this.poolLabel.assetB.type,
766
+ blueCoin.coinType,
767
+ suiCoin.coinType,
768
+ ],
769
+ arguments: [
770
+ tx.object(this.poolLabel.investorId),
771
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
772
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
773
+ tx.object(this.poolLabel.parentPoolId),
774
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
775
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'USDC', 'bluefin')),
776
+ tx.object(constants_js_1.STSUI.LST_INFO),
777
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
778
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
779
+ ],
780
+ });
781
+ tx.moveCall({
782
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::user_withdraw_v2`,
783
+ typeArguments: [
784
+ this.poolLabel.assetA.type,
785
+ this.poolLabel.assetB.type,
786
+ blueCoin.coinType,
787
+ suiCoin.coinType,
788
+ ],
789
+ arguments: [
790
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
791
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
792
+ tx.object(this.receiptObjects[0].id),
793
+ noneAlphaReceipt,
794
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
795
+ tx.object(this.poolLabel.poolId),
796
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
797
+ tx.object(this.poolLabel.investorId),
798
+ tx.pure.u128(xTokensAmount),
799
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
800
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
801
+ tx.object(this.poolLabel.parentPoolId),
802
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
803
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')), // cetus pool with same tokens
804
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
805
+ tx.object(constants_js_1.STSUI.LST_INFO),
806
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
807
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
808
+ ],
809
+ });
810
+ }
811
+ }
812
+ async depositBluefinType2Tx(tx, receiptOption, depositCoinA, depositCoinB) {
813
+ const [blueCoin, suiCoin, deepCoin] = await this.context.getCoinsBySymbols([
814
+ 'BLUE',
815
+ 'SUI',
816
+ 'DEEP',
817
+ ]);
818
+ if (this.poolLabel.poolName === 'BLUEFIN-STSUI-ETH' ||
819
+ this.poolLabel.poolName === 'BLUEFIN-STSUI-WSOL') {
820
+ tx.moveCall({
821
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_2_pool::user_deposit`,
822
+ typeArguments: [
823
+ this.poolLabel.assetA.type,
824
+ this.poolLabel.assetB.type,
825
+ blueCoin.coinType,
826
+ suiCoin.coinType,
827
+ ],
828
+ arguments: [
829
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
830
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
831
+ receiptOption,
832
+ tx.object(this.poolLabel.poolId),
833
+ depositCoinA,
834
+ depositCoinB,
835
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
836
+ tx.object(this.poolLabel.investorId),
837
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
838
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
839
+ tx.object(this.poolLabel.parentPoolId),
840
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name === 'BLUE' ? 'DEEP' : 'BLUE', 'bluefin')),
841
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')), // same asset cetus pool
842
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
843
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
844
+ ],
845
+ });
846
+ }
847
+ else {
848
+ tx.moveCall({
849
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_2_pool::user_deposit_v2`,
850
+ typeArguments: [
851
+ this.poolLabel.assetA.type,
852
+ this.poolLabel.assetB.type,
853
+ this.poolLabel.assetA.type === 'BLUE' ? deepCoin.coinType : blueCoin.coinType,
854
+ suiCoin.coinType,
855
+ ],
856
+ arguments: [
857
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
858
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
859
+ receiptOption,
860
+ tx.object(this.poolLabel.poolId),
861
+ depositCoinA,
862
+ depositCoinB,
863
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
864
+ tx.object(this.poolLabel.investorId),
865
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
866
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
867
+ tx.object(this.poolLabel.parentPoolId),
868
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name === 'BLUE' ? 'DEEP' : 'BLUE', 'bluefin')),
869
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')), // same asset cetus pool
870
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
871
+ tx.object(constants_js_1.STSUI.LST_INFO),
872
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
873
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
874
+ ],
875
+ });
876
+ }
877
+ }
878
+ async withdrawBluefinType2Tx(tx, noneAlphaReceipt, xTokensAmount) {
879
+ const [blueCoin, suiCoin] = await this.context.getCoinsBySymbols(['BLUE', 'SUI']);
880
+ if (this.poolLabel.poolName === 'BLUEFIN-STSUI-ETH' ||
881
+ this.poolLabel.poolName === 'BLUEFIN-STSUI-WSOL') {
882
+ tx.moveCall({
883
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_2_pool::user_withdraw`,
884
+ typeArguments: [
885
+ this.poolLabel.assetA.type,
886
+ this.poolLabel.assetB.type,
887
+ blueCoin.coinType,
888
+ suiCoin.coinType,
889
+ ],
890
+ arguments: [
891
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
892
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
893
+ tx.object(this.receiptObjects[0].id),
894
+ noneAlphaReceipt,
895
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
896
+ tx.object(this.poolLabel.poolId),
897
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
898
+ tx.object(this.poolLabel.investorId),
899
+ tx.pure.u128(xTokensAmount),
900
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
901
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
902
+ tx.object(this.poolLabel.parentPoolId),
903
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name === 'BLUE' ? 'DEEP' : 'BLUE', 'bluefin')),
904
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')), // same asset cetus pool
905
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
906
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
907
+ ],
908
+ });
909
+ }
910
+ else {
911
+ tx.moveCall({
912
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_type_2_pool::user_withdraw_v2`,
913
+ typeArguments: [
914
+ this.poolLabel.assetA.type,
915
+ this.poolLabel.assetB.type,
916
+ blueCoin.coinType,
917
+ suiCoin.coinType,
918
+ ],
919
+ arguments: [
920
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[4]),
921
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
922
+ tx.object(this.receiptObjects[0].id),
923
+ noneAlphaReceipt,
924
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
925
+ tx.object(this.poolLabel.poolId),
926
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
927
+ tx.object(this.poolLabel.investorId),
928
+ tx.pure.u128(xTokensAmount),
929
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
930
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
931
+ tx.object(this.poolLabel.parentPoolId),
932
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name === 'BLUE' ? 'DEEP' : 'BLUE', 'bluefin')),
933
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')), // same asset cetus pool
934
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
935
+ tx.object(constants_js_1.STSUI.LST_INFO),
936
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
937
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
938
+ ],
939
+ });
940
+ }
941
+ }
942
+ async depositBluefinStsuiTx(tx, receiptOption, depositCoinA, depositCoinB) {
943
+ const [blueCoin] = await this.context.getCoinsBySymbols(['BLUE']);
944
+ if (this.poolLabel.poolName === 'BLUEFIN-ALPHA-STSUI' ||
945
+ this.poolLabel.poolName === 'BLUEFIN-WAL-STSUI') {
946
+ tx.moveCall({
947
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_stsui_second_pool::user_deposit`,
948
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type, blueCoin.coinType],
949
+ arguments: [
950
+ tx.object(constants_js_1.VERSIONS.STSUI),
951
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
952
+ receiptOption,
953
+ tx.object(this.poolLabel.poolId),
954
+ depositCoinA,
955
+ depositCoinB,
956
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
957
+ tx.object(this.poolLabel.investorId),
958
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
959
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
960
+ tx.object(this.poolLabel.parentPoolId), // parent-pool id
961
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
962
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name, 'cetus')), // cetus pool with assetA, SUI
963
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name, 'bluefin')), // bluefin pool with assetA, SUI
964
+ tx.object(constants_js_1.STSUI.LST_INFO),
965
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
966
+ tx.pure.bool(true),
967
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
968
+ ],
969
+ });
970
+ }
971
+ else {
972
+ tx.moveCall({
973
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_stsui_first_pool::user_deposit`,
974
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type, blueCoin.coinType],
975
+ arguments: [
976
+ tx.object(constants_js_1.VERSIONS.STSUI),
977
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
978
+ receiptOption,
979
+ tx.object(this.poolLabel.poolId),
980
+ depositCoinA,
981
+ depositCoinB,
982
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
983
+ tx.object(this.poolLabel.investorId),
984
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
985
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
986
+ tx.object(this.poolLabel.parentPoolId), // parent-pool id
987
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
988
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
989
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'bluefin')), // bluefin pool with assetB, SUI
990
+ tx.object(constants_js_1.STSUI.LST_INFO),
991
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
992
+ tx.pure.bool(true),
993
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
994
+ ],
995
+ });
996
+ }
997
+ }
998
+ async withdrawBluefinStsuiTx(tx, noneAlphaReceipt, xTokensAmount) {
999
+ const [blueCoin] = await this.context.getCoinsBySymbols(['BLUE']);
1000
+ if (this.poolLabel.poolName === 'BLUEFIN-ALPHA-STSUI' ||
1001
+ this.poolLabel.poolName === 'BLUEFIN-WAL-STSUI') {
1002
+ tx.moveCall({
1003
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_stsui_second_pool::user_withdraw`,
1004
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type, blueCoin.coinType],
1005
+ arguments: [
1006
+ tx.object(constants_js_1.VERSIONS.STSUI),
1007
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1008
+ tx.object(this.receiptObjects[0].id),
1009
+ noneAlphaReceipt,
1010
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1011
+ tx.object(this.poolLabel.poolId),
1012
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1013
+ tx.object(this.poolLabel.investorId),
1014
+ tx.pure.u128(xTokensAmount),
1015
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
1016
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1017
+ tx.object(this.poolLabel.parentPoolId), // parent-pool id
1018
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
1019
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name, 'cetus')), // cetus pool with assetA, SUI
1020
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name, 'bluefin')), // bluefin pool with assetA, SUI
1021
+ tx.object(constants_js_1.STSUI.LST_INFO),
1022
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
1023
+ tx.pure.bool(true),
1024
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1025
+ ],
1026
+ });
1027
+ }
1028
+ else {
1029
+ tx.moveCall({
1030
+ target: `${this.poolLabel.packageId}::alphafi_bluefin_stsui_first_pool::user_withdraw`,
1031
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type, blueCoin.coinType],
1032
+ arguments: [
1033
+ tx.object(constants_js_1.VERSIONS.STSUI),
1034
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1035
+ tx.object(this.receiptObjects[0].id),
1036
+ noneAlphaReceipt,
1037
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1038
+ tx.object(this.poolLabel.poolId),
1039
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1040
+ tx.object(this.poolLabel.investorId),
1041
+ tx.pure.u128(xTokensAmount),
1042
+ tx.object(constants_js_1.GLOBAL_CONFIGS.BLUEFIN),
1043
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1044
+ tx.object(this.poolLabel.parentPoolId), // parent-pool id
1045
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'BLUE', 'bluefin')),
1046
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')), // cetus pool with assetB, SUI
1047
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'bluefin')), // bluefin pool with assetB, SUI
1048
+ tx.object(constants_js_1.STSUI.LST_INFO),
1049
+ tx.object(constants_js_1.SUI_SYSTEM_STATE),
1050
+ tx.pure.bool(true),
1051
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1052
+ ],
1053
+ });
1054
+ }
1055
+ }
1056
+ async depositCetusTx(tx, receiptOption, depositCoinA, depositCoinB) {
1057
+ if (this.poolLabel.poolName == 'WUSDC-WBTC' ||
1058
+ this.poolLabel.poolName == 'USDC-USDT' ||
1059
+ this.poolLabel.poolName == 'USDC-WUSDC' ||
1060
+ this.poolLabel.poolName == 'USDC-ETH') {
1061
+ tx.moveCall({
1062
+ target: `${this.poolLabel.packageId}::alphafi_cetus_pool_base_a::user_deposit`,
1063
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1064
+ arguments: [
1065
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1066
+ receiptOption,
1067
+ tx.object(this.poolLabel.poolId),
1068
+ depositCoinA,
1069
+ depositCoinB,
1070
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1071
+ tx.object(this.poolLabel.investorId),
1072
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1073
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1074
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name, 'cetus')),
1075
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'CETUS', 'cetus')),
1076
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
1077
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1078
+ ],
1079
+ });
1080
+ }
1081
+ else {
1082
+ tx.moveCall({
1083
+ target: `${this.poolLabel.packageId}::alphafi_cetus_pool::user_deposit`,
1084
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1085
+ arguments: [
1086
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1087
+ receiptOption,
1088
+ tx.object(this.poolLabel.poolId),
1089
+ depositCoinA,
1090
+ depositCoinB,
1091
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1092
+ tx.object(this.poolLabel.investorId),
1093
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1094
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1095
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')),
1096
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'CETUS', 'cetus')),
1097
+ tx.object(this.poolLabel.parentPoolId),
1098
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1099
+ ],
1100
+ });
1101
+ }
1102
+ }
1103
+ async withdrawCetusTx(tx, noneAlphaReceipt, xTokensAmount) {
1104
+ if (this.poolLabel.poolName == 'WUSDC-WBTC' ||
1105
+ this.poolLabel.poolName == 'USDC-USDT' ||
1106
+ this.poolLabel.poolName == 'USDC-WUSDC' ||
1107
+ this.poolLabel.poolName == 'USDC-ETH') {
1108
+ tx.moveCall({
1109
+ target: `${this.poolLabel.packageId}::alphafi_cetus_pool_base_a::user_withdraw`,
1110
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1111
+ arguments: [
1112
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1113
+ tx.object(this.receiptObjects[0].id),
1114
+ noneAlphaReceipt,
1115
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1116
+ tx.object(this.poolLabel.poolId),
1117
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1118
+ tx.object(this.poolLabel.investorId),
1119
+ tx.pure.u128(xTokensAmount),
1120
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1121
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1122
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetA.name, 'cetus')),
1123
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'CETUS', 'cetus')),
1124
+ tx.object(this.poolLabel.parentPoolId),
1125
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1126
+ ],
1127
+ });
1128
+ }
1129
+ else {
1130
+ tx.moveCall({
1131
+ target: `${this.poolLabel.packageId}::alphafi_cetus_pool::user_withdraw`,
1132
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1133
+ arguments: [
1134
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1135
+ tx.object(this.receiptObjects[0].id),
1136
+ noneAlphaReceipt,
1137
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1138
+ tx.object(this.poolLabel.poolId),
1139
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1140
+ tx.object(this.poolLabel.investorId),
1141
+ tx.pure.u128(xTokensAmount),
1142
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1143
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1144
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', this.poolLabel.assetB.name, 'cetus')),
1145
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'CETUS', 'cetus')),
1146
+ tx.object(this.poolLabel.parentPoolId),
1147
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1148
+ ],
1149
+ });
1150
+ }
1151
+ }
1152
+ async depositCetusAlphaSuiTx(tx, receiptOption, depositCoinA, depositCoinB) {
1153
+ tx.moveCall({
1154
+ target: `${this.poolLabel.packageId}::alphafi_cetus_sui_pool::user_deposit`,
1155
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1156
+ arguments: [
1157
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1158
+ receiptOption,
1159
+ tx.object(this.poolLabel.poolId),
1160
+ depositCoinA,
1161
+ depositCoinB,
1162
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1163
+ tx.object(this.poolLabel.investorId),
1164
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1165
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1166
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'CETUS', 'cetus')),
1167
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
1168
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1169
+ ],
1170
+ });
1171
+ }
1172
+ async withdrawCetusAlphaSuiTx(tx, noneAlphaReceipt, xTokensAmount) {
1173
+ tx.moveCall({
1174
+ target: `${this.poolLabel.packageId}::alphafi_cetus_sui_pool::user_withdraw`,
1175
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1176
+ arguments: [
1177
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1178
+ tx.object(this.receiptObjects[0].id),
1179
+ noneAlphaReceipt,
1180
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1181
+ tx.object(this.poolLabel.poolId),
1182
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1183
+ tx.object(this.poolLabel.investorId),
1184
+ tx.pure.u128(xTokensAmount),
1185
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1186
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1187
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol('SUI', 'CETUS', 'cetus')),
1188
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
1189
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1190
+ ],
1191
+ });
1192
+ }
1193
+ async depositCetusSuiTx(tx, receiptOption, depositCoinA, depositCoinB) {
1194
+ tx.moveCall({
1195
+ target: `${this.poolLabel.packageId}::alphafi_cetus_sui_pool::user_deposit`,
1196
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1197
+ arguments: [
1198
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[2]),
1199
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1200
+ receiptOption,
1201
+ tx.object(this.poolLabel.poolId),
1202
+ depositCoinA,
1203
+ depositCoinB,
1204
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1205
+ tx.object(this.poolLabel.investorId),
1206
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1207
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1208
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
1209
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1210
+ ],
1211
+ });
1212
+ }
1213
+ async withdrawCetusSuiTx(tx, noneAlphaReceipt, xTokensAmount) {
1214
+ tx.moveCall({
1215
+ target: `${this.poolLabel.packageId}::alphafi_cetus_sui_pool::user_withdraw`,
1216
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1217
+ arguments: [
1218
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[2]),
1219
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1220
+ tx.object(this.receiptObjects[0].id),
1221
+ noneAlphaReceipt,
1222
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1223
+ tx.object(this.poolLabel.poolId),
1224
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1225
+ tx.object(this.poolLabel.investorId),
1226
+ tx.pure.u128(xTokensAmount),
1227
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS),
1228
+ tx.object(constants_js_1.GLOBAL_CONFIGS.CETUS_REWARDER_GLOBAL_VAULT_ID),
1229
+ tx.object(await this.context.getPoolIdBySymbolsAndProtocol(this.poolLabel.assetA.name, this.poolLabel.assetB.name, 'cetus')),
1230
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1231
+ ],
1232
+ });
1233
+ }
1234
+ async deposit(tx, options) {
1235
+ if (options.isAmountA === undefined) {
1236
+ throw new Error('isAmountA is required for AutobalanceLp strategy');
1237
+ }
1238
+ const [amountA, amountB] = this.getOtherAmount(options.amount.toString(), options.isAmountA);
1239
+ // get Coin Objects
1240
+ const depositCoinA = await this.context.blockchain.getCoinObject(tx, this.poolLabel.assetA.type, options.address, BigInt(amountA));
1241
+ const depositCoinB = await this.context.blockchain.getCoinObject(tx, this.poolLabel.assetB.type, options.address, BigInt(amountB));
1242
+ const receiptOption = this.context.blockchain.getOptionReceipt(tx, this.poolLabel.receipt.type, this.receiptObjects.length > 0 ? this.receiptObjects[0].id : undefined);
1243
+ if (this.poolLabel.parentProtocol === 'Cetus') {
1244
+ if (this.poolLabel.assetA.name === 'CETUS' && this.poolLabel.assetB.name === 'SUI') {
1245
+ await this.depositCetusSuiTx(tx, receiptOption, depositCoinA, depositCoinB);
1246
+ }
1247
+ else if (this.poolLabel.assetB.name === 'SUI') {
1248
+ await this.depositCetusAlphaSuiTx(tx, receiptOption, depositCoinA, depositCoinB);
1249
+ }
1250
+ else {
1251
+ await this.depositCetusTx(tx, receiptOption, depositCoinA, depositCoinB);
1252
+ }
1253
+ }
1254
+ else if (this.poolLabel.parentProtocol === 'Bluefin') {
1255
+ if (this.poolLabel.poolName === 'BLUEFIN-NAVX-VSUI' ||
1256
+ this.poolLabel.poolName === 'BLUEFIN-ALPHA-USDC' ||
1257
+ this.poolLabel.poolName === 'BLUEFIN-BLUE-USDC') {
1258
+ await this.depositBluefinType2Tx(tx, receiptOption, depositCoinA, depositCoinB);
1259
+ }
1260
+ else if (this.poolLabel.assetA.name === 'SUI') {
1261
+ await this.depositBluefinSuiFirstTx(tx, receiptOption, depositCoinA, depositCoinB);
1262
+ }
1263
+ else if (this.poolLabel.assetB.name === 'SUI') {
1264
+ await this.depositBluefinSuiSecondTx(tx, receiptOption, depositCoinA, depositCoinB);
1265
+ }
1266
+ else if (this.poolLabel.assetA.name === 'stSUI' || this.poolLabel.assetB.name === 'stSUI') {
1267
+ await this.depositBluefinStsuiTx(tx, receiptOption, depositCoinA, depositCoinB);
1268
+ }
1269
+ else {
1270
+ await this.depositBluefinType1Tx(tx, receiptOption, depositCoinA, depositCoinB);
1271
+ }
1272
+ }
1273
+ }
1274
+ async withdraw(tx, options) {
1275
+ if (options.isAmountA === undefined) {
1276
+ throw new Error('isAmountA is required for AutobalanceLp strategy');
1277
+ }
1278
+ if (this.receiptObjects.length === 0) {
1279
+ throw new Error('No receipt found!');
1280
+ }
1281
+ let xTokenAmount = '0';
1282
+ if (options.withdrawMax) {
1283
+ xTokenAmount = this.receiptObjects[0].xTokenBalance;
1284
+ }
1285
+ else {
1286
+ xTokenAmount = this.coinAmountToXToken(options.amount.toString(), options.isAmountA);
1287
+ }
1288
+ const noneAlphaReceipt = tx.moveCall({
1289
+ target: `0x1::option::none`,
1290
+ typeArguments: [
1291
+ '0x9bbd650b8442abb082c20f3bc95a9434a8d47b4bef98b0832dab57c1a8ba7123::alphapool::Receipt',
1292
+ ],
1293
+ arguments: [],
1294
+ });
1295
+ if (this.poolLabel.parentProtocol === 'Cetus') {
1296
+ if (this.poolLabel.assetA.name === 'CETUS' && this.poolLabel.assetB.name === 'SUI') {
1297
+ await this.withdrawCetusSuiTx(tx, noneAlphaReceipt, xTokenAmount);
1298
+ }
1299
+ else if (this.poolLabel.assetB.name === 'SUI') {
1300
+ await this.withdrawCetusAlphaSuiTx(tx, noneAlphaReceipt, xTokenAmount);
1301
+ }
1302
+ else {
1303
+ await this.withdrawCetusTx(tx, noneAlphaReceipt, xTokenAmount);
1304
+ }
1305
+ }
1306
+ else if (this.poolLabel.parentProtocol === 'Bluefin') {
1307
+ if (this.poolLabel.poolName === 'BLUEFIN-NAVX-VSUI' ||
1308
+ this.poolLabel.poolName === 'BLUEFIN-ALPHA-USDC' ||
1309
+ this.poolLabel.poolName === 'BLUEFIN-BLUE-USDC') {
1310
+ await this.withdrawBluefinType2Tx(tx, noneAlphaReceipt, xTokenAmount);
1311
+ }
1312
+ else if (this.poolLabel.assetA.name === 'SUI') {
1313
+ await this.withdrawBluefinSuiFirstTx(tx, noneAlphaReceipt, xTokenAmount);
1314
+ }
1315
+ else if (this.poolLabel.assetB.name === 'SUI') {
1316
+ await this.withdrawBluefinSuiSecondTx(tx, noneAlphaReceipt, xTokenAmount);
1317
+ }
1318
+ else if (this.poolLabel.assetA.name === 'stSUI' || this.poolLabel.assetB.name === 'stSUI') {
1319
+ await this.withdrawBluefinStsuiTx(tx, noneAlphaReceipt, xTokenAmount);
1320
+ }
1321
+ else {
1322
+ await this.withdrawBluefinType1Tx(tx, noneAlphaReceipt, xTokenAmount);
1323
+ }
1324
+ }
1325
+ }
1326
+ async claimRewards(tx, alphaReceipt) {
1327
+ if (this.poolLabel.parentProtocol === 'Cetus') {
1328
+ if (this.poolLabel.poolName === 'CETUS-SUI') {
1329
+ this.receiptObjects.forEach((receipt) => {
1330
+ alphaReceipt = tx.moveCall({
1331
+ target: `${this.poolLabel.packageId}::alphafi_cetus_sui_pool::get_user_rewards_all`,
1332
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1333
+ arguments: [
1334
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[2]),
1335
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1336
+ tx.object(receipt.id),
1337
+ alphaReceipt,
1338
+ tx.object(this.poolLabel.poolId),
1339
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1340
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1341
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1342
+ ],
1343
+ });
1344
+ });
1345
+ }
1346
+ else {
1347
+ let target;
1348
+ if (this.poolLabel.assetB.name == 'SUI') {
1349
+ target = `${this.poolLabel.packageId}::alphafi_cetus_sui_pool::get_user_rewards_all`;
1350
+ }
1351
+ else if (this.poolLabel.poolName == 'WUSDC-WBTC' ||
1352
+ this.poolLabel.poolName == 'USDC-USDT' ||
1353
+ this.poolLabel.poolName == 'USDC-WUSDC' ||
1354
+ this.poolLabel.poolName == 'USDC-ETH') {
1355
+ target = `${this.poolLabel.packageId}::alphafi_cetus_pool_base_a::get_user_rewards_all`;
1356
+ }
1357
+ else {
1358
+ target = `${this.poolLabel.packageId}::alphafi_cetus_pool::get_user_rewards_all`;
1359
+ }
1360
+ if (target) {
1361
+ this.receiptObjects.forEach((receipt) => {
1362
+ alphaReceipt = tx.moveCall({
1363
+ target,
1364
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1365
+ arguments: [
1366
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1367
+ tx.object(receipt.id),
1368
+ alphaReceipt,
1369
+ tx.object(this.poolLabel.poolId),
1370
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1371
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1372
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1373
+ ],
1374
+ });
1375
+ });
1376
+ }
1377
+ }
1378
+ }
1379
+ else if (this.poolLabel.parentProtocol === 'Bluefin') {
1380
+ let version, target;
1381
+ if (this.poolLabel.poolName === 'BLUEFIN-SUIBTC-USDC' ||
1382
+ this.poolLabel.poolName === 'BLUEFIN-LBTC-SUIBTC') {
1383
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::get_user_rewards_all`;
1384
+ version = constants_js_1.VERSIONS.BLUEFIN_V2;
1385
+ }
1386
+ else if (this.poolLabel.poolName == 'BLUEFIN-SUI-USDC' ||
1387
+ this.poolLabel.poolName === 'BLUEFIN-SUI-BUCK' ||
1388
+ this.poolLabel.poolName === 'BLUEFIN-SUI-AUSD') {
1389
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_sui_first_pool::get_user_rewards_all`;
1390
+ version = constants_js_1.VERSIONS.ALPHA_VERSIONS[4];
1391
+ }
1392
+ else if (this.poolLabel.poolName == 'BLUEFIN-USDT-USDC' ||
1393
+ this.poolLabel.poolName === 'BLUEFIN-AUSD-USDC' ||
1394
+ this.poolLabel.poolName === 'BLUEFIN-WBTC-USDC' ||
1395
+ this.poolLabel.poolName === 'BLUEFIN-SEND-USDC' ||
1396
+ this.poolLabel.poolName === 'BLUEFIN-SUIUSDT-USDC' ||
1397
+ this.poolLabel.poolName === 'BLUEFIN-WAL-USDC') {
1398
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_type_1_pool::get_user_rewards_all`;
1399
+ version = constants_js_1.VERSIONS.ALPHA_VERSIONS[4];
1400
+ }
1401
+ else if (this.poolLabel.poolName === 'BLUEFIN-ALPHA-USDC' ||
1402
+ this.poolLabel.poolName === 'BLUEFIN-NAVX-VSUI' ||
1403
+ this.poolLabel.poolName === 'BLUEFIN-BLUE-USDC') {
1404
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_type_2_pool::get_user_rewards_all`;
1405
+ version = constants_js_1.VERSIONS.ALPHA_VERSIONS[4];
1406
+ }
1407
+ else if (this.poolLabel.poolName === 'BLUEFIN-BLUE-SUI' ||
1408
+ this.poolLabel.poolName === 'BLUEFIN-WBTC-SUI' ||
1409
+ this.poolLabel.poolName === 'BLUEFIN-DEEP-SUI') {
1410
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_sui_second_pool::get_user_rewards_all`;
1411
+ version = constants_js_1.VERSIONS.ALPHA_VERSIONS[4];
1412
+ }
1413
+ else if (this.poolLabel.poolName === 'BLUEFIN-STSUI-SUI') {
1414
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_stsui_sui_pool::get_user_rewards_all`;
1415
+ version = constants_js_1.VERSIONS.ALPHA_VERSIONS[4];
1416
+ }
1417
+ else if (this.poolLabel.poolName === 'BLUEFIN-STSUI-USDC' ||
1418
+ this.poolLabel.poolName === 'BLUEFIN-STSUI-WSOL' ||
1419
+ this.poolLabel.poolName === 'BLUEFIN-STSUI-ETH' ||
1420
+ this.poolLabel.poolName === 'BLUEFIN-STSUI-BUCK' ||
1421
+ this.poolLabel.poolName === 'BLUEFIN-STSUI-MUSD') {
1422
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_stsui_first_pool::get_user_rewards_all`;
1423
+ version = constants_js_1.VERSIONS.STSUI;
1424
+ }
1425
+ else if (this.poolLabel.poolName === 'BLUEFIN-ALPHA-STSUI' ||
1426
+ this.poolLabel.poolName === 'BLUEFIN-WAL-STSUI') {
1427
+ target = `${this.poolLabel.packageId}::alphafi_bluefin_stsui_second_pool::get_user_rewards_all`;
1428
+ version = constants_js_1.VERSIONS.STSUI;
1429
+ }
1430
+ if (version && target) {
1431
+ this.receiptObjects.forEach((receipt) => {
1432
+ alphaReceipt = tx.moveCall({
1433
+ target,
1434
+ typeArguments: [this.poolLabel.assetA.type, this.poolLabel.assetB.type],
1435
+ arguments: [
1436
+ tx.object(version),
1437
+ tx.object(constants_js_1.VERSIONS.ALPHA_VERSIONS[1]),
1438
+ tx.object(receipt.id),
1439
+ alphaReceipt,
1440
+ tx.object(this.poolLabel.poolId),
1441
+ tx.object(constants_js_1.POOLS.ALPHA_LEGACY),
1442
+ tx.object(constants_js_1.DISTRIBUTOR_OBJECT_ID),
1443
+ tx.object(constants_js_1.CLOCK_PACKAGE_ID),
1444
+ ],
1445
+ });
1446
+ });
1447
+ }
1448
+ }
1449
+ }
1450
+ }
1451
+ exports.LpStrategy = LpStrategy;
1452
+ //# sourceMappingURL=lp.js.map