@alphafi/alphafi-sdk 0.0.101 → 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.
- package/#package.json# +98 -0
- package/FETCH_OVERRIDE_FIX.md +222 -0
- package/dist/cjs/adminFunctions.d.ts +8 -0
- package/dist/cjs/adminFunctions.d.ts.map +1 -1
- package/dist/cjs/adminFunctions.js +121 -1
- package/dist/cjs/adminFunctions.js.map +1 -1
- package/dist/cjs/common/constants.d.ts +79 -0
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +130 -35
- 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 +72 -4
- package/dist/cjs/common/maps.js.map +1 -1
- package/dist/cjs/common/types.d.ts +76 -26
- package/dist/cjs/common/types.d.ts.map +1 -1
- package/dist/cjs/common/types.js.map +1 -1
- package/dist/cjs/getAprs.d.ts.map +1 -1
- package/dist/cjs/getAprs.js +0 -27
- package/dist/cjs/getAprs.js.map +1 -1
- package/dist/cjs/graphql/getMultiReceipts.js +1 -1
- package/dist/cjs/graphql/getMultiReceipts.js.map +1 -1
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +13 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js +7 -1
- package/dist/cjs/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
- package/dist/cjs/sui-sdk/functions/getReceipts.d.ts +4 -0
- package/dist/cjs/sui-sdk/functions/getReceipts.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/functions/getReceipts.js +31 -15
- package/dist/cjs/sui-sdk/functions/getReceipts.js.map +1 -1
- package/dist/cjs/transactions/7k.js +1 -1
- package/dist/cjs/transactions/7k.js.map +1 -1
- package/dist/cjs/transactions/alphaVault.d.ts +26 -0
- package/dist/cjs/transactions/alphaVault.d.ts.map +1 -0
- package/dist/cjs/transactions/alphaVault.js +385 -0
- package/dist/cjs/transactions/alphaVault.js.map +1 -0
- package/dist/cjs/transactions/alphalend.d.ts.map +1 -1
- package/dist/cjs/transactions/alphalend.js +10 -32
- package/dist/cjs/transactions/alphalend.js.map +1 -1
- package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
- package/dist/cjs/transactions/bluefin.js +68 -83
- package/dist/cjs/transactions/bluefin.js.map +1 -1
- package/dist/cjs/transactions/bucket.d.ts.map +1 -1
- package/dist/cjs/transactions/bucket.js +5 -16
- package/dist/cjs/transactions/bucket.js.map +1 -1
- package/dist/cjs/transactions/cetus.d.ts.map +1 -1
- package/dist/cjs/transactions/cetus.js +17 -50
- package/dist/cjs/transactions/cetus.js.map +1 -1
- package/dist/cjs/transactions/collect_rewards.d.ts +1 -0
- package/dist/cjs/transactions/collect_rewards.d.ts.map +1 -1
- package/dist/cjs/transactions/collect_rewards.js +145 -40
- package/dist/cjs/transactions/collect_rewards.js.map +1 -1
- package/dist/cjs/transactions/deposit.d.ts.map +1 -1
- package/dist/cjs/transactions/deposit.js +4 -0
- package/dist/cjs/transactions/deposit.js.map +1 -1
- package/dist/cjs/transactions/navi-looping.d.ts +11 -11
- package/dist/cjs/transactions/navi-looping.d.ts.map +1 -1
- package/dist/cjs/transactions/navi-looping.js +65 -138
- package/dist/cjs/transactions/navi-looping.js.map +1 -1
- package/dist/cjs/transactions/navi.d.ts.map +1 -1
- package/dist/cjs/transactions/navi.js +63 -108
- package/dist/cjs/transactions/navi.js.map +1 -1
- package/dist/cjs/transactions/naviOracle.d.ts +2 -1
- package/dist/cjs/transactions/naviOracle.d.ts.map +1 -1
- package/dist/cjs/transactions/naviOracle.js +11 -2
- package/dist/cjs/transactions/naviOracle.js.map +1 -1
- package/dist/cjs/transactions/slush.d.ts +12 -0
- package/dist/cjs/transactions/slush.d.ts.map +1 -0
- package/dist/cjs/transactions/slush.js +143 -0
- package/dist/cjs/transactions/slush.js.map +1 -0
- package/dist/cjs/transactions/withdraw.d.ts.map +1 -1
- package/dist/cjs/transactions/withdraw.js +14 -2
- package/dist/cjs/transactions/withdraw.js.map +1 -1
- package/dist/cjs/transactions/zapDeposit.js +4 -4
- package/dist/cjs/transactions/zapDeposit.js.map +1 -1
- package/dist/esm/adminFunctions.d.ts +8 -0
- package/dist/esm/adminFunctions.d.ts.map +1 -1
- package/dist/esm/adminFunctions.js +119 -3
- package/dist/esm/adminFunctions.js.map +1 -1
- package/dist/esm/common/constants.d.ts +79 -0
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +130 -35
- 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 +72 -4
- package/dist/esm/common/maps.js.map +1 -1
- package/dist/esm/common/types.d.ts +76 -26
- package/dist/esm/common/types.d.ts.map +1 -1
- package/dist/esm/common/types.js.map +1 -1
- package/dist/esm/getAprs.d.ts.map +1 -1
- package/dist/esm/getAprs.js +0 -27
- package/dist/esm/getAprs.js.map +1 -1
- package/dist/esm/graphql/getMultiReceipts.js +1 -1
- package/dist/esm/graphql/getMultiReceipts.js.map +1 -1
- package/dist/esm/index.d.ts +3 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +3 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sui-sdk/functions/getPortfolioAmounts.d.ts.map +1 -1
- package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js +7 -1
- package/dist/esm/sui-sdk/functions/getPortfolioAmounts.js.map +1 -1
- package/dist/esm/sui-sdk/functions/getReceipts.d.ts +4 -0
- package/dist/esm/sui-sdk/functions/getReceipts.d.ts.map +1 -1
- package/dist/esm/sui-sdk/functions/getReceipts.js +31 -15
- package/dist/esm/sui-sdk/functions/getReceipts.js.map +1 -1
- package/dist/esm/transactions/7k.js +1 -1
- package/dist/esm/transactions/7k.js.map +1 -1
- package/dist/esm/transactions/alphaVault.d.ts +26 -0
- package/dist/esm/transactions/alphaVault.d.ts.map +1 -0
- package/dist/esm/transactions/alphaVault.js +377 -0
- package/dist/esm/transactions/alphaVault.js.map +1 -0
- package/dist/esm/transactions/alphalend.d.ts.map +1 -1
- package/dist/esm/transactions/alphalend.js +10 -32
- package/dist/esm/transactions/alphalend.js.map +1 -1
- package/dist/esm/transactions/bluefin.d.ts.map +1 -1
- package/dist/esm/transactions/bluefin.js +68 -83
- package/dist/esm/transactions/bluefin.js.map +1 -1
- package/dist/esm/transactions/bucket.d.ts.map +1 -1
- package/dist/esm/transactions/bucket.js +5 -16
- package/dist/esm/transactions/bucket.js.map +1 -1
- package/dist/esm/transactions/cetus.d.ts.map +1 -1
- package/dist/esm/transactions/cetus.js +17 -50
- package/dist/esm/transactions/cetus.js.map +1 -1
- package/dist/esm/transactions/collect_rewards.d.ts +1 -0
- package/dist/esm/transactions/collect_rewards.d.ts.map +1 -1
- package/dist/esm/transactions/collect_rewards.js +144 -40
- package/dist/esm/transactions/collect_rewards.js.map +1 -1
- package/dist/esm/transactions/deposit.d.ts.map +1 -1
- package/dist/esm/transactions/deposit.js +4 -0
- package/dist/esm/transactions/deposit.js.map +1 -1
- package/dist/esm/transactions/navi-looping.d.ts +11 -11
- package/dist/esm/transactions/navi-looping.d.ts.map +1 -1
- package/dist/esm/transactions/navi-looping.js +65 -138
- package/dist/esm/transactions/navi-looping.js.map +1 -1
- package/dist/esm/transactions/navi.d.ts.map +1 -1
- package/dist/esm/transactions/navi.js +63 -108
- package/dist/esm/transactions/navi.js.map +1 -1
- package/dist/esm/transactions/naviOracle.d.ts +2 -1
- package/dist/esm/transactions/naviOracle.d.ts.map +1 -1
- package/dist/esm/transactions/naviOracle.js +11 -2
- package/dist/esm/transactions/naviOracle.js.map +1 -1
- package/dist/esm/transactions/slush.d.ts +12 -0
- package/dist/esm/transactions/slush.d.ts.map +1 -0
- package/dist/esm/transactions/slush.js +137 -0
- package/dist/esm/transactions/slush.js.map +1 -0
- package/dist/esm/transactions/withdraw.d.ts.map +1 -1
- package/dist/esm/transactions/withdraw.js +15 -3
- package/dist/esm/transactions/withdraw.js.map +1 -1
- package/dist/esm/transactions/zapDeposit.js +4 -4
- package/dist/esm/transactions/zapDeposit.js.map +1 -1
- package/docs/assets/highlight.css +1 -1
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/functions/addAirdropCoin.html +1 -0
- package/docs/functions/alphaLpBreakdown.html +1 -1
- package/docs/functions/cetusLpBreakdown.html +1 -1
- package/docs/functions/claimAirdropTx.html +1 -0
- package/docs/functions/claimRewardTxb.html +1 -1
- package/docs/functions/claimRewardsTxb.html +1 -1
- package/docs/functions/claimWithdrawAlphaTx.html +1 -0
- package/docs/functions/coinAmountToXTokensDoubleAsset.html +1 -1
- package/docs/functions/coinAmountToXTokensSingleAsset.html +1 -1
- package/docs/functions/coinsInPool.html +1 -1
- package/docs/functions/collectAndSwapRewardsLyf.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/collectRewardsAndSwapSlush.html +1 -0
- package/docs/functions/collectUnsuppliedBalance.html +1 -0
- package/docs/functions/deposit.html +1 -1
- package/docs/functions/depositAlphaTx.html +1 -0
- 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/getSlushUserTotalXtokens.html +1 -0
- 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/getWithdrawRequestAndUnsuppliedAmounts.html +1 -0
- package/docs/functions/initiateWithdrawAlpha.html +1 -0
- 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/processWithdrawRequestsManual.html +1 -0
- package/docs/functions/setCustomSuiClient.html +3 -3
- package/docs/functions/setSuiClient.html +2 -2
- package/docs/functions/setSuiNodeUrl.html +2 -2
- package/docs/functions/setWeights.html +1 -1
- package/docs/functions/slushDeposit.html +1 -0
- package/docs/functions/slushWithdraw.html +1 -0
- 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 +19 -19
- 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/Bag.html +3 -0
- package/docs/types/BluefinInvestor.html +1 -1
- package/docs/types/BluefinLyfInvestor.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/ObjectTable.html +1 -0
- 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/VecMap.html +3 -0
- 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 +6 -4
|
@@ -3,27 +3,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.claimRewardTxb = claimRewardTxb;
|
|
4
4
|
exports.collectAndSwapRewardsSingleLoop = collectAndSwapRewardsSingleLoop;
|
|
5
5
|
exports.collectAndSwapRewardsLyf = collectAndSwapRewardsLyf;
|
|
6
|
+
exports.collectRewardsAndSwapSlush = collectRewardsAndSwapSlush;
|
|
6
7
|
const transactions_1 = require("@mysten/sui/transactions");
|
|
7
8
|
const index_js_1 = require("../index.js");
|
|
8
9
|
async function claimRewardTxb(address) {
|
|
9
10
|
const txb = new transactions_1.Transaction();
|
|
10
11
|
await (0, index_js_1.getMultiReceipts)(address);
|
|
11
|
-
const alphaReceipt = await (0, index_js_1.getReceipts)("ALPHA", address, false);
|
|
12
12
|
let alpha_receipt;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
else {
|
|
21
|
-
[alpha_receipt] = txb.moveCall({
|
|
22
|
-
target: `0x1::option::some`,
|
|
23
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
24
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
25
|
-
});
|
|
26
|
-
}
|
|
13
|
+
[alpha_receipt] = txb.moveCall({
|
|
14
|
+
target: `0x1::option::none`,
|
|
15
|
+
typeArguments: [(0, index_js_1.getConf)().ALPHA_POOL_RECEIPT],
|
|
16
|
+
arguments: [],
|
|
17
|
+
});
|
|
27
18
|
const keys = Object.keys(index_js_1.poolInfo);
|
|
28
19
|
for (const poolName of keys) {
|
|
29
20
|
if (index_js_1.poolInfo[poolName].poolId == "") {
|
|
@@ -45,7 +36,7 @@ async function claimRewardTxb(address) {
|
|
|
45
36
|
txb.object(receipt.objectId),
|
|
46
37
|
alpha_receipt,
|
|
47
38
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
48
|
-
txb.object(index_js_1.
|
|
39
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
49
40
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
50
41
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
51
42
|
],
|
|
@@ -69,7 +60,7 @@ async function claimRewardTxb(address) {
|
|
|
69
60
|
txb.object(receipt.objectId),
|
|
70
61
|
alpha_receipt,
|
|
71
62
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
72
|
-
txb.object(index_js_1.
|
|
63
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
73
64
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
74
65
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
75
66
|
],
|
|
@@ -88,7 +79,7 @@ async function claimRewardTxb(address) {
|
|
|
88
79
|
txb.object(receipt.objectId),
|
|
89
80
|
alpha_receipt,
|
|
90
81
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
91
|
-
txb.object(index_js_1.
|
|
82
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
92
83
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
93
84
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
94
85
|
],
|
|
@@ -105,7 +96,7 @@ async function claimRewardTxb(address) {
|
|
|
105
96
|
txb.object(receipt.objectId),
|
|
106
97
|
alpha_receipt,
|
|
107
98
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
108
|
-
txb.object(index_js_1.
|
|
99
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
109
100
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
110
101
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
111
102
|
],
|
|
@@ -133,7 +124,7 @@ async function claimRewardTxb(address) {
|
|
|
133
124
|
txb.object(receipt.objectId),
|
|
134
125
|
alpha_receipt,
|
|
135
126
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
136
|
-
txb.object(index_js_1.
|
|
127
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
137
128
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
138
129
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
139
130
|
],
|
|
@@ -156,7 +147,7 @@ async function claimRewardTxb(address) {
|
|
|
156
147
|
txb.object(receipt.objectId),
|
|
157
148
|
alpha_receipt,
|
|
158
149
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
159
|
-
txb.object(index_js_1.
|
|
150
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
160
151
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
161
152
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
162
153
|
],
|
|
@@ -176,7 +167,7 @@ async function claimRewardTxb(address) {
|
|
|
176
167
|
txb.object(receipt.objectId),
|
|
177
168
|
alpha_receipt,
|
|
178
169
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
179
|
-
txb.object(index_js_1.
|
|
170
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
180
171
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
181
172
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
182
173
|
],
|
|
@@ -196,7 +187,7 @@ async function claimRewardTxb(address) {
|
|
|
196
187
|
txb.object(receipt.objectId),
|
|
197
188
|
alpha_receipt,
|
|
198
189
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
199
|
-
txb.object(index_js_1.
|
|
190
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
200
191
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
201
192
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
202
193
|
],
|
|
@@ -214,7 +205,7 @@ async function claimRewardTxb(address) {
|
|
|
214
205
|
txb.object(receipt.objectId),
|
|
215
206
|
alpha_receipt,
|
|
216
207
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
217
|
-
txb.object(index_js_1.
|
|
208
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
218
209
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
219
210
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
220
211
|
],
|
|
@@ -236,7 +227,7 @@ async function claimRewardTxb(address) {
|
|
|
236
227
|
txb.object(receipt.objectId),
|
|
237
228
|
alpha_receipt,
|
|
238
229
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
239
|
-
txb.object(index_js_1.
|
|
230
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
240
231
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
241
232
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
242
233
|
],
|
|
@@ -255,7 +246,7 @@ async function claimRewardTxb(address) {
|
|
|
255
246
|
txb.object(receipt.objectId),
|
|
256
247
|
alpha_receipt,
|
|
257
248
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
258
|
-
txb.object(index_js_1.
|
|
249
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
259
250
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
260
251
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
261
252
|
],
|
|
@@ -278,7 +269,7 @@ async function claimRewardTxb(address) {
|
|
|
278
269
|
txb.object(receipt.objectId),
|
|
279
270
|
alpha_receipt,
|
|
280
271
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
281
|
-
txb.object(index_js_1.
|
|
272
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
282
273
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
283
274
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
284
275
|
],
|
|
@@ -295,7 +286,7 @@ async function claimRewardTxb(address) {
|
|
|
295
286
|
txb.object(receipt.objectId),
|
|
296
287
|
alpha_receipt,
|
|
297
288
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
298
|
-
txb.object(index_js_1.
|
|
289
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
299
290
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
300
291
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
301
292
|
],
|
|
@@ -319,7 +310,7 @@ async function claimRewardTxb(address) {
|
|
|
319
310
|
txb.object(receipt.objectId),
|
|
320
311
|
alpha_receipt,
|
|
321
312
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
322
|
-
txb.object(index_js_1.
|
|
313
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
323
314
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
324
315
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
325
316
|
],
|
|
@@ -336,7 +327,7 @@ async function claimRewardTxb(address) {
|
|
|
336
327
|
txb.object(receipt.objectId),
|
|
337
328
|
alpha_receipt,
|
|
338
329
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
339
|
-
txb.object(index_js_1.
|
|
330
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
340
331
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
341
332
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
342
333
|
],
|
|
@@ -353,7 +344,7 @@ async function claimRewardTxb(address) {
|
|
|
353
344
|
txb.object(receipt.objectId),
|
|
354
345
|
alpha_receipt,
|
|
355
346
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
356
|
-
txb.object(index_js_1.
|
|
347
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
357
348
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
358
349
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
359
350
|
],
|
|
@@ -370,7 +361,7 @@ async function claimRewardTxb(address) {
|
|
|
370
361
|
txb.object(receipt.objectId),
|
|
371
362
|
alpha_receipt,
|
|
372
363
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
373
|
-
txb.object(index_js_1.
|
|
364
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
374
365
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
375
366
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
376
367
|
],
|
|
@@ -409,7 +400,7 @@ async function claimRewardTxb(address) {
|
|
|
409
400
|
txb.object(receipt.objectId),
|
|
410
401
|
alpha_receipt,
|
|
411
402
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
412
|
-
txb.object(index_js_1.
|
|
403
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
413
404
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
414
405
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
415
406
|
],
|
|
@@ -429,7 +420,7 @@ async function claimRewardTxb(address) {
|
|
|
429
420
|
txb.object(receipt.objectId),
|
|
430
421
|
alpha_receipt,
|
|
431
422
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
432
|
-
txb.object(index_js_1.
|
|
423
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
433
424
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
434
425
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
435
426
|
],
|
|
@@ -446,7 +437,7 @@ async function claimRewardTxb(address) {
|
|
|
446
437
|
txb.object(receipt.objectId),
|
|
447
438
|
alpha_receipt,
|
|
448
439
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
449
|
-
txb.object(index_js_1.
|
|
440
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
450
441
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
451
442
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
452
443
|
],
|
|
@@ -482,7 +473,7 @@ async function claimRewardTxb(address) {
|
|
|
482
473
|
txb.object(receipt.objectId),
|
|
483
474
|
alpha_receipt,
|
|
484
475
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
485
|
-
txb.object(index_js_1.
|
|
476
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
486
477
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
487
478
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
488
479
|
],
|
|
@@ -502,7 +493,7 @@ async function claimRewardTxb(address) {
|
|
|
502
493
|
txb.object(receipt.objectId),
|
|
503
494
|
alpha_receipt,
|
|
504
495
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
505
|
-
txb.object(index_js_1.
|
|
496
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
506
497
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
507
498
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
508
499
|
],
|
|
@@ -524,7 +515,7 @@ async function claimRewardTxb(address) {
|
|
|
524
515
|
txb.object(receipt.objectId),
|
|
525
516
|
alpha_receipt,
|
|
526
517
|
txb.object(index_js_1.poolInfo[poolName].poolId),
|
|
527
|
-
txb.object(index_js_1.
|
|
518
|
+
txb.object((0, index_js_1.getConf)().ALPHA_POOL),
|
|
528
519
|
txb.object((0, index_js_1.getConf)().ALPHA_DISTRIBUTOR),
|
|
529
520
|
txb.object((0, index_js_1.getConf)().CLOCK_PACKAGE_ID),
|
|
530
521
|
],
|
|
@@ -628,7 +619,7 @@ async function collectAndSwapRewardsSingleLoop(poolName, tx) {
|
|
|
628
619
|
txb.object(C.ALPHA_ALPHALEND_VERSION),
|
|
629
620
|
txb.object(poolData.investorId),
|
|
630
621
|
txb.object(C.LENDING_PROTOCOL_ID),
|
|
631
|
-
txb.object(index_js_1.bluefinPoolMap[`SUI-USDC`]),
|
|
622
|
+
txb.object(index_js_1.bluefinPoolMap[`SUI-USDC-175`]),
|
|
632
623
|
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
633
624
|
txb.pure.bool(true),
|
|
634
625
|
txb.pure.bool(true),
|
|
@@ -794,7 +785,7 @@ async function collectAndSwapRewardsSingleLoop(poolName, tx) {
|
|
|
794
785
|
txb.object(C.ALPHA_ALPHALEND_VERSION),
|
|
795
786
|
txb.object(poolData.investorId),
|
|
796
787
|
txb.object(C.LENDING_PROTOCOL_ID),
|
|
797
|
-
txb.object(index_js_1.bluefinPoolMap[`SUI-USDC`]),
|
|
788
|
+
txb.object(index_js_1.bluefinPoolMap[`SUI-USDC-175`]),
|
|
798
789
|
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
799
790
|
txb.pure.bool(true),
|
|
800
791
|
txb.pure.bool(true),
|
|
@@ -900,4 +891,118 @@ async function collectAndSwapRewardsLyf(poolname, tx) {
|
|
|
900
891
|
}
|
|
901
892
|
return txb;
|
|
902
893
|
}
|
|
894
|
+
async function collectRewardsAndSwapSlush(poolName, tx) {
|
|
895
|
+
const txb = tx ? tx : new transactions_1.Transaction();
|
|
896
|
+
const C = (0, index_js_1.getConf)();
|
|
897
|
+
const poolData = index_js_1.poolInfo[poolName];
|
|
898
|
+
const coinName = index_js_1.singleAssetPoolCoinMap[poolName].coin;
|
|
899
|
+
const coinType = index_js_1.coinsList[coinName].type;
|
|
900
|
+
txb.moveCall({
|
|
901
|
+
target: `${C.ALPHA_SLUSH_LATEST_PACKAGE_ID}::alphalend_slush_pool::collect_reward_and_swap_bluefin`,
|
|
902
|
+
typeArguments: [coinType, index_js_1.coinsList["ALPHA"].type, index_js_1.coinsList["STSUI"].type],
|
|
903
|
+
arguments: [
|
|
904
|
+
txb.object(C.ALPHA_SLUSH_VERSION),
|
|
905
|
+
txb.object(poolData.poolId),
|
|
906
|
+
txb.object(C.LENDING_PROTOCOL_ID),
|
|
907
|
+
txb.object(index_js_1.bluefinPoolMap["ALPHA-STSUI"]),
|
|
908
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
909
|
+
txb.pure.bool(true),
|
|
910
|
+
txb.pure.bool(true),
|
|
911
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
912
|
+
],
|
|
913
|
+
});
|
|
914
|
+
txb.moveCall({
|
|
915
|
+
target: `${C.ALPHA_SLUSH_LATEST_PACKAGE_ID}::alphalend_slush_pool::collect_reward_and_swap_bluefin`,
|
|
916
|
+
typeArguments: [coinType, index_js_1.coinsList["STSUI"].type, index_js_1.coinsList["SUI"].type],
|
|
917
|
+
arguments: [
|
|
918
|
+
txb.object(C.ALPHA_SLUSH_VERSION),
|
|
919
|
+
txb.object(poolData.poolId),
|
|
920
|
+
txb.object(C.LENDING_PROTOCOL_ID),
|
|
921
|
+
txb.object(index_js_1.bluefinPoolMap["STSUI-SUI"]),
|
|
922
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
923
|
+
txb.pure.bool(true),
|
|
924
|
+
txb.pure.bool(true),
|
|
925
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
926
|
+
],
|
|
927
|
+
});
|
|
928
|
+
txb.moveCall({
|
|
929
|
+
target: `${C.ALPHA_SLUSH_LATEST_PACKAGE_ID}::alphalend_slush_pool::collect_reward_and_swap_bluefin`,
|
|
930
|
+
typeArguments: [coinType, index_js_1.coinsList["BLUE"].type, index_js_1.coinsList["SUI"].type],
|
|
931
|
+
arguments: [
|
|
932
|
+
txb.object(C.ALPHA_SLUSH_VERSION),
|
|
933
|
+
txb.object(poolData.poolId),
|
|
934
|
+
txb.object(C.LENDING_PROTOCOL_ID),
|
|
935
|
+
txb.object(index_js_1.bluefinPoolMap["BLUE-SUI"]),
|
|
936
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
937
|
+
txb.pure.bool(true),
|
|
938
|
+
txb.pure.bool(true),
|
|
939
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
940
|
+
],
|
|
941
|
+
});
|
|
942
|
+
if (coinType !== index_js_1.coinsList["DEEP"].type) {
|
|
943
|
+
txb.moveCall({
|
|
944
|
+
target: `${C.ALPHA_SLUSH_LATEST_PACKAGE_ID}::alphalend_slush_pool::collect_reward_and_swap_bluefin`,
|
|
945
|
+
typeArguments: [coinType, index_js_1.coinsList["DEEP"].type, index_js_1.coinsList["SUI"].type],
|
|
946
|
+
arguments: [
|
|
947
|
+
txb.object(C.ALPHA_SLUSH_VERSION),
|
|
948
|
+
txb.object(poolData.poolId),
|
|
949
|
+
txb.object(C.LENDING_PROTOCOL_ID),
|
|
950
|
+
txb.object(index_js_1.bluefinPoolMap["DEEP-SUI"]),
|
|
951
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
952
|
+
txb.pure.bool(true),
|
|
953
|
+
txb.pure.bool(true),
|
|
954
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
955
|
+
],
|
|
956
|
+
});
|
|
957
|
+
}
|
|
958
|
+
if (coinType === index_js_1.coinsList["USDC"].type) {
|
|
959
|
+
txb.moveCall({
|
|
960
|
+
target: `${C.ALPHA_SLUSH_LATEST_PACKAGE_ID}::alphalend_slush_pool::collect_reward_and_swap_bluefin`,
|
|
961
|
+
typeArguments: [coinType, index_js_1.coinsList["SUI"].type, coinType],
|
|
962
|
+
arguments: [
|
|
963
|
+
txb.object(C.ALPHA_SLUSH_VERSION),
|
|
964
|
+
txb.object(poolData.poolId),
|
|
965
|
+
txb.object(C.LENDING_PROTOCOL_ID),
|
|
966
|
+
txb.object(index_js_1.bluefinPoolMap["SUI-USDC"]),
|
|
967
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
968
|
+
txb.pure.bool(true),
|
|
969
|
+
txb.pure.bool(false),
|
|
970
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
971
|
+
],
|
|
972
|
+
});
|
|
973
|
+
}
|
|
974
|
+
else if (coinType === index_js_1.coinsList["WAL"].type) {
|
|
975
|
+
txb.moveCall({
|
|
976
|
+
target: `${C.ALPHA_SLUSH_LATEST_PACKAGE_ID}::alphalend_slush_pool::collect_reward_and_swap_bluefin`,
|
|
977
|
+
typeArguments: [coinType, index_js_1.coinsList["WAL"].type, index_js_1.coinsList["SUI"].type],
|
|
978
|
+
arguments: [
|
|
979
|
+
txb.object(C.ALPHA_SLUSH_VERSION),
|
|
980
|
+
txb.object(poolData.poolId),
|
|
981
|
+
txb.object(C.LENDING_PROTOCOL_ID),
|
|
982
|
+
txb.object(index_js_1.bluefinPoolMap["WAL-SUI"]),
|
|
983
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
984
|
+
txb.pure.bool(false),
|
|
985
|
+
txb.pure.bool(true),
|
|
986
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
987
|
+
],
|
|
988
|
+
});
|
|
989
|
+
}
|
|
990
|
+
else if (coinType === index_js_1.coinsList["DEEP"].type) {
|
|
991
|
+
txb.moveCall({
|
|
992
|
+
target: `${C.ALPHA_SLUSH_LATEST_PACKAGE_ID}::alphalend_slush_pool::collect_reward_and_swap_bluefin`,
|
|
993
|
+
typeArguments: [coinType, index_js_1.coinsList["DEEP"].type, index_js_1.coinsList["SUI"].type],
|
|
994
|
+
arguments: [
|
|
995
|
+
txb.object(C.ALPHA_SLUSH_VERSION),
|
|
996
|
+
txb.object(poolData.poolId),
|
|
997
|
+
txb.object(C.LENDING_PROTOCOL_ID),
|
|
998
|
+
txb.object(index_js_1.bluefinPoolMap["DEEP-SUI"]),
|
|
999
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
1000
|
+
txb.pure.bool(false),
|
|
1001
|
+
txb.pure.bool(true),
|
|
1002
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
1003
|
+
],
|
|
1004
|
+
});
|
|
1005
|
+
}
|
|
1006
|
+
return txb;
|
|
1007
|
+
}
|
|
903
1008
|
//# sourceMappingURL=collect_rewards.js.map
|