@alphafi/alphafi-sdk 0.0.96 → 0.0.98

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 (242) hide show
  1. package/dist/cjs/common/constants.d.ts +36 -0
  2. package/dist/cjs/common/constants.d.ts.map +1 -1
  3. package/dist/cjs/common/constants.js +29 -2
  4. package/dist/cjs/common/constants.js.map +1 -1
  5. package/dist/cjs/common/maps.d.ts.map +1 -1
  6. package/dist/cjs/common/maps.js +23 -0
  7. package/dist/cjs/common/maps.js.map +1 -1
  8. package/dist/cjs/common/types.d.ts +1 -1
  9. package/dist/cjs/common/types.d.ts.map +1 -1
  10. package/dist/cjs/common/types.js.map +1 -1
  11. package/dist/cjs/transactions/alphalend.d.ts.map +1 -1
  12. package/dist/cjs/transactions/alphalend.js +4 -3
  13. package/dist/cjs/transactions/alphalend.js.map +1 -1
  14. package/dist/cjs/transactions/navi.d.ts.map +1 -1
  15. package/dist/cjs/transactions/navi.js +49 -17
  16. package/dist/cjs/transactions/navi.js.map +1 -1
  17. package/dist/esm/common/constants.d.ts +36 -0
  18. package/dist/esm/common/constants.d.ts.map +1 -1
  19. package/dist/esm/common/constants.js +29 -2
  20. package/dist/esm/common/constants.js.map +1 -1
  21. package/dist/esm/common/maps.d.ts.map +1 -1
  22. package/dist/esm/common/maps.js +23 -0
  23. package/dist/esm/common/maps.js.map +1 -1
  24. package/dist/esm/common/types.d.ts +1 -1
  25. package/dist/esm/common/types.d.ts.map +1 -1
  26. package/dist/esm/common/types.js.map +1 -1
  27. package/dist/esm/transactions/alphalend.d.ts.map +1 -1
  28. package/dist/esm/transactions/alphalend.js +4 -3
  29. package/dist/esm/transactions/alphalend.js.map +1 -1
  30. package/dist/esm/transactions/navi.d.ts.map +1 -1
  31. package/dist/esm/transactions/navi.js +49 -17
  32. package/dist/esm/transactions/navi.js.map +1 -1
  33. package/docs/functions/alphaLpBreakdown.html +1 -1
  34. package/docs/functions/cetusLpBreakdown.html +1 -1
  35. package/docs/functions/claimRewardTxb.html +1 -1
  36. package/docs/functions/claimRewardsTxb.html +1 -1
  37. package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
  38. package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
  39. package/docs/functions/coinsInPool.html +1 -1
  40. package/docs/functions/collectAndSwapRewardsSingleLoop.html +1 -1
  41. package/docs/functions/collectRewardTxb.html +1 -1
  42. package/docs/functions/collectRewards.html +1 -1
  43. package/docs/functions/deposit.html +1 -1
  44. package/docs/functions/depositDoubleAssetTxb.html +1 -1
  45. package/docs/functions/depositSingleAssetTxb.html +1 -1
  46. package/docs/functions/fetchAfterTransactionEvents.html +1 -1
  47. package/docs/functions/fetchAirdropClaimEvents.html +1 -1
  48. package/docs/functions/fetchAutoCompoundingEvents.html +1 -1
  49. package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -1
  50. package/docs/functions/fetchCetusPools.html +1 -1
  51. package/docs/functions/fetchChainIdentifier.html +1 -1
  52. package/docs/functions/fetchCheckRatioEvents.html +1 -1
  53. package/docs/functions/fetchEvents.html +1 -1
  54. package/docs/functions/fetchLiquidityChangeEvents.html +1 -1
  55. package/docs/functions/fetchMultiCategoryEvents.html +1 -1
  56. package/docs/functions/fetchMultiReceipts.html +1 -1
  57. package/docs/functions/fetchNftHolders.html +1 -1
  58. package/docs/functions/fetchPools.html +1 -1
  59. package/docs/functions/fetchPortfolioData.html +1 -1
  60. package/docs/functions/fetchProtocolData.html +1 -1
  61. package/docs/functions/fetchRequiredPrices.html +1 -1
  62. package/docs/functions/fetchTVL.html +1 -1
  63. package/docs/functions/fetchTransactions.html +1 -1
  64. package/docs/functions/fetchUserVaultBalances.html +1 -1
  65. package/docs/functions/fetchUserVaults.html +1 -1
  66. package/docs/functions/fetchUserWalletData.html +1 -1
  67. package/docs/functions/fetchVoloExchangeRate.html +1 -1
  68. package/docs/functions/fetchWithdrawV2Events.html +1 -1
  69. package/docs/functions/getAirdropShare.html +1 -1
  70. package/docs/functions/getAllDoubleAssetVaults.html +1 -1
  71. package/docs/functions/getAllSingleAssetVaults.html +1 -1
  72. package/docs/functions/getAllVaultBalances.html +1 -1
  73. package/docs/functions/getAllVaults.html +1 -1
  74. package/docs/functions/getAlphaUnlocks.html +1 -1
  75. package/docs/functions/getAlphaVaultBalance.html +1 -1
  76. package/docs/functions/getAmounts.html +1 -1
  77. package/docs/functions/getApr.html +1 -1
  78. package/docs/functions/getAprs.html +1 -1
  79. package/docs/functions/getApy.html +1 -1
  80. package/docs/functions/getApys.html +1 -1
  81. package/docs/functions/getCetusInvestorTicksMap.html +1 -1
  82. package/docs/functions/getCetusPool.html +1 -1
  83. package/docs/functions/getCetusSqrtPriceMap.html +1 -1
  84. package/docs/functions/getCoinAmountsFromLiquidity.html +1 -1
  85. package/docs/functions/getConf.html +1 -1
  86. package/docs/functions/getCurrentTick.html +1 -1
  87. package/docs/functions/getDistributor.html +1 -1
  88. package/docs/functions/getDoubleAssetVaultBalance.html +1 -1
  89. package/docs/functions/getDoubleAssetVaults.html +1 -1
  90. package/docs/functions/getInvestor.html +1 -1
  91. package/docs/functions/getInvestorPoolMap.html +1 -1
  92. package/docs/functions/getLastAutoCompoundTime.html +1 -1
  93. package/docs/functions/getLatestPrices.html +1 -1
  94. package/docs/functions/getLiquidity.html +1 -1
  95. package/docs/functions/getMultiCetusPool.html +1 -1
  96. package/docs/functions/getMultiInvestor.html +1 -1
  97. package/docs/functions/getMultiLatestPrices.html +1 -1
  98. package/docs/functions/getMultiParentPool.html +1 -1
  99. package/docs/functions/getMultiPool.html +1 -1
  100. package/docs/functions/getMultiReceipts.html +1 -1
  101. package/docs/functions/getParentPool.html +1 -1
  102. package/docs/functions/getPool.html +1 -1
  103. package/docs/functions/getPoolExchangeRate.html +1 -1
  104. package/docs/functions/getPoolExchangeRateMap.html +1 -1
  105. package/docs/functions/getPoolsWeightDistribution.html +1 -1
  106. package/docs/functions/getPositionRange.html +1 -1
  107. package/docs/functions/getPositionRanges.html +1 -1
  108. package/docs/functions/getPositionTicks.html +1 -1
  109. package/docs/functions/getPriceToTick.html +1 -1
  110. package/docs/functions/getRebalanceHistories.html +1 -1
  111. package/docs/functions/getRebalanceHistory.html +1 -1
  112. package/docs/functions/getReceipts.html +1 -1
  113. package/docs/functions/getSingleAssetVaultBalance.html +1 -1
  114. package/docs/functions/getSingleAssetVaults.html +1 -1
  115. package/docs/functions/getSuiClient.html +2 -2
  116. package/docs/functions/getSuiNodeUrl.html +2 -2
  117. package/docs/functions/getTVLs-1.html +1 -1
  118. package/docs/functions/getTickSpacing.html +1 -1
  119. package/docs/functions/getTickToPrice.html +1 -1
  120. package/docs/functions/getTvls.html +1 -1
  121. package/docs/functions/getVaultBalance.html +1 -1
  122. package/docs/functions/getVaults.html +1 -1
  123. package/docs/functions/lastAutocompoundTime.html +1 -1
  124. package/docs/functions/liquidityToTokens.html +1 -1
  125. package/docs/functions/migrateBoostedToLoop.html +1 -1
  126. package/docs/functions/multiLiquidityToTokens.html +1 -1
  127. package/docs/functions/multiTokensToUsd.html +1 -1
  128. package/docs/functions/multiXTokensToLiquidity.html +1 -1
  129. package/docs/functions/parseUserWalletData.html +1 -1
  130. package/docs/functions/pendingRewardAmount.html +1 -1
  131. package/docs/functions/setCustomSuiClient.html +2 -2
  132. package/docs/functions/setSuiClient.html +2 -2
  133. package/docs/functions/setSuiNodeUrl.html +2 -2
  134. package/docs/functions/setWeights.html +1 -1
  135. package/docs/functions/withdraw.html +1 -1
  136. package/docs/functions/withdrawAlphaTxb.html +1 -1
  137. package/docs/functions/withdrawTxb.html +1 -1
  138. package/docs/functions/zapDepositQuoteTxb.html +1 -1
  139. package/docs/functions/zapDepositTxb.html +1 -1
  140. package/docs/hierarchy.html +1 -1
  141. package/docs/index.html +2 -2
  142. package/docs/interfaces/Coin.html +6 -6
  143. package/docs/interfaces/CoinPair.html +2 -2
  144. package/docs/interfaces/CommonEventAttributes.html +2 -2
  145. package/docs/interfaces/NaviVoloData.html +2 -2
  146. package/docs/interfaces/PoolData.html +2 -2
  147. package/docs/interfaces/PoolWeightDistribution.html +2 -2
  148. package/docs/interfaces/RebalanceHistoryType.html +2 -2
  149. package/docs/modules.html +1 -1
  150. package/docs/types/AfterTransactionEventNode.html +1 -1
  151. package/docs/types/AirdropClaimEventNode.html +1 -1
  152. package/docs/types/Allocator.html +2 -2
  153. package/docs/types/AlphaFiDoubleAssetVault.html +2 -2
  154. package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
  155. package/docs/types/AlphaFiSingleAssetVault.html +2 -2
  156. package/docs/types/AlphaFiVault.html +1 -1
  157. package/docs/types/AlphaFiVaultBalance.html +1 -1
  158. package/docs/types/AlphaLendInvestor.html +1 -1
  159. package/docs/types/AlphaPoolType.html +2 -2
  160. package/docs/types/AlphaReceipt.html +2 -2
  161. package/docs/types/AlphaReceiptFields.html +2 -2
  162. package/docs/types/AlphaVaultBalance.html +2 -2
  163. package/docs/types/AutoBalancePoolNames.html +1 -1
  164. package/docs/types/AutoCompoundingEventNode.html +1 -1
  165. package/docs/types/BluefinInvestor.html +1 -1
  166. package/docs/types/BluefinPoolType.html +2 -2
  167. package/docs/types/BucketInvestor.html +2 -2
  168. package/docs/types/CetusInvestor.html +2 -2
  169. package/docs/types/CetusPoolType.html +2 -2
  170. package/docs/types/CetusSwapOptions.html +1 -1
  171. package/docs/types/CoinAmounts.html +2 -2
  172. package/docs/types/CoinName.html +1 -1
  173. package/docs/types/CoinType.html +1 -1
  174. package/docs/types/CommonInvestorFields.html +2 -2
  175. package/docs/types/CreatePoolOptions.html +2 -2
  176. package/docs/types/Distributor.html +2 -2
  177. package/docs/types/DoubleAssetMultiVaultBalance.html +2 -2
  178. package/docs/types/DoubleAssetPoolNames.html +1 -1
  179. package/docs/types/DoubleAssetTokenHoldings.html +2 -2
  180. package/docs/types/DoubleAssetVaultBalance.html +2 -2
  181. package/docs/types/EventCategory.html +1 -1
  182. package/docs/types/EventNode.html +1 -1
  183. package/docs/types/GetHoldersParams.html +2 -2
  184. package/docs/types/GetTokenHoldingsParams.html +2 -2
  185. package/docs/types/GetUserTokensFromTransactionsParams.html +2 -2
  186. package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +2 -2
  187. package/docs/types/GetVaultBalanceParams.html +1 -1
  188. package/docs/types/HoldingsObj.html +2 -2
  189. package/docs/types/Icon.html +1 -1
  190. package/docs/types/Investor.html +1 -1
  191. package/docs/types/LiquidityChangeEventNode.html +1 -1
  192. package/docs/types/LiquidityToTokensParams.html +2 -2
  193. package/docs/types/LiquidityToUsdParams.html +2 -2
  194. package/docs/types/LoopingDebt.html +2 -2
  195. package/docs/types/LoopingPoolNames.html +1 -1
  196. package/docs/types/LpBreakdownType.html +2 -2
  197. package/docs/types/MemberPoolDataType.html +2 -2
  198. package/docs/types/MemberType.html +2 -2
  199. package/docs/types/MultiGetVaultBalancesParams.html +2 -2
  200. package/docs/types/NaviInvestor.html +2 -2
  201. package/docs/types/OtherReceiptFields.html +2 -2
  202. package/docs/types/PoolName.html +1 -1
  203. package/docs/types/PoolReceipt.html +1 -1
  204. package/docs/types/PoolType.html +2 -2
  205. package/docs/types/Receipt.html +2 -2
  206. package/docs/types/ReceiptGQL.html +2 -2
  207. package/docs/types/SingleAssetMultiVaultBalance.html +2 -2
  208. package/docs/types/SingleAssetPoolNames.html +1 -1
  209. package/docs/types/SingleAssetTokenHoldings.html +2 -2
  210. package/docs/types/SingleAssetVaultBalance.html +2 -2
  211. package/docs/types/SingleGetVaultBalancesParams.html +2 -2
  212. package/docs/types/StrategyType.html +1 -1
  213. package/docs/types/SuiNetwork.html +1 -1
  214. package/docs/types/SwapOptions.html +1 -1
  215. package/docs/types/TickSpacing.html +1 -1
  216. package/docs/types/TotalWeightType.html +2 -2
  217. package/docs/types/TransactionBlockType.html +2 -2
  218. package/docs/types/UserPoolLiquidity.html +2 -2
  219. package/docs/types/UserPoolTokenHoldings.html +1 -1
  220. package/docs/types/UserUsdHoldings.html +2 -2
  221. package/docs/types/VaultBalance.html +1 -1
  222. package/docs/types/VoteCastEvent.html +1 -1
  223. package/docs/types/WithdrawV2EventNode.html +1 -1
  224. package/docs/variables/AUTOBALANCE_SUI_FIRST_POOLS.html +1 -1
  225. package/docs/variables/AUTOBALANCE_SUI_SECOND_POOLS.html +1 -1
  226. package/docs/variables/AUTOBALANCE_TYPE_1_POOLS.html +1 -1
  227. package/docs/variables/alphalendMarketIdMap.html +1 -1
  228. package/docs/variables/bluefinPoolMap.html +1 -1
  229. package/docs/variables/cetusPoolMap.html +1 -1
  230. package/docs/variables/coinsList.html +1 -1
  231. package/docs/variables/defunctPoolsSet.html +1 -1
  232. package/docs/variables/doubleAssetPoolCoinMap.html +1 -1
  233. package/docs/variables/eventCategories.html +1 -1
  234. package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -1
  235. package/docs/variables/loopingAccountAddresses.html +1 -1
  236. package/docs/variables/loopingPoolCoinMap.html +1 -1
  237. package/docs/variables/naviAssetMap.html +1 -1
  238. package/docs/variables/poolIdPoolNameMap.html +1 -1
  239. package/docs/variables/poolInfo.html +1 -1
  240. package/docs/variables/singleAssetPoolCoinMap.html +1 -1
  241. package/docs/variables/stableCoins.html +1 -1
  242. package/package.json +1 -1
