@alphafi/alphafi-sdk 0.0.78 → 0.0.80
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/cetus_mainnet_config.js +2 -2
- package/dist/cjs/common/cetus_mainnet_config.js.map +1 -1
- package/dist/cjs/common/constants.d.ts +10 -0
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +36 -11
- 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 +1 -0
- package/dist/cjs/common/maps.js.map +1 -1
- package/dist/cjs/sui-sdk/client.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/client.js +4 -0
- package/dist/cjs/sui-sdk/client.js.map +1 -1
- package/dist/cjs/transactions/blueRewards.d.ts.map +1 -1
- package/dist/cjs/transactions/blueRewards.js +64 -0
- package/dist/cjs/transactions/blueRewards.js.map +1 -1
- package/dist/cjs/transactions/bluefin.d.ts.map +1 -1
- package/dist/cjs/transactions/bluefin.js +128 -0
- package/dist/cjs/transactions/bluefin.js.map +1 -1
- package/dist/cjs/transactions/navi.d.ts.map +1 -1
- package/dist/cjs/transactions/navi.js +74 -30
- package/dist/cjs/transactions/navi.js.map +1 -1
- package/dist/esm/common/cetus_mainnet_config.js +2 -2
- package/dist/esm/common/cetus_mainnet_config.js.map +1 -1
- package/dist/esm/common/constants.d.ts +10 -0
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +36 -11
- 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 +1 -0
- package/dist/esm/common/maps.js.map +1 -1
- package/dist/esm/sui-sdk/client.d.ts.map +1 -1
- package/dist/esm/sui-sdk/client.js +4 -0
- package/dist/esm/sui-sdk/client.js.map +1 -1
- package/dist/esm/transactions/blueRewards.d.ts.map +1 -1
- package/dist/esm/transactions/blueRewards.js +64 -0
- package/dist/esm/transactions/blueRewards.js.map +1 -1
- package/dist/esm/transactions/bluefin.d.ts.map +1 -1
- package/dist/esm/transactions/bluefin.js +128 -0
- package/dist/esm/transactions/bluefin.js.map +1 -1
- package/dist/esm/transactions/navi.d.ts.map +1 -1
- package/dist/esm/transactions/navi.js +74 -30
- package/dist/esm/transactions/navi.js.map +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/functions/alphaLpBreakdown.html +1 -1
- package/docs/functions/cetusLpBreakdown.html +1 -1
- package/docs/functions/claimBlueRewardTxb.html +1 -1
- package/docs/functions/claimRewardTxb.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/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/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/getZapAmounts.html +1 -1
- package/docs/functions/lastAutocompoundTime.html +1 -1
- package/docs/functions/liquidityToTokens.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/pendingBlueRewardAmount.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/zapDepositTxb.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 +2 -2
- package/docs/types/AfterTransactionEventNode.html +1 -1
- package/docs/types/AirdropClaimEventNode.html +1 -1
- package/docs/types/Allocator.html +1 -1
- package/docs/types/AlphaFiDoubleAssetVault.html +1 -1
- package/docs/types/AlphaFiMultiVaultBalance.html +1 -1
- package/docs/types/AlphaFiSingleAssetVault.html +1 -1
- package/docs/types/AlphaFiVault.html +1 -1
- package/docs/types/AlphaFiVaultBalance.html +1 -1
- package/docs/types/AlphaPoolType.html +1 -1
- package/docs/types/AlphaReceipt.html +1 -1
- package/docs/types/AlphaReceiptFields.html +1 -1
- package/docs/types/AlphaVaultBalance.html +1 -1
- 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 +1 -1
- package/docs/types/BucketInvestor.html +1 -1
- package/docs/types/CetusInvestor.html +1 -1
- package/docs/types/CetusPoolType.html +1 -1
- package/docs/types/CetusSwapOptions.html +1 -1
- package/docs/types/CoinAmounts.html +1 -1
- package/docs/types/CoinName.html +1 -1
- package/docs/types/CoinType.html +1 -1
- package/docs/types/CommonInvestorFields.html +1 -1
- package/docs/types/CreatePoolOptions.html +1 -1
- package/docs/types/Distributor.html +1 -1
- package/docs/types/DoubleAssetMultiVaultBalance.html +1 -1
- package/docs/types/DoubleAssetPoolNames.html +1 -1
- package/docs/types/DoubleAssetTokenHoldings.html +1 -1
- package/docs/types/DoubleAssetVaultBalance.html +1 -1
- package/docs/types/EventCategory.html +1 -1
- package/docs/types/EventNode.html +1 -1
- package/docs/types/GetHoldersParams.html +1 -1
- package/docs/types/GetTokenHoldingsParams.html +1 -1
- package/docs/types/GetUserTokensFromTransactionsParams.html +1 -1
- package/docs/types/GetUserTokensInUsdFromTransactionsParams.html +1 -1
- package/docs/types/GetVaultBalanceParams.html +1 -1
- package/docs/types/HoldingsObj.html +1 -1
- 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 +1 -1
- package/docs/types/LiquidityToUsdParams.html +1 -1
- package/docs/types/LoopingDebt.html +1 -1
- package/docs/types/LoopingPoolNames.html +1 -1
- package/docs/types/LpBreakdownType.html +1 -1
- package/docs/types/MemberPoolDataType.html +1 -1
- package/docs/types/MemberType.html +1 -1
- package/docs/types/MultiGetVaultBalancesParams.html +1 -1
- package/docs/types/NaviInvestor.html +1 -1
- package/docs/types/OtherReceiptFields.html +1 -1
- package/docs/types/PoolName.html +1 -1
- package/docs/types/PoolReceipt.html +1 -1
- package/docs/types/PoolType.html +1 -1
- package/docs/types/Receipt.html +1 -1
- package/docs/types/ReceiptGQL.html +1 -1
- package/docs/types/SingleAssetMultiVaultBalance.html +1 -1
- package/docs/types/SingleAssetPoolNames.html +1 -1
- package/docs/types/SingleAssetTokenHoldings.html +1 -1
- package/docs/types/SingleAssetVaultBalance.html +1 -1
- package/docs/types/SingleGetVaultBalancesParams.html +1 -1
- 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 +1 -1
- package/docs/types/TransactionBlockType.html +1 -1
- package/docs/types/UserPoolLiquidity.html +1 -1
- package/docs/types/UserPoolTokenHoldings.html +1 -1
- package/docs/types/UserUsdHoldings.html +1 -1
- package/docs/types/VaultBalance.html +1 -1
- package/docs/types/VoteCastEvent.html +1 -1
- package/docs/types/WithdrawV2EventNode.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 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navi.d.ts","sourceRoot":"","sources":["../../../src/transactions/navi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAYvD,OAAO,EAAE,QAAQ,EAAW,MAAM,oBAAoB,CAAC;AAQvD,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"navi.d.ts","sourceRoot":"","sources":["../../../src/transactions/navi.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAYvD,OAAO,EAAE,QAAQ,EAAW,MAAM,oBAAoB,CAAC;AAQvD,wBAAsB,aAAa,CACjC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,WAAW,CAAC,CAqpDtB;AAED,wBAAsB,cAAc,CAClC,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3B,OAAO,CAAC,WAAW,CAAC,CA2iDtB"}
|
|
@@ -962,9 +962,10 @@ export async function naviDepositTx(amount, poolName, options) {
|
|
|
962
962
|
for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
|
|
963
963
|
if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
|
|
964
964
|
txb.moveCall({
|
|
965
|
-
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
965
|
+
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
966
966
|
typeArguments: [
|
|
967
967
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
968
|
+
coinsList["SUI"].type,
|
|
968
969
|
coinsList["NAVX"].type,
|
|
969
970
|
],
|
|
970
971
|
arguments: [
|
|
@@ -974,19 +975,19 @@ export async function naviDepositTx(amount, poolName, options) {
|
|
|
974
975
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
975
976
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
976
977
|
txb.object(C.NAVI_NAVX_REWARDS_POOL),
|
|
977
|
-
txb.object(cetusPoolMap["NAVX-SUI"]),
|
|
978
|
-
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
979
978
|
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
980
|
-
txb.object(
|
|
979
|
+
txb.object(bluefinPoolMap["NAVX-SUI"]),
|
|
980
|
+
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
981
981
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
982
982
|
],
|
|
983
983
|
});
|
|
984
984
|
}
|
|
985
985
|
else if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
|
|
986
986
|
txb.moveCall({
|
|
987
|
-
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
987
|
+
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
988
988
|
typeArguments: [
|
|
989
989
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
990
|
+
coinsList["SUI"].type,
|
|
990
991
|
coinsList["DEEP"].type,
|
|
991
992
|
],
|
|
992
993
|
arguments: [
|
|
@@ -996,10 +997,31 @@ export async function naviDepositTx(amount, poolName, options) {
|
|
|
996
997
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
997
998
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
998
999
|
txb.object(C.NAVI_DEEP_REWARDS_POOL),
|
|
999
|
-
txb.object(
|
|
1000
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
1001
|
+
txb.object(bluefinPoolMap["DEEP-SUI"]),
|
|
1000
1002
|
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
1003
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
1004
|
+
],
|
|
1005
|
+
});
|
|
1006
|
+
}
|
|
1007
|
+
else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
|
|
1008
|
+
txb.moveCall({
|
|
1009
|
+
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
1010
|
+
typeArguments: [
|
|
1011
|
+
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
1012
|
+
coinsList["SUI"].type,
|
|
1013
|
+
coinsList["VSUI"].type,
|
|
1014
|
+
],
|
|
1015
|
+
arguments: [
|
|
1016
|
+
txb.object(C.ALPHA_NAVI_V2_VERSION),
|
|
1017
|
+
txb.object(poolData.investorId),
|
|
1018
|
+
txb.object(C.NAVI_STORAGE),
|
|
1019
|
+
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
1020
|
+
txb.object(C.NAVI_INCENTIVE_V3),
|
|
1021
|
+
txb.object(C.NAVI_VSUI_REWARDS_POOL),
|
|
1001
1022
|
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
1002
|
-
txb.object(
|
|
1023
|
+
txb.object(bluefinPoolMap["VSUI-SUI"]),
|
|
1024
|
+
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
1003
1025
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
1004
1026
|
],
|
|
1005
1027
|
});
|
|
@@ -1183,7 +1205,7 @@ export async function naviDepositTx(amount, poolName, options) {
|
|
|
1183
1205
|
}
|
|
1184
1206
|
else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
|
|
1185
1207
|
txb.moveCall({
|
|
1186
|
-
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
1208
|
+
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
1187
1209
|
typeArguments: [
|
|
1188
1210
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
1189
1211
|
coinsList["SUI"].type,
|
|
@@ -1196,9 +1218,9 @@ export async function naviDepositTx(amount, poolName, options) {
|
|
|
1196
1218
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
1197
1219
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
1198
1220
|
txb.object(C.NAVI_VSUI_REWARDS_POOL),
|
|
1199
|
-
txb.object(C.
|
|
1200
|
-
txb.object(
|
|
1201
|
-
txb.object(
|
|
1221
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
1222
|
+
txb.object(bluefinPoolMap["VSUI-SUI"]),
|
|
1223
|
+
txb.object(bluefinPoolMap[`${singleAssetPoolCoinMap[poolName].coin}-SUI`]),
|
|
1202
1224
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
1203
1225
|
],
|
|
1204
1226
|
});
|
|
@@ -1251,7 +1273,7 @@ export async function naviDepositTx(amount, poolName, options) {
|
|
|
1251
1273
|
}
|
|
1252
1274
|
else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
|
|
1253
1275
|
txb.moveCall({
|
|
1254
|
-
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
1276
|
+
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
1255
1277
|
typeArguments: [
|
|
1256
1278
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
1257
1279
|
coinsList["SUI"].type,
|
|
@@ -1264,9 +1286,9 @@ export async function naviDepositTx(amount, poolName, options) {
|
|
|
1264
1286
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
1265
1287
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
1266
1288
|
txb.object(C.NAVI_VSUI_REWARDS_POOL),
|
|
1267
|
-
txb.object(C.
|
|
1268
|
-
txb.object(
|
|
1269
|
-
txb.object(
|
|
1289
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
1290
|
+
txb.object(bluefinPoolMap["VSUI-SUI"]),
|
|
1291
|
+
txb.object(bluefinPoolMap[`${singleAssetPoolCoinMap[poolName].coin}-SUI`]),
|
|
1270
1292
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
1271
1293
|
],
|
|
1272
1294
|
});
|
|
@@ -2248,9 +2270,10 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
|
|
|
2248
2270
|
for (const reward of claimableRewards[coinsList[singleAssetPoolCoinMap[poolName].coin].type.substring(2)]) {
|
|
2249
2271
|
if (reward.reward_coin_type === coinsList["NAVX"].type.substring(2)) {
|
|
2250
2272
|
txb.moveCall({
|
|
2251
|
-
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
2273
|
+
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
2252
2274
|
typeArguments: [
|
|
2253
2275
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
2276
|
+
coinsList["SUI"].type,
|
|
2254
2277
|
coinsList["NAVX"].type,
|
|
2255
2278
|
],
|
|
2256
2279
|
arguments: [
|
|
@@ -2260,19 +2283,19 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
|
|
|
2260
2283
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
2261
2284
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
2262
2285
|
txb.object(C.NAVI_NAVX_REWARDS_POOL),
|
|
2263
|
-
txb.object(cetusPoolMap["NAVX-SUI"]),
|
|
2264
|
-
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
2265
2286
|
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
2266
|
-
txb.object(
|
|
2287
|
+
txb.object(bluefinPoolMap["NAVX-SUI"]),
|
|
2288
|
+
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
2267
2289
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
2268
2290
|
],
|
|
2269
2291
|
});
|
|
2270
2292
|
}
|
|
2271
2293
|
else if (reward.reward_coin_type === coinsList["DEEP"].type.substring(2)) {
|
|
2272
2294
|
txb.moveCall({
|
|
2273
|
-
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
2295
|
+
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
2274
2296
|
typeArguments: [
|
|
2275
2297
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
2298
|
+
coinsList["SUI"].type,
|
|
2276
2299
|
coinsList["DEEP"].type,
|
|
2277
2300
|
],
|
|
2278
2301
|
arguments: [
|
|
@@ -2282,10 +2305,31 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
|
|
|
2282
2305
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
2283
2306
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
2284
2307
|
txb.object(C.NAVI_DEEP_REWARDS_POOL),
|
|
2285
|
-
txb.object(
|
|
2308
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
2309
|
+
txb.object(bluefinPoolMap["DEEP-SUI"]),
|
|
2286
2310
|
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
2311
|
+
txb.object(C.CLOCK_PACKAGE_ID),
|
|
2312
|
+
],
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
|
|
2316
|
+
txb.moveCall({
|
|
2317
|
+
target: `${C.ALPHA_NAVI_V2_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
2318
|
+
typeArguments: [
|
|
2319
|
+
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
2320
|
+
coinsList["SUI"].type,
|
|
2321
|
+
coinsList["VSUI"].type,
|
|
2322
|
+
],
|
|
2323
|
+
arguments: [
|
|
2324
|
+
txb.object(C.ALPHA_NAVI_V2_VERSION),
|
|
2325
|
+
txb.object(poolData.investorId),
|
|
2326
|
+
txb.object(C.NAVI_STORAGE),
|
|
2327
|
+
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
2328
|
+
txb.object(C.NAVI_INCENTIVE_V3),
|
|
2329
|
+
txb.object(C.NAVI_VSUI_REWARDS_POOL),
|
|
2287
2330
|
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
2288
|
-
txb.object(
|
|
2331
|
+
txb.object(bluefinPoolMap["VSUI-SUI"]),
|
|
2332
|
+
txb.object(bluefinPoolMap[`SUI-${singleAssetPoolCoinMap[poolName].coin}`]),
|
|
2289
2333
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
2290
2334
|
],
|
|
2291
2335
|
});
|
|
@@ -2469,7 +2513,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
|
|
|
2469
2513
|
}
|
|
2470
2514
|
else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
|
|
2471
2515
|
txb.moveCall({
|
|
2472
|
-
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
2516
|
+
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
2473
2517
|
typeArguments: [
|
|
2474
2518
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
2475
2519
|
coinsList["SUI"].type,
|
|
@@ -2482,9 +2526,9 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
|
|
|
2482
2526
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
2483
2527
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
2484
2528
|
txb.object(C.NAVI_VSUI_REWARDS_POOL),
|
|
2485
|
-
txb.object(C.
|
|
2486
|
-
txb.object(
|
|
2487
|
-
txb.object(
|
|
2529
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
2530
|
+
txb.object(bluefinPoolMap["VSUI-SUI"]),
|
|
2531
|
+
txb.object(bluefinPoolMap[`${singleAssetPoolCoinMap[poolName].coin}-SUI`]),
|
|
2488
2532
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
2489
2533
|
],
|
|
2490
2534
|
});
|
|
@@ -2537,7 +2581,7 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
|
|
|
2537
2581
|
}
|
|
2538
2582
|
else if (reward.reward_coin_type === coinsList["VSUI"].type.substring(2)) {
|
|
2539
2583
|
txb.moveCall({
|
|
2540
|
-
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::
|
|
2584
|
+
target: `${C.ALPHA_3_LATEST_PACKAGE_ID}::alphafi_navi_pool_v2::collect_reward_with_two_swaps_bluefin`,
|
|
2541
2585
|
typeArguments: [
|
|
2542
2586
|
coinsList[singleAssetPoolCoinMap[poolName].coin].type,
|
|
2543
2587
|
coinsList["SUI"].type,
|
|
@@ -2550,9 +2594,9 @@ export async function naviWithdrawTx(xTokens, poolName, options) {
|
|
|
2550
2594
|
txb.pure.u8(Number(naviAssetMap[singleAssetPoolCoinMap[poolName].coin])),
|
|
2551
2595
|
txb.object(C.NAVI_INCENTIVE_V3),
|
|
2552
2596
|
txb.object(C.NAVI_VSUI_REWARDS_POOL),
|
|
2553
|
-
txb.object(C.
|
|
2554
|
-
txb.object(
|
|
2555
|
-
txb.object(
|
|
2597
|
+
txb.object(C.BLUEFIN_GLOBAL_CONFIG),
|
|
2598
|
+
txb.object(bluefinPoolMap["VSUI-SUI"]),
|
|
2599
|
+
txb.object(bluefinPoolMap[`${singleAssetPoolCoinMap[poolName].coin}-SUI`]),
|
|
2556
2600
|
txb.object(C.CLOCK_PACKAGE_ID),
|
|
2557
2601
|
],
|
|
2558
2602
|
});
|