@alphafi/alphafi-sdk 0.0.102 → 0.0.103

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 (359) hide show
  1. package/#package.json# +98 -0
  2. package/FETCH_OVERRIDE_FIX.md +222 -0
  3. package/dist/cjs/adminFunctions.d.ts +8 -0
  4. package/dist/cjs/adminFunctions.d.ts.map +1 -1
  5. package/dist/cjs/adminFunctions.js +97 -3
  6. package/dist/cjs/adminFunctions.js.map +1 -1
  7. package/dist/cjs/common/constants.d.ts +79 -10
  8. package/dist/cjs/common/constants.d.ts.map +1 -1
  9. package/dist/cjs/common/constants.js +108 -23
  10. package/dist/cjs/common/constants.js.map +1 -1
  11. package/dist/cjs/common/maps.d.ts.map +1 -1
  12. package/dist/cjs/common/maps.js +72 -4
  13. package/dist/cjs/common/maps.js.map +1 -1
  14. package/dist/cjs/common/types.d.ts +76 -26
  15. package/dist/cjs/common/types.d.ts.map +1 -1
  16. package/dist/cjs/common/types.js.map +1 -1
  17. package/dist/cjs/getAprs.d.ts.map +1 -1
  18. package/dist/cjs/getAprs.js +0 -27
  19. package/dist/cjs/getAprs.js.map +1 -1
  20. package/dist/cjs/graphql/getMultiReceipts.js +1 -1
  21. package/dist/cjs/graphql/getMultiReceipts.js.map +1 -1
  22. package/dist/cjs/index.d.ts +3 -1
  23. package/dist/cjs/index.d.ts.map +1 -1
  24. package/dist/cjs/index.js +13 -3
  25. package/dist/cjs/index.js.map +1 -1
  26. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts +4 -0
  27. package/dist/cjs/sui-sdk/functions/getReceipts.d.ts.map +1 -1
  28. package/dist/cjs/sui-sdk/functions/getReceipts.js +31 -15
  29. package/dist/cjs/sui-sdk/functions/getReceipts.js.map +1 -1
  30. package/dist/cjs/transactions/alphaVault.d.ts +26 -0
  31. package/dist/cjs/transactions/alphaVault.d.ts.map +1 -0
  32. package/dist/cjs/transactions/alphaVault.js +385 -0
  33. package/dist/cjs/transactions/alphaVault.js.map +1 -0
  34. package/dist/cjs/transactions/alphalend.d.ts.map +1 -1
  35. package/dist/cjs/transactions/alphalend.js +10 -32
  36. package/dist/cjs/transactions/alphalend.js.map +1 -1
  37. package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
  38. package/dist/cjs/transactions/bluefin.js +30 -80
  39. package/dist/cjs/transactions/bluefin.js.map +1 -1
  40. package/dist/cjs/transactions/bucket.d.ts.map +1 -1
  41. package/dist/cjs/transactions/bucket.js +5 -16
  42. package/dist/cjs/transactions/bucket.js.map +1 -1
  43. package/dist/cjs/transactions/cetus.d.ts.map +1 -1
  44. package/dist/cjs/transactions/cetus.js +17 -50
  45. package/dist/cjs/transactions/cetus.js.map +1 -1
  46. package/dist/cjs/transactions/collect_rewards.d.ts +1 -0
  47. package/dist/cjs/transactions/collect_rewards.d.ts.map +1 -1
  48. package/dist/cjs/transactions/collect_rewards.js +143 -38
  49. package/dist/cjs/transactions/collect_rewards.js.map +1 -1
  50. package/dist/cjs/transactions/deposit.d.ts.map +1 -1
  51. package/dist/cjs/transactions/deposit.js +4 -0
  52. package/dist/cjs/transactions/deposit.js.map +1 -1
  53. package/dist/cjs/transactions/navi-looping.d.ts +11 -11
  54. package/dist/cjs/transactions/navi-looping.d.ts.map +1 -1
  55. package/dist/cjs/transactions/navi-looping.js +61 -134
  56. package/dist/cjs/transactions/navi-looping.js.map +1 -1
  57. package/dist/cjs/transactions/navi.d.ts.map +1 -1
  58. package/dist/cjs/transactions/navi.js +61 -106
  59. package/dist/cjs/transactions/navi.js.map +1 -1
  60. package/dist/cjs/transactions/slush.d.ts +12 -0
  61. package/dist/cjs/transactions/slush.d.ts.map +1 -0
  62. package/dist/cjs/transactions/slush.js +143 -0
  63. package/dist/cjs/transactions/slush.js.map +1 -0
  64. package/dist/cjs/transactions/withdraw.d.ts.map +1 -1
  65. package/dist/cjs/transactions/withdraw.js +4 -0
  66. package/dist/cjs/transactions/withdraw.js.map +1 -1
  67. package/dist/esm/adminFunctions.d.ts +8 -0
  68. package/dist/esm/adminFunctions.d.ts.map +1 -1
  69. package/dist/esm/adminFunctions.js +95 -5
  70. package/dist/esm/adminFunctions.js.map +1 -1
  71. package/dist/esm/common/constants.d.ts +79 -10
  72. package/dist/esm/common/constants.d.ts.map +1 -1
  73. package/dist/esm/common/constants.js +108 -23
  74. package/dist/esm/common/constants.js.map +1 -1
  75. package/dist/esm/common/maps.d.ts.map +1 -1
  76. package/dist/esm/common/maps.js +72 -4
  77. package/dist/esm/common/maps.js.map +1 -1
  78. package/dist/esm/common/types.d.ts +76 -26
  79. package/dist/esm/common/types.d.ts.map +1 -1
  80. package/dist/esm/common/types.js.map +1 -1
  81. package/dist/esm/getAprs.d.ts.map +1 -1
  82. package/dist/esm/getAprs.js +0 -27
  83. package/dist/esm/getAprs.js.map +1 -1
  84. package/dist/esm/graphql/getMultiReceipts.js +1 -1
  85. package/dist/esm/graphql/getMultiReceipts.js.map +1 -1
  86. package/dist/esm/index.d.ts +3 -1
  87. package/dist/esm/index.d.ts.map +1 -1
  88. package/dist/esm/index.js +3 -1
  89. package/dist/esm/index.js.map +1 -1
  90. package/dist/esm/sui-sdk/functions/getReceipts.d.ts +4 -0
  91. package/dist/esm/sui-sdk/functions/getReceipts.d.ts.map +1 -1
  92. package/dist/esm/sui-sdk/functions/getReceipts.js +31 -15
  93. package/dist/esm/sui-sdk/functions/getReceipts.js.map +1 -1
  94. package/dist/esm/transactions/alphaVault.d.ts +26 -0
  95. package/dist/esm/transactions/alphaVault.d.ts.map +1 -0
  96. package/dist/esm/transactions/alphaVault.js +377 -0
  97. package/dist/esm/transactions/alphaVault.js.map +1 -0
  98. package/dist/esm/transactions/alphalend.d.ts.map +1 -1
  99. package/dist/esm/transactions/alphalend.js +10 -32
  100. package/dist/esm/transactions/alphalend.js.map +1 -1
  101. package/dist/esm/transactions/bluefin.d.ts.map +1 -1
  102. package/dist/esm/transactions/bluefin.js +30 -80
  103. package/dist/esm/transactions/bluefin.js.map +1 -1
  104. package/dist/esm/transactions/bucket.d.ts.map +1 -1
  105. package/dist/esm/transactions/bucket.js +5 -16
  106. package/dist/esm/transactions/bucket.js.map +1 -1
  107. package/dist/esm/transactions/cetus.d.ts.map +1 -1
  108. package/dist/esm/transactions/cetus.js +17 -50
  109. package/dist/esm/transactions/cetus.js.map +1 -1
  110. package/dist/esm/transactions/collect_rewards.d.ts +1 -0
  111. package/dist/esm/transactions/collect_rewards.d.ts.map +1 -1
  112. package/dist/esm/transactions/collect_rewards.js +142 -38
  113. package/dist/esm/transactions/collect_rewards.js.map +1 -1
  114. package/dist/esm/transactions/deposit.d.ts.map +1 -1
  115. package/dist/esm/transactions/deposit.js +4 -0
  116. package/dist/esm/transactions/deposit.js.map +1 -1
  117. package/dist/esm/transactions/navi-looping.d.ts +11 -11
  118. package/dist/esm/transactions/navi-looping.d.ts.map +1 -1
  119. package/dist/esm/transactions/navi-looping.js +61 -134
  120. package/dist/esm/transactions/navi-looping.js.map +1 -1
  121. package/dist/esm/transactions/navi.d.ts.map +1 -1
  122. package/dist/esm/transactions/navi.js +61 -106
  123. package/dist/esm/transactions/navi.js.map +1 -1
  124. package/dist/esm/transactions/slush.d.ts +12 -0
  125. package/dist/esm/transactions/slush.d.ts.map +1 -0
  126. package/dist/esm/transactions/slush.js +137 -0
  127. package/dist/esm/transactions/slush.js.map +1 -0
  128. package/dist/esm/transactions/withdraw.d.ts.map +1 -1
  129. package/dist/esm/transactions/withdraw.js +4 -0
  130. package/dist/esm/transactions/withdraw.js.map +1 -1
  131. package/docs/assets/navigation.js +1 -1
  132. package/docs/assets/search.js +1 -1
  133. package/docs/functions/addAirdropCoin.html +1 -0
  134. package/docs/functions/alphaLpBreakdown.html +1 -1
  135. package/docs/functions/cetusLpBreakdown.html +1 -1
  136. package/docs/functions/claimAirdropTx.html +1 -0
  137. package/docs/functions/claimRewardTxb.html +1 -1
  138. package/docs/functions/claimRewardsTxb.html +1 -1
  139. package/docs/functions/claimWithdrawAlphaTx.html +1 -0
  140. package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
  141. package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
  142. package/docs/functions/coinsInPool.html +1 -1
  143. package/docs/functions/collectAndSwapRewardsLyf.html +1 -1
  144. package/docs/functions/collectAndSwapRewardsSingleLoop.html +1 -1
  145. package/docs/functions/collectRewardTxb.html +1 -1
  146. package/docs/functions/collectRewards.html +1 -1
  147. package/docs/functions/collectRewardsAndSwapSlush.html +1 -0
  148. package/docs/functions/collectUnsuppliedBalance.html +1 -0
  149. package/docs/functions/deposit.html +1 -1
  150. package/docs/functions/depositAlphaTx.html +1 -0
  151. package/docs/functions/depositDoubleAssetTxb.html +1 -1
  152. package/docs/functions/depositSingleAssetTxb.html +1 -1
  153. package/docs/functions/fetchAfterTransactionEvents.html +1 -1
  154. package/docs/functions/fetchAirdropClaimEvents.html +1 -1
  155. package/docs/functions/fetchAutoCompoundingEvents.html +1 -1
  156. package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -1
  157. package/docs/functions/fetchCetusPools.html +1 -1
  158. package/docs/functions/fetchChainIdentifier.html +1 -1
  159. package/docs/functions/fetchCheckRatioEvents.html +1 -1
  160. package/docs/functions/fetchEvents.html +1 -1
  161. package/docs/functions/fetchLiquidityChangeEvents.html +1 -1
  162. package/docs/functions/fetchMultiCategoryEvents.html +1 -1
  163. package/docs/functions/fetchMultiReceipts.html +1 -1
  164. package/docs/functions/fetchNftHolders.html +1 -1
  165. package/docs/functions/fetchPools.html +1 -1
  166. package/docs/functions/fetchPortfolioData.html +1 -1
  167. package/docs/functions/fetchProtocolData.html +1 -1
  168. package/docs/functions/fetchRequiredPrices.html +1 -1
  169. package/docs/functions/fetchTVL.html +1 -1
  170. package/docs/functions/fetchTransactions.html +1 -1
  171. package/docs/functions/fetchUserVaultBalances.html +1 -1
  172. package/docs/functions/fetchUserVaults.html +1 -1
  173. package/docs/functions/fetchUserWalletData.html +1 -1
  174. package/docs/functions/fetchVoloExchangeRate.html +1 -1
  175. package/docs/functions/fetchWithdrawV2Events.html +1 -1
  176. package/docs/functions/getAirdropShare.html +1 -1
  177. package/docs/functions/getAllDoubleAssetVaults.html +1 -1
  178. package/docs/functions/getAllSingleAssetVaults.html +1 -1
  179. package/docs/functions/getAllVaultBalances.html +1 -1
  180. package/docs/functions/getAllVaults.html +1 -1
  181. package/docs/functions/getAlphaUnlocks.html +1 -1
  182. package/docs/functions/getAlphaVaultBalance.html +1 -1
  183. package/docs/functions/getAmounts.html +1 -1
  184. package/docs/functions/getApr.html +1 -1
  185. package/docs/functions/getAprs.html +1 -1
  186. package/docs/functions/getApy.html +1 -1
  187. package/docs/functions/getApys.html +1 -1
  188. package/docs/functions/getCetusInvestorTicksMap.html +1 -1
  189. package/docs/functions/getCetusPool.html +1 -1
  190. package/docs/functions/getCetusSqrtPriceMap.html +1 -1
  191. package/docs/functions/getCoinAmountsFromLiquidity.html +1 -1
  192. package/docs/functions/getConf.html +1 -1
  193. package/docs/functions/getCurrentTick.html +1 -1
  194. package/docs/functions/getDistributor.html +1 -1
  195. package/docs/functions/getDoubleAssetVaultBalance.html +1 -1
  196. package/docs/functions/getDoubleAssetVaults.html +1 -1
  197. package/docs/functions/getInvestor.html +1 -1
  198. package/docs/functions/getInvestorPoolMap.html +1 -1
  199. package/docs/functions/getLastAutoCompoundTime.html +1 -1
  200. package/docs/functions/getLatestPrices.html +1 -1
  201. package/docs/functions/getLiquidity.html +1 -1
  202. package/docs/functions/getMultiCetusPool.html +1 -1
  203. package/docs/functions/getMultiInvestor.html +1 -1
  204. package/docs/functions/getMultiLatestPrices.html +1 -1
  205. package/docs/functions/getMultiParentPool.html +1 -1
  206. package/docs/functions/getMultiPool.html +1 -1
  207. package/docs/functions/getMultiReceipts.html +1 -1
  208. package/docs/functions/getParentPool.html +1 -1
  209. package/docs/functions/getPool.html +1 -1
  210. package/docs/functions/getPoolExchangeRate.html +1 -1
  211. package/docs/functions/getPoolExchangeRateMap.html +1 -1
  212. package/docs/functions/getPoolsWeightDistribution.html +1 -1
  213. package/docs/functions/getPositionRange.html +1 -1
  214. package/docs/functions/getPositionRanges.html +1 -1
  215. package/docs/functions/getPositionTicks.html +1 -1
  216. package/docs/functions/getPriceToTick.html +1 -1
  217. package/docs/functions/getRebalanceHistories.html +1 -1
  218. package/docs/functions/getRebalanceHistory.html +1 -1
  219. package/docs/functions/getReceipts.html +1 -1
  220. package/docs/functions/getSingleAssetVaultBalance.html +1 -1
  221. package/docs/functions/getSingleAssetVaults.html +1 -1
  222. package/docs/functions/getSlushUserTotalXtokens.html +1 -0
  223. package/docs/functions/getSuiClient.html +2 -2
  224. package/docs/functions/getSuiNodeUrl.html +2 -2
  225. package/docs/functions/getTVLs-1.html +1 -1
  226. package/docs/functions/getTickSpacing.html +1 -1
  227. package/docs/functions/getTickToPrice.html +1 -1
  228. package/docs/functions/getTvls.html +1 -1
  229. package/docs/functions/getVaultBalance.html +1 -1
  230. package/docs/functions/getVaults.html +1 -1
  231. package/docs/functions/getWithdrawRequestAndUnsuppliedAmounts.html +1 -0
  232. package/docs/functions/initiateWithdrawAlpha.html +1 -0
  233. package/docs/functions/lastAutocompoundTime.html +1 -1
  234. package/docs/functions/liquidityToTokens.html +1 -1
  235. package/docs/functions/migrateBoostedToLoop.html +1 -1
  236. package/docs/functions/multiLiquidityToTokens.html +1 -1
  237. package/docs/functions/multiTokensToUsd.html +1 -1
  238. package/docs/functions/multiXTokensToLiquidity.html +1 -1
  239. package/docs/functions/parseUserWalletData.html +1 -1
  240. package/docs/functions/pendingRewardAmount.html +1 -1
  241. package/docs/functions/processWithdrawRequestsManual.html +1 -0
  242. package/docs/functions/setCustomSuiClient.html +2 -2
  243. package/docs/functions/setSuiClient.html +2 -2
  244. package/docs/functions/setSuiNodeUrl.html +2 -2
  245. package/docs/functions/setWeights.html +1 -1
  246. package/docs/functions/slushDeposit.html +1 -0
  247. package/docs/functions/slushWithdraw.html +1 -0
  248. package/docs/functions/withdraw.html +1 -1
  249. package/docs/functions/withdrawAlphaTxb.html +1 -1
  250. package/docs/functions/withdrawTxb.html +1 -1
  251. package/docs/functions/zapDepositQuoteTxb.html +1 -1
  252. package/docs/functions/zapDepositTxb.html +1 -1
  253. package/docs/hierarchy.html +1 -1
  254. package/docs/index.html +2 -2
  255. package/docs/interfaces/Coin.html +6 -6
  256. package/docs/interfaces/CoinPair.html +2 -2
  257. package/docs/interfaces/CommonEventAttributes.html +2 -2
  258. package/docs/interfaces/NaviVoloData.html +2 -2
  259. package/docs/interfaces/PoolData.html +2 -2
  260. package/docs/interfaces/PoolWeightDistribution.html +2 -2
  261. package/docs/interfaces/RebalanceHistoryType.html +2 -2
  262. package/docs/modules.html +1 -1
  263. package/docs/types/AfterTransactionEventNode.html +1 -1
  264. package/docs/types/AirdropClaimEventNode.html +1 -1
  265. package/docs/types/Allocator.html +2 -2
  266. package/docs/types/AlphaFiDoubleAssetVault.html +2 -2
  267. package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
  268. package/docs/types/AlphaFiSingleAssetVault.html +2 -2
  269. package/docs/types/AlphaFiVault.html +1 -1
  270. package/docs/types/AlphaFiVaultBalance.html +1 -1
  271. package/docs/types/AlphaLendInvestor.html +1 -1
  272. package/docs/types/AlphaPoolType.html +2 -2
  273. package/docs/types/AlphaReceipt.html +2 -2
  274. package/docs/types/AlphaReceiptFields.html +2 -2
  275. package/docs/types/AlphaVaultBalance.html +2 -2
  276. package/docs/types/AutoBalancePoolNames.html +1 -1
  277. package/docs/types/AutoCompoundingEventNode.html +1 -1
  278. package/docs/types/Bag.html +3 -0
  279. package/docs/types/BluefinInvestor.html +1 -1
  280. package/docs/types/BluefinLyfInvestor.html +1 -1
  281. package/docs/types/BluefinPoolType.html +2 -2
  282. package/docs/types/BucketInvestor.html +2 -2
  283. package/docs/types/CetusInvestor.html +2 -2
  284. package/docs/types/CetusPoolType.html +2 -2
  285. package/docs/types/CetusSwapOptions.html +1 -1
  286. package/docs/types/CoinAmounts.html +2 -2
  287. package/docs/types/CoinName.html +1 -1
  288. package/docs/types/CoinType.html +1 -1
  289. package/docs/types/CommonInvestorFields.html +2 -2
  290. package/docs/types/CreatePoolOptions.html +2 -2
  291. package/docs/types/Distributor.html +2 -2
  292. package/docs/types/DoubleAssetMultiVaultBalance.html +2 -2
  293. package/docs/types/DoubleAssetPoolNames.html +1 -1
  294. package/docs/types/DoubleAssetTokenHoldings.html +2 -2
  295. package/docs/types/DoubleAssetVaultBalance.html +2 -2
  296. package/docs/types/EventCategory.html +1 -1
  297. package/docs/types/EventNode.html +1 -1
  298. package/docs/types/GetHoldersParams.html +2 -2
  299. package/docs/types/GetTokenHoldingsParams.html +2 -2
  300. package/docs/types/GetUserTokensFromTransactionsParams.html +2 -2
  301. package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +2 -2
  302. package/docs/types/GetVaultBalanceParams.html +1 -1
  303. package/docs/types/HoldingsObj.html +2 -2
  304. package/docs/types/Icon.html +1 -1
  305. package/docs/types/Investor.html +1 -1
  306. package/docs/types/LiquidityChangeEventNode.html +1 -1
  307. package/docs/types/LiquidityToTokensParams.html +2 -2
  308. package/docs/types/LiquidityToUsdParams.html +2 -2
  309. package/docs/types/LoopingDebt.html +2 -2
  310. package/docs/types/LoopingPoolNames.html +1 -1
  311. package/docs/types/LpBreakdownType.html +2 -2
  312. package/docs/types/MemberPoolDataType.html +2 -2
  313. package/docs/types/MemberType.html +2 -2
  314. package/docs/types/MultiGetVaultBalancesParams.html +2 -2
  315. package/docs/types/NaviInvestor.html +2 -2
  316. package/docs/types/ObjectTable.html +1 -0
  317. package/docs/types/OtherReceiptFields.html +2 -2
  318. package/docs/types/PoolName.html +1 -1
  319. package/docs/types/PoolReceipt.html +1 -1
  320. package/docs/types/PoolType.html +2 -2
  321. package/docs/types/Receipt.html +2 -2
  322. package/docs/types/ReceiptGQL.html +2 -2
  323. package/docs/types/SingleAssetMultiVaultBalance.html +2 -2
  324. package/docs/types/SingleAssetPoolNames.html +1 -1
  325. package/docs/types/SingleAssetTokenHoldings.html +2 -2
  326. package/docs/types/SingleAssetVaultBalance.html +2 -2
  327. package/docs/types/SingleGetVaultBalancesParams.html +2 -2
  328. package/docs/types/StrategyType.html +1 -1
  329. package/docs/types/SuiNetwork.html +1 -1
  330. package/docs/types/SwapOptions.html +1 -1
  331. package/docs/types/TickSpacing.html +1 -1
  332. package/docs/types/TotalWeightType.html +2 -2
  333. package/docs/types/TransactionBlockType.html +2 -2
  334. package/docs/types/UserPoolLiquidity.html +2 -2
  335. package/docs/types/UserPoolTokenHoldings.html +1 -1
  336. package/docs/types/UserUsdHoldings.html +2 -2
  337. package/docs/types/VaultBalance.html +1 -1
  338. package/docs/types/VecMap.html +3 -0
  339. package/docs/types/VoteCastEvent.html +1 -1
  340. package/docs/types/WithdrawV2EventNode.html +1 -1
  341. package/docs/variables/AUTOBALANCE_SUI_FIRST_POOLS.html +1 -1
  342. package/docs/variables/AUTOBALANCE_SUI_SECOND_POOLS.html +1 -1
  343. package/docs/variables/AUTOBALANCE_TYPE_1_POOLS.html +1 -1
  344. package/docs/variables/alphalendMarketIdMap.html +1 -1
  345. package/docs/variables/bluefinPoolMap.html +1 -1
  346. package/docs/variables/cetusPoolMap.html +1 -1
  347. package/docs/variables/coinsList.html +1 -1
  348. package/docs/variables/defunctPoolsSet.html +1 -1
  349. package/docs/variables/doubleAssetPoolCoinMap.html +1 -1
  350. package/docs/variables/eventCategories.html +1 -1
  351. package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -1
  352. package/docs/variables/loopingAccountAddresses.html +1 -1
  353. package/docs/variables/loopingPoolCoinMap.html +1 -1
  354. package/docs/variables/naviAssetMap.html +1 -1
  355. package/docs/variables/poolIdPoolNameMap.html +1 -1
  356. package/docs/variables/poolInfo.html +1 -1
  357. package/docs/variables/singleAssetPoolCoinMap.html +1 -1
  358. package/docs/variables/stableCoins.html +1 -1
  359. package/package.json +2 -1
