@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
|
@@ -1503,6 +1503,11 @@ export const getCoinObject = async (type, address, tx) => {
|
|
|
1503
1503
|
else {
|
|
1504
1504
|
txb = tx;
|
|
1505
1505
|
}
|
|
1506
|
+
if (type === "0x2::sui::SUI" ||
|
|
1507
|
+
type ===
|
|
1508
|
+
"0x0000000000000000000000000000000000000000000000000000000000000002::sui::SUI") {
|
|
1509
|
+
return txb.gas;
|
|
1510
|
+
}
|
|
1506
1511
|
let coins1 = [];
|
|
1507
1512
|
let currentCursor = null;
|
|
1508
1513
|
do {
|
|
@@ -1611,7 +1616,6 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
|
|
|
1611
1616
|
const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
|
|
1612
1617
|
const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
|
|
1613
1618
|
const receipt = await getReceipts(poolName, address, true);
|
|
1614
|
-
const alphaReceipt = await getReceipts("ALPHA", address, true);
|
|
1615
1619
|
if (receipt.length > 0) {
|
|
1616
1620
|
const poolinfo = poolInfo[poolName];
|
|
1617
1621
|
if (poolName.toString().includes("AUTOBALANCE")) {
|
|
@@ -1644,21 +1648,11 @@ export const withdrawBluefinSuiFirstTxb = async (xTokens, poolName, options) =>
|
|
|
1644
1648
|
}
|
|
1645
1649
|
}
|
|
1646
1650
|
else {
|
|
1647
|
-
let alpha_receipt
|
|
1648
|
-
|
|
1649
|
-
[
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
arguments: [],
|
|
1653
|
-
});
|
|
1654
|
-
}
|
|
1655
|
-
else {
|
|
1656
|
-
[alpha_receipt] = txb.moveCall({
|
|
1657
|
-
target: `0x1::option::some`,
|
|
1658
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
1659
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
1660
|
-
});
|
|
1661
|
-
}
|
|
1651
|
+
let alpha_receipt = txb.moveCall({
|
|
1652
|
+
target: `0x1::option::none`,
|
|
1653
|
+
typeArguments: [getConf().ALPHA_POOL_RECEIPT],
|
|
1654
|
+
arguments: [],
|
|
1655
|
+
});
|
|
1662
1656
|
if (poolName === "BLUEFIN-SUI-USDC") {
|
|
1663
1657
|
txb.moveCall({
|
|
1664
1658
|
target: `${poolinfo.packageId}::alphafi_bluefin_sui_first_pool::user_withdraw_v2`,
|
|
@@ -1762,7 +1756,6 @@ export const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) =>
|
|
|
1762
1756
|
const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
|
|
1763
1757
|
const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
|
|
1764
1758
|
const receipt = await getReceipts(poolName, address, true);
|
|
1765
|
-
const alphaReceipt = await getReceipts("ALPHA", address, true);
|
|
1766
1759
|
if (receipt.length > 0) {
|
|
1767
1760
|
const poolinfo = poolInfo[poolName];
|
|
1768
1761
|
if (poolName.toString().includes("AUTOBALANCE")) {
|
|
@@ -1795,21 +1788,11 @@ export const withdrawBluefinSuiSecondTxb = async (xTokens, poolName, options) =>
|
|
|
1795
1788
|
}
|
|
1796
1789
|
}
|
|
1797
1790
|
else {
|
|
1798
|
-
let alpha_receipt
|
|
1799
|
-
|
|
1800
|
-
[
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
arguments: [],
|
|
1804
|
-
});
|
|
1805
|
-
}
|
|
1806
|
-
else {
|
|
1807
|
-
[alpha_receipt] = txb.moveCall({
|
|
1808
|
-
target: `0x1::option::some`,
|
|
1809
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
1810
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
1811
|
-
});
|
|
1812
|
-
}
|
|
1791
|
+
let alpha_receipt = txb.moveCall({
|
|
1792
|
+
target: `0x1::option::none`,
|
|
1793
|
+
typeArguments: [getConf().ALPHA_POOL_RECEIPT],
|
|
1794
|
+
arguments: [],
|
|
1795
|
+
});
|
|
1813
1796
|
if (poolName === "BLUEFIN-BLUE-SUI") {
|
|
1814
1797
|
txb.moveCall({
|
|
1815
1798
|
target: `${poolinfo.packageId}::alphafi_bluefin_sui_second_pool::user_withdraw_v2`,
|
|
@@ -1999,7 +1982,6 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
1999
1982
|
const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
|
|
2000
1983
|
const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
|
|
2001
1984
|
const receipt = await getReceipts(poolName, address, true);
|
|
2002
|
-
const alphaReceipt = await getReceipts("ALPHA", address, true);
|
|
2003
1985
|
if (receipt.length > 0) {
|
|
2004
1986
|
const poolinfo = poolInfo[poolName];
|
|
2005
1987
|
if (poolName.toString().includes("AUTOBALANCE")) {
|
|
@@ -2032,21 +2014,11 @@ export const withdrawBluefinType1Txb = async (xTokens, poolName, options) => {
|
|
|
2032
2014
|
}
|
|
2033
2015
|
}
|
|
2034
2016
|
else {
|
|
2035
|
-
let alpha_receipt
|
|
2036
|
-
|
|
2037
|
-
[
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
arguments: [],
|
|
2041
|
-
});
|
|
2042
|
-
}
|
|
2043
|
-
else {
|
|
2044
|
-
[alpha_receipt] = txb.moveCall({
|
|
2045
|
-
target: `0x1::option::some`,
|
|
2046
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
2047
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
2048
|
-
});
|
|
2049
|
-
}
|
|
2017
|
+
let alpha_receipt = txb.moveCall({
|
|
2018
|
+
target: `0x1::option::none`,
|
|
2019
|
+
typeArguments: [getConf().ALPHA_POOL_RECEIPT],
|
|
2020
|
+
arguments: [],
|
|
2021
|
+
});
|
|
2050
2022
|
if (poolName === "BLUEFIN-USDT-USDC") {
|
|
2051
2023
|
txb.moveCall({
|
|
2052
2024
|
target: `${poolinfo.packageId}::alphafi_bluefin_type_1_investor::collect_and_swap_rewards_to_token_b_bluefin`,
|
|
@@ -2505,23 +2477,12 @@ export const withdrawBluefinType2Txb = async (xTokens, poolName, options) => {
|
|
|
2505
2477
|
const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
|
|
2506
2478
|
const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
|
|
2507
2479
|
const receipt = await getReceipts(poolName, address, true);
|
|
2508
|
-
const alphaReceipt = await getReceipts("ALPHA", address, true);
|
|
2509
2480
|
if (receipt.length > 0) {
|
|
2510
|
-
let alpha_receipt
|
|
2511
|
-
|
|
2512
|
-
[
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
arguments: [],
|
|
2516
|
-
});
|
|
2517
|
-
}
|
|
2518
|
-
else {
|
|
2519
|
-
[alpha_receipt] = txb.moveCall({
|
|
2520
|
-
target: `0x1::option::some`,
|
|
2521
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
2522
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
2523
|
-
});
|
|
2524
|
-
}
|
|
2481
|
+
let alpha_receipt = txb.moveCall({
|
|
2482
|
+
target: `0x1::option::none`,
|
|
2483
|
+
typeArguments: [getConf().ALPHA_POOL_RECEIPT],
|
|
2484
|
+
arguments: [],
|
|
2485
|
+
});
|
|
2525
2486
|
const poolinfo = poolInfo[poolName];
|
|
2526
2487
|
if (poolName === "BLUEFIN-ALPHA-USDC") {
|
|
2527
2488
|
txb.moveCall({
|
|
@@ -2686,23 +2647,12 @@ export const withdrawBluefinStsuiTxb = async (xTokens, poolName, options) => {
|
|
|
2686
2647
|
const pool1 = doubleAssetPoolCoinMap[poolName].coin1;
|
|
2687
2648
|
const pool2 = doubleAssetPoolCoinMap[poolName].coin2;
|
|
2688
2649
|
const receipt = await getReceipts(poolName, address, true);
|
|
2689
|
-
const alphaReceipt = await getReceipts("ALPHA", address, true);
|
|
2690
2650
|
if (receipt.length > 0) {
|
|
2691
|
-
let alpha_receipt
|
|
2692
|
-
|
|
2693
|
-
[
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
arguments: [],
|
|
2697
|
-
});
|
|
2698
|
-
}
|
|
2699
|
-
else {
|
|
2700
|
-
[alpha_receipt] = txb.moveCall({
|
|
2701
|
-
target: `0x1::option::some`,
|
|
2702
|
-
typeArguments: [alphaReceipt[0].content.type],
|
|
2703
|
-
arguments: [txb.object(alphaReceipt[0].objectId)],
|
|
2704
|
-
});
|
|
2705
|
-
}
|
|
2651
|
+
let alpha_receipt = txb.moveCall({
|
|
2652
|
+
target: `0x1::option::none`,
|
|
2653
|
+
typeArguments: [getConf().ALPHA_POOL_RECEIPT],
|
|
2654
|
+
arguments: [],
|
|
2655
|
+
});
|
|
2706
2656
|
const poolinfo = poolInfo[poolName];
|
|
2707
2657
|
if (poolName === "BLUEFIN-STSUI-USDC") {
|
|
2708
2658
|
txb.moveCall({
|