@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.
- package/dist/cjs/common/constants.d.ts +36 -0
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +29 -2
- package/dist/cjs/common/constants.js.map +1 -1
- package/dist/cjs/common/maps.d.ts.map +1 -1
- package/dist/cjs/common/maps.js +23 -0
- package/dist/cjs/common/maps.js.map +1 -1
- package/dist/cjs/common/types.d.ts +1 -1
- package/dist/cjs/common/types.d.ts.map +1 -1
- package/dist/cjs/common/types.js.map +1 -1
- package/dist/cjs/transactions/alphalend.d.ts.map +1 -1
- package/dist/cjs/transactions/alphalend.js +4 -3
- package/dist/cjs/transactions/alphalend.js.map +1 -1
- package/dist/cjs/transactions/navi.d.ts.map +1 -1
- package/dist/cjs/transactions/navi.js +49 -17
- package/dist/cjs/transactions/navi.js.map +1 -1
- package/dist/esm/common/constants.d.ts +36 -0
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +29 -2
- package/dist/esm/common/constants.js.map +1 -1
- package/dist/esm/common/maps.d.ts.map +1 -1
- package/dist/esm/common/maps.js +23 -0
- package/dist/esm/common/maps.js.map +1 -1
- package/dist/esm/common/types.d.ts +1 -1
- package/dist/esm/common/types.d.ts.map +1 -1
- package/dist/esm/common/types.js.map +1 -1
- package/dist/esm/transactions/alphalend.d.ts.map +1 -1
- package/dist/esm/transactions/alphalend.js +4 -3
- package/dist/esm/transactions/alphalend.js.map +1 -1
- package/dist/esm/transactions/navi.d.ts.map +1 -1
- package/dist/esm/transactions/navi.js +49 -17
- package/dist/esm/transactions/navi.js.map +1 -1
- package/docs/functions/alphaLpBreakdown.html +1 -1
- package/docs/functions/cetusLpBreakdown.html +1 -1
- package/docs/functions/claimRewardTxb.html +1 -1
- package/docs/functions/claimRewardsTxb.html +1 -1
- package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
- package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
- package/docs/functions/coinsInPool.html +1 -1
- package/docs/functions/collectAndSwapRewardsSingleLoop.html +1 -1
- package/docs/functions/collectRewardTxb.html +1 -1
- package/docs/functions/collectRewards.html +1 -1
- package/docs/functions/deposit.html +1 -1
- package/docs/functions/depositDoubleAssetTxb.html +1 -1
- package/docs/functions/depositSingleAssetTxb.html +1 -1
- package/docs/functions/fetchAfterTransactionEvents.html +1 -1
- package/docs/functions/fetchAirdropClaimEvents.html +1 -1
- package/docs/functions/fetchAutoCompoundingEvents.html +1 -1
- package/docs/functions/fetchAutoCompoundingEventsGql.html +1 -1
- package/docs/functions/fetchCetusPools.html +1 -1
- package/docs/functions/fetchChainIdentifier.html +1 -1
- package/docs/functions/fetchCheckRatioEvents.html +1 -1
- package/docs/functions/fetchEvents.html +1 -1
- package/docs/functions/fetchLiquidityChangeEvents.html +1 -1
- package/docs/functions/fetchMultiCategoryEvents.html +1 -1
- package/docs/functions/fetchMultiReceipts.html +1 -1
- package/docs/functions/fetchNftHolders.html +1 -1
- package/docs/functions/fetchPools.html +1 -1
- package/docs/functions/fetchPortfolioData.html +1 -1
- package/docs/functions/fetchProtocolData.html +1 -1
- package/docs/functions/fetchRequiredPrices.html +1 -1
- package/docs/functions/fetchTVL.html +1 -1
- package/docs/functions/fetchTransactions.html +1 -1
- package/docs/functions/fetchUserVaultBalances.html +1 -1
- package/docs/functions/fetchUserVaults.html +1 -1
- package/docs/functions/fetchUserWalletData.html +1 -1
- package/docs/functions/fetchVoloExchangeRate.html +1 -1
- package/docs/functions/fetchWithdrawV2Events.html +1 -1
- package/docs/functions/getAirdropShare.html +1 -1
- package/docs/functions/getAllDoubleAssetVaults.html +1 -1
- package/docs/functions/getAllSingleAssetVaults.html +1 -1
- package/docs/functions/getAllVaultBalances.html +1 -1
- package/docs/functions/getAllVaults.html +1 -1
- package/docs/functions/getAlphaUnlocks.html +1 -1
- package/docs/functions/getAlphaVaultBalance.html +1 -1
- package/docs/functions/getAmounts.html +1 -1
- package/docs/functions/getApr.html +1 -1
- package/docs/functions/getAprs.html +1 -1
- package/docs/functions/getApy.html +1 -1
- package/docs/functions/getApys.html +1 -1
- package/docs/functions/getCetusInvestorTicksMap.html +1 -1
- package/docs/functions/getCetusPool.html +1 -1
- package/docs/functions/getCetusSqrtPriceMap.html +1 -1
- package/docs/functions/getCoinAmountsFromLiquidity.html +1 -1
- package/docs/functions/getConf.html +1 -1
- package/docs/functions/getCurrentTick.html +1 -1
- package/docs/functions/getDistributor.html +1 -1
- package/docs/functions/getDoubleAssetVaultBalance.html +1 -1
- package/docs/functions/getDoubleAssetVaults.html +1 -1
- package/docs/functions/getInvestor.html +1 -1
- package/docs/functions/getInvestorPoolMap.html +1 -1
- package/docs/functions/getLastAutoCompoundTime.html +1 -1
- package/docs/functions/getLatestPrices.html +1 -1
- package/docs/functions/getLiquidity.html +1 -1
- package/docs/functions/getMultiCetusPool.html +1 -1
- package/docs/functions/getMultiInvestor.html +1 -1
- package/docs/functions/getMultiLatestPrices.html +1 -1
- package/docs/functions/getMultiParentPool.html +1 -1
- package/docs/functions/getMultiPool.html +1 -1
- package/docs/functions/getMultiReceipts.html +1 -1
- package/docs/functions/getParentPool.html +1 -1
- package/docs/functions/getPool.html +1 -1
- package/docs/functions/getPoolExchangeRate.html +1 -1
- package/docs/functions/getPoolExchangeRateMap.html +1 -1
- package/docs/functions/getPoolsWeightDistribution.html +1 -1
- package/docs/functions/getPositionRange.html +1 -1
- package/docs/functions/getPositionRanges.html +1 -1
- package/docs/functions/getPositionTicks.html +1 -1
- package/docs/functions/getPriceToTick.html +1 -1
- package/docs/functions/getRebalanceHistories.html +1 -1
- package/docs/functions/getRebalanceHistory.html +1 -1
- package/docs/functions/getReceipts.html +1 -1
- package/docs/functions/getSingleAssetVaultBalance.html +1 -1
- package/docs/functions/getSingleAssetVaults.html +1 -1
- package/docs/functions/getSuiClient.html +2 -2
- package/docs/functions/getSuiNodeUrl.html +2 -2
- package/docs/functions/getTVLs-1.html +1 -1
- package/docs/functions/getTickSpacing.html +1 -1
- package/docs/functions/getTickToPrice.html +1 -1
- package/docs/functions/getTvls.html +1 -1
- package/docs/functions/getVaultBalance.html +1 -1
- package/docs/functions/getVaults.html +1 -1
- package/docs/functions/lastAutocompoundTime.html +1 -1
- package/docs/functions/liquidityToTokens.html +1 -1
- package/docs/functions/migrateBoostedToLoop.html +1 -1
- package/docs/functions/multiLiquidityToTokens.html +1 -1
- package/docs/functions/multiTokensToUsd.html +1 -1
- package/docs/functions/multiXTokensToLiquidity.html +1 -1
- package/docs/functions/parseUserWalletData.html +1 -1
- package/docs/functions/pendingRewardAmount.html +1 -1
- package/docs/functions/setCustomSuiClient.html +2 -2
- package/docs/functions/setSuiClient.html +2 -2
- package/docs/functions/setSuiNodeUrl.html +2 -2
- package/docs/functions/setWeights.html +1 -1
- package/docs/functions/withdraw.html +1 -1
- package/docs/functions/withdrawAlphaTxb.html +1 -1
- package/docs/functions/withdrawTxb.html +1 -1
- package/docs/functions/zapDepositQuoteTxb.html +1 -1
- package/docs/functions/zapDepositTxb.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/index.html +2 -2
- package/docs/interfaces/Coin.html +6 -6
- package/docs/interfaces/CoinPair.html +2 -2
- package/docs/interfaces/CommonEventAttributes.html +2 -2
- package/docs/interfaces/NaviVoloData.html +2 -2
- package/docs/interfaces/PoolData.html +2 -2
- package/docs/interfaces/PoolWeightDistribution.html +2 -2
- package/docs/interfaces/RebalanceHistoryType.html +2 -2
- package/docs/modules.html +1 -1
- package/docs/types/AfterTransactionEventNode.html +1 -1
- package/docs/types/AirdropClaimEventNode.html +1 -1
- package/docs/types/Allocator.html +2 -2
- package/docs/types/AlphaFiDoubleAssetVault.html +2 -2
- package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
- package/docs/types/AlphaFiSingleAssetVault.html +2 -2
- package/docs/types/AlphaFiVault.html +1 -1
- package/docs/types/AlphaFiVaultBalance.html +1 -1
- package/docs/types/AlphaLendInvestor.html +1 -1
- package/docs/types/AlphaPoolType.html +2 -2
- package/docs/types/AlphaReceipt.html +2 -2
- package/docs/types/AlphaReceiptFields.html +2 -2
- package/docs/types/AlphaVaultBalance.html +2 -2
- package/docs/types/AutoBalancePoolNames.html +1 -1
- package/docs/types/AutoCompoundingEventNode.html +1 -1
- package/docs/types/BluefinInvestor.html +1 -1
- package/docs/types/BluefinPoolType.html +2 -2
- package/docs/types/BucketInvestor.html +2 -2
- package/docs/types/CetusInvestor.html +2 -2
- package/docs/types/CetusPoolType.html +2 -2
- package/docs/types/CetusSwapOptions.html +1 -1
- package/docs/types/CoinAmounts.html +2 -2
- package/docs/types/CoinName.html +1 -1
- package/docs/types/CoinType.html +1 -1
- package/docs/types/CommonInvestorFields.html +2 -2
- package/docs/types/CreatePoolOptions.html +2 -2
- package/docs/types/Distributor.html +2 -2
- package/docs/types/DoubleAssetMultiVaultBalance.html +2 -2
- package/docs/types/DoubleAssetPoolNames.html +1 -1
- package/docs/types/DoubleAssetTokenHoldings.html +2 -2
- package/docs/types/DoubleAssetVaultBalance.html +2 -2
- package/docs/types/EventCategory.html +1 -1
- package/docs/types/EventNode.html +1 -1
- package/docs/types/GetHoldersParams.html +2 -2
- package/docs/types/GetTokenHoldingsParams.html +2 -2
- package/docs/types/GetUserTokensFromTransactionsParams.html +2 -2
- package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +2 -2
- package/docs/types/GetVaultBalanceParams.html +1 -1
- package/docs/types/HoldingsObj.html +2 -2
- package/docs/types/Icon.html +1 -1
- package/docs/types/Investor.html +1 -1
- package/docs/types/LiquidityChangeEventNode.html +1 -1
- package/docs/types/LiquidityToTokensParams.html +2 -2
- package/docs/types/LiquidityToUsdParams.html +2 -2
- package/docs/types/LoopingDebt.html +2 -2
- package/docs/types/LoopingPoolNames.html +1 -1
- package/docs/types/LpBreakdownType.html +2 -2
- package/docs/types/MemberPoolDataType.html +2 -2
- package/docs/types/MemberType.html +2 -2
- package/docs/types/MultiGetVaultBalancesParams.html +2 -2
- package/docs/types/NaviInvestor.html +2 -2
- package/docs/types/OtherReceiptFields.html +2 -2
- package/docs/types/PoolName.html +1 -1
- package/docs/types/PoolReceipt.html +1 -1
- package/docs/types/PoolType.html +2 -2
- package/docs/types/Receipt.html +2 -2
- package/docs/types/ReceiptGQL.html +2 -2
- package/docs/types/SingleAssetMultiVaultBalance.html +2 -2
- package/docs/types/SingleAssetPoolNames.html +1 -1
- package/docs/types/SingleAssetTokenHoldings.html +2 -2
- package/docs/types/SingleAssetVaultBalance.html +2 -2
- package/docs/types/SingleGetVaultBalancesParams.html +2 -2
- package/docs/types/StrategyType.html +1 -1
- package/docs/types/SuiNetwork.html +1 -1
- package/docs/types/SwapOptions.html +1 -1
- package/docs/types/TickSpacing.html +1 -1
- package/docs/types/TotalWeightType.html +2 -2
- package/docs/types/TransactionBlockType.html +2 -2
- package/docs/types/UserPoolLiquidity.html +2 -2
- package/docs/types/UserPoolTokenHoldings.html +1 -1
- package/docs/types/UserUsdHoldings.html +2 -2
- package/docs/types/VaultBalance.html +1 -1
- package/docs/types/VoteCastEvent.html +1 -1
- package/docs/types/WithdrawV2EventNode.html +1 -1
- package/docs/variables/AUTOBALANCE_SUI_FIRST_POOLS.html +1 -1
- package/docs/variables/AUTOBALANCE_SUI_SECOND_POOLS.html +1 -1
- package/docs/variables/AUTOBALANCE_TYPE_1_POOLS.html +1 -1
- package/docs/variables/alphalendMarketIdMap.html +1 -1
- package/docs/variables/bluefinPoolMap.html +1 -1
- package/docs/variables/cetusPoolMap.html +1 -1
- package/docs/variables/coinsList.html +1 -1
- package/docs/variables/defunctPoolsSet.html +1 -1
- package/docs/variables/doubleAssetPoolCoinMap.html +1 -1
- package/docs/variables/eventCategories.html +1 -1
- package/docs/variables/ignoredWalletsForDailyRevenue.html +1 -1
- package/docs/variables/loopingAccountAddresses.html +1 -1
- package/docs/variables/loopingPoolCoinMap.html +1 -1
- package/docs/variables/naviAssetMap.html +1 -1
- package/docs/variables/poolIdPoolNameMap.html +1 -1
- package/docs/variables/poolInfo.html +1 -1
- package/docs/variables/singleAssetPoolCoinMap.html +1 -1
- package/docs/variables/stableCoins.html +1 -1
- 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
|
|
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`,
|