@@ -520,7 +520,9 @@ async function naviDepositTx(amount, poolName, options) {
520
520
  maps_js_1.singleAssetPoolCoinMap[poolName].coin == "ETH") {
521
521
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)(maps_js_1.loopingAccountAddresses[poolName]);
522
522
  if (claimableRewards) {
523
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
523
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
524
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
525
+ : []) {
524
526
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
525
527
  txb.moveCall({
526
528
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -590,7 +592,9 @@ async function naviDepositTx(amount, poolName, options) {
590
592
  else if (poolName === "NAVI-NS") {
591
593
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_NS_ACCOUNT_ADDRESS);
592
594
  if (claimableRewards) {
593
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
595
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
596
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
597
+ : []) {
594
598
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
595
599
  txb.moveCall({
596
600
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
@@ -726,7 +730,9 @@ async function naviDepositTx(amount, poolName, options) {
726
730
  else if (poolName === "NAVI-NAVX") {
727
731
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_NAVX_ACCOUNT_ADDRESS);
728
732
  if (claimableRewards) {
729
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
733
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
734
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
735
+ : []) {
730
736
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
731
737
  txb.moveCall({
732
738
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -820,7 +826,9 @@ async function naviDepositTx(amount, poolName, options) {
820
826
  else if (poolName === "NAVI-STSUI") {
821
827
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_STSUI_ACCOUNT_ADDRESS);
822
828
  if (claimableRewards) {
823
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
829
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
830
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
831
+ : []) {
824
832
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
825
833
  txb.moveCall({
826
834
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -929,7 +937,9 @@ async function naviDepositTx(amount, poolName, options) {
929
937
  else if (poolName === "NAVI-SUIBTC") {
930
938
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_SUIBTC_ACCOUNT_ADDRESS);
931
939
  if (claimableRewards) {
932
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
940
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
941
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
942
+ : []) {
933
943
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
934
944
  txb.moveCall({
935
945
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
@@ -1055,7 +1065,9 @@ async function naviDepositTx(amount, poolName, options) {
1055
1065
  else if (poolName === "NAVI-SUIUSDT") {
1056
1066
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_SUIUSDT_ACCOUNT_ADDRESS);
1057
1067
  if (claimableRewards) {
1058
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
1068
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1069
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1070
+ : []) {
1059
1071
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
1060
1072
  txb.moveCall({
1061
1073
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -1126,7 +1138,7 @@ async function naviDepositTx(amount, poolName, options) {
1126
1138
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)(maps_js_1.loopingAccountAddresses[poolName]);
1127
1139
  if (claimableRewards) {
1128
1140
  for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1129
- ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type.substring(2)]
1141
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1130
1142
  : [
1131
1143
  { rewardCoinType: coins_js_1.coinsList["WAL"].type },
1132
1144
  { rewardCoinType: coins_js_1.coinsList["VSUI"].type },
@@ -1198,7 +1210,9 @@ async function naviDepositTx(amount, poolName, options) {
1198
1210
  else if (maps_js_1.singleAssetPoolCoinMap[poolName].coin == "DEEP") {
1199
1211
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)(maps_js_1.loopingAccountAddresses[poolName]);
1200
1212
  if (claimableRewards) {
1201
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
1213
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1214
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1215
+ : []) {
1202
1216
  if (reward.rewardCoinType === coins_js_1.coinsList["DEEP"].type) {
1203
1217
  txb.moveCall({
1204
1218
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -1469,7 +1483,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
1469
1483
  maps_js_1.singleAssetPoolCoinMap[poolName].coin == "USDT") {
1470
1484
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)(maps_js_1.loopingAccountAddresses[poolName]);
1471
1485
  if (claimableRewards) {
1472
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
1486
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1487
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1488
+ : []) {
1473
1489
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
1474
1490
  txb.moveCall({
1475
1491
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
@@ -1697,7 +1713,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
1697
1713
  else if (maps_js_1.singleAssetPoolCoinMap[poolName].coin == "USDY") {
1698
1714
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)(maps_js_1.loopingAccountAddresses[poolName]);
1699
1715
  if (claimableRewards) {
1700
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
1716
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1717
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1718
+ : []) {
1701
1719
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
1702
1720
  txb.moveCall({
1703
1721
  target: `${C.ALPHA_LATEST_PACKAGE_ID}::alphafi_navi_investor::collect_v3_rewards_with_three_swaps`,
@@ -1774,7 +1792,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
1774
1792
  maps_js_1.singleAssetPoolCoinMap[poolName].coin == "ETH") {
1775
1793
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)(maps_js_1.loopingAccountAddresses[poolName]);
1776
1794
  if (claimableRewards) {
1777
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
1795
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1796
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1797
+ : []) {
1778
1798
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
1779
1799
  txb.moveCall({
1780
1800
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -1844,7 +1864,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
1844
1864
  else if (poolName === "NAVI-NS") {
1845
1865
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_NS_ACCOUNT_ADDRESS);
1846
1866
  if (claimableRewards) {
1847
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
1867
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1868
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
1869
+ : []) {
1848
1870
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
1849
1871
  txb.moveCall({
1850
1872
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps`,
@@ -1980,7 +2002,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
1980
2002
  else if (poolName === "NAVI-NAVX") {
1981
2003
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_NAVX_ACCOUNT_ADDRESS);
1982
2004
  if (claimableRewards) {
1983
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
2005
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2006
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2007
+ : []) {
1984
2008
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
1985
2009
  txb.moveCall({
1986
2010
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -2074,7 +2098,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
2074
2098
  else if (poolName === "NAVI-STSUI") {
2075
2099
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_STSUI_ACCOUNT_ADDRESS);
2076
2100
  if (claimableRewards) {
2077
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
2101
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2102
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2103
+ : []) {
2078
2104
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
2079
2105
  txb.moveCall({
2080
2106
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -2183,7 +2209,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
2183
2209
  else if (poolName === "NAVI-SUIBTC") {
2184
2210
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_SUIBTC_ACCOUNT_ADDRESS);
2185
2211
  if (claimableRewards) {
2186
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
2212
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2213
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2214
+ : []) {
2187
2215
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
2188
2216
  txb.moveCall({
2189
2217
  target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
@@ -2309,7 +2337,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
2309
2337
  else if (poolName === "NAVI-SUIUSDT") {
2310
2338
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)((0, constants_js_1.getConf)().NAVI_SUIUSDT_ACCOUNT_ADDRESS);
2311
2339
  if (claimableRewards) {
2312
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
2340
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2341
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2342
+ : []) {
2313
2343
  if (reward.rewardCoinType === coins_js_1.coinsList["NAVX"].type) {
2314
2344
  txb.moveCall({
2315
2345
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,
@@ -2452,7 +2482,9 @@ async function naviWithdrawTx(xTokens, poolName, options) {
2452
2482
  else if (maps_js_1.singleAssetPoolCoinMap[poolName].coin == "DEEP") {
2453
2483
  const claimableRewards = await (0, get_navi_rewards_js_1.getAvailableRewards)(maps_js_1.loopingAccountAddresses[poolName]);
2454
2484
  if (claimableRewards) {
2455
- for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]) {
2485
+ for (const reward of claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2486
+ ? claimableRewards[coins_js_1.coinsList[maps_js_1.singleAssetPoolCoinMap[poolName].coin].type]
2487
+ : []) {
2456
2488
  if (reward.rewardCoinType === coins_js_1.coinsList["DEEP"].type) {
2457
2489
  txb.moveCall({
2458
2490
  target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_no_swap`,