@0dotxyz/p0-ts-sdk 2.10.1-alpha.0 → 2.11.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 CHANGED
@@ -76854,18 +76854,12 @@ function computeHealthComponentsFromBalances(params) {
76854
76854
  let totalLiabilities = new BigNumber3__default.default(0);
76855
76855
  for (const accountBalance of filteredBalances) {
76856
76856
  const bankKey = accountBalance.bankPk.toBase58();
76857
- const bank = banksMap.get(bankKey);
76858
- if (!bank) {
76859
- console.warn(
76860
- `Bank ${shortenAddress(accountBalance.bankPk)} not found, excluding from health computation`
76861
- );
76862
- continue;
76863
- }
76857
+ const bank = requireBank(banksMap, accountBalance.bankPk);
76864
76858
  const oraclePrice = oraclePricesByBank.get(bankKey);
76865
76859
  if (!oraclePrice) {
76866
- console.warn(
76867
- `Price info for bank ${shortenAddress(accountBalance.bankPk)} not found, excluding from health computation`
76868
- );
76860
+ if (accountBalance.liabilityShares.gt(0)) {
76861
+ throw Error(`Oracle price for ${bankKey} not found`);
76862
+ }
76869
76863
  continue;
76870
76864
  }
76871
76865
  const emodeWeight = activeEmodeWeightsByBank?.get(bankKey);
@@ -77074,7 +77068,7 @@ function computeLiquidationPriceForBank(params) {
77074
77068
  const { bank, oraclePrice, marginfiAccount, assetShareValueMultiplier, activeEmodeWeights } = params;
77075
77069
  const balance = getBalance(bank.address, marginfiAccount.balances);
77076
77070
  if (!balance.active) return null;
77077
- const { assets: assetBank, liabilities: liabilitiesBank } = computeBalanceUsdValue({
77071
+ const { assets: assetBank, liabilities: liabilitiesBank } = getBalanceUsdValueWithPriceBias({
77078
77072
  balance,
77079
77073
  bank,
77080
77074
  oraclePrice,
@@ -77088,7 +77082,8 @@ function computeLiquidationPriceForBank(params) {
77088
77082
  const isLending = balance.liabilityShares.isZero();
77089
77083
  const { assets: assetQuantityUi, liabilities: liabQuantitiesUi } = computeQuantityUi(
77090
77084
  balance,
77091
- bank
77085
+ bank,
77086
+ assetShareValueMultiplier
77092
77087
  );
77093
77088
  let liquidationPrice;
77094
77089
  if (isLending) {
@@ -77194,6 +77189,8 @@ function computeBankRiskAccountKeys(bank) {
77194
77189
  } else if (bank.stakedOracleUsesOnramp && bank.stakedIntegrationAccounts && !bank.stakedIntegrationAccounts.validatorVoteAccount.equals(web3_js.PublicKey.default)) {
77195
77190
  const pool = findPoolAddress(bank.stakedIntegrationAccounts.validatorVoteAccount);
77196
77191
  keys.push(findPoolOnRampAddress(pool));
77192
+ } else {
77193
+ keys.push(web3_js.PublicKey.default);
77197
77194
  }
77198
77195
  }
77199
77196
  return keys;
@@ -78232,7 +78229,6 @@ function createJupiterClient(config = {}) {
78232
78229
  // src/services/account/utils/swap.utils.ts
78233
78230
  function resolvePinnedSwapRoute(swapIxs, expectedInAmountNative) {
78234
78231
  const { quoteResponse } = swapIxs;
78235
- const expectedIn = new BN8__default.default(expectedInAmountNative);
78236
78232
  let minOut;
78237
78233
  try {
78238
78234
  minOut = new BN8__default.default(quoteResponse.otherAmountThreshold);
@@ -78245,15 +78241,15 @@ function resolvePinnedSwapRoute(swapIxs, expectedInAmountNative) {
78245
78241
  );
78246
78242
  }
78247
78243
  const pinnedIn = new BN8__default.default(quoteResponse.inAmount);
78248
- if (!pinnedIn.eq(expectedIn)) {
78244
+ if (expectedInAmountNative !== void 0 && !pinnedIn.eq(new BN8__default.default(expectedInAmountNative))) {
78249
78245
  throw new Error(
78250
- `Pinned swap route (swapOpts.swapIxs) was quoted for a different input amount than the flow will swap: quote inAmount=${pinnedIn.toString()}, flow swap input=${expectedIn.toString()} (native units). Re-quote the pinned route for the exact flow amount.`
78246
+ `Pinned swap route (swapOpts.swapIxs) was quoted for a different input amount than the flow will swap: quote inAmount=${pinnedIn.toString()}, flow swap input=${expectedInAmountNative.toString()} (native units). Re-quote the pinned route for the exact flow amount.`
78251
78247
  );
78252
78248
  }
78253
78249
  return {
78254
78250
  swapInstructions: swapIxs.instructions,
78255
78251
  setupInstructions: [],
78256
- lookupTables: swapIxs.lookupTables,
78252
+ swapLuts: swapIxs.lookupTables,
78257
78253
  quoteResponse,
78258
78254
  outputAmountNative: minOut
78259
78255
  };
@@ -78367,7 +78363,7 @@ var getSwapIxsForFlashloan = async (params) => {
78367
78363
  return {
78368
78364
  swapInstructions: pinned.swapInstructions,
78369
78365
  setupInstructions: pinned.setupInstructions,
78370
- addressLookupTableAddresses: pinned.lookupTables,
78366
+ addressLookupTableAddresses: pinned.swapLuts,
78371
78367
  quoteResponse: pinned.quoteResponse
78372
78368
  };
78373
78369
  }
@@ -78565,17 +78561,8 @@ var getJupiterSwapIxsForFlashloan = async ({
78565
78561
  quoteResponse: mapJupiterQuoteToSwapQuoteResult(swapQuote)
78566
78562
  };
78567
78563
  };
78568
-
78569
- // src/services/account/utils/misc.utils.ts
78570
- function floor(value, decimals) {
78571
- return Math.floor(value * 10 ** decimals) / 10 ** decimals;
78572
- }
78573
- function ceil(value, decimals) {
78574
- return Math.ceil(value * 10 ** decimals) / 10 ** decimals;
78575
- }
78576
78564
  function computeClosePositionTokenAmount(position, mintDecimals) {
78577
- const closePositionTokenAmount = position.isLending ? floor(position.amount, mintDecimals) : ceil(position.amount, mintDecimals);
78578
- return closePositionTokenAmount;
78565
+ return new BigNumber3.BigNumber(position.amount).decimalPlaces(mintDecimals, position.isLending ? BigNumber3.BigNumber.ROUND_FLOOR : BigNumber3.BigNumber.ROUND_CEIL).toNumber();
78579
78566
  }
78580
78567
  function isWholePosition(position, amount, mintDecimals) {
78581
78568
  const closePositionTokenAmount = computeClosePositionTokenAmount(position, mintDecimals);
@@ -83987,7 +83974,7 @@ async function buildSwapDebtFlashloanTx({
83987
83974
  opts: { wrapAndUnwrapSol: false, overrideInferAccounts }
83988
83975
  });
83989
83976
  const runEngine = swapEngineRunner ?? runSwapEngine;
83990
- const engineResult = await runEngine({
83977
+ const engineResult = swapOpts.swapIxs ? resolvePinnedSwapRoute(swapOpts.swapIxs) : await runEngine({
83991
83978
  inputMint: borrowBank.mint.toBase58(),
83992
83979
  outputMint: repayBank.mint.toBase58(),
83993
83980
  amountNative: uiToNative(estimatedBorrowAmount, borrowBank.mintDecimals).toNumber(),
@@ -84013,7 +84000,8 @@ async function buildSwapDebtFlashloanTx({
84013
84000
  const quoteResponse = engineResult.quoteResponse;
84014
84001
  const outAmount = nativeToUi(quoteResponse.outAmount, repayBank.mintDecimals);
84015
84002
  const outAmountThreshold = nativeToUi(quoteResponse.otherAmountThreshold, repayBank.mintDecimals);
84016
- const amountToRepay = outAmount > totalPositionAmount ? totalPositionAmount : outAmountThreshold;
84003
+ const repayAll = outAmount > totalPositionAmount;
84004
+ const amountToRepay = repayAll ? totalPositionAmount : outAmountThreshold;
84017
84005
  const borrowAmount = nativeToUi(quoteResponse.inAmount, borrowBank.mintDecimals);
84018
84006
  const borrowIxs = await makeBorrowIx3({
84019
84007
  program,
@@ -84037,14 +84025,7 @@ async function buildSwapDebtFlashloanTx({
84037
84025
  amount: amountToRepay,
84038
84026
  accountAddress: marginfiAccount.address,
84039
84027
  authority: marginfiAccount.authority,
84040
- repayAll: isWholePosition(
84041
- {
84042
- amount: totalPositionAmount,
84043
- isLending: false
84044
- },
84045
- amountToRepay,
84046
- repayBank.mintDecimals
84047
- ),
84028
+ repayAll,
84048
84029
  isSync: true,
84049
84030
  opts: {
84050
84031
  wrapAndUnwrapSol: false,
@@ -84503,16 +84484,7 @@ async function buildDepositIxs(params, amountUi) {
84503
84484
  }
84504
84485
  async function runLoopSwapEngine(descriptor, params) {
84505
84486
  const { connection, swapOpts, marginfiAccount, swapEngineRunner } = params;
84506
- if (swapOpts.swapIxs) {
84507
- const pinned = resolvePinnedSwapRoute(swapOpts.swapIxs, descriptor.inAmountNative);
84508
- return {
84509
- swapInstructions: pinned.swapInstructions,
84510
- setupInstructions: pinned.setupInstructions,
84511
- swapLuts: pinned.lookupTables,
84512
- quoteResponse: pinned.quoteResponse,
84513
- outputAmountNative: pinned.outputAmountNative
84514
- };
84515
- }
84487
+ if (swapOpts.swapIxs) return resolvePinnedSwapRoute(swapOpts.swapIxs, descriptor.inAmountNative);
84516
84488
  const runEngine = swapEngineRunner ?? runSwapEngine;
84517
84489
  const engineResult = await runEngine({
84518
84490
  inputMint: descriptor.inputMint,
@@ -85008,10 +84980,11 @@ async function buildSwapCollateralFlashloanTx({
85008
84980
  });
85009
84981
  sizeConstraintUsed = swapConstraints.sizeConstraint;
85010
84982
  const runEngine = swapEngineRunner ?? runSwapEngine;
85011
- const engineResult = await runEngine({
84983
+ const amountNative = uiToNative(actualWithdrawAmount, withdrawBank.mintDecimals);
84984
+ const engineResult = swapOpts.swapIxs ? resolvePinnedSwapRoute(swapOpts.swapIxs, amountNative) : await runEngine({
85012
84985
  inputMint: withdrawBank.mint.toBase58(),
85013
84986
  outputMint: depositBank.mint.toBase58(),
85014
- amountNative: uiToNative(actualWithdrawAmount, withdrawBank.mintDecimals).toNumber(),
84987
+ amountNative: amountNative.toNumber(),
85015
84988
  inputDecimals: withdrawBank.mintDecimals,
85016
84989
  outputDecimals: depositBank.mintDecimals,
85017
84990
  ...swapEngineQuoteFieldsFromOpts(swapOpts),
@@ -85019,7 +84992,11 @@ async function buildSwapCollateralFlashloanTx({
85019
84992
  destinationTokenAccount,
85020
84993
  connection,
85021
84994
  footprint: {
85022
- instructions: [...cuRequestIxs, ...withdrawIxs.instructions, ...depositIxs.instructions],
84995
+ instructions: [
84996
+ ...cuRequestIxs,
84997
+ ...withdrawIxs.instructions,
84998
+ ...depositIxs.instructions
84999
+ ],
85023
85000
  luts: addressLookupTableAccounts ?? [],
85024
85001
  payer: marginfiAccount.authority,
85025
85002
  sizeConstraint: swapConstraints.sizeConstraint,
@@ -86718,7 +86695,7 @@ var fetchStakePoolActiveStates = async (connection, validatorVoteAccounts) => {
86718
86695
  });
86719
86696
  const poolStakeAddressKeys = Object.keys(poolStakeAddressRecord);
86720
86697
  const poolStakeAccounts = Object.fromEntries(
86721
- (await chunkedGetRawMultipleAccountInfoOrdered(connection, poolStakeAddressKeys)).map((ai, index) => {
86698
+ (await chunkedGetRawMultipleAccountInfoOrderedWithNulls(connection, poolStakeAddressKeys)).map((ai, index) => {
86722
86699
  const key = poolStakeAddressKeys[index];
86723
86700
  const validatorVote = key ? poolStakeAddressRecord[key] : void 0;
86724
86701
  return [validatorVote, ai?.data || null];
@@ -86726,7 +86703,8 @@ var fetchStakePoolActiveStates = async (connection, validatorVoteAccounts) => {
86726
86703
  );
86727
86704
  validatorVoteAccounts.map((validatorVoteAccount) => {
86728
86705
  const voteAccountKey = validatorVoteAccount.toBase58();
86729
- const stakeAccount = fetchStakeAccount(poolStakeAccounts[voteAccountKey]);
86706
+ const stakeData = poolStakeAccounts[voteAccountKey];
86707
+ const stakeAccount = stakeData ? fetchStakeAccount(stakeData) : null;
86730
86708
  const poolMintAddress = poolMintAddressRecord[voteAccountKey];
86731
86709
  if (!poolMintAddress) {
86732
86710
  return;
@@ -86813,26 +86791,28 @@ var fetchStakePoolMev = async (connection, validatorVoteAccounts) => {
86813
86791
  const allAddresses = [...poolStakeAddresses, ...onRampAddresses].map(
86814
86792
  (address) => address.toBase58()
86815
86793
  );
86816
- return chunkedGetRawMultipleAccountInfoOrdered(connection, allAddresses).then((accountInfos) => {
86817
- const poolStakeInfos = accountInfos.slice(0, poolStakeAddresses.length);
86818
- const onRampInfos = accountInfos.slice(poolStakeAddresses.length);
86819
- const rent = 2282280;
86820
- validatorVoteAccounts.forEach((validatorVoteAccount, index) => {
86821
- const poolStakeInfo = poolStakeInfos[index];
86822
- const onRampInfo = onRampInfos[index];
86823
- if (poolStakeInfo && onRampInfo) {
86824
- const stakeDecoded = fetchStakeAccount(poolStakeInfo.data);
86825
- const onrampDecoded = fetchStakeAccount(onRampInfo.data);
86826
- const poolLamps = poolStakeInfo.lamports - rent - Number(stakeDecoded.stake.delegation.stake.toString());
86827
- const onrampStake = Number(onrampDecoded.stake.delegation.stake.toString());
86828
- mev.set(validatorVoteAccount.toBase58(), {
86829
- pool: poolLamps >= 1e3 ? poolLamps : 0,
86830
- onramp: onrampStake
86831
- });
86832
- }
86833
- });
86834
- return mev;
86835
- });
86794
+ return chunkedGetRawMultipleAccountInfoOrderedWithNulls(connection, allAddresses).then(
86795
+ (accountInfos) => {
86796
+ const poolStakeInfos = accountInfos.slice(0, poolStakeAddresses.length);
86797
+ const onRampInfos = accountInfos.slice(poolStakeAddresses.length);
86798
+ const rent = 2282280;
86799
+ validatorVoteAccounts.forEach((validatorVoteAccount, index) => {
86800
+ const poolStakeInfo = poolStakeInfos[index];
86801
+ const onRampInfo = onRampInfos[index];
86802
+ if (poolStakeInfo && onRampInfo) {
86803
+ const stakeDecoded = fetchStakeAccount(poolStakeInfo.data);
86804
+ const onrampDecoded = fetchStakeAccount(onRampInfo.data);
86805
+ const poolLamps = poolStakeInfo.lamports - rent - Number(stakeDecoded.stake.delegation.stake.toString());
86806
+ const onrampStake = Number(onrampDecoded.stake.delegation.stake.toString());
86807
+ mev.set(validatorVoteAccount.toBase58(), {
86808
+ pool: poolLamps >= 1e3 ? poolLamps : 0,
86809
+ onramp: onrampStake
86810
+ });
86811
+ }
86812
+ });
86813
+ return mev;
86814
+ }
86815
+ );
86836
86816
  };
86837
86817
 
86838
86818
  // src/services/native-stake/utils/serialize.utils.ts
@@ -87272,55 +87252,67 @@ function getValidatorVoteAccountByBank() {
87272
87252
  }
87273
87253
  return _voteAccountByBank;
87274
87254
  }
87255
+ var POOL_BOOTSTRAP_LAMPORTS = 1000000000n;
87256
+ var STAKE_STATE_DELEGATED = 2;
87275
87257
  async function computeStakedBankMultipliers(stakedBanks, connection) {
87276
87258
  const multiplierByBank = /* @__PURE__ */ new Map();
87277
87259
  if (stakedBanks.length === 0) {
87278
87260
  return multiplierByBank;
87279
87261
  }
87280
87262
  const metadataMap = getStakedBankMetadataMap();
87281
- const stakedBankAddresses = [];
87263
+ const resolvedBanks = [];
87282
87264
  const poolStakeAddresses = [];
87283
87265
  const lstMintAddresses = [];
87266
+ const onrampAddresses = [];
87284
87267
  for (const bank of stakedBanks) {
87285
87268
  const metadata = metadataMap.get(bank.address.toBase58());
87286
87269
  if (!metadata) {
87287
- multiplierByBank.set(bank.address.toBase58(), new BigNumber3__default.default(1));
87270
+ multiplierByBank.set(bank.address.toBase58(), new BigNumber3.BigNumber(1));
87288
87271
  continue;
87289
87272
  }
87290
87273
  const pool = findPoolAddress(new web3_js.PublicKey(metadata.validatorVoteAccount));
87291
- stakedBankAddresses.push(bank.address.toBase58());
87274
+ resolvedBanks.push(bank);
87292
87275
  poolStakeAddresses.push(findPoolStakeAddress(pool));
87293
87276
  lstMintAddresses.push(findPoolMintAddress(pool));
87277
+ onrampAddresses.push(findPoolOnRampAddress(pool));
87294
87278
  }
87295
- if (stakedBankAddresses.length === 0) {
87279
+ if (resolvedBanks.length === 0) {
87296
87280
  return multiplierByBank;
87297
87281
  }
87298
- const allAddresses = [
87299
- ...poolStakeAddresses.map((a) => a.toBase58()),
87300
- ...lstMintAddresses.map((a) => a.toBase58())
87301
- ];
87302
- const accountInfos = await chunkedGetRawMultipleAccountInfoOrdered(connection, allAddresses);
87303
- const poolStakeInfos = accountInfos.slice(0, poolStakeAddresses.length);
87304
- const lstMintInfos = accountInfos.slice(poolStakeAddresses.length);
87305
- for (let i = 0; i < stakedBankAddresses.length; i++) {
87306
- const bankAddr = stakedBankAddresses[i];
87307
- const poolStakeInfo = poolStakeInfos[i];
87308
- const lstMintInfo = lstMintInfos[i];
87309
- if (!poolStakeInfo || !lstMintInfo) {
87310
- multiplierByBank.set(bankAddr, new BigNumber3__default.default(1));
87311
- continue;
87282
+ const allAddresses = [...poolStakeAddresses, ...lstMintAddresses, ...onrampAddresses].map(
87283
+ (a) => a.toBase58()
87284
+ );
87285
+ const [accountInfos, stakeRent] = await Promise.all([
87286
+ chunkedGetRawMultipleAccountInfoOrderedWithNulls(connection, allAddresses),
87287
+ resolvedBanks.some((bank) => bank.stakedOracleUsesOnramp) ? connection.getMinimumBalanceForRentExemption(web3_js.StakeProgram.space) : 0
87288
+ ]);
87289
+ const count = resolvedBanks.length;
87290
+ const aboveRent = (lamports) => Math.max(lamports - stakeRent, 0);
87291
+ resolvedBanks.forEach((bank, i) => {
87292
+ const bankAddr = bank.address.toBase58();
87293
+ const poolStakeInfo = accountInfos[i];
87294
+ const lstMintInfo = accountInfos[count + i];
87295
+ const onrampInfo = accountInfos[2 * count + i];
87296
+ const lstMintSupply = lstMintInfo ? buffer.Buffer.from(lstMintInfo.data.subarray(36, 44)).readBigUInt64LE(0) : 0n;
87297
+ if (!poolStakeInfo || lstMintSupply === 0n) {
87298
+ multiplierByBank.set(bankAddr, new BigNumber3.BigNumber(1));
87299
+ return;
87312
87300
  }
87313
- const stakeLamports = poolStakeInfo.lamports;
87314
- const supplyBuffer = lstMintInfo.data.slice(36, 44);
87315
- const lstMintSupply = Number(buffer.Buffer.from(supplyBuffer).readBigUInt64LE(0));
87316
- if (lstMintSupply === 0) {
87317
- multiplierByBank.set(bankAddr, new BigNumber3__default.default(1));
87318
- continue;
87301
+ if (bank.stakedOracleUsesOnramp) {
87302
+ const value = aboveRent(poolStakeInfo.lamports) + (onrampInfo ? aboveRent(onrampInfo.lamports) : 0);
87303
+ multiplierByBank.set(
87304
+ bankAddr,
87305
+ new BigNumber3.BigNumber(value).dividedBy((lstMintSupply + POOL_BOOTSTRAP_LAMPORTS).toString())
87306
+ );
87307
+ return;
87319
87308
  }
87320
- const adjustedStake = Math.max(stakeLamports - web3_js.LAMPORTS_PER_SOL, 0);
87321
- const multiplier = new BigNumber3__default.default(adjustedStake).dividedBy(lstMintSupply);
87322
- multiplierByBank.set(bankAddr, multiplier);
87323
- }
87309
+ const delegated = poolStakeInfo.data.readUInt32LE(0) === STAKE_STATE_DELEGATED ? fetchStakeAccount(poolStakeInfo.data).stake.delegation.stake : 0n;
87310
+ const delegatedAboveBootstrap = delegated > POOL_BOOTSTRAP_LAMPORTS ? delegated - POOL_BOOTSTRAP_LAMPORTS : 0n;
87311
+ multiplierByBank.set(
87312
+ bankAddr,
87313
+ new BigNumber3.BigNumber(delegatedAboveBootstrap.toString()).dividedBy(lstMintSupply.toString())
87314
+ );
87315
+ });
87324
87316
  return multiplierByBank;
87325
87317
  }
87326
87318
  var SYSVAR_CLOCK_ID2 = new web3_js.PublicKey("SysvarC1ock11111111111111111111111111111111");
@@ -88149,7 +88141,7 @@ async function fetchBankIntegrationMetadata(options) {
88149
88141
 
88150
88142
  // src/models/bank.ts
88151
88143
  var Bank = class _Bank {
88152
- constructor(address, mint, mintDecimals, group, assetShareValue, liabilityShareValue, liquidityVault, liquidityVaultBump, liquidityVaultAuthorityBump, insuranceVault, insuranceVaultBump, insuranceVaultAuthorityBump, collectedInsuranceFeesOutstanding, feeVault, feeVaultBump, feeVaultAuthorityBump, collectedGroupFeesOutstanding, lastUpdate, config, totalAssetShares, totalLiabilityShares, emissionsActiveBorrowing, emissionsActiveLending, emissionsRate, emissionsMint, emissionsRemaining, collectedProgramFeesOutstanding, oracleKey, emode, premiumTag, premiumActive, premiumActivatedAt, kaminoEmergency, rateLimiter, kaminoIntegrationAccounts, driftIntegrationAccounts, solendIntegrationAccounts, jupLendIntegrationAccounts, feesDestinationAccount, lendingPositionCount, borrowingPositionCount, tokenSymbol) {
88144
+ constructor(address, mint, mintDecimals, group, assetShareValue, liabilityShareValue, liquidityVault, liquidityVaultBump, liquidityVaultAuthorityBump, insuranceVault, insuranceVaultBump, insuranceVaultAuthorityBump, collectedInsuranceFeesOutstanding, feeVault, feeVaultBump, feeVaultAuthorityBump, collectedGroupFeesOutstanding, lastUpdate, config, totalAssetShares, totalLiabilityShares, emissionsActiveBorrowing, emissionsActiveLending, emissionsRate, emissionsMint, emissionsRemaining, collectedProgramFeesOutstanding, oracleKey, emode, premiumTag, premiumActive, premiumActivatedAt, kaminoEmergency, rateLimiter, kaminoIntegrationAccounts, driftIntegrationAccounts, solendIntegrationAccounts, jupLendIntegrationAccounts, feesDestinationAccount, lendingPositionCount, borrowingPositionCount, tokenSymbol, stakedOracleDisabled, stakedOracleUsesOnramp, stakedIntegrationAccounts) {
88153
88145
  this.address = address;
88154
88146
  this.mint = mint;
88155
88147
  this.mintDecimals = mintDecimals;
@@ -88192,6 +88184,9 @@ var Bank = class _Bank {
88192
88184
  this.lendingPositionCount = lendingPositionCount;
88193
88185
  this.borrowingPositionCount = borrowingPositionCount;
88194
88186
  this.tokenSymbol = tokenSymbol;
88187
+ this.stakedOracleDisabled = stakedOracleDisabled;
88188
+ this.stakedOracleUsesOnramp = stakedOracleUsesOnramp;
88189
+ this.stakedIntegrationAccounts = stakedIntegrationAccounts;
88195
88190
  }
88196
88191
  static async fetch(address, program, bankMetadata) {
88197
88192
  const data = await program.account.bank.fetch(address);
@@ -88267,7 +88262,10 @@ var Bank = class _Bank {
88267
88262
  bankType.feesDestinationAccount,
88268
88263
  bankType.lendingPositionCount,
88269
88264
  bankType.borrowingPositionCount,
88270
- bankType.tokenSymbol
88265
+ bankType.tokenSymbol,
88266
+ bankType.stakedOracleDisabled,
88267
+ bankType.stakedOracleUsesOnramp,
88268
+ bankType.stakedIntegrationAccounts
88271
88269
  );
88272
88270
  }
88273
88271
  static fromAccountParsed(address, accountParsed, bankMetadata) {
@@ -88314,7 +88312,10 @@ var Bank = class _Bank {
88314
88312
  props.feesDestinationAccount,
88315
88313
  props.lendingPositionCount,
88316
88314
  props.borrowingPositionCount,
88317
- props.tokenSymbol
88315
+ props.tokenSymbol,
88316
+ props.stakedOracleDisabled,
88317
+ props.stakedOracleUsesOnramp,
88318
+ props.stakedIntegrationAccounts
88318
88319
  );
88319
88320
  }
88320
88321
  static withEmodeWeights(bank, emodeWeights) {