@alphafi/alphafi-sdk 0.0.76 → 0.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/common/constants.d.ts +26 -0
- package/dist/cjs/common/constants.d.ts.map +1 -1
- package/dist/cjs/common/constants.js +32 -9
- 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 +36 -57
- package/dist/cjs/common/maps.js.map +1 -1
- package/dist/cjs/common/types.d.ts +1 -1
- package/dist/cjs/common/types.d.ts.map +1 -1
- package/dist/cjs/common/types.js.map +1 -1
- package/dist/cjs/getVaultBalances.d.ts +1 -3
- package/dist/cjs/getVaultBalances.d.ts.map +1 -1
- package/dist/cjs/getVaultBalances.js +1 -57
- package/dist/cjs/getVaultBalances.js.map +1 -1
- package/dist/cjs/index.d.ts +3 -3
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -8
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.d.ts +3 -0
- package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.d.ts.map +1 -0
- package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.js +19 -0
- package/dist/cjs/sui-sdk/events/fetchAirdropClaimEvent.js.map +1 -0
- package/dist/cjs/sui-sdk/events/fetchEvents.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/fetchEvents.js +15 -0
- package/dist/cjs/sui-sdk/events/fetchEvents.js.map +1 -1
- package/dist/cjs/sui-sdk/events/types.d.ts +11 -1
- package/dist/cjs/sui-sdk/events/types.d.ts.map +1 -1
- package/dist/cjs/sui-sdk/events/types.js.map +1 -1
- package/dist/cjs/transactions/blueRewards.d.ts.map +1 -1
- package/dist/cjs/transactions/blueRewards.js +27 -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 +57 -0
- package/dist/cjs/transactions/bluefin.js.map +1 -1
- package/dist/cjs/transactions/navi-looping.d.ts.map +1 -1
- package/dist/cjs/transactions/navi-looping.js +38 -12
- 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 +30 -0
- package/dist/cjs/transactions/navi.js.map +1 -1
- package/dist/cjs/types.d.ts +0 -12
- package/dist/cjs/types.d.ts.map +1 -1
- package/dist/cjs/types.js.map +1 -1
- package/dist/cjs/utils/userHoldings.d.ts +1 -1
- package/dist/cjs/utils/userHoldings.d.ts.map +1 -1
- package/dist/cjs/utils/userHoldings.js +22 -42
- package/dist/cjs/utils/userHoldings.js.map +1 -1
- package/dist/esm/common/constants.d.ts +26 -0
- package/dist/esm/common/constants.d.ts.map +1 -1
- package/dist/esm/common/constants.js +32 -9
- 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 +36 -57
- package/dist/esm/common/maps.js.map +1 -1
- package/dist/esm/common/types.d.ts +1 -1
- package/dist/esm/common/types.d.ts.map +1 -1
- package/dist/esm/common/types.js.map +1 -1
- package/dist/esm/getVaultBalances.d.ts +1 -3
- package/dist/esm/getVaultBalances.d.ts.map +1 -1
- package/dist/esm/getVaultBalances.js +1 -55
- package/dist/esm/getVaultBalances.js.map +1 -1
- package/dist/esm/index.d.ts +3 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.d.ts +3 -0
- package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.d.ts.map +1 -0
- package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.js +16 -0
- package/dist/esm/sui-sdk/events/fetchAirdropClaimEvent.js.map +1 -0
- package/dist/esm/sui-sdk/events/fetchEvents.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/fetchEvents.js +15 -0
- package/dist/esm/sui-sdk/events/fetchEvents.js.map +1 -1
- package/dist/esm/sui-sdk/events/types.d.ts +11 -1
- package/dist/esm/sui-sdk/events/types.d.ts.map +1 -1
- package/dist/esm/sui-sdk/events/types.js.map +1 -1
- package/dist/esm/transactions/blueRewards.d.ts.map +1 -1
- package/dist/esm/transactions/blueRewards.js +27 -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 +57 -0
- package/dist/esm/transactions/bluefin.js.map +1 -1
- package/dist/esm/transactions/navi-looping.d.ts.map +1 -1
- package/dist/esm/transactions/navi-looping.js +38 -12
- 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 +30 -0
- package/dist/esm/transactions/navi.js.map +1 -1
- package/dist/esm/types.d.ts +0 -12
- package/dist/esm/types.d.ts.map +1 -1
- package/dist/esm/types.js.map +1 -1
- package/dist/esm/utils/userHoldings.d.ts +1 -1
- package/dist/esm/utils/userHoldings.d.ts.map +1 -1
- package/dist/esm/utils/userHoldings.js +23 -42
- package/dist/esm/utils/userHoldings.js.map +1 -1
- package/docs/assets/navigation.js +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 -0
- 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 +4 -8
- package/docs/types/AfterTransactionEventNode.html +1 -1
- package/docs/types/AirdropClaimEventNode.html +1 -0
- 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 +1 -1
- package/docs/functions/getHoldersFromTransactions.html +0 -1
- package/docs/functions/getUserTokensFromTransactions.html +0 -1
- package/docs/functions/getUserTokensInUsdFromTransactions.html +0 -1
- package/docs/functions/getVaultBalanceForActiveUsers.html +0 -1
- package/docs/functions/getXTokenVaultBalanceForActiveUsers.html +0 -1
- package/docs/types/GetVaultBalanceForActiveUsersParams.html +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"maps.d.ts","sourceRoot":"","sources":["../../../src/common/maps.ts"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"maps.d.ts","sourceRoot":"","sources":["../../../src/common/maps.ts"],"names":[],"mappings":"AACA,OAAO,EAGL,QAAQ,E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C;AAEF,eAAO,MAAM,uBAAuB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAe5D,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAe3D,CAAC;AAEF,wBAAsB,sBAAsB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAO7E;AAID,wBAAsB,oBAAoB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAG3E;AAID,wBAAsB,wBAAwB,IAAI,OAAO,CAAC;KACvD,IAAI,IAAI,QAAQ,CAAC,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;CACtD,CAAC,CAGD;AAED,wBAAsB,4BAA4B,IAAI,OAAO,CAC3D,GAAG,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAClC,CAyBA;AAED,wBAAsB,gCAAgC,IAAI,OAAO,CAAC;KAC/D,IAAI,IAAI,oBAAoB,CAAC,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;CAClE,CAAC,CA2BD;AAED,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAevE;AAED,eAAO,MAAM,aAAa,EAAE;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;CAM/C,CAAC;AAEL,eAAO,MAAM,eAAe,aAGxB,CAAC;AAEL,eAAO,MAAM,6BAA6B,UAYzC,CAAC"}
|
package/dist/cjs/common/maps.js
CHANGED
|
@@ -11,10 +11,9 @@ exports.getLiquidityPoolInvestorTicksMap = getLiquidityPoolInvestorTicksMap;
|
|
|
11
11
|
exports.getTokenPriceMap = getTokenPriceMap;
|
|
12
12
|
const constants_js_1 = require("./constants.js");
|
|
13
13
|
const client_js_1 = require("../sui-sdk/client.js");
|
|
14
|
-
const decimal_js_1 = require("decimal.js");
|
|
15
|
-
const prices_js_1 = require("../utils/prices.js");
|
|
16
|
-
const getReceipts_js_1 = require("../sui-sdk/functions/getReceipts.js");
|
|
17
14
|
const coins_js_1 = require("./coins.js");
|
|
15
|
+
const getReceipts_js_1 = require("../sui-sdk/functions/getReceipts.js");
|
|
16
|
+
const prices_js_1 = require("../utils/prices.js");
|
|
18
17
|
exports.stableCoins = [
|
|
19
18
|
"USDT",
|
|
20
19
|
"WUSDT",
|
|
@@ -83,6 +82,10 @@ exports.doubleAssetPoolCoinMap = {
|
|
|
83
82
|
"BLUEFIN-WAL-USDC": { coin1: "WAL", coin2: "USDC" },
|
|
84
83
|
"BLUEFIN-WAL-STSUI": { coin1: "WAL", coin2: "STSUI" },
|
|
85
84
|
"BLUEFIN-AUTOBALANCE-WAL-USDC": { coin1: "WAL", coin2: "USDC" },
|
|
85
|
+
"BLUEFIN-AUTOBALANCE-SUIUSDT-USDC-ZERO-ZERO": {
|
|
86
|
+
coin1: "SUIUSDT",
|
|
87
|
+
coin2: "USDC",
|
|
88
|
+
},
|
|
86
89
|
};
|
|
87
90
|
exports.singleAssetPoolCoinMap = {
|
|
88
91
|
ALPHA: { coin: "ALPHA" },
|
|
@@ -223,6 +226,7 @@ exports.bluefinPoolMap = {
|
|
|
223
226
|
"WAL-USDC": constants_js_1.conf[constants_js_1.CONF_ENV].BLUEFIN_WAL_USDC_POOL,
|
|
224
227
|
"SUI-WAL": constants_js_1.conf[constants_js_1.CONF_ENV].BLUEFIN_SUI_WAL_POOL,
|
|
225
228
|
"WAL-STSUI": constants_js_1.conf[constants_js_1.CONF_ENV].BLUEFIN_WAL_STSUI_POOL,
|
|
229
|
+
"SUIUSDT-USDC-ZERO-ZERO": constants_js_1.conf[constants_js_1.CONF_ENV].BLUEFIN_SUIUSDT_USDC_ZERO_ZERO_POOL,
|
|
226
230
|
};
|
|
227
231
|
exports.loopingAccountAddresses = {
|
|
228
232
|
"NAVI-LOOP-USDC-USDT": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_USDC_USDT_LOOP_ACCOUNT_ADDRESS,
|
|
@@ -235,6 +239,7 @@ exports.loopingAccountAddresses = {
|
|
|
235
239
|
"NAVI-NS": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_NS_ACCOUNT_ADDRESS,
|
|
236
240
|
"NAVI-STSUI": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_STSUI_ACCOUNT_ADDRESS,
|
|
237
241
|
"NAVI-SUIUSDT": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_SUIUSDT_ACCOUNT_ADDRESS,
|
|
242
|
+
"NAVI-SUIBTC": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_SUIBTC_ACCOUNT_ADDRESS,
|
|
238
243
|
"NAVI-USDT": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_USDT_ACCOUNT_ADDRESS,
|
|
239
244
|
"NAVI-WUSDC": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_WUSDC_ACCOUNT_ADDRESS,
|
|
240
245
|
"NAVI-USDC": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_USDC_ACCOUNT_ADDRESS,
|
|
@@ -243,6 +248,7 @@ exports.loopingAccountAddresses = {
|
|
|
243
248
|
"NAVI-VSUI": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_VSUI_ACCOUNT_ADDRESS,
|
|
244
249
|
"NAVI-DEEP": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_DEEP_ACCOUNT_ADDRESS,
|
|
245
250
|
"NAVI-WAL": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_WAL_ACCOUNT_ADDRESS,
|
|
251
|
+
"NAVI-NAVX": constants_js_1.conf[constants_js_1.CONF_ENV].NAVI_NAVX_ACCOUNT_ADDRESS,
|
|
246
252
|
};
|
|
247
253
|
exports.naviPriceFeedMap = {
|
|
248
254
|
SUI: {
|
|
@@ -331,6 +337,27 @@ exports.naviPriceFeedMap = {
|
|
|
331
337
|
},
|
|
332
338
|
};
|
|
333
339
|
exports.poolInfo = {
|
|
340
|
+
"BLUEFIN-AUTOBALANCE-SUIUSDT-USDC-ZERO-ZERO": {
|
|
341
|
+
packageId: constants_js_1.conf[constants_js_1.CONF_ENV].ALPHA_BLUEFIN_AUTOBALANCE_LATEST_PACKAGE_ID,
|
|
342
|
+
packageNumber: 7,
|
|
343
|
+
parentProtocolName: "BLUEFIN",
|
|
344
|
+
parentPoolId: constants_js_1.conf[constants_js_1.CONF_ENV].BLUEFIN_SUIUSDT_USDC_ZERO_ZERO_POOL,
|
|
345
|
+
poolId: constants_js_1.conf[constants_js_1.CONF_ENV].ALPHAFI_BLUEFIN_AUTOBALANCE_SUIUSDT_USDC_ZERO_ZERO_POOL,
|
|
346
|
+
investorId: constants_js_1.conf[constants_js_1.CONF_ENV]
|
|
347
|
+
.ALPHAFI_BLUEFIN_AUTOBALANCE_SUIUSDT_USDC_ZERO_ZERO_INVESTOR,
|
|
348
|
+
receiptName: constants_js_1.conf[constants_js_1.CONF_ENV]
|
|
349
|
+
.ALPHAFI_BLUEFIN_AUTOBALANCE_SUIUSDT_USDC_ZERO_ZERO_RECEIPT_NAME,
|
|
350
|
+
receiptType: constants_js_1.conf[constants_js_1.CONF_ENV].ALPHAFI_BLUEFIN_AUTOBALANCE_SUIUSDT_USDC_ZERO_ZERO_RECEIPT,
|
|
351
|
+
assetTypes: [coins_js_1.coinsList["SUIUSDT"].type, coins_js_1.coinsList["USDC"].type],
|
|
352
|
+
autoCompoundingEventType: constants_js_1.conf[constants_js_1.CONF_ENV]
|
|
353
|
+
.ALPHAFI_BLUEFIN_AUTOBALANCE_SUIUSDT_USDC_ZERO_ZERO_POOL_AUTO_COMPOUNDING_EVENT,
|
|
354
|
+
rebalanceEventType: constants_js_1.conf[constants_js_1.CONF_ENV]
|
|
355
|
+
.ALPHAFI_BLUEFIN_AUTOBALANCE_SUIUSDT_USDC_ZERO_ZERO_POOL_REBALANCE_EVENT,
|
|
356
|
+
liquidityChangeEventType: constants_js_1.conf[constants_js_1.CONF_ENV]
|
|
357
|
+
.ALPHAFI_BLUEFIN_AUTOBALANCE_SUIUSDT_USDC_ZERO_ZERO_POOL_LIQUIDITY_CHANGE_EVENT,
|
|
358
|
+
strategyType: "AUTOBALANCE-LIQUIDITY-POOL",
|
|
359
|
+
retired: false,
|
|
360
|
+
},
|
|
334
361
|
"NAVI-DEEP": {
|
|
335
362
|
packageId: constants_js_1.conf[constants_js_1.CONF_ENV].ALPHA_3_LATEST_PACKAGE_ID,
|
|
336
363
|
packageNumber: 3,
|
|
@@ -957,7 +984,7 @@ exports.poolInfo = {
|
|
|
957
984
|
// add strategy type
|
|
958
985
|
imageUrl1: "https://images.alphafi.xyz/adminweb/navi_token.svg",
|
|
959
986
|
imageUrl2: "https://images.alphafi.xyz/adminweb/vsui.png",
|
|
960
|
-
retired:
|
|
987
|
+
retired: true,
|
|
961
988
|
},
|
|
962
989
|
"BLUEFIN-SUI-AUSD": {
|
|
963
990
|
packageId: constants_js_1.conf[constants_js_1.CONF_ENV].ALPHA_4_LATEST_PACKAGE_ID,
|
|
@@ -1947,61 +1974,13 @@ exports.poolIdQueryInvestorMap = {
|
|
|
1947
1974
|
"0x676fc5cad79f51f6a7d03bfa3474ecd3c695d322380fc68e3d4f61819da3bf8a": "wbtcWusdcInvestor",
|
|
1948
1975
|
"0x045e4e3ccd383bedeb8fda54c39a7a1b1a6ed6a9f66aec4998984373558f96a0": "navxSuiInvestor",
|
|
1949
1976
|
};
|
|
1950
|
-
// Pagination needed for more than 50 pools
|
|
1951
1977
|
async function getPoolExchangeRateMap() {
|
|
1952
|
-
const
|
|
1953
|
-
const
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
ids: poolIds,
|
|
1957
|
-
options: {
|
|
1958
|
-
showContent: true,
|
|
1959
|
-
},
|
|
1960
|
-
});
|
|
1961
|
-
for (const poolRawData of res) {
|
|
1962
|
-
const poolDetails = poolRawData.data;
|
|
1963
|
-
const poolId = poolDetails.objectId;
|
|
1964
|
-
const xTokenSupply = new decimal_js_1.Decimal(poolDetails.content.fields.xTokenSupply);
|
|
1965
|
-
const tokensInvested = new decimal_js_1.Decimal(poolDetails.content.fields.tokensInvested);
|
|
1966
|
-
const conversionRate = Number(xTokenSupply) !== 0
|
|
1967
|
-
? tokensInvested.div(xTokenSupply).toString()
|
|
1968
|
-
: "0";
|
|
1969
|
-
poolNameToConversionRateMap.set(exports.poolIdPoolNameMap[poolId], conversionRate);
|
|
1970
|
-
}
|
|
1971
|
-
// Looping pools
|
|
1972
|
-
const loopingPoolNames = Object.keys(exports.poolInfo).filter((poolName) => exports.poolInfo[poolName].strategyType === "LOOPING");
|
|
1973
|
-
const loopingPoolsMap = {};
|
|
1974
|
-
res
|
|
1975
|
-
.filter((poolRawData) => {
|
|
1976
|
-
const poolDetails = poolRawData.data;
|
|
1977
|
-
const poolId = poolDetails.objectId;
|
|
1978
|
-
return exports.poolInfo[exports.poolIdPoolNameMap[poolId]].strategyType === "LOOPING"
|
|
1979
|
-
? true
|
|
1980
|
-
: false;
|
|
1981
|
-
})
|
|
1982
|
-
.map((poolRawData) => {
|
|
1983
|
-
const poolDetails = poolRawData.data;
|
|
1984
|
-
const poolId = poolDetails.objectId;
|
|
1985
|
-
const poolName = exports.poolIdPoolNameMap[poolId];
|
|
1986
|
-
loopingPoolsMap[poolName] = poolRawData.data;
|
|
1987
|
-
});
|
|
1988
|
-
const naviInvestors = await (0, getReceipts_js_1.multiGetNaviInvestor)(loopingPoolNames);
|
|
1989
|
-
for (const poolName of loopingPoolNames) {
|
|
1990
|
-
const pool = loopingPoolsMap[poolName];
|
|
1991
|
-
const investor = naviInvestors[poolName];
|
|
1992
|
-
if (investor) {
|
|
1993
|
-
const liquidity = new decimal_js_1.Decimal(investor.content.fields.tokensDeposited);
|
|
1994
|
-
const debtToSupplyRatio = new decimal_js_1.Decimal(investor.content.fields.current_debt_to_supply_ratio);
|
|
1995
|
-
const tokensInvested = liquidity.mul(new decimal_js_1.Decimal(1).minus(new decimal_js_1.Decimal(debtToSupplyRatio).div(1e20)));
|
|
1996
|
-
const xTokenSupplyInPool = new decimal_js_1.Decimal(pool.content.fields.xTokenSupply);
|
|
1997
|
-
const exchangeRate = tokensInvested.div(xTokenSupplyInPool);
|
|
1998
|
-
poolNameToConversionRateMap.set(poolName, exchangeRate.toString());
|
|
1999
|
-
}
|
|
2000
|
-
else {
|
|
2001
|
-
console.error("investor not found for poolName: ", poolName);
|
|
2002
|
-
}
|
|
1978
|
+
const result = new Map();
|
|
1979
|
+
for (const poolName in exports.poolInfo) {
|
|
1980
|
+
const exchangeRate = await (0, getReceipts_js_1.getPoolExchangeRate)(poolName, false);
|
|
1981
|
+
result.set(poolName, exchangeRate.toString());
|
|
2003
1982
|
}
|
|
2004
|
-
return
|
|
1983
|
+
return result;
|
|
2005
1984
|
}
|
|
2006
1985
|
// Pagination needed for more than 50 pools
|
|
2007
1986
|
// DEPRECATED
|