@alphafi/alphafi-sdk 0.0.100 → 0.0.102

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 (284) hide show
  1. package/dist/cjs/adminFunctions.d.ts.map +1 -1
  2. package/dist/cjs/adminFunctions.js +27 -1
  3. package/dist/cjs/adminFunctions.js.map +1 -1
  4. package/dist/cjs/common/constants.d.ts +10 -0
  5. package/dist/cjs/common/constants.d.ts.map +1 -1
  6. package/dist/cjs/common/constants.js +30 -20
  7. package/dist/cjs/common/constants.js.map +1 -1
  8. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
  9. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js +7 -1
  10. package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
  11. package/dist/cjs/transactions/7k.js +1 -1
  12. package/dist/cjs/transactions/7k.js.map +1 -1
  13. package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
  14. package/dist/cjs/transactions/bluefin.js +38 -3
  15. package/dist/cjs/transactions/bluefin.js.map +1 -1
  16. package/dist/cjs/transactions/collect_rewards.js +3 -3
  17. package/dist/cjs/transactions/collect_rewards.js.map +1 -1
  18. package/dist/cjs/transactions/navi-looping.d.ts.map +1 -1
  19. package/dist/cjs/transactions/navi-looping.js +4 -4
  20. package/dist/cjs/transactions/navi-looping.js.map +1 -1
  21. package/dist/cjs/transactions/navi.d.ts.map +1 -1
  22. package/dist/cjs/transactions/navi.js +2 -2
  23. package/dist/cjs/transactions/navi.js.map +1 -1
  24. package/dist/cjs/transactions/naviOracle.d.ts +2 -1
  25. package/dist/cjs/transactions/naviOracle.d.ts.map +1 -1
  26. package/dist/cjs/transactions/naviOracle.js +11 -2
  27. package/dist/cjs/transactions/naviOracle.js.map +1 -1
  28. package/dist/cjs/transactions/withdraw.d.ts.map +1 -1
  29. package/dist/cjs/transactions/withdraw.js +10 -2
  30. package/dist/cjs/transactions/withdraw.js.map +1 -1
  31. package/dist/cjs/transactions/zapDeposit.d.ts +2 -1
  32. package/dist/cjs/transactions/zapDeposit.d.ts.map +1 -1
  33. package/dist/cjs/transactions/zapDeposit.js +79 -320
  34. package/dist/cjs/transactions/zapDeposit.js.map +1 -1
  35. package/dist/esm/adminFunctions.d.ts.map +1 -1
  36. package/dist/esm/adminFunctions.js +27 -1
  37. package/dist/esm/adminFunctions.js.map +1 -1
  38. package/dist/esm/common/constants.d.ts +10 -0
  39. package/dist/esm/common/constants.d.ts.map +1 -1
  40. package/dist/esm/common/constants.js +30 -20
  41. package/dist/esm/common/constants.js.map +1 -1
  42. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
  43. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js +7 -1
  44. package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
  45. package/dist/esm/transactions/7k.js +1 -1
  46. package/dist/esm/transactions/7k.js.map +1 -1
  47. package/dist/esm/transactions/bluefin.d.ts.map +1 -1
  48. package/dist/esm/transactions/bluefin.js +38 -3
  49. package/dist/esm/transactions/bluefin.js.map +1 -1
  50. package/dist/esm/transactions/collect_rewards.js +3 -3
  51. package/dist/esm/transactions/collect_rewards.js.map +1 -1
  52. package/dist/esm/transactions/navi-looping.d.ts.map +1 -1
  53. package/dist/esm/transactions/navi-looping.js +4 -4
  54. package/dist/esm/transactions/navi-looping.js.map +1 -1
  55. package/dist/esm/transactions/navi.d.ts.map +1 -1
  56. package/dist/esm/transactions/navi.js +2 -2
  57. package/dist/esm/transactions/navi.js.map +1 -1
  58. package/dist/esm/transactions/naviOracle.d.ts +2 -1
  59. package/dist/esm/transactions/naviOracle.d.ts.map +1 -1
  60. package/dist/esm/transactions/naviOracle.js +11 -2
  61. package/dist/esm/transactions/naviOracle.js.map +1 -1
  62. package/dist/esm/transactions/withdraw.d.ts.map +1 -1
  63. package/dist/esm/transactions/withdraw.js +11 -3
  64. package/dist/esm/transactions/withdraw.js.map +1 -1
  65. package/dist/esm/transactions/zapDeposit.d.ts +2 -1
  66. package/dist/esm/transactions/zapDeposit.d.ts.map +1 -1
  67. package/dist/esm/transactions/zapDeposit.js +78 -321
  68. package/dist/esm/transactions/zapDeposit.js.map +1 -1
  69. package/docs/assets/highlight.css +1 -1
  70. package/docs/functions/alphaLpBreakdown.html +1 -1
  71. package/docs/functions/cetusLpBreakdown.html +1 -1
  72. package/docs/functions/claimRewardTxb.html +1 -1
  73. package/docs/functions/claimRewardsTxb.html +1 -1
  74. package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
  75. package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
  76. package/docs/functions/coinsInPool.html +1 -1
  77. package/docs/functions/collectAndSwapRewardsLyf.html +1 -1
  78. package/docs/functions/collectAndSwapRewardsSingleLoop.html +1 -1
  79. package/docs/functions/collectRewardTxb.html +1 -1
  80. package/docs/functions/collectRewards.html +1 -1
  81. package/docs/functions/deposit.html +1 -1
  82. package/docs/functions/depositDoubleAssetTxb.html +1 -1
  83. package/docs/functions/depositSingleAssetTxb.html +1 -1
  84. package/docs/functions/fetchAfterTransactionEvents.html +1 -1
  85. package/docs/functions/fetchAirdropClaimEvents.html +1 -1
  86. package/docs/functions/fetchAutoCompoundingEvents.html +1 -1
  87. package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -1
  88. package/docs/functions/fetchCetusPools.html +1 -1
  89. package/docs/functions/fetchChainIdentifier.html +1 -1
  90. package/docs/functions/fetchCheckRatioEvents.html +1 -1
  91. package/docs/functions/fetchEvents.html +1 -1
  92. package/docs/functions/fetchLiquidityChangeEvents.html +1 -1
  93. package/docs/functions/fetchMultiCategoryEvents.html +1 -1
  94. package/docs/functions/fetchMultiReceipts.html +1 -1
  95. package/docs/functions/fetchNftHolders.html +1 -1
  96. package/docs/functions/fetchPools.html +1 -1
  97. package/docs/functions/fetchPortfolioData.html +1 -1
  98. package/docs/functions/fetchProtocolData.html +1 -1
  99. package/docs/functions/fetchRequiredPrices.html +1 -1
  100. package/docs/functions/fetchTVL.html +1 -1
  101. package/docs/functions/fetchTransactions.html +1 -1
  102. package/docs/functions/fetchUserVaultBalances.html +1 -1
  103. package/docs/functions/fetchUserVaults.html +1 -1
  104. package/docs/functions/fetchUserWalletData.html +1 -1
  105. package/docs/functions/fetchVoloExchangeRate.html +1 -1
  106. package/docs/functions/fetchWithdrawV2Events.html +1 -1
  107. package/docs/functions/getAirdropShare.html +1 -1
  108. package/docs/functions/getAllDoubleAssetVaults.html +1 -1
  109. package/docs/functions/getAllSingleAssetVaults.html +1 -1
  110. package/docs/functions/getAllVaultBalances.html +1 -1
  111. package/docs/functions/getAllVaults.html +1 -1
  112. package/docs/functions/getAlphaUnlocks.html +1 -1
  113. package/docs/functions/getAlphaVaultBalance.html +1 -1
  114. package/docs/functions/getAmounts.html +1 -1
  115. package/docs/functions/getApr.html +1 -1
  116. package/docs/functions/getAprs.html +1 -1
  117. package/docs/functions/getApy.html +1 -1
  118. package/docs/functions/getApys.html +1 -1
  119. package/docs/functions/getCetusInvestorTicksMap.html +1 -1
  120. package/docs/functions/getCetusPool.html +1 -1
  121. package/docs/functions/getCetusSqrtPriceMap.html +1 -1
  122. package/docs/functions/getCoinAmountsFromLiquidity.html +1 -1
  123. package/docs/functions/getConf.html +1 -1
  124. package/docs/functions/getCurrentTick.html +1 -1
  125. package/docs/functions/getDistributor.html +1 -1
  126. package/docs/functions/getDoubleAssetVaultBalance.html +1 -1
  127. package/docs/functions/getDoubleAssetVaults.html +1 -1
  128. package/docs/functions/getInvestor.html +1 -1
  129. package/docs/functions/getInvestorPoolMap.html +1 -1
  130. package/docs/functions/getLastAutoCompoundTime.html +1 -1
  131. package/docs/functions/getLatestPrices.html +1 -1
  132. package/docs/functions/getLiquidity.html +1 -1
  133. package/docs/functions/getMultiCetusPool.html +1 -1
  134. package/docs/functions/getMultiInvestor.html +1 -1
  135. package/docs/functions/getMultiLatestPrices.html +1 -1
  136. package/docs/functions/getMultiParentPool.html +1 -1
  137. package/docs/functions/getMultiPool.html +1 -1
  138. package/docs/functions/getMultiReceipts.html +1 -1
  139. package/docs/functions/getParentPool.html +1 -1
  140. package/docs/functions/getPool.html +1 -1
  141. package/docs/functions/getPoolExchangeRate.html +1 -1
  142. package/docs/functions/getPoolExchangeRateMap.html +1 -1
  143. package/docs/functions/getPoolsWeightDistribution.html +1 -1
  144. package/docs/functions/getPositionRange.html +1 -1
  145. package/docs/functions/getPositionRanges.html +1 -1
  146. package/docs/functions/getPositionTicks.html +1 -1
  147. package/docs/functions/getPriceToTick.html +1 -1
  148. package/docs/functions/getRebalanceHistories.html +1 -1
  149. package/docs/functions/getRebalanceHistory.html +1 -1
  150. package/docs/functions/getReceipts.html +1 -1
  151. package/docs/functions/getSingleAssetVaultBalance.html +1 -1
  152. package/docs/functions/getSingleAssetVaults.html +1 -1
  153. package/docs/functions/getSuiClient.html +2 -2
  154. package/docs/functions/getSuiNodeUrl.html +2 -2
  155. package/docs/functions/getTVLs-1.html +1 -1
  156. package/docs/functions/getTickSpacing.html +1 -1
  157. package/docs/functions/getTickToPrice.html +1 -1
  158. package/docs/functions/getTvls.html +1 -1
  159. package/docs/functions/getVaultBalance.html +1 -1
  160. package/docs/functions/getVaults.html +1 -1
  161. package/docs/functions/lastAutocompoundTime.html +1 -1
  162. package/docs/functions/liquidityToTokens.html +1 -1
  163. package/docs/functions/migrateBoostedToLoop.html +1 -1
  164. package/docs/functions/multiLiquidityToTokens.html +1 -1
  165. package/docs/functions/multiTokensToUsd.html +1 -1
  166. package/docs/functions/multiXTokensToLiquidity.html +1 -1
  167. package/docs/functions/parseUserWalletData.html +1 -1
  168. package/docs/functions/pendingRewardAmount.html +1 -1
  169. package/docs/functions/setCustomSuiClient.html +3 -3
  170. package/docs/functions/setSuiClient.html +2 -2
  171. package/docs/functions/setSuiNodeUrl.html +2 -2
  172. package/docs/functions/setWeights.html +1 -1
  173. package/docs/functions/withdraw.html +1 -1
  174. package/docs/functions/withdrawAlphaTxb.html +1 -1
  175. package/docs/functions/withdrawTxb.html +1 -1
  176. package/docs/functions/zapDepositQuoteTxb.html +1 -1
  177. package/docs/functions/zapDepositTxb.html +1 -1
  178. package/docs/hierarchy.html +1 -1
  179. package/docs/index.html +19 -19
  180. package/docs/interfaces/Coin.html +6 -6
  181. package/docs/interfaces/CoinPair.html +2 -2
  182. package/docs/interfaces/CommonEventAttributes.html +2 -2
  183. package/docs/interfaces/NaviVoloData.html +2 -2
  184. package/docs/interfaces/PoolData.html +2 -2
  185. package/docs/interfaces/PoolWeightDistribution.html +2 -2
  186. package/docs/interfaces/RebalanceHistoryType.html +2 -2
  187. package/docs/modules.html +1 -1
  188. package/docs/types/AfterTransactionEventNode.html +1 -1
  189. package/docs/types/AirdropClaimEventNode.html +1 -1
  190. package/docs/types/Allocator.html +2 -2
  191. package/docs/types/AlphaFiDoubleAssetVault.html +2 -2
  192. package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
  193. package/docs/types/AlphaFiSingleAssetVault.html +2 -2
  194. package/docs/types/AlphaFiVault.html +1 -1
  195. package/docs/types/AlphaFiVaultBalance.html +1 -1
  196. package/docs/types/AlphaLendInvestor.html +1 -1
  197. package/docs/types/AlphaPoolType.html +2 -2
  198. package/docs/types/AlphaReceipt.html +2 -2
  199. package/docs/types/AlphaReceiptFields.html +2 -2
  200. package/docs/types/AlphaVaultBalance.html +2 -2
  201. package/docs/types/AutoBalancePoolNames.html +1 -1
  202. package/docs/types/AutoCompoundingEventNode.html +1 -1
  203. package/docs/types/BluefinInvestor.html +1 -1
  204. package/docs/types/BluefinLyfInvestor.html +1 -1
  205. package/docs/types/BluefinPoolType.html +2 -2
  206. package/docs/types/BucketInvestor.html +2 -2
  207. package/docs/types/CetusInvestor.html +2 -2
  208. package/docs/types/CetusPoolType.html +2 -2
  209. package/docs/types/CetusSwapOptions.html +1 -1
  210. package/docs/types/CoinAmounts.html +2 -2
  211. package/docs/types/CoinName.html +1 -1
  212. package/docs/types/CoinType.html +1 -1
  213. package/docs/types/CommonInvestorFields.html +2 -2
  214. package/docs/types/CreatePoolOptions.html +2 -2
  215. package/docs/types/Distributor.html +2 -2
  216. package/docs/types/DoubleAssetMultiVaultBalance.html +2 -2
  217. package/docs/types/DoubleAssetPoolNames.html +1 -1
  218. package/docs/types/DoubleAssetTokenHoldings.html +2 -2
  219. package/docs/types/DoubleAssetVaultBalance.html +2 -2
  220. package/docs/types/EventCategory.html +1 -1
  221. package/docs/types/EventNode.html +1 -1
  222. package/docs/types/GetHoldersParams.html +2 -2
  223. package/docs/types/GetTokenHoldingsParams.html +2 -2
  224. package/docs/types/GetUserTokensFromTransactionsParams.html +2 -2
  225. package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +2 -2
  226. package/docs/types/GetVaultBalanceParams.html +1 -1
  227. package/docs/types/HoldingsObj.html +2 -2
  228. package/docs/types/Icon.html +1 -1
  229. package/docs/types/Investor.html +1 -1
  230. package/docs/types/LiquidityChangeEventNode.html +1 -1
  231. package/docs/types/LiquidityToTokensParams.html +2 -2
  232. package/docs/types/LiquidityToUsdParams.html +2 -2
  233. package/docs/types/LoopingDebt.html +2 -2
  234. package/docs/types/LoopingPoolNames.html +1 -1
  235. package/docs/types/LpBreakdownType.html +2 -2
  236. package/docs/types/MemberPoolDataType.html +2 -2
  237. package/docs/types/MemberType.html +2 -2
  238. package/docs/types/MultiGetVaultBalancesParams.html +2 -2
  239. package/docs/types/NaviInvestor.html +2 -2
  240. package/docs/types/OtherReceiptFields.html +2 -2
  241. package/docs/types/PoolName.html +1 -1
  242. package/docs/types/PoolReceipt.html +1 -1
  243. package/docs/types/PoolType.html +2 -2
  244. package/docs/types/Receipt.html +2 -2
  245. package/docs/types/ReceiptGQL.html +2 -2
  246. package/docs/types/SingleAssetMultiVaultBalance.html +2 -2
  247. package/docs/types/SingleAssetPoolNames.html +1 -1
  248. package/docs/types/SingleAssetTokenHoldings.html +2 -2
  249. package/docs/types/SingleAssetVaultBalance.html +2 -2
  250. package/docs/types/SingleGetVaultBalancesParams.html +2 -2
  251. package/docs/types/StrategyType.html +1 -1
  252. package/docs/types/SuiNetwork.html +1 -1
  253. package/docs/types/SwapOptions.html +1 -1
  254. package/docs/types/TickSpacing.html +1 -1
  255. package/docs/types/TotalWeightType.html +2 -2
  256. package/docs/types/TransactionBlockType.html +2 -2
  257. package/docs/types/UserPoolLiquidity.html +2 -2
  258. package/docs/types/UserPoolTokenHoldings.html +1 -1
  259. package/docs/types/UserUsdHoldings.html +2 -2
  260. package/docs/types/VaultBalance.html +1 -1
  261. package/docs/types/VoteCastEvent.html +1 -1
  262. package/docs/types/WithdrawV2EventNode.html +1 -1
  263. package/docs/variables/AUTOBALANCE_SUI_FIRST_POOLS.html +1 -1
  264. package/docs/variables/AUTOBALANCE_SUI_SECOND_POOLS.html +1 -1
  265. package/docs/variables/AUTOBALANCE_TYPE_1_POOLS.html +1 -1
  266. package/docs/variables/alphalendMarketIdMap.html +1 -1
  267. package/docs/variables/bluefinPoolMap.html +1 -1
  268. package/docs/variables/cetusPoolMap.html +1 -1
  269. package/docs/variables/coinsList.html +1 -1
  270. package/docs/variables/defunctPoolsSet.html +1 -1
  271. package/docs/variables/doubleAssetPoolCoinMap.html +1 -1
  272. package/docs/variables/eventCategories.html +1 -1
  273. package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -1
  274. package/docs/variables/loopingAccountAddresses.html +1 -1
  275. package/docs/variables/loopingPoolCoinMap.html +1 -1
  276. package/docs/variables/naviAssetMap.html +1 -1
  277. package/docs/variables/poolIdPoolNameMap.html +1 -1
  278. package/docs/variables/poolInfo.html +1 -1
  279. package/docs/variables/singleAssetPoolCoinMap.html +1 -1
  280. package/docs/variables/stableCoins.html +1 -1
  281. package/package.json +5 -4
  282. package/scripts/testRun.ts +1 -4
  283. package/#package.json# +0 -98
  284. package/FETCH_OVERRIDE_FIX.md +0 -222
