@alphafi/alphafi-sdk 0.0.91 → 0.0.93

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 (412) hide show
  1. package/#package.json# +98 -0
  2. package/dist/cjs/adminFunctions.d.ts.map +1 -1
  3. package/dist/cjs/common/coins.d.ts.map +1 -1
  4. package/dist/cjs/common/coins.js +18 -0
  5. package/dist/cjs/common/coins.js.map +1 -1
  6. package/dist/cjs/common/constants.d.ts +21 -0
  7. package/dist/cjs/common/constants.d.ts.map +1 -1
  8. package/dist/cjs/common/constants.js +15 -2
  9. package/dist/cjs/common/constants.js.map +1 -1
  10. package/dist/cjs/common/maps.d.ts +1 -0
  11. package/dist/cjs/common/maps.d.ts.map +1 -1
  12. package/dist/cjs/common/maps.js +65 -4
  13. package/dist/cjs/common/maps.js.map +1 -1
  14. package/dist/cjs/common/pyth.d.ts +1 -1
  15. package/dist/cjs/common/pyth.d.ts.map +1 -1
  16. package/dist/cjs/common/pyth.js.map +1 -1
  17. package/dist/cjs/common/types.d.ts +17 -21
  18. package/dist/cjs/common/types.d.ts.map +1 -1
  19. package/dist/cjs/common/types.js +0 -17
  20. package/dist/cjs/common/types.js.map +1 -1
  21. package/dist/cjs/graphql/client.d.ts +1 -1
  22. package/dist/cjs/graphql/client.d.ts.map +1 -1
  23. package/dist/cjs/graphql/executeMutations.d.ts +15 -3
  24. package/dist/cjs/graphql/executeMutations.d.ts.map +1 -1
  25. package/dist/cjs/graphql/executeMutations.js +6 -0
  26. package/dist/cjs/graphql/executeMutations.js.map +1 -1
  27. package/dist/cjs/graphql/fetchData.d.ts +23 -7
  28. package/dist/cjs/graphql/fetchData.d.ts.map +1 -1
  29. package/dist/cjs/graphql/fetchData.js +11 -11
  30. package/dist/cjs/graphql/fetchData.js.map +1 -1
  31. package/dist/cjs/graphql/fetchNftHolders.d.ts.map +1 -1
  32. package/dist/cjs/graphql/fetchNftHolders.js +3 -1
  33. package/dist/cjs/graphql/fetchNftHolders.js.map +1 -1
  34. package/dist/cjs/graphql/fetchReceipts.d.ts.map +1 -1
  35. package/dist/cjs/graphql/fetchReceipts.js +3 -1
  36. package/dist/cjs/graphql/fetchReceipts.js.map +1 -1
  37. package/dist/cjs/graphql/getMultiReceipts.d.ts.map +1 -1
  38. package/dist/cjs/graphql/getMultiReceipts.js +7 -2
  39. package/dist/cjs/graphql/getMultiReceipts.js.map +1 -1
  40. package/dist/cjs/index.d.ts +2 -1
  41. package/dist/cjs/index.d.ts.map +1 -1
  42. package/dist/cjs/index.js +6 -4
  43. package/dist/cjs/index.js.map +1 -1
  44. package/dist/cjs/sui-sdk/client.d.ts.map +1 -1
  45. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
  46. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js +9 -3
  47. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
  48. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts +1 -0
  49. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts.map +1 -1
  50. package/dist/cjs/sui-sdk/functions/getReceipts.js +2 -2
  51. package/dist/cjs/sui-sdk/functions/getReceipts.js.map +1 -1
  52. package/dist/cjs/transactions/7k.d.ts +2 -7
  53. package/dist/cjs/transactions/7k.d.ts.map +1 -1
  54. package/dist/cjs/transactions/7k.js +18 -31
  55. package/dist/cjs/transactions/7k.js.map +1 -1
  56. package/dist/cjs/transactions/alpha.d.ts.map +1 -1
  57. package/dist/cjs/transactions/alphalend.d.ts +1 -0
  58. package/dist/cjs/transactions/alphalend.d.ts.map +1 -1
  59. package/dist/cjs/transactions/alphalend.js +148 -201
  60. package/dist/cjs/transactions/alphalend.js.map +1 -1
  61. package/dist/cjs/transactions/blueRewards.js +17 -7
  62. package/dist/cjs/transactions/blueRewards.js.map +1 -1
  63. package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
  64. package/dist/cjs/transactions/cetus.d.ts.map +1 -1
  65. package/dist/cjs/transactions/collect_rewards.d.ts.map +1 -1
  66. package/dist/cjs/transactions/collect_rewards.js +1 -3
  67. package/dist/cjs/transactions/collect_rewards.js.map +1 -1
  68. package/dist/cjs/transactions/get_navi_rewards.d.ts +2 -0
  69. package/dist/cjs/transactions/get_navi_rewards.d.ts.map +1 -0
  70. package/dist/cjs/transactions/get_navi_rewards.js +42 -0
  71. package/dist/cjs/transactions/get_navi_rewards.js.map +1 -0
  72. package/dist/cjs/transactions/navi-looping.d.ts.map +1 -1
  73. package/dist/cjs/transactions/navi-looping.js +79 -79
  74. package/dist/cjs/transactions/navi-looping.js.map +1 -1
  75. package/dist/cjs/transactions/navi.d.ts.map +1 -1
  76. package/dist/cjs/transactions/navi.js +142 -141
  77. package/dist/cjs/transactions/navi.js.map +1 -1
  78. package/dist/cjs/transactions/newZapDeposit.d.ts +15 -0
  79. package/dist/cjs/transactions/newZapDeposit.d.ts.map +1 -0
  80. package/dist/cjs/transactions/newZapDeposit.js +1775 -0
  81. package/dist/cjs/transactions/newZapDeposit.js.map +1 -0
  82. package/dist/cjs/transactions/zapDeposit.d.ts +3 -3
  83. package/dist/cjs/transactions/zapDeposit.d.ts.map +1 -1
  84. package/dist/cjs/transactions/zapDeposit.js +1043 -503
  85. package/dist/cjs/transactions/zapDeposit.js.map +1 -1
  86. package/dist/cjs/utils/clmm/prices.d.ts.map +1 -1
  87. package/dist/cjs/utils/clmm/prices.js +4 -0
  88. package/dist/cjs/utils/clmm/prices.js.map +1 -1
  89. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.d.ts +0 -1
  90. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.d.ts.map +1 -1
  91. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.js +0 -1
  92. package/dist/cjs/utils/clmm/tokenAmountFromLiquidity.js.map +1 -1
  93. package/dist/cjs/utils/getReceipts.js +1 -1
  94. package/dist/cjs/utils/getReceipts.js.map +1 -1
  95. package/dist/cjs/utils/prices.js +2 -2
  96. package/dist/cjs/utils/prices.js.map +1 -1
  97. package/dist/esm/adminFunctions.d.ts.map +1 -1
  98. package/dist/esm/common/coins.d.ts.map +1 -1
  99. package/dist/esm/common/coins.js +18 -0
  100. package/dist/esm/common/coins.js.map +1 -1
  101. package/dist/esm/common/constants.d.ts +21 -0
  102. package/dist/esm/common/constants.d.ts.map +1 -1
  103. package/dist/esm/common/constants.js +15 -2
  104. package/dist/esm/common/constants.js.map +1 -1
  105. package/dist/esm/common/maps.d.ts +1 -0
  106. package/dist/esm/common/maps.d.ts.map +1 -1
  107. package/dist/esm/common/maps.js +65 -4
  108. package/dist/esm/common/maps.js.map +1 -1
  109. package/dist/esm/common/pyth.d.ts +1 -1
  110. package/dist/esm/common/pyth.d.ts.map +1 -1
  111. package/dist/esm/common/pyth.js.map +1 -1
  112. package/dist/esm/common/types.d.ts +17 -21
  113. package/dist/esm/common/types.d.ts.map +1 -1
  114. package/dist/esm/common/types.js +1 -17
  115. package/dist/esm/common/types.js.map +1 -1
  116. package/dist/esm/graphql/client.d.ts +1 -1
  117. package/dist/esm/graphql/client.d.ts.map +1 -1
  118. package/dist/esm/graphql/executeMutations.d.ts +15 -3
  119. package/dist/esm/graphql/executeMutations.d.ts.map +1 -1
  120. package/dist/esm/graphql/executeMutations.js +6 -0
  121. package/dist/esm/graphql/executeMutations.js.map +1 -1
  122. package/dist/esm/graphql/fetchData.d.ts +23 -7
  123. package/dist/esm/graphql/fetchData.d.ts.map +1 -1
  124. package/dist/esm/graphql/fetchData.js +11 -11
  125. package/dist/esm/graphql/fetchData.js.map +1 -1
  126. package/dist/esm/graphql/fetchNftHolders.d.ts.map +1 -1
  127. package/dist/esm/graphql/fetchNftHolders.js +3 -1
  128. package/dist/esm/graphql/fetchNftHolders.js.map +1 -1
  129. package/dist/esm/graphql/fetchReceipts.d.ts.map +1 -1
  130. package/dist/esm/graphql/fetchReceipts.js +3 -1
  131. package/dist/esm/graphql/fetchReceipts.js.map +1 -1
  132. package/dist/esm/graphql/getMultiReceipts.d.ts.map +1 -1
  133. package/dist/esm/graphql/getMultiReceipts.js +7 -2
  134. package/dist/esm/graphql/getMultiReceipts.js.map +1 -1
  135. package/dist/esm/index.d.ts +2 -1
  136. package/dist/esm/index.d.ts.map +1 -1
  137. package/dist/esm/index.js +2 -1
  138. package/dist/esm/index.js.map +1 -1
  139. package/dist/esm/sui-sdk/client.d.ts.map +1 -1
  140. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
  141. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js +9 -3
  142. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
  143. package/dist/esm/sui-sdk/functions/getReceipts.d.ts +1 -0
  144. package/dist/esm/sui-sdk/functions/getReceipts.d.ts.map +1 -1
  145. package/dist/esm/sui-sdk/functions/getReceipts.js +2 -2
  146. package/dist/esm/sui-sdk/functions/getReceipts.js.map +1 -1
  147. package/dist/esm/transactions/7k.d.ts +2 -7
  148. package/dist/esm/transactions/7k.d.ts.map +1 -1
  149. package/dist/esm/transactions/7k.js +19 -32
  150. package/dist/esm/transactions/7k.js.map +1 -1
  151. package/dist/esm/transactions/alpha.d.ts.map +1 -1
  152. package/dist/esm/transactions/alphalend.d.ts +1 -0
  153. package/dist/esm/transactions/alphalend.d.ts.map +1 -1
  154. package/dist/esm/transactions/alphalend.js +147 -201
  155. package/dist/esm/transactions/alphalend.js.map +1 -1
  156. package/dist/esm/transactions/bluefin.d.ts.map +1 -1
  157. package/dist/esm/transactions/cetus.d.ts.map +1 -1
  158. package/dist/esm/transactions/collect_rewards.d.ts.map +1 -1
  159. package/dist/esm/transactions/collect_rewards.js +1 -3
  160. package/dist/esm/transactions/collect_rewards.js.map +1 -1
  161. package/dist/esm/transactions/get_navi_rewards.d.ts +2 -0
  162. package/dist/esm/transactions/get_navi_rewards.d.ts.map +1 -0
  163. package/dist/esm/transactions/get_navi_rewards.js +39 -0
  164. package/dist/esm/transactions/get_navi_rewards.js.map +1 -0
  165. package/dist/esm/transactions/navi-looping.d.ts.map +1 -1
  166. package/dist/esm/transactions/navi-looping.js +79 -79
  167. package/dist/esm/transactions/navi-looping.js.map +1 -1
  168. package/dist/esm/transactions/navi.d.ts.map +1 -1
  169. package/dist/esm/transactions/navi.js +142 -141
  170. package/dist/esm/transactions/navi.js.map +1 -1
  171. package/dist/esm/transactions/newZapDeposit.d.ts +15 -0
  172. package/dist/esm/transactions/newZapDeposit.d.ts.map +1 -0
  173. package/dist/esm/transactions/newZapDeposit.js +1771 -0
  174. package/dist/esm/transactions/newZapDeposit.js.map +1 -0
  175. package/dist/esm/transactions/zapDeposit.d.ts +3 -3
  176. package/dist/esm/transactions/zapDeposit.d.ts.map +1 -1
  177. package/dist/esm/transactions/zapDeposit.js +1043 -502
  178. package/dist/esm/transactions/zapDeposit.js.map +1 -1
  179. package/dist/esm/utils/clmm/prices.d.ts.map +1 -1
  180. package/dist/esm/utils/clmm/prices.js +4 -0
  181. package/dist/esm/utils/clmm/prices.js.map +1 -1
  182. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.d.ts +0 -1
  183. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.d.ts.map +1 -1
  184. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.js +0 -1
  185. package/dist/esm/utils/clmm/tokenAmountFromLiquidity.js.map +1 -1
  186. package/dist/esm/utils/getReceipts.js +1 -1
  187. package/dist/esm/utils/getReceipts.js.map +1 -1
  188. package/dist/esm/utils/prices.js +2 -2
  189. package/dist/esm/utils/prices.js.map +1 -1
  190. package/docs/assets/hierarchy.js +1 -0
  191. package/docs/assets/icons.js +1 -1
  192. package/docs/assets/icons.svg +1 -1
  193. package/docs/assets/main.js +5 -5
  194. package/docs/assets/navigation.js +1 -1
  195. package/docs/assets/search.js +1 -1
  196. package/docs/assets/style.css +1428 -1288
  197. package/docs/functions/alphaLpBreakdown.html +1 -1
  198. package/docs/functions/cetusLpBreakdown.html +1 -1
  199. package/docs/functions/claimRewardTxb.html +1 -1
  200. package/docs/functions/claimRewardsTxb.html +1 -1
  201. package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
  202. package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
  203. package/docs/functions/coinsInPool.html +1 -1
  204. package/docs/functions/collectAndSwapRewardsSingleLoop.html +1 -0
  205. package/docs/functions/collectRewardTxb.html +1 -1
  206. package/docs/functions/collectRewards.html +1 -1
  207. package/docs/functions/deposit.html +1 -1
  208. package/docs/functions/depositDoubleAssetTxb.html +1 -1
  209. package/docs/functions/depositSingleAssetTxb.html +1 -1
  210. package/docs/functions/fetchAfterTransactionEvents.html +1 -1
  211. package/docs/functions/fetchAirdropClaimEvents.html +1 -1
  212. package/docs/functions/fetchAutoCompoundingEvents.html +1 -1
  213. package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -1
  214. package/docs/functions/fetchCetusPools.html +1 -1
  215. package/docs/functions/fetchChainIdentifier.html +1 -1
  216. package/docs/functions/fetchCheckRatioEvents.html +1 -1
  217. package/docs/functions/fetchEvents.html +1 -1
  218. package/docs/functions/fetchLiquidityChangeEvents.html +1 -1
  219. package/docs/functions/fetchMultiCategoryEvents.html +1 -1
  220. package/docs/functions/fetchMultiReceipts.html +1 -1
  221. package/docs/functions/fetchNftHolders.html +1 -1
  222. package/docs/functions/fetchPools.html +1 -1
  223. package/docs/functions/fetchPortfolioData.html +1 -1
  224. package/docs/functions/fetchProtocolData.html +1 -1
  225. package/docs/functions/fetchRequiredPrices.html +1 -1
  226. package/docs/functions/fetchTVL.html +1 -1
  227. package/docs/functions/fetchTransactions.html +1 -1
  228. package/docs/functions/fetchUserVaultBalances.html +1 -1
  229. package/docs/functions/fetchUserVaults.html +1 -1
  230. package/docs/functions/fetchUserWalletData.html +1 -1
  231. package/docs/functions/fetchVoloExchangeRate.html +1 -1
  232. package/docs/functions/fetchWithdrawV2Events.html +1 -1
  233. package/docs/functions/getAirdropShare.html +1 -1
  234. package/docs/functions/getAllDoubleAssetVaults.html +1 -1
  235. package/docs/functions/getAllSingleAssetVaults.html +1 -1
  236. package/docs/functions/getAllVaultBalances.html +1 -1
  237. package/docs/functions/getAllVaults.html +1 -1
  238. package/docs/functions/getAlphaUnlocks.html +1 -1
  239. package/docs/functions/getAlphaVaultBalance.html +1 -1
  240. package/docs/functions/getAmounts.html +1 -1
  241. package/docs/functions/getApr.html +1 -1
  242. package/docs/functions/getAprs.html +1 -1
  243. package/docs/functions/getApy.html +1 -1
  244. package/docs/functions/getApys.html +1 -1
  245. package/docs/functions/getCetusInvestorTicksMap.html +1 -1
  246. package/docs/functions/getCetusPool.html +1 -1
  247. package/docs/functions/getCetusSqrtPriceMap.html +1 -1
  248. package/docs/functions/getCoinAmountsFromLiquidity.html +1 -1
  249. package/docs/functions/getConf.html +1 -1
  250. package/docs/functions/getCurrentTick.html +1 -1
  251. package/docs/functions/getDistributor.html +1 -1
  252. package/docs/functions/getDoubleAssetVaultBalance.html +1 -1
  253. package/docs/functions/getDoubleAssetVaults.html +1 -1
  254. package/docs/functions/getInvestor.html +1 -1
  255. package/docs/functions/getInvestorPoolMap.html +1 -1
  256. package/docs/functions/getLastAutoCompoundTime.html +1 -1
  257. package/docs/functions/getLatestPrices.html +1 -1
  258. package/docs/functions/getLiquidity.html +1 -1
  259. package/docs/functions/getMultiCetusPool.html +1 -1
  260. package/docs/functions/getMultiInvestor.html +1 -1
  261. package/docs/functions/getMultiLatestPrices.html +1 -1
  262. package/docs/functions/getMultiParentPool.html +1 -1
  263. package/docs/functions/getMultiPool.html +1 -1
  264. package/docs/functions/getMultiReceipts.html +1 -1
  265. package/docs/functions/getParentPool.html +1 -1
  266. package/docs/functions/getPool.html +1 -1
  267. package/docs/functions/getPoolExchangeRate.html +1 -1
  268. package/docs/functions/getPoolExchangeRateMap.html +1 -1
  269. package/docs/functions/getPoolsWeightDistribution.html +1 -1
  270. package/docs/functions/getPositionRange.html +1 -1
  271. package/docs/functions/getPositionRanges.html +1 -1
  272. package/docs/functions/getPositionTicks.html +1 -1
  273. package/docs/functions/getPriceToTick.html +1 -1
  274. package/docs/functions/getRebalanceHistories.html +1 -1
  275. package/docs/functions/getRebalanceHistory.html +1 -1
  276. package/docs/functions/getReceipts.html +1 -1
  277. package/docs/functions/getSingleAssetVaultBalance.html +1 -1
  278. package/docs/functions/getSingleAssetVaults.html +1 -1
  279. package/docs/functions/getSuiClient.html +2 -2
  280. package/docs/functions/getSuiNodeUrl.html +2 -2
  281. package/docs/functions/getTVLs-1.html +1 -1
  282. package/docs/functions/getTickSpacing.html +1 -1
  283. package/docs/functions/getTickToPrice.html +1 -1
  284. package/docs/functions/getTvls.html +1 -1
  285. package/docs/functions/getVaultBalance.html +1 -1
  286. package/docs/functions/getVaults.html +1 -1
  287. package/docs/functions/lastAutocompoundTime.html +1 -1
  288. package/docs/functions/liquidityToTokens.html +1 -1
  289. package/docs/functions/migrateBoostedToLoop.html +1 -1
  290. package/docs/functions/multiLiquidityToTokens.html +1 -1
  291. package/docs/functions/multiTokensToUsd.html +1 -1
  292. package/docs/functions/multiXTokensToLiquidity.html +1 -1
  293. package/docs/functions/parseUserWalletData.html +1 -1
  294. package/docs/functions/pendingRewardAmount.html +1 -1
  295. package/docs/functions/setCustomSuiClient.html +3 -3
  296. package/docs/functions/setSuiClient.html +2 -2
  297. package/docs/functions/setSuiNodeUrl.html +2 -2
  298. package/docs/functions/setWeights.html +1 -1
  299. package/docs/functions/withdraw.html +1 -1
  300. package/docs/functions/withdrawAlphaTxb.html +1 -1
  301. package/docs/functions/withdrawTxb.html +1 -1
  302. package/docs/functions/zapDepositQuoteTxb.html +1 -0
  303. package/docs/functions/zapDepositTxb.html +1 -1
  304. package/docs/hierarchy.html +1 -0
  305. package/docs/index.html +19 -19
  306. package/docs/interfaces/Coin.html +10 -10
  307. package/docs/interfaces/CoinPair.html +3 -3
  308. package/docs/interfaces/CommonEventAttributes.html +7 -7
  309. package/docs/interfaces/NaviVoloData.html +3 -3
  310. package/docs/interfaces/PoolData.html +8 -8
  311. package/docs/interfaces/PoolWeightDistribution.html +4 -4
  312. package/docs/interfaces/RebalanceHistoryType.html +9 -9
  313. package/docs/modules.html +1 -206
  314. package/docs/types/AfterTransactionEventNode.html +1 -1
  315. package/docs/types/AirdropClaimEventNode.html +1 -1
  316. package/docs/types/Allocator.html +3 -1
  317. package/docs/types/AlphaFiDoubleAssetVault.html +9 -1
  318. package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
  319. package/docs/types/AlphaFiSingleAssetVault.html +7 -1
  320. package/docs/types/AlphaFiVault.html +1 -1
  321. package/docs/types/AlphaFiVaultBalance.html +1 -1
  322. package/docs/types/AlphaLendInvestor.html +1 -1
  323. package/docs/types/AlphaPoolType.html +5 -1
  324. package/docs/types/AlphaReceipt.html +4 -1
  325. package/docs/types/AlphaReceiptFields.html +11 -1
  326. package/docs/types/AlphaVaultBalance.html +7 -1
  327. package/docs/types/AutoBalancePoolNames.html +1 -1
  328. package/docs/types/AutoCompoundingEventNode.html +1 -1
  329. package/docs/types/BluefinInvestor.html +1 -1
  330. package/docs/types/BluefinPoolType.html +5 -1
  331. package/docs/types/BucketInvestor.html +2 -1
  332. package/docs/types/CetusInvestor.html +2 -1
  333. package/docs/types/CetusPoolType.html +5 -1
  334. package/docs/types/CetusSwapOptions.html +1 -1
  335. package/docs/types/CoinAmounts.html +3 -1
  336. package/docs/types/CoinName.html +1 -1
  337. package/docs/types/CoinType.html +1 -1
  338. package/docs/types/CommonInvestorFields.html +6 -1
  339. package/docs/types/CreatePoolOptions.html +8 -1
  340. package/docs/types/Distributor.html +6 -1
  341. package/docs/types/DoubleAssetMultiVaultBalance.html +6 -1
  342. package/docs/types/DoubleAssetPoolNames.html +1 -1
  343. package/docs/types/DoubleAssetTokenHoldings.html +5 -1
  344. package/docs/types/DoubleAssetVaultBalance.html +4 -1
  345. package/docs/types/EventCategory.html +1 -1
  346. package/docs/types/EventNode.html +1 -1
  347. package/docs/types/GetHoldersParams.html +4 -1
  348. package/docs/types/GetTokenHoldingsParams.html +4 -1
  349. package/docs/types/GetUserTokensFromTransactionsParams.html +5 -1
  350. package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +6 -1
  351. package/docs/types/GetVaultBalanceParams.html +1 -1
  352. package/docs/types/HoldingsObj.html +4 -1
  353. package/docs/types/Icon.html +1 -1
  354. package/docs/types/Investor.html +1 -1
  355. package/docs/types/LiquidityChangeEventNode.html +1 -1
  356. package/docs/types/LiquidityToTokensParams.html +3 -1
  357. package/docs/types/LiquidityToUsdParams.html +6 -1
  358. package/docs/types/LoopingDebt.html +5 -1
  359. package/docs/types/LoopingPoolNames.html +1 -1
  360. package/docs/types/LpBreakdownType.html +6 -1
  361. package/docs/types/MemberPoolDataType.html +3 -1
  362. package/docs/types/MemberType.html +3 -1
  363. package/docs/types/MultiGetVaultBalancesParams.html +4 -1
  364. package/docs/types/NaviInvestor.html +2 -1
  365. package/docs/types/OtherReceiptFields.html +9 -1
  366. package/docs/types/PoolName.html +1 -1
  367. package/docs/types/PoolReceipt.html +1 -1
  368. package/docs/types/PoolType.html +5 -1
  369. package/docs/types/Receipt.html +5 -1
  370. package/docs/types/ReceiptGQL.html +6 -1
  371. package/docs/types/SingleAssetMultiVaultBalance.html +5 -1
  372. package/docs/types/SingleAssetPoolNames.html +1 -1
  373. package/docs/types/SingleAssetTokenHoldings.html +4 -1
  374. package/docs/types/SingleAssetVaultBalance.html +3 -1
  375. package/docs/types/SingleGetVaultBalancesParams.html +3 -1
  376. package/docs/types/StrategyType.html +1 -1
  377. package/docs/types/SuiNetwork.html +1 -1
  378. package/docs/types/SwapOptions.html +1 -1
  379. package/docs/types/TickSpacing.html +1 -1
  380. package/docs/types/TotalWeightType.html +3 -1
  381. package/docs/types/TransactionBlockType.html +6 -1
  382. package/docs/types/UserPoolLiquidity.html +4 -1
  383. package/docs/types/UserPoolTokenHoldings.html +1 -1
  384. package/docs/types/UserUsdHoldings.html +4 -1
  385. package/docs/types/VaultBalance.html +1 -1
  386. package/docs/types/VoteCastEvent.html +1 -1
  387. package/docs/types/WithdrawV2EventNode.html +1 -1
  388. package/docs/variables/AUTOBALANCE_SUI_FIRST_POOLS.html +1 -1
  389. package/docs/variables/AUTOBALANCE_SUI_SECOND_POOLS.html +1 -1
  390. package/docs/variables/AUTOBALANCE_TYPE_1_POOLS.html +1 -1
  391. package/docs/variables/alphalendMarketIdMap.html +1 -1
  392. package/docs/variables/bluefinPoolMap.html +1 -1
  393. package/docs/variables/cetusPoolMap.html +1 -1
  394. package/docs/variables/coinsList.html +1 -1
  395. package/docs/variables/defunctPoolsSet.html +1 -1
  396. package/docs/variables/doubleAssetPoolCoinMap.html +1 -1
  397. package/docs/variables/eventCategories.html +1 -1
  398. package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -1
  399. package/docs/variables/loopingAccountAddresses.html +1 -1
  400. package/docs/variables/loopingPoolCoinMap.html +1 -1
  401. package/docs/variables/naviAssetMap.html +1 -1
  402. package/docs/variables/poolIdPoolNameMap.html +1 -1
  403. package/docs/variables/poolInfo.html +1 -1
  404. package/docs/variables/singleAssetPoolCoinMap.html +1 -1
  405. package/docs/variables/stableCoins.html +1 -1
  406. package/eslint.config.js +53 -0
  407. package/package.json +39 -23
  408. package/scripts/package-lock.json +2506 -0
  409. package/scripts/package.json +30 -0
  410. package/scripts/testRun.ts +101 -0
  411. package/scripts/utils.ts +104 -0
  412. package/docs/functions/getZapAmounts.html +0 -1
