@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
@@ -1503,6 +1503,11 @@ export const getCoinObject = async (type, address, tx) => {
1503
1503
  else {
1504
1504
  txb = tx;
1505
1505
  }
1506
+ if (type === "0x2::sui::SUI" ||
1507
+ type ===
1508
+ "0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI") {
1509
+ return txb.gas;
1510
+ }
1506
1511
  let coins1 = [];
1507
1512
  let currentCursor = null;
1508
1513
  do {
@@ -1611,7 +1616,6 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
1611
1616
  const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
1612
1617
  const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
1613
1618
  const receipt = await getReceipts(poolName, address, true);
1614
- const alphaReceipt = await getReceipts("ALPHA", address, true);
1615
1619
  if (receipt.length > 0) {
1616
1620
  const poolinfo = poolInfo[poolName];
1617
1621
  if (poolName.toString().includes("AUTOBALANCE")) {
@@ -1644,21 +1648,11 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
1644
1648
  }
1645
1649
  }
1646
1650
  else {
1647
- let alpha_receipt;
1648
- if (alphaReceipt.length == 0) {
1649
- [alpha_receipt] = txb.moveCall({
1650
- target: `0x1::option::none`,
1651
- typeArguments: [getConf().ALPHA_POOL_RECEIPT],
1652
- arguments: [],
1653
- });
1654
- }
1655
- else {
1656
- [alpha_receipt] = txb.moveCall({
1657
- target: `0x1::option::some`,
1658
- typeArguments: [alphaReceipt[0].content.type],
1659
- arguments: [txb.object(alphaReceipt[0].objectId)],
1660
- });
1661
- }
1651
+ let alpha_receipt = txb.moveCall({
1652
+ target: `0x1::option::none`,
1653
+ typeArguments: [getConf().ALPHA_POOL_RECEIPT],
1654
+ arguments: [],
1655
+ });
1662
1656
  if (poolName === "BLUEFIN-SUI-USDC") {
1663
1657
  txb.moveCall({
1664
1658
  target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw_v2`,
@@ -1762,7 +1756,6 @@ export const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) =>
1762
1756
  const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
1763
1757
  const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
1764
1758
  const receipt = await getReceipts(poolName, address, true);
1765
- const alphaReceipt = await getReceipts("ALPHA", address, true);
1766
1759
  if (receipt.length > 0) {
1767
1760
  const poolinfo = poolInfo[poolName];
1768
1761
  if (poolName.toString().includes("AUTOBALANCE")) {
@@ -1795,21 +1788,11 @@ export const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) =>
1795
1788
  }
1796
1789
  }
1797
1790
  else {
1798
- let alpha_receipt;
1799
- if (alphaReceipt.length == 0) {
1800
- [alpha_receipt] = txb.moveCall({
1801
- target: `0x1::option::none`,
1802
- typeArguments: [getConf().ALPHA_POOL_RECEIPT],
1803
- arguments: [],
1804
- });
1805
- }
1806
- else {
1807
- [alpha_receipt] = txb.moveCall({
1808
- target: `0x1::option::some`,
1809
- typeArguments: [alphaReceipt[0].content.type],
1810
- arguments: [txb.object(alphaReceipt[0].objectId)],
1811
- });
1812
- }
1791
+ let alpha_receipt = txb.moveCall({
1792
+ target: `0x1::option::none`,
1793
+ typeArguments: [getConf().ALPHA_POOL_RECEIPT],
1794
+ arguments: [],
1795
+ });
1813
1796
  if (poolName === "BLUEFIN-BLUE-SUI") {
1814
1797
  txb.moveCall({
1815
1798
  target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw_v2`,
@@ -1999,7 +1982,6 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
1999
1982
  const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
2000
1983
  const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
2001
1984
  const receipt = await getReceipts(poolName, address, true);
2002
- const alphaReceipt = await getReceipts("ALPHA", address, true);
2003
1985
  if (receipt.length > 0) {
2004
1986
  const poolinfo = poolInfo[poolName];
2005
1987
  if (poolName.toString().includes("AUTOBALANCE")) {
@@ -2032,21 +2014,11 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
2032
2014
  }
2033
2015
  }
2034
2016
  else {
2035
- let alpha_receipt;
2036
- if (alphaReceipt.length == 0) {
2037
- [alpha_receipt] = txb.moveCall({
2038
- target: `0x1::option::none`,
2039
- typeArguments: [getConf().ALPHA_POOL_RECEIPT],
2040
- arguments: [],
2041
- });
2042
- }
2043
- else {
2044
- [alpha_receipt] = txb.moveCall({
2045
- target: `0x1::option::some`,
2046
- typeArguments: [alphaReceipt[0].content.type],
2047
- arguments: [txb.object(alphaReceipt[0].objectId)],
2048
- });
2049
- }
2017
+ let alpha_receipt = txb.moveCall({
2018
+ target: `0x1::option::none`,
2019
+ typeArguments: [getConf().ALPHA_POOL_RECEIPT],
2020
+ arguments: [],
2021
+ });
2050
2022
  if (poolName === "BLUEFIN-USDT-USDC") {
2051
2023
  txb.moveCall({
2052
2024
  target: `${poolinfo.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
@@ -2505,23 +2477,12 @@ export const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
2505
2477
  const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
2506
2478
  const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
2507
2479
  const receipt = await getReceipts(poolName, address, true);
2508
- const alphaReceipt = await getReceipts("ALPHA", address, true);
2509
2480
  if (receipt.length > 0) {
2510
- let alpha_receipt;
2511
- if (alphaReceipt.length == 0) {
2512
- [alpha_receipt] = txb.moveCall({
2513
- target: `0x1::option::none`,
2514
- typeArguments: [getConf().ALPHA_POOL_RECEIPT],
2515
- arguments: [],
2516
- });
2517
- }
2518
- else {
2519
- [alpha_receipt] = txb.moveCall({
2520
- target: `0x1::option::some`,
2521
- typeArguments: [alphaReceipt[0].content.type],
2522
- arguments: [txb.object(alphaReceipt[0].objectId)],
2523
- });
2524
- }
2481
+ let alpha_receipt = txb.moveCall({
2482
+ target: `0x1::option::none`,
2483
+ typeArguments: [getConf().ALPHA_POOL_RECEIPT],
2484
+ arguments: [],
2485
+ });
2525
2486
  const poolinfo = poolInfo[poolName];
2526
2487
  if (poolName === "BLUEFIN-ALPHA-USDC") {
2527
2488
  txb.moveCall({
@@ -2686,23 +2647,12 @@ export const withdrawBluefinStsuiTxb = async (xTokens, poolName, options) => {
2686
2647
  const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
2687
2648
  const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
2688
2649
  const receipt = await getReceipts(poolName, address, true);
2689
- const alphaReceipt = await getReceipts("ALPHA", address, true);
2690
2650
  if (receipt.length > 0) {
2691
- let alpha_receipt;
2692
- if (alphaReceipt.length == 0) {
2693
- [alpha_receipt] = txb.moveCall({
2694
- target: `0x1::option::none`,
2695
- typeArguments: [getConf().ALPHA_POOL_RECEIPT],
2696
- arguments: [],
2697
- });
2698
- }
2699
- else {
2700
- [alpha_receipt] = txb.moveCall({
2701
- target: `0x1::option::some`,
2702
- typeArguments: [alphaReceipt[0].content.type],
2703
- arguments: [txb.object(alphaReceipt[0].objectId)],
2704
- });
2705
- }
2651
+ let alpha_receipt = txb.moveCall({
2652
+ target: `0x1::option::none`,
2653
+ typeArguments: [getConf().ALPHA_POOL_RECEIPT],
2654
+ arguments: [],
2655
+ });
2706
2656
  const poolinfo = poolInfo[poolName];
2707
2657
  if (poolName === "BLUEFIN-STSUI-USDC") {
2708
2658
  txb.moveCall({