@@ -1511,6 +1511,11 @@ const getCoinObject = async (type, address, tx) => {
1511
1511
  else {
1512
1512
  txb = tx;
1513
1513
  }
1514
+ if (type === "0x2::sui::SUI" ||
1515
+ type ===
1516
+ "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI") {
1517
+ return txb.gas;
1518
+ }
1514
1519
  let coins1 = [];
1515
1520
  let currentCursor = null;
1516
1521
  do {
@@ -1621,7 +1626,6 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
1621
1626
  const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
1622
1627
  const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
1623
1628
  const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
1624
- const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
1625
1629
  if (receipt.length > 0) {
1626
1630
  const poolinfo = maps_js_1.poolInfo[poolName];
1627
1631
  if (poolName.toString().includes("AUTOBALANCE")) {
@@ -1654,21 +1658,11 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
1654
1658
  }
1655
1659
  }
1656
1660
  else {
1657
- let alpha_receipt;
1658
- if (alphaReceipt.length == 0) {
1659
- [alpha_receipt] = txb.moveCall({
1660
- target: `0x1::option::none`,
1661
- typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
1662
- arguments: [],
1663
- });
1664
- }
1665
- else {
1666
- [alpha_receipt] = txb.moveCall({
1667
- target: `0x1::option::some`,
1668
- typeArguments: [alphaReceipt[0].content.type],
1669
- arguments: [txb.object(alphaReceipt[0].objectId)],
1670
- });
1671
- }
1661
+ let alpha_receipt = txb.moveCall({
1662
+ target: `0x1::option::none`,
1663
+ typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
1664
+ arguments: [],
1665
+ });
1672
1666
  if (poolName === "BLUEFIN-SUI-USDC") {
1673
1667
  txb.moveCall({
1674
1668
  target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw_v2`,
@@ -1773,7 +1767,6 @@ const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) => {
1773
1767
  const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
1774
1768
  const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
1775
1769
  const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
1776
- const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
1777
1770
  if (receipt.length > 0) {
1778
1771
  const poolinfo = maps_js_1.poolInfo[poolName];
1779
1772
  if (poolName.toString().includes("AUTOBALANCE")) {
@@ -1806,21 +1799,11 @@ const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) => {
1806
1799
  }
1807
1800
  }
1808
1801
  else {
1809
- let alpha_receipt;
1810
- if (alphaReceipt.length == 0) {
1811
- [alpha_receipt] = txb.moveCall({
1812
- target: `0x1::option::none`,
1813
- typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
1814
- arguments: [],
1815
- });
1816
- }
1817
- else {
1818
- [alpha_receipt] = txb.moveCall({
1819
- target: `0x1::option::some`,
1820
- typeArguments: [alphaReceipt[0].content.type],
1821
- arguments: [txb.object(alphaReceipt[0].objectId)],
1822
- });
1823
- }
1802
+ let alpha_receipt = txb.moveCall({
1803
+ target: `0x1::option::none`,
1804
+ typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
1805
+ arguments: [],
1806
+ });
1824
1807
  if (poolName === "BLUEFIN-BLUE-SUI") {
1825
1808
  txb.moveCall({
1826
1809
  target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw_v2`,
@@ -2011,7 +1994,6 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
2011
1994
  const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
2012
1995
  const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
2013
1996
  const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
2014
- const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
2015
1997
  if (receipt.length > 0) {
2016
1998
  const poolinfo = maps_js_1.poolInfo[poolName];
2017
1999
  if (poolName.toString().includes("AUTOBALANCE")) {
@@ -2044,21 +2026,11 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
2044
2026
  }
2045
2027
  }
2046
2028
  else {
2047
- let alpha_receipt;
2048
- if (alphaReceipt.length == 0) {
2049
- [alpha_receipt] = txb.moveCall({
2050
- target: `0x1::option::none`,
2051
- typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
2052
- arguments: [],
2053
- });
2054
- }
2055
- else {
2056
- [alpha_receipt] = txb.moveCall({
2057
- target: `0x1::option::some`,
2058
- typeArguments: [alphaReceipt[0].content.type],
2059
- arguments: [txb.object(alphaReceipt[0].objectId)],
2060
- });
2061
- }
2029
+ let alpha_receipt = txb.moveCall({
2030
+ target: `0x1::option::none`,
2031
+ typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
2032
+ arguments: [],
2033
+ });
2062
2034
  if (poolName === "BLUEFIN-USDT-USDC") {
2063
2035
  txb.moveCall({
2064
2036
  target: `${poolinfo.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
@@ -2518,23 +2490,12 @@ const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
2518
2490
  const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
2519
2491
  const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
2520
2492
  const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
2521
- const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
2522
2493
  if (receipt.length > 0) {
2523
- let alpha_receipt;
2524
- if (alphaReceipt.length == 0) {
2525
- [alpha_receipt] = txb.moveCall({
2526
- target: `0x1::option::none`,
2527
- typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
2528
- arguments: [],
2529
- });
2530
- }
2531
- else {
2532
- [alpha_receipt] = txb.moveCall({
2533
- target: `0x1::option::some`,
2534
- typeArguments: [alphaReceipt[0].content.type],
2535
- arguments: [txb.object(alphaReceipt[0].objectId)],
2536
- });
2537
- }
2494
+ let alpha_receipt = txb.moveCall({
2495
+ target: `0x1::option::none`,
2496
+ typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
2497
+ arguments: [],
2498
+ });
2538
2499
  const poolinfo = maps_js_1.poolInfo[poolName];
2539
2500
  if (poolName === "BLUEFIN-ALPHA-USDC") {
2540
2501
  txb.moveCall({
@@ -2700,23 +2661,12 @@ const withdrawBluefinStsuiTxb = async (xTokens, poolName, options) => {
2700
2661
  const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
2701
2662
  const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
2702
2663
  const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
2703
- const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
2704
2664
  if (receipt.length > 0) {
2705
- let alpha_receipt;
2706
- if (alphaReceipt.length == 0) {
2707
- [alpha_receipt] = txb.moveCall({
2708
- target: `0x1::option::none`,
2709
- typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
2710
- arguments: [],
2711
- });
2712
- }
2713
- else {
2714
- [alpha_receipt] = txb.moveCall({
2715
- target: `0x1::option::some`,
2716
- typeArguments: [alphaReceipt[0].content.type],
2717
- arguments: [txb.object(alphaReceipt[0].objectId)],
2718
- });
2719
- }
2665
+ let alpha_receipt = txb.moveCall({
2666
+ target: `0x1::option::none`,
2667
+ typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
2668
+ arguments: [],
2669
+ });
2720
2670
  const poolinfo = maps_js_1.poolInfo[poolName];
2721
2671
  if (poolName === "BLUEFIN-STSUI-USDC") {
2722
2672
  txb.moveCall({