@@ -5,8 +5,7 @@ import { getReceipts } from "../sui-sdk/functions/getReceipts.js";
5
5
  import { getConf } from "../common/constants.js";
6
6
  import { getSuiClient } from "../sui-sdk/client.js";
7
7
  import { updateSingleTokenPrice } from "./naviOracle.js";
8
- import { getAvailableRewards } from "navi-sdk/dist/libs/PTB/V3.js";
9
- // import { getAvailableRewards } from "navi-sdk";
8
+ import { getAvailableRewards } from "./get_navi_rewards.js";
10
9
  export async function naviDepositTx(amount, poolName, options) {
11
10
  const C = getConf();
12
11
  const suiClient = getSuiClient();
@@ -33,12 +32,12 @@ export async function naviDepositTx(amount, poolName, options) {
33
32
  });
34
33
  }
35
34
  const [depositCoin] = txb.splitCoins(txb.gas, [amount]);
36
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_SUI_ACCOUNT_ADDRESS);
35
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_SUI_ACCOUNT_ADDRESS);
37
36
  if (claimableRewards) {
38
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
39
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
37
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
38
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
40
39
  : []) {
41
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
40
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
42
41
  txb.moveCall({
43
42
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_one_swap_bluefin`,
44
43
  typeArguments: [
@@ -58,7 +57,7 @@ export async function naviDepositTx(amount, poolName, options) {
58
57
  ],
59
58
  });
60
59
  }
61
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
60
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
62
61
  txb.moveCall({
63
62
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_one_swap`,
64
63
  typeArguments: [
@@ -140,12 +139,12 @@ export async function naviDepositTx(amount, poolName, options) {
140
139
  });
141
140
  }
142
141
  if (singleAssetPoolCoinMap[poolName].coin == "VSUI") {
143
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_VSUI_ACCOUNT_ADDRESS);
142
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_VSUI_ACCOUNT_ADDRESS);
144
143
  if (claimableRewards) {
145
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
146
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
144
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
145
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
147
146
  : []) {
148
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
147
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
149
148
  txb.moveCall({
150
149
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps_bluefin`,
151
150
  typeArguments: [
@@ -167,7 +166,7 @@ export async function naviDepositTx(amount, poolName, options) {
167
166
  ],
168
167
  });
169
168
  }
170
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
169
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
171
170
  txb.moveCall({
172
171
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_no_swap`,
173
172
  typeArguments: [
@@ -210,12 +209,12 @@ export async function naviDepositTx(amount, poolName, options) {
210
209
  }
211
210
  else if (singleAssetPoolCoinMap[poolName].coin == "WETH" ||
212
211
  singleAssetPoolCoinMap[poolName].coin == "USDT") {
213
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
212
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
214
213
  if (claimableRewards) {
215
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
216
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
214
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
215
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
217
216
  : []) {
218
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
217
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
219
218
  txb.moveCall({
220
219
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
221
220
  typeArguments: [
@@ -239,7 +238,7 @@ export async function naviDepositTx(amount, poolName, options) {
239
238
  ],
240
239
  });
241
240
  }
242
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
241
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
243
242
  txb.moveCall({
244
243
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
245
244
  typeArguments: [
@@ -288,12 +287,12 @@ export async function naviDepositTx(amount, poolName, options) {
288
287
  });
289
288
  }
290
289
  else if (singleAssetPoolCoinMap[poolName].coin == "WUSDC") {
291
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
290
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
292
291
  if (claimableRewards) {
293
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
294
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
292
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
293
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
295
294
  : []) {
296
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
295
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
297
296
  txb.moveCall({
298
297
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps_bluefin`,
299
298
  typeArguments: [
@@ -315,7 +314,7 @@ export async function naviDepositTx(amount, poolName, options) {
315
314
  ],
316
315
  });
317
316
  }
318
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
317
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
319
318
  txb.moveCall({
320
319
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps_bluefin_v2`,
321
320
  typeArguments: [
@@ -362,12 +361,12 @@ export async function naviDepositTx(amount, poolName, options) {
362
361
  });
363
362
  }
364
363
  else if (singleAssetPoolCoinMap[poolName].coin == "USDC") {
365
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
364
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
366
365
  if (claimableRewards) {
367
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
368
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
366
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
367
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
369
368
  : []) {
370
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
369
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
371
370
  txb.moveCall({
372
371
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps`,
373
372
  typeArguments: [
@@ -389,7 +388,7 @@ export async function naviDepositTx(amount, poolName, options) {
389
388
  ],
390
389
  });
391
390
  }
392
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
391
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
393
392
  txb.moveCall({
394
393
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps`,
395
394
  typeArguments: [
@@ -436,12 +435,12 @@ export async function naviDepositTx(amount, poolName, options) {
436
435
  });
437
436
  }
438
437
  else if (singleAssetPoolCoinMap[poolName].coin == "USDY") {
439
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
438
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
440
439
  if (claimableRewards) {
441
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
442
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
440
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
441
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
443
442
  : []) {
444
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
443
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
445
444
  txb.moveCall({
446
445
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
447
446
  typeArguments: [
@@ -465,7 +464,7 @@ export async function naviDepositTx(amount, poolName, options) {
465
464
  ],
466
465
  });
467
466
  }
468
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
467
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
469
468
  txb.moveCall({
470
469
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
471
470
  typeArguments: [
@@ -515,10 +514,10 @@ export async function naviDepositTx(amount, poolName, options) {
515
514
  }
516
515
  else if (singleAssetPoolCoinMap[poolName].coin == "AUSD" ||
517
516
  singleAssetPoolCoinMap[poolName].coin == "ETH") {
518
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
517
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
519
518
  if (claimableRewards) {
520
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
521
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
519
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
520
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
522
521
  txb.moveCall({
523
522
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
524
523
  typeArguments: [
@@ -535,7 +534,7 @@ export async function naviDepositTx(amount, poolName, options) {
535
534
  ],
536
535
  });
537
536
  }
538
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
537
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
539
538
  txb.moveCall({
540
539
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_three_swaps_bluefin`,
541
540
  typeArguments: [
@@ -585,10 +584,10 @@ export async function naviDepositTx(amount, poolName, options) {
585
584
  });
586
585
  }
587
586
  else if (poolName === "NAVI-NS") {
588
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_NS_ACCOUNT_ADDRESS);
587
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_NS_ACCOUNT_ADDRESS);
589
588
  if (claimableRewards) {
590
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
591
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
589
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
590
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
592
591
  txb.moveCall({
593
592
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
594
593
  typeArguments: [
@@ -609,7 +608,7 @@ export async function naviDepositTx(amount, poolName, options) {
609
608
  ],
610
609
  });
611
610
  }
612
- else if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
611
+ else if (reward.rewardCoinType === coinsList["DEEP"].type) {
613
612
  txb.moveCall({
614
613
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
615
614
  typeArguments: [
@@ -630,7 +629,7 @@ export async function naviDepositTx(amount, poolName, options) {
630
629
  ],
631
630
  });
632
631
  }
633
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
632
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
634
633
  txb.moveCall({
635
634
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
636
635
  typeArguments: [
@@ -652,7 +651,7 @@ export async function naviDepositTx(amount, poolName, options) {
652
651
  ],
653
652
  });
654
653
  }
655
- else if (reward.reward_coin_type === coinsList["NS"].type.substring(2)) {
654
+ else if (reward.rewardCoinType === coinsList["NS"].type) {
656
655
  txb.moveCall({
657
656
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
658
657
  typeArguments: [
@@ -721,10 +720,10 @@ export async function naviDepositTx(amount, poolName, options) {
721
720
  });
722
721
  }
723
722
  else if (poolName === "NAVI-NAVX") {
724
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_NAVX_ACCOUNT_ADDRESS);
723
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_NAVX_ACCOUNT_ADDRESS);
725
724
  if (claimableRewards) {
726
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
727
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
725
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
726
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
728
727
  txb.moveCall({
729
728
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
730
729
  typeArguments: [
@@ -741,7 +740,7 @@ export async function naviDepositTx(amount, poolName, options) {
741
740
  ],
742
741
  });
743
742
  }
744
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
743
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
745
744
  txb.moveCall({
746
745
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
747
746
  typeArguments: [
@@ -815,10 +814,10 @@ export async function naviDepositTx(amount, poolName, options) {
815
814
  });
816
815
  }
817
816
  else if (poolName === "NAVI-STSUI") {
818
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_STSUI_ACCOUNT_ADDRESS);
817
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_STSUI_ACCOUNT_ADDRESS);
819
818
  if (claimableRewards) {
820
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
821
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
819
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
820
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
822
821
  txb.moveCall({
823
822
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
824
823
  typeArguments: [
@@ -835,7 +834,7 @@ export async function naviDepositTx(amount, poolName, options) {
835
834
  ],
836
835
  });
837
836
  }
838
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
837
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
839
838
  txb.moveCall({
840
839
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
841
840
  typeArguments: [
@@ -857,7 +856,7 @@ export async function naviDepositTx(amount, poolName, options) {
857
856
  ],
858
857
  });
859
858
  }
860
- else if (reward.reward_coin_type === coinsList["STSUI"].type.substring(2)) {
859
+ else if (reward.rewardCoinType === coinsList["STSUI"].type) {
861
860
  txb.moveCall({
862
861
  target: `${poolData.packageId}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
863
862
  typeArguments: [coinsList["STSUI"].type],
@@ -924,10 +923,10 @@ export async function naviDepositTx(amount, poolName, options) {
924
923
  });
925
924
  }
926
925
  else if (poolName === "NAVI-SUIBTC") {
927
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_SUIBTC_ACCOUNT_ADDRESS);
926
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_SUIBTC_ACCOUNT_ADDRESS);
928
927
  if (claimableRewards) {
929
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
930
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
928
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
929
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
931
930
  txb.moveCall({
932
931
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
933
932
  typeArguments: [
@@ -949,7 +948,7 @@ export async function naviDepositTx(amount, poolName, options) {
949
948
  ],
950
949
  });
951
950
  }
952
- else if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
951
+ else if (reward.rewardCoinType === coinsList["DEEP"].type) {
953
952
  txb.moveCall({
954
953
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
955
954
  typeArguments: [
@@ -971,7 +970,7 @@ export async function naviDepositTx(amount, poolName, options) {
971
970
  ],
972
971
  });
973
972
  }
974
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
973
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
975
974
  txb.moveCall({
976
975
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
977
976
  typeArguments: [
@@ -1050,10 +1049,10 @@ export async function naviDepositTx(amount, poolName, options) {
1050
1049
  });
1051
1050
  }
1052
1051
  else if (poolName === "NAVI-SUIUSDT") {
1053
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_SUIUSDT_ACCOUNT_ADDRESS);
1052
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_SUIUSDT_ACCOUNT_ADDRESS);
1054
1053
  if (claimableRewards) {
1055
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
1056
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1054
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
1055
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1057
1056
  txb.moveCall({
1058
1057
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
1059
1058
  typeArguments: [
@@ -1070,7 +1069,7 @@ export async function naviDepositTx(amount, poolName, options) {
1070
1069
  ],
1071
1070
  });
1072
1071
  }
1073
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1072
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1074
1073
  txb.moveCall({
1075
1074
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_three_swaps`,
1076
1075
  typeArguments: [
@@ -1120,15 +1119,15 @@ export async function naviDepositTx(amount, poolName, options) {
1120
1119
  });
1121
1120
  }
1122
1121
  else if (singleAssetPoolCoinMap[poolName].coin == "WAL") {
1123
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
1122
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
1124
1123
  if (claimableRewards) {
1125
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1124
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1126
1125
  ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1127
1126
  : [
1128
- { reward_coin_type: coinsList["WAL"].type.substring(2) },
1129
- { reward_coin_type: coinsList["VSUI"].type.substring(2) },
1127
+ { rewardCoinType: coinsList["WAL"].type },
1128
+ { rewardCoinType: coinsList["VSUI"].type },
1130
1129
  ]) {
1131
- if (reward.reward_coin_type === coinsList["WAL"].type.substring(2)) {
1130
+ if (reward.rewardCoinType === coinsList["WAL"].type) {
1132
1131
  txb.moveCall({
1133
1132
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
1134
1133
  typeArguments: [
@@ -1145,7 +1144,7 @@ export async function naviDepositTx(amount, poolName, options) {
1145
1144
  ],
1146
1145
  });
1147
1146
  }
1148
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1147
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1149
1148
  txb.moveCall({
1150
1149
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
1151
1150
  typeArguments: [
@@ -1193,10 +1192,10 @@ export async function naviDepositTx(amount, poolName, options) {
1193
1192
  });
1194
1193
  }
1195
1194
  else if (singleAssetPoolCoinMap[poolName].coin == "DEEP") {
1196
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
1195
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
1197
1196
  if (claimableRewards) {
1198
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
1199
- if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
1197
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
1198
+ if (reward.rewardCoinType === coinsList["DEEP"].type) {
1200
1199
  txb.moveCall({
1201
1200
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
1202
1201
  typeArguments: [
@@ -1213,7 +1212,7 @@ export async function naviDepositTx(amount, poolName, options) {
1213
1212
  ],
1214
1213
  });
1215
1214
  }
1216
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1215
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1217
1216
  txb.moveCall({
1218
1217
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
1219
1218
  typeArguments: [
@@ -1324,12 +1323,12 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1324
1323
  }
1325
1324
  updateSingleTokenPrice(naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].pythPriceInfo, naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].feedId, txb);
1326
1325
  if (singleAssetPoolCoinMap[poolName].coin == "SUI") {
1327
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_SUI_ACCOUNT_ADDRESS);
1326
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_SUI_ACCOUNT_ADDRESS);
1328
1327
  if (claimableRewards) {
1329
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1330
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1328
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1329
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1331
1330
  : []) {
1332
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1331
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1333
1332
  txb.moveCall({
1334
1333
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_one_swap_bluefin`,
1335
1334
  typeArguments: [
@@ -1349,7 +1348,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1349
1348
  ],
1350
1349
  });
1351
1350
  }
1352
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1351
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1353
1352
  txb.moveCall({
1354
1353
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_one_swap`,
1355
1354
  typeArguments: [
@@ -1394,12 +1393,12 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1394
1393
  });
1395
1394
  }
1396
1395
  else if (singleAssetPoolCoinMap[poolName].coin == "VSUI") {
1397
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_VSUI_ACCOUNT_ADDRESS);
1396
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_VSUI_ACCOUNT_ADDRESS);
1398
1397
  if (claimableRewards) {
1399
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1400
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1398
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1399
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1401
1400
  : []) {
1402
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1401
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1403
1402
  txb.moveCall({
1404
1403
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps_bluefin`,
1405
1404
  typeArguments: [
@@ -1421,7 +1420,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1421
1420
  ],
1422
1421
  });
1423
1422
  }
1424
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1423
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1425
1424
  txb.moveCall({
1426
1425
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_no_swap`,
1427
1426
  typeArguments: [
@@ -1464,10 +1463,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1464
1463
  }
1465
1464
  else if (singleAssetPoolCoinMap[poolName].coin == "WETH" ||
1466
1465
  singleAssetPoolCoinMap[poolName].coin == "USDT") {
1467
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
1466
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
1468
1467
  if (claimableRewards) {
1469
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
1470
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1468
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
1469
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1471
1470
  txb.moveCall({
1472
1471
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
1473
1472
  typeArguments: [
@@ -1491,7 +1490,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1491
1490
  ],
1492
1491
  });
1493
1492
  }
1494
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1493
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1495
1494
  txb.moveCall({
1496
1495
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
1497
1496
  typeArguments: [
@@ -1540,12 +1539,12 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1540
1539
  });
1541
1540
  }
1542
1541
  else if (singleAssetPoolCoinMap[poolName].coin == "WUSDC") {
1543
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
1542
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
1544
1543
  if (claimableRewards) {
1545
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1546
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1544
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1545
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1547
1546
  : []) {
1548
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1547
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1549
1548
  txb.moveCall({
1550
1549
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
1551
1550
  typeArguments: [
@@ -1569,7 +1568,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1569
1568
  ],
1570
1569
  });
1571
1570
  }
1572
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1571
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1573
1572
  txb.moveCall({
1574
1573
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
1575
1574
  typeArguments: [
@@ -1618,12 +1617,12 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1618
1617
  });
1619
1618
  }
1620
1619
  else if (singleAssetPoolCoinMap[poolName].coin == "USDC") {
1621
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
1620
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
1622
1621
  if (claimableRewards) {
1623
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1624
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1622
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1623
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
1625
1624
  : []) {
1626
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1625
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1627
1626
  txb.moveCall({
1628
1627
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps`,
1629
1628
  typeArguments: [
@@ -1645,7 +1644,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1645
1644
  ],
1646
1645
  });
1647
1646
  }
1648
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1647
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1649
1648
  txb.moveCall({
1650
1649
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_two_swaps`,
1651
1650
  typeArguments: [
@@ -1692,10 +1691,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1692
1691
  });
1693
1692
  }
1694
1693
  else if (singleAssetPoolCoinMap[poolName].coin == "USDY") {
1695
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
1694
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
1696
1695
  if (claimableRewards) {
1697
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
1698
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1696
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
1697
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1699
1698
  txb.moveCall({
1700
1699
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
1701
1700
  typeArguments: [
@@ -1719,7 +1718,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1719
1718
  ],
1720
1719
  });
1721
1720
  }
1722
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1721
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1723
1722
  txb.moveCall({
1724
1723
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
1725
1724
  typeArguments: [
@@ -1769,10 +1768,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1769
1768
  }
1770
1769
  else if (singleAssetPoolCoinMap[poolName].coin == "AUSD" ||
1771
1770
  singleAssetPoolCoinMap[poolName].coin == "ETH") {
1772
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
1771
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
1773
1772
  if (claimableRewards) {
1774
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
1775
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1773
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
1774
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1776
1775
  txb.moveCall({
1777
1776
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
1778
1777
  typeArguments: [
@@ -1789,12 +1788,13 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1789
1788
  ],
1790
1789
  });
1791
1790
  }
1792
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1791
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1793
1792
  txb.moveCall({
1794
- target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
1793
+ target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_three_swaps`,
1795
1794
  typeArguments: [
1796
1795
  coinsList[singleAssetPoolCoinMap[poolName].coin].type,
1797
1796
  coinsList["USDC"].type,
1797
+ coinsList["SUI"].type,
1798
1798
  coinsList["VSUI"].type,
1799
1799
  ],
1800
1800
  arguments: [
@@ -1804,9 +1804,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1804
1804
  txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
1805
1805
  txb.object(C.NAVI_INCENTIVE_V3),
1806
1806
  txb.object(C.NAVI_VSUI_REWARDS_POOL),
1807
- txb.object(C.BLUEFIN_GLOBAL_CONFIG),
1808
- txb.object(bluefinPoolMap["VSUI-USDC"]),
1809
- txb.object(bluefinPoolMap[`${singleAssetPoolCoinMap[poolName].coin}-USDC`]),
1807
+ txb.object(C.CETUS_GLOBAL_CONFIG_ID),
1808
+ txb.object(cetusPoolMap["VSUI-SUI"]),
1809
+ txb.object(cetusPoolMap["USDC-SUI"]),
1810
+ txb.object(cetusPoolMap[`USDC-${singleAssetPoolCoinMap[poolName].coin}`]),
1810
1811
  txb.object(C.CLOCK_PACKAGE_ID),
1811
1812
  ],
1812
1813
  });
@@ -1837,10 +1838,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1837
1838
  });
1838
1839
  }
1839
1840
  else if (poolName === "NAVI-NS") {
1840
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_NS_ACCOUNT_ADDRESS);
1841
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_NS_ACCOUNT_ADDRESS);
1841
1842
  if (claimableRewards) {
1842
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
1843
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1843
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
1844
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1844
1845
  txb.moveCall({
1845
1846
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
1846
1847
  typeArguments: [
@@ -1861,7 +1862,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1861
1862
  ],
1862
1863
  });
1863
1864
  }
1864
- else if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
1865
+ else if (reward.rewardCoinType === coinsList["DEEP"].type) {
1865
1866
  txb.moveCall({
1866
1867
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
1867
1868
  typeArguments: [
@@ -1882,7 +1883,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1882
1883
  ],
1883
1884
  });
1884
1885
  }
1885
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1886
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1886
1887
  txb.moveCall({
1887
1888
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
1888
1889
  typeArguments: [
@@ -1904,7 +1905,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1904
1905
  ],
1905
1906
  });
1906
1907
  }
1907
- else if (reward.reward_coin_type === coinsList["NS"].type.substring(2)) {
1908
+ else if (reward.rewardCoinType === coinsList["NS"].type) {
1908
1909
  txb.moveCall({
1909
1910
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
1910
1911
  typeArguments: [
@@ -1973,10 +1974,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1973
1974
  });
1974
1975
  }
1975
1976
  else if (poolName === "NAVI-NAVX") {
1976
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_NAVX_ACCOUNT_ADDRESS);
1977
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_NAVX_ACCOUNT_ADDRESS);
1977
1978
  if (claimableRewards) {
1978
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
1979
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
1979
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
1980
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
1980
1981
  txb.moveCall({
1981
1982
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
1982
1983
  typeArguments: [
@@ -1993,7 +1994,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1993
1994
  ],
1994
1995
  });
1995
1996
  }
1996
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
1997
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
1997
1998
  txb.moveCall({
1998
1999
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
1999
2000
  typeArguments: [
@@ -2067,10 +2068,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2067
2068
  });
2068
2069
  }
2069
2070
  else if (poolName === "NAVI-STSUI") {
2070
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_STSUI_ACCOUNT_ADDRESS);
2071
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_STSUI_ACCOUNT_ADDRESS);
2071
2072
  if (claimableRewards) {
2072
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
2073
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
2073
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
2074
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
2074
2075
  txb.moveCall({
2075
2076
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
2076
2077
  typeArguments: [
@@ -2087,7 +2088,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2087
2088
  ],
2088
2089
  });
2089
2090
  }
2090
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
2091
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
2091
2092
  txb.moveCall({
2092
2093
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
2093
2094
  typeArguments: [
@@ -2109,7 +2110,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2109
2110
  ],
2110
2111
  });
2111
2112
  }
2112
- else if (reward.reward_coin_type === coinsList["STSUI"].type.substring(2)) {
2113
+ else if (reward.rewardCoinType === coinsList["STSUI"].type) {
2113
2114
  txb.moveCall({
2114
2115
  target: `${poolData.packageId}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
2115
2116
  typeArguments: [coinsList["STSUI"].type],
@@ -2176,10 +2177,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2176
2177
  });
2177
2178
  }
2178
2179
  else if (poolName === "NAVI-SUIBTC") {
2179
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_SUIBTC_ACCOUNT_ADDRESS);
2180
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_SUIBTC_ACCOUNT_ADDRESS);
2180
2181
  if (claimableRewards) {
2181
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
2182
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
2182
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
2183
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
2183
2184
  txb.moveCall({
2184
2185
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
2185
2186
  typeArguments: [
@@ -2201,7 +2202,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2201
2202
  ],
2202
2203
  });
2203
2204
  }
2204
- else if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
2205
+ else if (reward.rewardCoinType === coinsList["DEEP"].type) {
2205
2206
  txb.moveCall({
2206
2207
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
2207
2208
  typeArguments: [
@@ -2223,7 +2224,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2223
2224
  ],
2224
2225
  });
2225
2226
  }
2226
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
2227
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
2227
2228
  txb.moveCall({
2228
2229
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
2229
2230
  typeArguments: [
@@ -2302,10 +2303,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2302
2303
  });
2303
2304
  }
2304
2305
  else if (poolName === "NAVI-SUIUSDT") {
2305
- const claimableRewards = await getAvailableRewards(getSuiClient(), getConf().NAVI_SUIUSDT_ACCOUNT_ADDRESS);
2306
+ const claimableRewards = await getAvailableRewards(getConf().NAVI_SUIUSDT_ACCOUNT_ADDRESS);
2306
2307
  if (claimableRewards) {
2307
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
2308
- if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
2308
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
2309
+ if (reward.rewardCoinType === coinsList["NAVX"].type) {
2309
2310
  txb.moveCall({
2310
2311
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
2311
2312
  typeArguments: [
@@ -2322,7 +2323,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2322
2323
  ],
2323
2324
  });
2324
2325
  }
2325
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
2326
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
2326
2327
  txb.moveCall({
2327
2328
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_three_swaps`,
2328
2329
  typeArguments: [
@@ -2372,15 +2373,15 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2372
2373
  });
2373
2374
  }
2374
2375
  else if (singleAssetPoolCoinMap[poolName].coin == "WAL") {
2375
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
2376
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
2376
2377
  if (claimableRewards) {
2377
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
2378
- ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
2378
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
2379
+ ? claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]
2379
2380
  : [
2380
- { reward_coin_type: coinsList["WAL"].type.substring(2) },
2381
- { reward_coin_type: coinsList["VSUI"].type.substring(2) },
2381
+ { rewardCoinType: coinsList["WAL"].type },
2382
+ { rewardCoinType: coinsList["VSUI"].type },
2382
2383
  ]) {
2383
- if (reward.reward_coin_type === coinsList["WAL"].type.substring(2)) {
2384
+ if (reward.rewardCoinType === coinsList["WAL"].type) {
2384
2385
  txb.moveCall({
2385
2386
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
2386
2387
  typeArguments: [
@@ -2397,7 +2398,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2397
2398
  ],
2398
2399
  });
2399
2400
  }
2400
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
2401
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
2401
2402
  txb.moveCall({
2402
2403
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
2403
2404
  typeArguments: [
@@ -2445,10 +2446,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2445
2446
  });
2446
2447
  }
2447
2448
  else if (singleAssetPoolCoinMap[poolName].coin == "DEEP") {
2448
- const claimableRewards = await getAvailableRewards(getSuiClient(), loopingAccountAddresses[poolName]);
2449
+ const claimableRewards = await getAvailableRewards(loopingAccountAddresses[poolName]);
2449
2450
  if (claimableRewards) {
2450
- for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
2451
- if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
2451
+ for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type]) {
2452
+ if (reward.rewardCoinType === coinsList["DEEP"].type) {
2452
2453
  txb.moveCall({
2453
2454
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
2454
2455
  typeArguments: [
@@ -2465,7 +2466,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
2465
2466
  ],
2466
2467
  });
2467
2468
  }
2468
- else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
2469
+ else if (reward.rewardCoinType === coinsList["VSUI"].type) {
2469
2470
  txb.moveCall({
2470
2471
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
2471
2472
  typeArguments: [