@@ -1 +1 @@
1
- {"version":3,"file":"navi.d.ts","sourceRoot":"","sources":["../../../src/transactions/navi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAYvD,OAAO,EAAE,QAAQ,EAAW,MAAM,oBAAoB,CAAC;AAOvD,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,WAAW,CAAC,CAuhDtB;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,WAAW,CAAC,CAi+CtB"}
1
+ {"version":3,"file":"navi.d.ts","sourceRoot":"","sources":["../../../src/transactions/navi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAYvD,OAAO,EAAE,QAAQ,EAAW,MAAM,oBAAoB,CAAC;AAOvD,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,WAAW,CAAC,CAwhDtB;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,WAAW,CAAC,CAk+CtB"}
@@ -14,7 +14,7 @@ export async function naviDepositTx(amount, poolName, options) {
14
14
  poolName = poolName.toUpperCase();
15
15
  const poolData = poolInfo[poolName];
16
16
  const receipt = await getReceipts(poolName, address, true);
17
- updateSingleTokenPrice(naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].pythPriceInfo, naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].feedId, txb);
17
+ await updateSingleTokenPrice(getSuiClient(), naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].pythPriceInfo, naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].feedId, txb);
18
18
  if (singleAssetPoolCoinMap[poolName].coin == "SUI") {
19
19
  let someReceipt;
20
20
  if (receipt.length == 0) {
@@ -1335,7 +1335,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
1335
1335
  arguments: [txb.object(alphaReceipt[0].objectId)],
1336
1336
  });
1337
1337
  }
1338
- updateSingleTokenPrice(naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].pythPriceInfo, naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].feedId, txb);
1338
+ await updateSingleTokenPrice(getSuiClient(), naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].pythPriceInfo, naviPriceFeedMap[singleAssetPoolCoinMap[poolName].coin].feedId, txb);
1339
1339
  if (singleAssetPoolCoinMap[poolName].coin == "SUI") {
1340
1340
  const claimableRewards = await getAvailableRewards(getConf().NAVI_SUI_ACCOUNT_ADDRESS);
1341
1341
  if (claimableRewards) {