@0dotxyz/p0-ts-sdk 1.1.0-alpha.8 → 1.1.0
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/index.cjs +24 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +23 -22
- package/dist/index.js.map +1 -1
- package/dist/vendor.cjs +84 -87
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +46 -18
- package/dist/vendor.d.ts +46 -18
- package/dist/vendor.js +70 -74
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
package/dist/vendor.cjs
CHANGED
|
@@ -12992,7 +12992,7 @@ function roundNearest(decimal) {
|
|
|
12992
12992
|
var interpolateLinear = (x, x0, y0, x1, y1) => {
|
|
12993
12993
|
return y0 + (x - x0) * (y1 - y0) / (x1 - x0);
|
|
12994
12994
|
};
|
|
12995
|
-
var
|
|
12995
|
+
var getKaminoBorrowRate = (currentUtilization, curve) => {
|
|
12996
12996
|
let [x0, y0, x1, y1] = [0, 0, 0, 0];
|
|
12997
12997
|
if (currentUtilization > 1) {
|
|
12998
12998
|
currentUtilization = 1;
|
|
@@ -13024,29 +13024,21 @@ var getBorrowRate = (currentUtilization, curve) => {
|
|
|
13024
13024
|
function calculateAPYFromAPR(apr) {
|
|
13025
13025
|
return Math.pow(1 + apr / SLOTS_PER_YEAR, SLOTS_PER_YEAR) - 1;
|
|
13026
13026
|
}
|
|
13027
|
-
function
|
|
13028
|
-
const liquidityAvailableAmount = new Decimal3__default.default(
|
|
13029
|
-
|
|
13030
|
-
);
|
|
13031
|
-
const borrowedAmount = new Fraction(
|
|
13032
|
-
reserve.liquidity.borrowedAmountSf
|
|
13033
|
-
).toDecimal();
|
|
13027
|
+
function getKaminoTotalSupply(reserve) {
|
|
13028
|
+
const liquidityAvailableAmount = new Decimal3__default.default(reserve.liquidity.availableAmount.toString());
|
|
13029
|
+
const borrowedAmount = new Fraction(reserve.liquidity.borrowedAmountSf).toDecimal();
|
|
13034
13030
|
const accumulatedProtocolFee = new Fraction(
|
|
13035
13031
|
reserve.liquidity.accumulatedProtocolFeesSf
|
|
13036
13032
|
).toDecimal();
|
|
13037
13033
|
const accumulatedReferrerFees = new Fraction(
|
|
13038
13034
|
reserve.liquidity.accumulatedReferrerFeesSf
|
|
13039
13035
|
).toDecimal();
|
|
13040
|
-
const pendingReferrerFees = new Fraction(
|
|
13041
|
-
reserve.liquidity.pendingReferrerFeesSf
|
|
13042
|
-
).toDecimal();
|
|
13036
|
+
const pendingReferrerFees = new Fraction(reserve.liquidity.pendingReferrerFeesSf).toDecimal();
|
|
13043
13037
|
return liquidityAvailableAmount.add(borrowedAmount).sub(accumulatedProtocolFee).sub(accumulatedReferrerFees).sub(pendingReferrerFees);
|
|
13044
13038
|
}
|
|
13045
13039
|
function calculateUtilizationRatio(reserve) {
|
|
13046
|
-
const totalBorrows = new Fraction(
|
|
13047
|
-
|
|
13048
|
-
).toDecimal();
|
|
13049
|
-
const totalSupply = getTotalSupply(reserve);
|
|
13040
|
+
const totalBorrows = new Fraction(reserve.liquidity.borrowedAmountSf).toDecimal();
|
|
13041
|
+
const totalSupply = getKaminoTotalSupply(reserve);
|
|
13050
13042
|
if (totalSupply.eq(0)) {
|
|
13051
13043
|
return 0;
|
|
13052
13044
|
}
|
|
@@ -13058,38 +13050,28 @@ function slotAdjustmentFactor(recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATIO
|
|
|
13058
13050
|
function calculateSlotAdjustmentFactor(reserve, recentSlotDurationMs) {
|
|
13059
13051
|
return 1e3 / SLOTS_PER_SECOND / recentSlotDurationMs;
|
|
13060
13052
|
}
|
|
13061
|
-
function
|
|
13053
|
+
function calculateKaminoEstimatedBorrowRate(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
|
|
13062
13054
|
const slotAdjFactor = slotAdjustmentFactor(recentSlotDurationMs);
|
|
13063
13055
|
const currentUtilization = calculateUtilizationRatio(reserve);
|
|
13064
13056
|
const curve = truncateBorrowCurve(reserve.config.borrowRateCurve.points);
|
|
13065
|
-
return
|
|
13057
|
+
return getKaminoBorrowRate(currentUtilization, curve) * slotAdjFactor;
|
|
13066
13058
|
}
|
|
13067
|
-
function
|
|
13068
|
-
const borrowRate =
|
|
13069
|
-
reserve,
|
|
13070
|
-
recentSlotDurationMs
|
|
13071
|
-
);
|
|
13059
|
+
function calculateKaminoEstimatedSupplyRate(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
|
|
13060
|
+
const borrowRate = calculateKaminoEstimatedBorrowRate(reserve, recentSlotDurationMs);
|
|
13072
13061
|
const currentUtilization = calculateUtilizationRatio(reserve);
|
|
13073
13062
|
const protocolTakeRatePct = 1 - reserve.config.protocolTakeRatePct / 100;
|
|
13074
13063
|
return borrowRate * currentUtilization * protocolTakeRatePct;
|
|
13075
13064
|
}
|
|
13076
|
-
function
|
|
13065
|
+
function calculateKaminoSupplyAPY(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
|
|
13077
13066
|
const currentUtilization = calculateUtilizationRatio(reserve);
|
|
13078
|
-
const borrowRate =
|
|
13079
|
-
reserve,
|
|
13080
|
-
recentSlotDurationMs
|
|
13081
|
-
);
|
|
13067
|
+
const borrowRate = calculateKaminoEstimatedBorrowRate(reserve, recentSlotDurationMs);
|
|
13082
13068
|
const protocolTakeRatePct = 1 - reserve.config.protocolTakeRatePct / 100;
|
|
13083
|
-
return calculateAPYFromAPR(
|
|
13084
|
-
currentUtilization * borrowRate * protocolTakeRatePct
|
|
13085
|
-
);
|
|
13069
|
+
return calculateAPYFromAPR(currentUtilization * borrowRate * protocolTakeRatePct);
|
|
13086
13070
|
}
|
|
13087
13071
|
function scaledSupplies(state) {
|
|
13088
13072
|
const liqMintDecimals = new Decimal3__default.default(state.liquidity.mintDecimals.toString());
|
|
13089
|
-
const totalSupplyLamports =
|
|
13090
|
-
const mintTotalSupplyLam = new Decimal3__default.default(
|
|
13091
|
-
state.collateral.mintTotalSupply.toString()
|
|
13092
|
-
);
|
|
13073
|
+
const totalSupplyLamports = getKaminoTotalSupply(state);
|
|
13074
|
+
const mintTotalSupplyLam = new Decimal3__default.default(state.collateral.mintTotalSupply.toString());
|
|
13093
13075
|
const liqScale = new Decimal3__default.default(10).pow(liqMintDecimals);
|
|
13094
13076
|
const collScale = new Decimal3__default.default(10).pow(liqMintDecimals);
|
|
13095
13077
|
const totalSupply = totalSupplyLamports.div(liqScale);
|
|
@@ -13122,7 +13104,7 @@ function generateKaminoReserveCurve(curvePoints, slotAdjustmentFactor2, fixedHos
|
|
|
13122
13104
|
const curve = truncateBorrowCurve(curvePoints);
|
|
13123
13105
|
return Array.from({ length: 101 }, (_, i) => {
|
|
13124
13106
|
const utilization = i / 100;
|
|
13125
|
-
const baseBorrowRate =
|
|
13107
|
+
const baseBorrowRate = getKaminoBorrowRate(utilization, curve) * slotAdjustmentFactor2;
|
|
13126
13108
|
const borrowAPR = baseBorrowRate + fixedHostInterestRate;
|
|
13127
13109
|
const supplyAPR = utilization * borrowAPR * protocolTakeRatePct;
|
|
13128
13110
|
const borrowAPY = calculateAPYFromAPR(borrowAPR);
|
|
@@ -13160,9 +13142,7 @@ function getRewardPerTimeUnitSecond(reward) {
|
|
|
13160
13142
|
const rewardAmountPerUnitDecimals = new Decimal3__default.default(10).pow(
|
|
13161
13143
|
reward.rewardsPerSecondDecimals.toString()
|
|
13162
13144
|
);
|
|
13163
|
-
const rewardAmountPerUnitLamports = new Decimal3__default.default(10).pow(
|
|
13164
|
-
rewardTokenDecimals.toString()
|
|
13165
|
-
);
|
|
13145
|
+
const rewardAmountPerUnitLamports = new Decimal3__default.default(10).pow(rewardTokenDecimals.toString());
|
|
13166
13146
|
const rpsAdjusted = new Decimal3__default.default(rewardPerTimeUnitSecond.toString()).div(rewardAmountPerUnitDecimals).div(rewardAmountPerUnitLamports);
|
|
13167
13147
|
return rewardPerTimeUnitSecond ? rpsAdjusted : new Decimal3__default.default(0);
|
|
13168
13148
|
}
|
|
@@ -13178,18 +13158,14 @@ async function getReserveRewardsApy(priceByMint, farmState, reserveState) {
|
|
|
13178
13158
|
if (reservePrice === void 0 || reservePrice === null || rewardPrice === void 0 || rewardPrice === null) {
|
|
13179
13159
|
continue;
|
|
13180
13160
|
}
|
|
13181
|
-
const { apy, apr } = calculateRewardApy(
|
|
13182
|
-
priceByMint,
|
|
13183
|
-
reserveState,
|
|
13184
|
-
rewardInfo
|
|
13185
|
-
);
|
|
13161
|
+
const { apy, apr } = calculateRewardApy(priceByMint, reserveState, rewardInfo);
|
|
13186
13162
|
rewardApys.push({ rewardApy: apy, rewardInfo, rewardApr: apr });
|
|
13187
13163
|
}
|
|
13188
13164
|
return rewardApys;
|
|
13189
13165
|
}
|
|
13190
13166
|
function calculateRewardApy(priceByMint, reserve, rewardInfo) {
|
|
13191
13167
|
const decimals = reserve.liquidity.mintDecimals.toNumber();
|
|
13192
|
-
const totalSupply =
|
|
13168
|
+
const totalSupply = getKaminoTotalSupply(reserve);
|
|
13193
13169
|
const mintAddress = reserve.liquidity.mintPubkey;
|
|
13194
13170
|
const totalAmount = lamportsToNumberDecimal(totalSupply, decimals);
|
|
13195
13171
|
const mintPrice = priceByMint[mintAddress.toString()] ?? 0;
|
|
@@ -27980,9 +27956,7 @@ var TEN = new anchor.BN(10);
|
|
|
27980
27956
|
var PERCENTAGE_PRECISION_EXP = new anchor.BN(6);
|
|
27981
27957
|
var PERCENTAGE_PRECISION = new anchor.BN(10).pow(PERCENTAGE_PRECISION_EXP);
|
|
27982
27958
|
var SPOT_MARKET_RATE_PRECISION_EXP = new anchor.BN(6);
|
|
27983
|
-
var SPOT_MARKET_RATE_PRECISION = new anchor.BN(10).pow(
|
|
27984
|
-
SPOT_MARKET_RATE_PRECISION_EXP
|
|
27985
|
-
);
|
|
27959
|
+
var SPOT_MARKET_RATE_PRECISION = new anchor.BN(10).pow(SPOT_MARKET_RATE_PRECISION_EXP);
|
|
27986
27960
|
var SPOT_MARKET_UTILIZATION_PRECISION_EXP = new anchor.BN(6);
|
|
27987
27961
|
var SPOT_MARKET_UTILIZATION_PRECISION = new anchor.BN(10).pow(
|
|
27988
27962
|
SPOT_MARKET_UTILIZATION_PRECISION_EXP
|
|
@@ -27996,24 +27970,21 @@ function divCeil(a, b) {
|
|
|
27996
27970
|
}
|
|
27997
27971
|
return quotient;
|
|
27998
27972
|
}
|
|
27999
|
-
function
|
|
27973
|
+
function getDriftTokenAmount(balanceAmount, spotMarket, balanceType) {
|
|
28000
27974
|
const precisionDecrease = TEN.pow(new anchor.BN(19 - spotMarket.decimals));
|
|
28001
27975
|
if (isSpotBalanceTypeVariant(balanceType, "deposit")) {
|
|
28002
27976
|
return balanceAmount.mul(spotMarket.cumulativeDepositInterest).div(precisionDecrease);
|
|
28003
27977
|
} else {
|
|
28004
|
-
return divCeil(
|
|
28005
|
-
balanceAmount.mul(spotMarket.cumulativeBorrowInterest),
|
|
28006
|
-
precisionDecrease
|
|
28007
|
-
);
|
|
27978
|
+
return divCeil(balanceAmount.mul(spotMarket.cumulativeBorrowInterest), precisionDecrease);
|
|
28008
27979
|
}
|
|
28009
27980
|
}
|
|
28010
|
-
function
|
|
28011
|
-
let tokenDepositAmount =
|
|
27981
|
+
function calculateDriftUtilization(bank, delta = ZERO) {
|
|
27982
|
+
let tokenDepositAmount = getDriftTokenAmount(
|
|
28012
27983
|
bank.depositBalance,
|
|
28013
27984
|
bank,
|
|
28014
27985
|
"deposit" /* DEPOSIT */
|
|
28015
27986
|
);
|
|
28016
|
-
let tokenBorrowAmount =
|
|
27987
|
+
let tokenBorrowAmount = getDriftTokenAmount(
|
|
28017
27988
|
bank.borrowBalance,
|
|
28018
27989
|
bank,
|
|
28019
27990
|
"borrow" /* BORROW */
|
|
@@ -28033,14 +28004,12 @@ function calculateUtilization(bank, delta = ZERO) {
|
|
|
28033
28004
|
}
|
|
28034
28005
|
return utilization;
|
|
28035
28006
|
}
|
|
28036
|
-
function
|
|
28037
|
-
const utilization = currentUtilization ||
|
|
28007
|
+
function calculateDriftInterestRate(bank, delta = ZERO, currentUtilization = null) {
|
|
28008
|
+
const utilization = currentUtilization || calculateDriftUtilization(bank, delta);
|
|
28038
28009
|
const optimalUtil = new anchor.BN(bank.optimalUtilization);
|
|
28039
28010
|
const optimalRate = new anchor.BN(bank.optimalBorrowRate);
|
|
28040
28011
|
const maxRate = new anchor.BN(bank.maxBorrowRate);
|
|
28041
|
-
const minRate = new anchor.BN(bank.minBorrowRate).mul(
|
|
28042
|
-
PERCENTAGE_PRECISION.divn(200)
|
|
28043
|
-
);
|
|
28012
|
+
const minRate = new anchor.BN(bank.minBorrowRate).mul(PERCENTAGE_PRECISION.divn(200));
|
|
28044
28013
|
const weightsDivisor = new anchor.BN(1e3);
|
|
28045
28014
|
const segments = [
|
|
28046
28015
|
[new anchor.BN(85e4), new anchor.BN(50)],
|
|
@@ -28075,17 +28044,17 @@ function calculateInterestRate(bank, delta = ZERO, currentUtilization = null) {
|
|
|
28075
28044
|
}
|
|
28076
28045
|
return anchor.BN.max(minRate, rate);
|
|
28077
28046
|
}
|
|
28078
|
-
function
|
|
28079
|
-
return
|
|
28047
|
+
function calculateDriftBorrowRate(bank, delta = ZERO, currentUtilization = null) {
|
|
28048
|
+
return calculateDriftInterestRate(bank, delta, currentUtilization);
|
|
28080
28049
|
}
|
|
28081
|
-
function
|
|
28082
|
-
const utilization = currentUtilization ||
|
|
28083
|
-
const borrowRate =
|
|
28050
|
+
function calculateDriftDepositRate(bank, delta = ZERO, currentUtilization = null) {
|
|
28051
|
+
const utilization = currentUtilization || calculateDriftUtilization(bank, delta);
|
|
28052
|
+
const borrowRate = calculateDriftBorrowRate(bank, delta, utilization);
|
|
28084
28053
|
const depositRate = borrowRate.mul(PERCENTAGE_PRECISION.sub(new anchor.BN(bank.insuranceFund.totalFactor))).mul(utilization).div(SPOT_MARKET_UTILIZATION_PRECISION).div(PERCENTAGE_PRECISION);
|
|
28085
28054
|
return depositRate;
|
|
28086
28055
|
}
|
|
28087
|
-
function
|
|
28088
|
-
const depositRate =
|
|
28056
|
+
function calculateDriftLendingAPY(bank, delta = ZERO, currentUtilization = null, compoundingPeriodsPerYear = 365) {
|
|
28057
|
+
const depositRate = calculateDriftDepositRate(bank, delta, currentUtilization);
|
|
28089
28058
|
if (depositRate.eq(ZERO)) {
|
|
28090
28059
|
return ZERO;
|
|
28091
28060
|
}
|
|
@@ -28112,13 +28081,13 @@ function calculateLendingAPY(bank, delta = ZERO, currentUtilization = null, comp
|
|
|
28112
28081
|
const apy = apyInCalcPrecision.mul(PERCENTAGE_PRECISION).div(CALC_PRECISION);
|
|
28113
28082
|
return apy;
|
|
28114
28083
|
}
|
|
28115
|
-
function
|
|
28116
|
-
const depositRate =
|
|
28084
|
+
function calculateDriftLendingAPR(bank, delta = ZERO, currentUtilization = null) {
|
|
28085
|
+
const depositRate = calculateDriftDepositRate(bank, delta, currentUtilization);
|
|
28117
28086
|
const apr = depositRate.mul(PERCENTAGE_PRECISION).div(SPOT_MARKET_RATE_PRECISION);
|
|
28118
28087
|
return apr;
|
|
28119
28088
|
}
|
|
28120
|
-
function
|
|
28121
|
-
const borrowRate =
|
|
28089
|
+
function calculateDriftBorrowAPY(bank, delta = ZERO, currentUtilization = null, compoundingPeriodsPerYear = 365) {
|
|
28090
|
+
const borrowRate = calculateDriftBorrowRate(bank, delta, currentUtilization);
|
|
28122
28091
|
if (borrowRate.eq(ZERO)) {
|
|
28123
28092
|
return ZERO;
|
|
28124
28093
|
}
|
|
@@ -28145,11 +28114,38 @@ function calculateBorrowAPY(bank, delta = ZERO, currentUtilization = null, compo
|
|
|
28145
28114
|
const apy = apyInCalcPrecision.mul(PERCENTAGE_PRECISION).div(CALC_PRECISION);
|
|
28146
28115
|
return apy;
|
|
28147
28116
|
}
|
|
28148
|
-
function
|
|
28149
|
-
const borrowRate =
|
|
28117
|
+
function calculateDriftBorrowAPR(bank, delta = ZERO, currentUtilization = null) {
|
|
28118
|
+
const borrowRate = calculateDriftBorrowRate(bank, delta, currentUtilization);
|
|
28150
28119
|
const apr = borrowRate.mul(PERCENTAGE_PRECISION).div(SPOT_MARKET_RATE_PRECISION);
|
|
28151
28120
|
return apr;
|
|
28152
28121
|
}
|
|
28122
|
+
var SLOTS_PER_YEAR2 = 63072e3;
|
|
28123
|
+
function calculateAPYFromAPR2(apr) {
|
|
28124
|
+
if (apr === 0) return 0;
|
|
28125
|
+
return Math.pow(1 + apr / SLOTS_PER_YEAR2, SLOTS_PER_YEAR2) - 1;
|
|
28126
|
+
}
|
|
28127
|
+
function generateDriftReserveCurve(spotMarket) {
|
|
28128
|
+
return Array.from({ length: 101 }, (_, i) => {
|
|
28129
|
+
const utilizationPercent = i / 100;
|
|
28130
|
+
const utilizationBN = new anchor.BN(
|
|
28131
|
+
Math.floor(utilizationPercent * SPOT_MARKET_UTILIZATION_PRECISION.toNumber())
|
|
28132
|
+
);
|
|
28133
|
+
const borrowRateBN = calculateDriftBorrowRate(spotMarket, ZERO, utilizationBN);
|
|
28134
|
+
const depositRateBN = calculateDriftDepositRate(spotMarket, ZERO, utilizationBN);
|
|
28135
|
+
const borrowAPR = borrowRateBN.toNumber() / SPOT_MARKET_RATE_PRECISION.toNumber();
|
|
28136
|
+
const supplyAPR = depositRateBN.toNumber() / SPOT_MARKET_RATE_PRECISION.toNumber();
|
|
28137
|
+
const borrowAPY = calculateAPYFromAPR2(borrowAPR);
|
|
28138
|
+
const supplyAPY = calculateAPYFromAPR2(supplyAPR);
|
|
28139
|
+
return {
|
|
28140
|
+
utilization: utilizationPercent * 100,
|
|
28141
|
+
// Convert to percentage (0-100)
|
|
28142
|
+
borrowAPY: borrowAPY * 100,
|
|
28143
|
+
// Convert to percentage
|
|
28144
|
+
supplyAPY: supplyAPY * 100
|
|
28145
|
+
// Convert to percentage
|
|
28146
|
+
};
|
|
28147
|
+
});
|
|
28148
|
+
}
|
|
28153
28149
|
|
|
28154
28150
|
// src/vendor/drift/utils/rewards.utils.ts
|
|
28155
28151
|
async function getDriftRewards(spotMarkets, userStates, connection) {
|
|
@@ -28383,19 +28379,19 @@ exports.TokenUnsupportedInstructionError = TokenUnsupportedInstructionError;
|
|
|
28383
28379
|
exports.ZERO = ZERO;
|
|
28384
28380
|
exports.addSigners = addSigners;
|
|
28385
28381
|
exports.calculateAPYFromAPR = calculateAPYFromAPR;
|
|
28386
|
-
exports.
|
|
28387
|
-
exports.
|
|
28388
|
-
exports.
|
|
28389
|
-
exports.
|
|
28390
|
-
exports.
|
|
28391
|
-
exports.
|
|
28392
|
-
exports.
|
|
28393
|
-
exports.
|
|
28394
|
-
exports.
|
|
28382
|
+
exports.calculateDriftBorrowAPR = calculateDriftBorrowAPR;
|
|
28383
|
+
exports.calculateDriftBorrowAPY = calculateDriftBorrowAPY;
|
|
28384
|
+
exports.calculateDriftBorrowRate = calculateDriftBorrowRate;
|
|
28385
|
+
exports.calculateDriftDepositRate = calculateDriftDepositRate;
|
|
28386
|
+
exports.calculateDriftInterestRate = calculateDriftInterestRate;
|
|
28387
|
+
exports.calculateDriftLendingAPR = calculateDriftLendingAPR;
|
|
28388
|
+
exports.calculateDriftLendingAPY = calculateDriftLendingAPY;
|
|
28389
|
+
exports.calculateDriftUtilization = calculateDriftUtilization;
|
|
28390
|
+
exports.calculateKaminoEstimatedBorrowRate = calculateKaminoEstimatedBorrowRate;
|
|
28391
|
+
exports.calculateKaminoEstimatedSupplyRate = calculateKaminoEstimatedSupplyRate;
|
|
28392
|
+
exports.calculateKaminoSupplyAPY = calculateKaminoSupplyAPY;
|
|
28395
28393
|
exports.calculateRewardApy = calculateRewardApy;
|
|
28396
28394
|
exports.calculateSlotAdjustmentFactor = calculateSlotAdjustmentFactor;
|
|
28397
|
-
exports.calculateSupplyAPY = calculateSupplyAPY;
|
|
28398
|
-
exports.calculateUtilization = calculateUtilization;
|
|
28399
28395
|
exports.calculateUtilizationRatio = calculateUtilizationRatio;
|
|
28400
28396
|
exports.closeAccountInstructionData = closeAccountInstructionData;
|
|
28401
28397
|
exports.createAccountIx = createAccountIx;
|
|
@@ -28456,6 +28452,7 @@ exports.findPoolMplAuthorityAddress = findPoolMplAuthorityAddress;
|
|
|
28456
28452
|
exports.findPoolOnRampAddress = findPoolOnRampAddress;
|
|
28457
28453
|
exports.findPoolStakeAddress = findPoolStakeAddress;
|
|
28458
28454
|
exports.findPoolStakeAuthorityAddress = findPoolStakeAuthorityAddress;
|
|
28455
|
+
exports.generateDriftReserveCurve = generateDriftReserveCurve;
|
|
28459
28456
|
exports.generateKaminoReserveCurve = generateKaminoReserveCurve;
|
|
28460
28457
|
exports.getAccount = getAccount;
|
|
28461
28458
|
exports.getAccountLen = getAccountLen;
|
|
@@ -28463,9 +28460,11 @@ exports.getAllDerivedDriftAccounts = getAllDerivedDriftAccounts;
|
|
|
28463
28460
|
exports.getAllDerivedKaminoAccounts = getAllDerivedKaminoAccounts;
|
|
28464
28461
|
exports.getAllRequiredMarkets = getAllRequiredMarkets;
|
|
28465
28462
|
exports.getAssociatedTokenAddressSync = getAssociatedTokenAddressSync;
|
|
28466
|
-
exports.getBorrowRate = getBorrowRate;
|
|
28467
28463
|
exports.getDriftRewards = getDriftRewards;
|
|
28464
|
+
exports.getDriftTokenAmount = getDriftTokenAmount;
|
|
28468
28465
|
exports.getFixedHostInterestRate = getFixedHostInterestRate;
|
|
28466
|
+
exports.getKaminoBorrowRate = getKaminoBorrowRate;
|
|
28467
|
+
exports.getKaminoTotalSupply = getKaminoTotalSupply;
|
|
28469
28468
|
exports.getMinimumBalanceForRentExemptAccount = getMinimumBalanceForRentExemptAccount;
|
|
28470
28469
|
exports.getMinimumBalanceForRentExemptAccountWithExtensions = getMinimumBalanceForRentExemptAccountWithExtensions;
|
|
28471
28470
|
exports.getMint = getMint;
|
|
@@ -28475,8 +28474,6 @@ exports.getReserveRewardsApy = getReserveRewardsApy;
|
|
|
28475
28474
|
exports.getRewardPerTimeUnitSecond = getRewardPerTimeUnitSecond;
|
|
28476
28475
|
exports.getStakeAccount = getStakeAccount;
|
|
28477
28476
|
exports.getSwitchboardProgram = getSwitchboardProgram;
|
|
28478
|
-
exports.getTokenAmount = getTokenAmount;
|
|
28479
|
-
exports.getTotalSupply = getTotalSupply;
|
|
28480
28477
|
exports.initializeAccountInstructionData = initializeAccountInstructionData;
|
|
28481
28478
|
exports.initializeStakedPoolIxs = initializeStakedPoolIxs;
|
|
28482
28479
|
exports.initializeStakedPoolTx = initializeStakedPoolTx;
|