@alphafi/alphafi-sdk 0.0.102 → 0.0.103
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +97 -3
- package/dist/cjs/adminFunctions.js.map +1 -1
- package/dist/cjs/common/constants.d.ts +79 -10
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +108 -23
- 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/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/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 +30 -80
- 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 +143 -38
- 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 +61 -134
- 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 +61 -106
- package/dist/cjs/transactions/navi.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 +4 -0
- package/dist/cjs/transactions/withdraw.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 +95 -5
- package/dist/esm/adminFunctions.js.map +1 -1
- package/dist/esm/common/constants.d.ts +79 -10
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +108 -23
- 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/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/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 +30 -80
- 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 +142 -38
- 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 +61 -134
- 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 +61 -106
- package/dist/esm/transactions/navi.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 +4 -0
- package/dist/esm/transactions/withdraw.js.map +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 +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/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 +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/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 +2 -1
|
@@ -1511,6 +1511,11 @@ const getCoinObject = async (type, address, tx) => {
|
|
|
1511
1511
|
else {
|
|
1512
1512
|
txb = tx;
|
|
1513
1513
|
}
|
|
1514
|
+
if (type === "0x2::sui::SUI" ||
|
|
1515
|
+
type ===
|
|
1516
|
+
"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI") {
|
|
1517
|
+
return txb.gas;
|
|
1518
|
+
}
|
|
1514
1519
|
let coins1 = [];
|
|
1515
1520
|
let currentCursor = null;
|
|
1516
1521
|
do {
|
|
@@ -1621,7 +1626,6 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
1621
1626
|
const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
|
|
1622
1627
|
const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
|
|
1623
1628
|
const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
|
|
1624
|
-
const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
|
|
1625
1629
|
if (receipt.length > 0) {
|
|
1626
1630
|
const poolinfo = maps_js_1.poolInfo[poolName];
|
|
1627
1631
|
if (poolName.toString().includes("AUTOBALANCE")) {
|
|
@@ -1654,21 +1658,11 @@ const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) => {
|
|
|
1654
1658
|
}
|
|
1655
1659
|
}
|
|
1656
1660
|
else {
|
|
1657
|
-
let alpha_receipt
|
|
1658
|
-
|
|
1659
|
-
[
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
arguments: [],
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
else {
|
|
1666
|
-
[alpha_receipt] = txb.moveCall({
|
|
1667
|
-
target: `0x1::option::some`,
|
|
1668
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
1669
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
1670
|
-
});
|
|
1671
|
-
}
|
|
1661
|
+
let alpha_receipt = txb.moveCall({
|
|
1662
|
+
target: `0x1::option::none`,
|
|
1663
|
+
typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
|
|
1664
|
+
arguments: [],
|
|
1665
|
+
});
|
|
1672
1666
|
if (poolName === "BLUEFIN-SUI-USDC") {
|
|
1673
1667
|
txb.moveCall({
|
|
1674
1668
|
target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw_v2`,
|
|
@@ -1773,7 +1767,6 @@ const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) => {
|
|
|
1773
1767
|
const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
|
|
1774
1768
|
const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
|
|
1775
1769
|
const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
|
|
1776
|
-
const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
|
|
1777
1770
|
if (receipt.length > 0) {
|
|
1778
1771
|
const poolinfo = maps_js_1.poolInfo[poolName];
|
|
1779
1772
|
if (poolName.toString().includes("AUTOBALANCE")) {
|
|
@@ -1806,21 +1799,11 @@ const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) => {
|
|
|
1806
1799
|
}
|
|
1807
1800
|
}
|
|
1808
1801
|
else {
|
|
1809
|
-
let alpha_receipt
|
|
1810
|
-
|
|
1811
|
-
[
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
arguments: [],
|
|
1815
|
-
});
|
|
1816
|
-
}
|
|
1817
|
-
else {
|
|
1818
|
-
[alpha_receipt] = txb.moveCall({
|
|
1819
|
-
target: `0x1::option::some`,
|
|
1820
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
1821
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
1822
|
-
});
|
|
1823
|
-
}
|
|
1802
|
+
let alpha_receipt = txb.moveCall({
|
|
1803
|
+
target: `0x1::option::none`,
|
|
1804
|
+
typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
|
|
1805
|
+
arguments: [],
|
|
1806
|
+
});
|
|
1824
1807
|
if (poolName === "BLUEFIN-BLUE-SUI") {
|
|
1825
1808
|
txb.moveCall({
|
|
1826
1809
|
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw_v2`,
|
|
@@ -2011,7 +1994,6 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
2011
1994
|
const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
|
|
2012
1995
|
const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
|
|
2013
1996
|
const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
|
|
2014
|
-
const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
|
|
2015
1997
|
if (receipt.length > 0) {
|
|
2016
1998
|
const poolinfo = maps_js_1.poolInfo[poolName];
|
|
2017
1999
|
if (poolName.toString().includes("AUTOBALANCE")) {
|
|
@@ -2044,21 +2026,11 @@ const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
2044
2026
|
}
|
|
2045
2027
|
}
|
|
2046
2028
|
else {
|
|
2047
|
-
let alpha_receipt
|
|
2048
|
-
|
|
2049
|
-
[
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
arguments: [],
|
|
2053
|
-
});
|
|
2054
|
-
}
|
|
2055
|
-
else {
|
|
2056
|
-
[alpha_receipt] = txb.moveCall({
|
|
2057
|
-
target: `0x1::option::some`,
|
|
2058
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
2059
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
2060
|
-
});
|
|
2061
|
-
}
|
|
2029
|
+
let alpha_receipt = txb.moveCall({
|
|
2030
|
+
target: `0x1::option::none`,
|
|
2031
|
+
typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
|
|
2032
|
+
arguments: [],
|
|
2033
|
+
});
|
|
2062
2034
|
if (poolName === "BLUEFIN-USDT-USDC") {
|
|
2063
2035
|
txb.moveCall({
|
|
2064
2036
|
target: `${poolinfo.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
|
|
@@ -2518,23 +2490,12 @@ const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
2518
2490
|
const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
|
|
2519
2491
|
const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
|
|
2520
2492
|
const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
|
|
2521
|
-
const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
|
|
2522
2493
|
if (receipt.length > 0) {
|
|
2523
|
-
let alpha_receipt
|
|
2524
|
-
|
|
2525
|
-
[
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
arguments: [],
|
|
2529
|
-
});
|
|
2530
|
-
}
|
|
2531
|
-
else {
|
|
2532
|
-
[alpha_receipt] = txb.moveCall({
|
|
2533
|
-
target: `0x1::option::some`,
|
|
2534
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
2535
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
2536
|
-
});
|
|
2537
|
-
}
|
|
2494
|
+
let alpha_receipt = txb.moveCall({
|
|
2495
|
+
target: `0x1::option::none`,
|
|
2496
|
+
typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
|
|
2497
|
+
arguments: [],
|
|
2498
|
+
});
|
|
2538
2499
|
const poolinfo = maps_js_1.poolInfo[poolName];
|
|
2539
2500
|
if (poolName === "BLUEFIN-ALPHA-USDC") {
|
|
2540
2501
|
txb.moveCall({
|
|
@@ -2700,23 +2661,12 @@ const withdrawBluefinStsuiTxb = async (xTokens, poolName, options) => {
|
|
|
2700
2661
|
const pool1 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin1;
|
|
2701
2662
|
const pool2 = maps_js_1.doubleAssetPoolCoinMap[poolName].coin2;
|
|
2702
2663
|
const receipt = await (0, getReceipts_js_1.getReceipts)(poolName, address, true);
|
|
2703
|
-
const alphaReceipt = await (0, getReceipts_js_1.getReceipts)("ALPHA", address, true);
|
|
2704
2664
|
if (receipt.length > 0) {
|
|
2705
|
-
let alpha_receipt
|
|
2706
|
-
|
|
2707
|
-
[
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
arguments: [],
|
|
2711
|
-
});
|
|
2712
|
-
}
|
|
2713
|
-
else {
|
|
2714
|
-
[alpha_receipt] = txb.moveCall({
|
|
2715
|
-
target: `0x1::option::some`,
|
|
2716
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
2717
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
2718
|
-
});
|
|
2719
|
-
}
|
|
2665
|
+
let alpha_receipt = txb.moveCall({
|
|
2666
|
+
target: `0x1::option::none`,
|
|
2667
|
+
typeArguments: [(0, constants_js_1.getConf)().ALPHA_POOL_RECEIPT],
|
|
2668
|
+
arguments: [],
|
|
2669
|
+
});
|
|
2720
2670
|
const poolinfo = maps_js_1.poolInfo[poolName];
|
|
2721
2671
|
if (poolName === "BLUEFIN-STSUI-USDC") {
|
|
2722
2672
|
txb.moveCall({
|