@0dotxyz/p0-ts-sdk 2.7.1-alpha.0 → 2.7.1
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/README.md +2 -9
- package/dist/index.cjs +30 -216
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +9 -184
- package/dist/index.d.ts +9 -184
- package/dist/index.js +31 -203
- package/dist/index.js.map +1 -1
- package/dist/instructions.cjs.map +1 -1
- package/dist/instructions.d.cts +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/instructions.js.map +1 -1
- package/dist/{types-B5SGXpex.d.ts → types-Ctm1kvCr.d.ts} +1 -1
- package/dist/{types-BFLi0Ozl.d.cts → types-DzbVhEfo.d.cts} +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -69481,6 +69481,7 @@ function makeEndFlashLoanIx2(programId, accounts, remainingAccounts = []) {
|
|
|
69481
69481
|
{ pubkey: accounts.group, isSigner: false, isWritable: false },
|
|
69482
69482
|
{ pubkey: accounts.authority, isSigner: true, isWritable: false }
|
|
69483
69483
|
];
|
|
69484
|
+
if (!isMarginfiV0110Live(programId)) keys.splice(1, 1);
|
|
69484
69485
|
keys.push(...remainingAccounts);
|
|
69485
69486
|
return new TransactionInstruction({
|
|
69486
69487
|
keys,
|
|
@@ -69690,6 +69691,7 @@ function makePulseHealthIx3(programId, accounts, remainingAccounts = []) {
|
|
|
69690
69691
|
{ pubkey: accounts.marginfiAccount, isSigner: false, isWritable: true },
|
|
69691
69692
|
{ pubkey: accounts.group, isSigner: false, isWritable: false }
|
|
69692
69693
|
];
|
|
69694
|
+
if (!isMarginfiV0110Live(programId)) keys.splice(1, 1);
|
|
69693
69695
|
keys.push(...remainingAccounts);
|
|
69694
69696
|
return new TransactionInstruction({
|
|
69695
69697
|
keys,
|
|
@@ -69709,6 +69711,7 @@ function makeAccountTransferToNewAccountIx2(programId, accounts) {
|
|
|
69709
69711
|
{ pubkey: accounts.feeState, isSigner: false, isWritable: false },
|
|
69710
69712
|
{ pubkey: SystemProgram.programId, isSigner: false, isWritable: false }
|
|
69711
69713
|
];
|
|
69714
|
+
if (!isMarginfiV0110Live(programId)) keys.splice(7, 1);
|
|
69712
69715
|
return new TransactionInstruction({
|
|
69713
69716
|
keys,
|
|
69714
69717
|
programId,
|
|
@@ -73857,20 +73860,6 @@ var MarginfiAccount = class _MarginfiAccount {
|
|
|
73857
73860
|
...params
|
|
73858
73861
|
});
|
|
73859
73862
|
}
|
|
73860
|
-
/**
|
|
73861
|
-
* Calculates the maximum amount that can be deposited into a bank.
|
|
73862
|
-
*
|
|
73863
|
-
* Deposits are not constrained by account health, only by the bank's remaining deposit cap
|
|
73864
|
-
* and (optionally) the wallet balance.
|
|
73865
|
-
*
|
|
73866
|
-
* @param params - Configuration for max deposit computation
|
|
73867
|
-
* @returns Maximum depositable amount in UI units
|
|
73868
|
-
*
|
|
73869
|
-
* @see {@link computeMaxDepositForBank} for implementation details
|
|
73870
|
-
*/
|
|
73871
|
-
computeMaxDepositForBank(params) {
|
|
73872
|
-
return computeMaxDepositForBank(params);
|
|
73873
|
-
}
|
|
73874
73863
|
/**
|
|
73875
73864
|
* Gets the banks required for health check calculations.
|
|
73876
73865
|
*
|
|
@@ -77730,9 +77719,7 @@ function computeMaxBorrowForBank(params) {
|
|
|
77730
77719
|
assetShareValueMultiplierByBank,
|
|
77731
77720
|
emodeImpactStatus,
|
|
77732
77721
|
volatilityFactor,
|
|
77733
|
-
activePair
|
|
77734
|
-
groupRateLimiter,
|
|
77735
|
-
ignoreBankLimits
|
|
77722
|
+
activePair
|
|
77736
77723
|
} = params;
|
|
77737
77724
|
const bank = banksMap.get(bankAddress.toBase58());
|
|
77738
77725
|
if (!bank) throw Error(`Bank ${bankAddress.toBase58()} not found`);
|
|
@@ -77792,63 +77779,15 @@ function computeMaxBorrowForBank(params) {
|
|
|
77792
77779
|
assetShareValueMultiplier
|
|
77793
77780
|
});
|
|
77794
77781
|
const liabWeight = getLiabilityWeight(bank.config, 0 /* Initial */);
|
|
77795
|
-
|
|
77796
|
-
bank.
|
|
77797
|
-
|
|
77798
|
-
|
|
77799
|
-
|
|
77800
|
-
freeCollateral.minus(untiedCollateralForBank).div(
|
|
77801
|
-
) : untiedCollateralForBank.div(priceLowestBias.times(assetWeight)).plus(freeCollateral.minus(untiedCollateralForBank).div(liabPriceWeighted));
|
|
77802
|
-
if (ignoreBankLimits) return healthMaxBorrow;
|
|
77803
|
-
const borrowCapRemaining = new BigNumber3(computeBankBorrowCapRemaining(bank)).div(
|
|
77804
|
-
originationFeeFactor
|
|
77805
|
-
);
|
|
77806
|
-
const availableLiquidity = computeBankProjectedAvailableLiquidity(
|
|
77807
|
-
bank,
|
|
77808
|
-
assetShareValueMultiplier
|
|
77809
|
-
).div(originationFeeFactor);
|
|
77810
|
-
const rateLimitRemaining = computeOutflowRateLimitRemaining(bank, oraclePrice, groupRateLimiter);
|
|
77811
|
-
return BigNumber3.max(
|
|
77812
|
-
0,
|
|
77813
|
-
BigNumber3.min(healthMaxBorrow, borrowCapRemaining, availableLiquidity, rateLimitRemaining)
|
|
77814
|
-
);
|
|
77815
|
-
}
|
|
77816
|
-
function computeOutflowRateLimitRemaining(bank, oraclePrice, groupRateLimiter) {
|
|
77817
|
-
const nowSeconds = Date.now() / 1e3;
|
|
77818
|
-
let remaining = new BigNumber3(Infinity);
|
|
77819
|
-
const bankRemaining = computeBankRateLimitRemaining(bank, nowSeconds);
|
|
77820
|
-
if (bankRemaining !== null) remaining = BigNumber3.min(remaining, bankRemaining);
|
|
77821
|
-
const groupRemainingUsd = computeGroupRateLimitRemainingUsd(groupRateLimiter, nowSeconds);
|
|
77822
|
-
if (groupRemainingUsd !== null) {
|
|
77823
|
-
const price = getPrice(oraclePrice, 1 /* None */, false);
|
|
77824
|
-
if (price.gt(0)) remaining = BigNumber3.min(remaining, groupRemainingUsd.div(price));
|
|
77782
|
+
if (assetWeight.eq(0)) {
|
|
77783
|
+
return computeQuantityUi(balance, bank, assetShareValueMultiplier).assets.plus(
|
|
77784
|
+
freeCollateral.minus(untiedCollateralForBank).div(priceHighestBias.times(liabWeight))
|
|
77785
|
+
);
|
|
77786
|
+
} else {
|
|
77787
|
+
return untiedCollateralForBank.div(priceLowestBias.times(assetWeight)).plus(freeCollateral.minus(untiedCollateralForBank).div(priceHighestBias.times(liabWeight)));
|
|
77825
77788
|
}
|
|
77826
|
-
return remaining;
|
|
77827
77789
|
}
|
|
77828
77790
|
function computeMaxWithdrawForBank(params) {
|
|
77829
|
-
const {
|
|
77830
|
-
banksMap,
|
|
77831
|
-
bankAddress,
|
|
77832
|
-
oraclePricesByBank,
|
|
77833
|
-
assetShareValueMultiplierByBank,
|
|
77834
|
-
groupRateLimiter,
|
|
77835
|
-
ignoreBankLimits
|
|
77836
|
-
} = params;
|
|
77837
|
-
const bank = banksMap.get(bankAddress.toBase58());
|
|
77838
|
-
if (!bank) throw Error(`Bank ${bankAddress.toBase58()} not found`);
|
|
77839
|
-
const healthMaxWithdraw = computeHealthMaxWithdrawForBank(params);
|
|
77840
|
-
if (ignoreBankLimits) return healthMaxWithdraw;
|
|
77841
|
-
const oraclePrice = oraclePricesByBank.get(bankAddress.toBase58());
|
|
77842
|
-
if (!oraclePrice) throw Error(`Oracle price for ${bankAddress.toBase58()} not found`);
|
|
77843
|
-
const assetShareValueMultiplier = assetShareValueMultiplierByBank?.get(bankAddress.toBase58());
|
|
77844
|
-
const availableLiquidity = computeBankProjectedAvailableLiquidity(
|
|
77845
|
-
bank,
|
|
77846
|
-
assetShareValueMultiplier
|
|
77847
|
-
);
|
|
77848
|
-
const rateLimitRemaining = computeOutflowRateLimitRemaining(bank, oraclePrice, groupRateLimiter);
|
|
77849
|
-
return BigNumber3.max(0, BigNumber3.min(healthMaxWithdraw, availableLiquidity, rateLimitRemaining));
|
|
77850
|
-
}
|
|
77851
|
-
function computeHealthMaxWithdrawForBank(params) {
|
|
77852
77791
|
const {
|
|
77853
77792
|
account,
|
|
77854
77793
|
banksMap,
|
|
@@ -77944,17 +77883,6 @@ function computeHealthMaxWithdrawForBank(params) {
|
|
|
77944
77883
|
const maxWithdraw = initUntiedCollateralForBank.div(initWeightedPrice);
|
|
77945
77884
|
return maxWithdraw;
|
|
77946
77885
|
}
|
|
77947
|
-
function computeMaxDepositForBank(params) {
|
|
77948
|
-
const { banksMap, bankAddress, assetShareValueMultiplierByBank, walletBalance } = params;
|
|
77949
|
-
const bank = banksMap.get(bankAddress.toBase58());
|
|
77950
|
-
if (!bank) throw Error(`Bank ${bankAddress.toBase58()} not found`);
|
|
77951
|
-
const assetShareValueMultiplier = assetShareValueMultiplierByBank?.get(bankAddress.toBase58());
|
|
77952
|
-
const depositCapRemaining = new BigNumber3(computeBankDepositCapRemaining(bank)).times(
|
|
77953
|
-
assetShareValueMultiplier ?? 1
|
|
77954
|
-
);
|
|
77955
|
-
if (walletBalance === void 0) return depositCapRemaining;
|
|
77956
|
-
return BigNumber3.max(0, BigNumber3.min(depositCapRemaining, new BigNumber3(walletBalance)));
|
|
77957
|
-
}
|
|
77958
77886
|
|
|
77959
77887
|
// src/services/account/utils/misc.utils.ts
|
|
77960
77888
|
function floor(value, decimals) {
|
|
@@ -79627,21 +79555,6 @@ var fetchMultipleBanks = async (program, opts) => {
|
|
|
79627
79555
|
}
|
|
79628
79556
|
return bankDatas;
|
|
79629
79557
|
};
|
|
79630
|
-
var U64_MAX = new BigNumber3("18446744073709551615");
|
|
79631
|
-
var DRIFT_SCALED_BALANCE_DECIMALS = 9;
|
|
79632
|
-
function isDepositLimitActive(bank) {
|
|
79633
|
-
return !bank.config.depositLimit.eq(U64_MAX);
|
|
79634
|
-
}
|
|
79635
|
-
function isBorrowLimitActive(bank) {
|
|
79636
|
-
return !bank.config.borrowLimit.eq(U64_MAX);
|
|
79637
|
-
}
|
|
79638
|
-
function getEffectiveDepositLimit(bank) {
|
|
79639
|
-
const limit = bank.config.depositLimit;
|
|
79640
|
-
if (bank.config.assetTag !== 4 /* DRIFT */) return limit;
|
|
79641
|
-
const diff = DRIFT_SCALED_BALANCE_DECIMALS - bank.mintDecimals;
|
|
79642
|
-
if (diff === 0) return limit;
|
|
79643
|
-
return diff > 0 ? limit.times(10 ** diff) : limit.div(10 ** -diff);
|
|
79644
|
-
}
|
|
79645
79558
|
function computeInterestRates(bank) {
|
|
79646
79559
|
const { insuranceFeeFixedApr, insuranceIrFee, protocolFixedFeeApr, protocolIrFee } = bank.config.interestRateConfig;
|
|
79647
79560
|
const fixedFee = insuranceFeeFixedApr.plus(protocolFixedFeeApr);
|
|
@@ -79736,34 +79649,25 @@ function computeUtilizationRate(bank) {
|
|
|
79736
79649
|
return liabilities.div(assets);
|
|
79737
79650
|
}
|
|
79738
79651
|
var SECONDS_PER_DAY = 24 * 60 * 60;
|
|
79739
|
-
var SECONDS_PER_YEAR = SECONDS_PER_DAY * 365;
|
|
79740
|
-
var EXECUTION_HEADROOM_SECONDS = 120;
|
|
79741
|
-
function computeAccrualProjectionSeconds(bank, nowSeconds = Date.now() / 1e3) {
|
|
79742
|
-
const age = Math.max(0, nowSeconds - bank.lastUpdate);
|
|
79743
|
-
return Math.max(2 * age, age + EXECUTION_HEADROOM_SECONDS);
|
|
79744
|
-
}
|
|
79652
|
+
var SECONDS_PER_YEAR = SECONDS_PER_DAY * 365.25;
|
|
79745
79653
|
function computeRemainingCapacity(bank) {
|
|
79746
79654
|
const totalDeposits = getTotalAssetQuantity(bank);
|
|
79747
|
-
const remainingCapacity =
|
|
79748
|
-
0,
|
|
79749
|
-
getEffectiveDepositLimit(bank).minus(totalDeposits).minus(1).integerValue(BigNumber3.ROUND_FLOOR)
|
|
79750
|
-
) : U64_MAX;
|
|
79655
|
+
const remainingCapacity = BigNumber3.max(0, bank.config.depositLimit.minus(totalDeposits));
|
|
79751
79656
|
const totalBorrows = getTotalLiabilityQuantity(bank);
|
|
79752
|
-
const remainingBorrowCapacity =
|
|
79753
|
-
|
|
79754
|
-
bank.config.borrowLimit.minus(totalBorrows).minus(1).integerValue(BigNumber3.ROUND_FLOOR)
|
|
79755
|
-
) : U64_MAX;
|
|
79756
|
-
const projectionSeconds = computeAccrualProjectionSeconds(bank);
|
|
79657
|
+
const remainingBorrowCapacity = BigNumber3.max(0, bank.config.borrowLimit.minus(totalBorrows));
|
|
79658
|
+
const durationSinceLastAccrual = Date.now() / 1e3 - bank.lastUpdate;
|
|
79757
79659
|
const { lendingRate, borrowingRate } = computeInterestRates(bank);
|
|
79758
|
-
const
|
|
79759
|
-
const
|
|
79760
|
-
const depositCapacity = remainingCapacity.minus(
|
|
79761
|
-
const borrowCapacity = remainingBorrowCapacity.minus(
|
|
79660
|
+
const outstandingLendingInterest = lendingRate.times(durationSinceLastAccrual).dividedBy(SECONDS_PER_YEAR).times(totalDeposits);
|
|
79661
|
+
const outstandingBorrowInterest = borrowingRate.times(durationSinceLastAccrual).dividedBy(SECONDS_PER_YEAR).times(totalBorrows);
|
|
79662
|
+
const depositCapacity = remainingCapacity.minus(outstandingLendingInterest.times(2));
|
|
79663
|
+
const borrowCapacity = remainingBorrowCapacity.minus(outstandingBorrowInterest.times(2));
|
|
79762
79664
|
return {
|
|
79763
79665
|
depositCapacity,
|
|
79764
79666
|
borrowCapacity
|
|
79765
79667
|
};
|
|
79766
79668
|
}
|
|
79669
|
+
|
|
79670
|
+
// src/services/bank/utils/bank-metrics.utils.ts
|
|
79767
79671
|
function isStandardBorrowable(bank) {
|
|
79768
79672
|
const { assetTag, operationalState, borrowLimit } = bank.config;
|
|
79769
79673
|
return (assetTag === 0 /* DEFAULT */ || assetTag === 1 /* SOL */) && operationalState === "Operational" /* Operational */ && borrowLimit.gt(0);
|
|
@@ -79773,7 +79677,9 @@ function isStandardDepositable(bank) {
|
|
|
79773
79677
|
return (assetTag === 0 /* DEFAULT */ || assetTag === 1 /* SOL */) && operationalState === "Operational" /* Operational */;
|
|
79774
79678
|
}
|
|
79775
79679
|
function computeBankTotalDeposits(bank, assetShareValueMultiplier) {
|
|
79776
|
-
const totalAssets = getTotalAssetQuantity(bank).times(
|
|
79680
|
+
const totalAssets = getTotalAssetQuantity(bank).times(
|
|
79681
|
+
assetShareValueMultiplier ?? 1
|
|
79682
|
+
);
|
|
79777
79683
|
return nativeToUi(totalAssets, bank.mintDecimals);
|
|
79778
79684
|
}
|
|
79779
79685
|
function computeBankTotalBorrows(bank) {
|
|
@@ -79804,35 +79710,14 @@ function computeBankPoolSize(bank, assetShareValueMultiplier) {
|
|
|
79804
79710
|
const borrowCap = nativeToUi(bank.config.borrowLimit, bank.mintDecimals);
|
|
79805
79711
|
return Math.max(0, Math.min(totalDeposits, borrowCap) - totalBorrows);
|
|
79806
79712
|
}
|
|
79807
|
-
function computeBankAvailableLiquidity(bank, assetShareValueMultiplier) {
|
|
79808
|
-
const totalDeposits = computeBankTotalDeposits(bank, assetShareValueMultiplier);
|
|
79809
|
-
const totalBorrows = computeBankTotalBorrows(bank);
|
|
79810
|
-
return BigNumber3.max(0, new BigNumber3(totalDeposits).minus(totalBorrows));
|
|
79811
|
-
}
|
|
79812
79713
|
function computeBankDepositCapRemaining(bank) {
|
|
79813
|
-
if (!isDepositLimitActive(bank)) return Infinity;
|
|
79814
79714
|
const { depositCapacity } = computeRemainingCapacity(bank);
|
|
79815
79715
|
return Math.max(0, nativeToUi(depositCapacity, bank.mintDecimals));
|
|
79816
79716
|
}
|
|
79817
79717
|
function computeBankBorrowCapRemaining(bank) {
|
|
79818
|
-
if (!isBorrowLimitActive(bank)) return Infinity;
|
|
79819
79718
|
const { borrowCapacity } = computeRemainingCapacity(bank);
|
|
79820
79719
|
return Math.max(0, nativeToUi(borrowCapacity, bank.mintDecimals));
|
|
79821
79720
|
}
|
|
79822
|
-
function computeBankProjectedAvailableLiquidity(bank, assetShareValueMultiplier) {
|
|
79823
|
-
const liquidity = computeBankAvailableLiquidity(bank, assetShareValueMultiplier);
|
|
79824
|
-
const totalDeposits = computeBankTotalDeposits(bank, assetShareValueMultiplier);
|
|
79825
|
-
const totalBorrows = computeBankTotalBorrows(bank);
|
|
79826
|
-
const projectionYears = computeAccrualProjectionSeconds(bank) / SECONDS_PER_YEAR;
|
|
79827
|
-
const { lendingRate, borrowingRate } = computeInterestRates(bank);
|
|
79828
|
-
const projectedBorrowInterest = borrowingRate.times(totalBorrows).times(projectionYears);
|
|
79829
|
-
const projectedLendingInterest = lendingRate.times(totalDeposits).times(projectionYears);
|
|
79830
|
-
const liquidityLostToAccrual = BigNumber3.max(
|
|
79831
|
-
0,
|
|
79832
|
-
projectedBorrowInterest.minus(projectedLendingInterest)
|
|
79833
|
-
);
|
|
79834
|
-
return BigNumber3.max(0, liquidity.minus(liquidityLostToAccrual));
|
|
79835
|
-
}
|
|
79836
79721
|
function computeBankSupplyApy(bank) {
|
|
79837
79722
|
return aprToApy(computeInterestRates(bank).lendingRate.toNumber());
|
|
79838
79723
|
}
|
|
@@ -79845,7 +79730,11 @@ function computeBankMetrics(params) {
|
|
|
79845
79730
|
symbol,
|
|
79846
79731
|
totalDeposits: computeBankTotalDeposits(bank, assetShareValueMultiplier),
|
|
79847
79732
|
totalBorrows: computeBankTotalBorrows(bank),
|
|
79848
|
-
totalDepositsUsd: computeBankTotalDepositsUsd(
|
|
79733
|
+
totalDepositsUsd: computeBankTotalDepositsUsd(
|
|
79734
|
+
bank,
|
|
79735
|
+
oraclePrice,
|
|
79736
|
+
assetShareValueMultiplier
|
|
79737
|
+
),
|
|
79849
79738
|
totalBorrowsUsd: computeBankTotalBorrowsUsd(bank, oraclePrice),
|
|
79850
79739
|
utilizationRate: computeUtilizationRate(bank).toNumber(),
|
|
79851
79740
|
poolSize: computeBankPoolSize(bank, assetShareValueMultiplier),
|
|
@@ -79873,47 +79762,6 @@ function requireTokenProgram(tokenProgramsByBank, address, makeError = (message)
|
|
|
79873
79762
|
}
|
|
79874
79763
|
return tokenProgram;
|
|
79875
79764
|
}
|
|
79876
|
-
function computeRateLimitWindowRemainingCapacity(window, nowSeconds) {
|
|
79877
|
-
const { maxOutflow, windowDuration } = window;
|
|
79878
|
-
if (maxOutflow.lte(0)) return null;
|
|
79879
|
-
if (windowDuration === 0) return maxOutflow;
|
|
79880
|
-
let { windowStart, prevWindowOutflow, curWindowOutflow } = window;
|
|
79881
|
-
const elapsedRaw = Math.floor(nowSeconds) - windowStart;
|
|
79882
|
-
if (elapsedRaw >= windowDuration * 2) {
|
|
79883
|
-
windowStart = Math.floor(nowSeconds);
|
|
79884
|
-
prevWindowOutflow = new BigNumber3(0);
|
|
79885
|
-
curWindowOutflow = new BigNumber3(0);
|
|
79886
|
-
} else if (elapsedRaw >= windowDuration) {
|
|
79887
|
-
windowStart = windowStart + windowDuration;
|
|
79888
|
-
prevWindowOutflow = curWindowOutflow;
|
|
79889
|
-
curWindowOutflow = new BigNumber3(0);
|
|
79890
|
-
}
|
|
79891
|
-
const elapsed = Math.floor(nowSeconds) - windowStart;
|
|
79892
|
-
if (elapsed < 0) return new BigNumber3(0);
|
|
79893
|
-
if (elapsed >= windowDuration) return maxOutflow;
|
|
79894
|
-
const remainingTime = windowDuration - elapsed;
|
|
79895
|
-
const weightedPrev = prevWindowOutflow.abs().times(remainingTime).idiv(windowDuration).times(prevWindowOutflow.isNegative() ? -1 : 1);
|
|
79896
|
-
const totalNetOutflow = weightedPrev.plus(curWindowOutflow);
|
|
79897
|
-
return maxOutflow.minus(totalNetOutflow);
|
|
79898
|
-
}
|
|
79899
|
-
function computeRateLimiterRemainingCapacity(rateLimiter, nowSeconds) {
|
|
79900
|
-
if (!rateLimiter) return null;
|
|
79901
|
-
const hourly = computeRateLimitWindowRemainingCapacity(rateLimiter.hourly, nowSeconds);
|
|
79902
|
-
const daily = computeRateLimitWindowRemainingCapacity(rateLimiter.daily, nowSeconds);
|
|
79903
|
-
if (hourly === null) return daily;
|
|
79904
|
-
if (daily === null) return hourly;
|
|
79905
|
-
return BigNumber3.min(hourly, daily);
|
|
79906
|
-
}
|
|
79907
|
-
function computeBankRateLimitRemaining(bank, nowSeconds = Date.now() / 1e3) {
|
|
79908
|
-
const remaining = computeRateLimiterRemainingCapacity(bank.rateLimiter, nowSeconds);
|
|
79909
|
-
if (remaining === null) return null;
|
|
79910
|
-
return BigNumber3.max(0, nativeToUi(remaining, bank.mintDecimals));
|
|
79911
|
-
}
|
|
79912
|
-
function computeGroupRateLimitRemainingUsd(rateLimiter, nowSeconds = Date.now() / 1e3) {
|
|
79913
|
-
const remaining = computeRateLimiterRemainingCapacity(rateLimiter, nowSeconds);
|
|
79914
|
-
if (remaining === null) return null;
|
|
79915
|
-
return BigNumber3.max(0, remaining);
|
|
79916
|
-
}
|
|
79917
79765
|
|
|
79918
79766
|
// src/services/bank/bank.service.ts
|
|
79919
79767
|
async function freezeBankConfigIx(program, bankAddress, bankConfigOpt) {
|
|
@@ -82738,9 +82586,7 @@ var MarginfiAccountWrapper = class {
|
|
|
82738
82586
|
assetShareValueMultiplierByBank: this.client.assetShareValueMultiplierByBank,
|
|
82739
82587
|
emodeImpactStatus: borrowImpact?.status,
|
|
82740
82588
|
activePair: borrowImpact?.activePair,
|
|
82741
|
-
volatilityFactor: opts?.volatilityFactor
|
|
82742
|
-
groupRateLimiter: this.client.group.rateLimiter,
|
|
82743
|
-
ignoreBankLimits: opts?.ignoreBankLimits
|
|
82589
|
+
volatilityFactor: opts?.volatilityFactor
|
|
82744
82590
|
});
|
|
82745
82591
|
}
|
|
82746
82592
|
/**
|
|
@@ -82758,25 +82604,7 @@ var MarginfiAccountWrapper = class {
|
|
|
82758
82604
|
bankAddress,
|
|
82759
82605
|
assetShareValueMultiplierByBank: this.client.assetShareValueMultiplierByBank,
|
|
82760
82606
|
activePair,
|
|
82761
|
-
volatilityFactor: opts?.volatilityFactor
|
|
82762
|
-
groupRateLimiter: this.client.group.rateLimiter,
|
|
82763
|
-
ignoreBankLimits: opts?.ignoreBankLimits
|
|
82764
|
-
});
|
|
82765
|
-
}
|
|
82766
|
-
/**
|
|
82767
|
-
* Computes max deposit for a bank with auto-injected client data.
|
|
82768
|
-
*
|
|
82769
|
-
* Bounded by the bank's remaining deposit cap and, if provided, the wallet balance.
|
|
82770
|
-
*
|
|
82771
|
-
* @param bankAddress - Bank address to check max deposit for
|
|
82772
|
-
* @param opts - Optional wallet balance (UI units) to cap the result
|
|
82773
|
-
*/
|
|
82774
|
-
computeMaxDepositForBank(bankAddress, opts) {
|
|
82775
|
-
return this.account.computeMaxDepositForBank({
|
|
82776
|
-
banksMap: this.client.bankMap,
|
|
82777
|
-
bankAddress,
|
|
82778
|
-
assetShareValueMultiplierByBank: this.client.assetShareValueMultiplierByBank,
|
|
82779
|
-
walletBalance: opts?.walletBalance
|
|
82607
|
+
volatilityFactor: opts?.volatilityFactor
|
|
82780
82608
|
});
|
|
82781
82609
|
}
|
|
82782
82610
|
/**
|
|
@@ -83190,6 +83018,6 @@ var EmodeSettings = class _EmodeSettings {
|
|
|
83190
83018
|
}
|
|
83191
83019
|
};
|
|
83192
83020
|
|
|
83193
|
-
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, BankVaultType, DEFAULT_BRIDGE_MINTS, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_HEALTH_CACHE, EXECUTION_HEADROOM_SECONDS, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MARGINFI_V0_1_10_ACTIVATION, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier, SECONDS_PER_YEAR, SINGLE_POOL_PROGRAM_ID, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, WSOL_MINT, ZERO_ORACLE_KEY, accountConflictsWithBridgeBank, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compileFlashloanPrecheck, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEffectiveDepositLimit, getEmodePairs, getExactOutEstimate, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBorrowLimitActive, isBridgeConflictError, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isMarginfiV0110Live, isStandardBorrowable, isStandardDepositable, isV0Tx, isWeightedPrice, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx3 as makeBeginFlashLoanIx, makeBorrowIx3 as makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx3 as makeDepositIx, makeDepositTx, makeDriftDepositIx3 as makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx3 as makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx3 as makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx2 as makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx2 as makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx3 as makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx3 as makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx3 as makePoolAddBankIx, makePoolConfigureBankIx3 as makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx3 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSmartCrankSwbFeedIxForAccounts, makeSwapCollateralTx, makeSwapDebtTx, makeTransferPositionsTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeVersionedTransaction, makeWithdrawIx3 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, mergeBridgeQuotesDebt, mergeBridgeQuotesLoop, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, requireBank, requireTokenProgram, resolveAmount, resolveBridgeCandidateBanks, resolvePinnedSwapRoute, resolveTokenProgramForMint, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, selectSwapBridges, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, sharedBridgeLegContext, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, tryBridgeCandidates, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
83021
|
+
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, BankVaultType, DEFAULT_BRIDGE_MINTS, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_HEALTH_CACHE, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MARGINFI_V0_1_10_ACTIVATION, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier, SINGLE_POOL_PROGRAM_ID, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, USDC_DECIMALS, USDC_MINT, USDT_MINT, WSOL_MINT, ZERO_ORACLE_KEY, accountConflictsWithBridgeBank, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compileFlashloanPrecheck, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBridgeConflictError, isDecomposableSwapError, isDepositIx, isFlashloan, isGroupRateLimiterEnabled, isMarginfiV0110Live, isStandardBorrowable, isStandardDepositable, isV0Tx, isWeightedPrice, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx3 as makeBeginFlashLoanIx, makeBorrowIx3 as makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx3 as makeDepositIx, makeDepositTx, makeDriftDepositIx3 as makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx3 as makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx3 as makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx2 as makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx2 as makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx3 as makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx3 as makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx3 as makePoolAddBankIx, makePoolConfigureBankIx3 as makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx3 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSmartCrankSwbFeedIxForAccounts, makeSwapCollateralTx, makeSwapDebtTx, makeTransferPositionsTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeVersionedTransaction, makeWithdrawIx3 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, mergeBridgeQuotesDebt, mergeBridgeQuotesLoop, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, requireBank, requireTokenProgram, resolveAmount, resolveBridgeCandidateBanks, resolvePinnedSwapRoute, resolveTokenProgramForMint, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, selectSwapBridges, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, sharedBridgeLegContext, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, tryBridgeCandidates, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
83194
83022
|
//# sourceMappingURL=index.js.map
|
|
83195
83023
|
//# sourceMappingURL=index.js.map
|