@0dotxyz/p0-ts-sdk 2.7.3 → 2.7.4

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/vendor.js CHANGED
@@ -3886,7 +3886,8 @@ var SLOTS_PER_MINUTE = SLOTS_PER_SECOND * 60;
3886
3886
  var SLOTS_PER_HOUR = SLOTS_PER_MINUTE * 60;
3887
3887
  var SLOTS_PER_DAY = SLOTS_PER_HOUR * 24;
3888
3888
  var SLOTS_PER_YEAR = SLOTS_PER_DAY * 365;
3889
- var DEFAULT_RECENT_SLOT_DURATION_MS = 450;
3889
+ var SECONDS_PER_YEAR = 31536e3;
3890
+ var DEFAULT_RECENT_SLOT_DURATION_MS = 350;
3890
3891
  var ONE_HUNDRED_PCT_IN_BPS = 1e4;
3891
3892
 
3892
3893
  // src/vendor/klend/instructions.ts
@@ -4037,6 +4038,13 @@ async function makeRefreshingIxs({
4037
4038
  return [refreshReserveIx, refreshObligationIx];
4038
4039
  }
4039
4040
 
4041
+ // src/vendor/klend/types/reserve/reserve.types.ts
4042
+ var KaminoInterestRateBasis = /* @__PURE__ */ ((KaminoInterestRateBasis2) => {
4043
+ KaminoInterestRateBasis2[KaminoInterestRateBasis2["Legacy"] = 0] = "Legacy";
4044
+ KaminoInterestRateBasis2[KaminoInterestRateBasis2["TrueApr"] = 1] = "TrueApr";
4045
+ return KaminoInterestRateBasis2;
4046
+ })(KaminoInterestRateBasis || {});
4047
+
4040
4048
  // src/vendor/klend/utils/klend/serialize.utils.ts
4041
4049
  function kaminoObligationToDto(obligation) {
4042
4050
  return {
@@ -4076,6 +4084,7 @@ function kaminoReserveToDto(reserve) {
4076
4084
  config: {
4077
4085
  protocolTakeRatePct: reserve.config.protocolTakeRatePct,
4078
4086
  hostFixedInterestRateBps: reserve.config.hostFixedInterestRateBps,
4087
+ interestRateBasis: reserve.config.interestRateBasis ?? 0 /* Legacy */,
4079
4088
  depositLimit: reserve.config.depositLimit.toString(),
4080
4089
  borrowLimit: reserve.config.borrowLimit.toString(),
4081
4090
  borrowRateCurve: {
@@ -12258,7 +12267,12 @@ var reserveLayout = borsh.struct([
12258
12267
  borsh.u8("status"),
12259
12268
  borsh.u8("assetTier"),
12260
12269
  borsh.u16("hostFixedInterestRateBps"),
12261
- borsh.array(borsh.u8(), 9, "reserved2"),
12270
+ borsh.u16("minDeleveragingBonusBps"),
12271
+ borsh.u8("blockCtokenUsage"),
12272
+ borsh.u8("earlyRepayRemainingInterestPct"),
12273
+ borsh.u8("emergencyMode"),
12274
+ borsh.u8("interestRateBasis"),
12275
+ borsh.array(borsh.u8(), 3, "reserved2"),
12262
12276
  borsh.u8("protocolOrderExecutionFeePct"),
12263
12277
  borsh.u8("protocolTakeRatePct"),
12264
12278
  borsh.u8("protocolLiquidationFeePct"),
@@ -12424,6 +12438,7 @@ function dtoToKaminoReserve(reserveDto) {
12424
12438
  config: {
12425
12439
  protocolTakeRatePct: reserveDto.config.protocolTakeRatePct,
12426
12440
  hostFixedInterestRateBps: reserveDto.config.hostFixedInterestRateBps,
12441
+ interestRateBasis: reserveDto.config.interestRateBasis ?? 0 /* Legacy */,
12427
12442
  depositLimit: new BN5(reserveDto.config.depositLimit),
12428
12443
  borrowLimit: new BN5(reserveDto.config.borrowLimit),
12429
12444
  borrowRateCurve: {
@@ -12664,8 +12679,8 @@ var getKaminoBorrowRate = (currentUtilization, curve) => {
12664
12679
  }
12665
12680
  return interpolateLinear(currentUtilization, x0, y0, x1, y1);
12666
12681
  };
12667
- function calculateAPYFromAPR(apr) {
12668
- return Math.pow(1 + apr / SLOTS_PER_YEAR, SLOTS_PER_YEAR) - 1;
12682
+ function calculateAPYFromAPR(apr, periodsPerYear = SLOTS_PER_YEAR) {
12683
+ return Math.pow(1 + apr / periodsPerYear, periodsPerYear) - 1;
12669
12684
  }
12670
12685
  function getKaminoTotalSupply(reserve) {
12671
12686
  const liquidityAvailableAmount = new Decimal3(reserve.liquidity.availableAmount.toString());
@@ -12687,17 +12702,43 @@ function calculateUtilizationRatio(reserve) {
12687
12702
  }
12688
12703
  return totalBorrows.dividedBy(totalSupply).toNumber();
12689
12704
  }
12705
+ function getKaminoInterestRateBasis(reserve) {
12706
+ const basis = reserve.config.interestRateBasis ?? 0 /* Legacy */;
12707
+ switch (basis) {
12708
+ case 0 /* Legacy */:
12709
+ case 1 /* TrueApr */:
12710
+ return basis;
12711
+ default:
12712
+ throw new Error(`Unsupported Kamino interest rate basis: ${basis}`);
12713
+ }
12714
+ }
12690
12715
  function slotAdjustmentFactor(recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
12691
12716
  return 1e3 / SLOTS_PER_SECOND / recentSlotDurationMs;
12692
12717
  }
12693
- function calculateSlotAdjustmentFactor(reserve, recentSlotDurationMs) {
12694
- return 1e3 / SLOTS_PER_SECOND / recentSlotDurationMs;
12718
+ function getKaminoRateBasis(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
12719
+ switch (getKaminoInterestRateBasis(reserve)) {
12720
+ case 0 /* Legacy */:
12721
+ if (!Number.isFinite(recentSlotDurationMs) || recentSlotDurationMs <= 0) {
12722
+ throw new Error(
12723
+ `Kamino recent slot duration must be positive, got ${recentSlotDurationMs}`
12724
+ );
12725
+ }
12726
+ return {
12727
+ multiplier: slotAdjustmentFactor(recentSlotDurationMs),
12728
+ periodsPerYear: SLOTS_PER_YEAR
12729
+ };
12730
+ case 1 /* TrueApr */:
12731
+ return { multiplier: 1, periodsPerYear: SECONDS_PER_YEAR };
12732
+ }
12733
+ }
12734
+ function calculateSlotAdjustmentFactor(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
12735
+ return getKaminoRateBasis(reserve, recentSlotDurationMs).multiplier;
12695
12736
  }
12696
12737
  function calculateKaminoEstimatedBorrowRate(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
12697
- const slotAdjFactor = slotAdjustmentFactor(recentSlotDurationMs);
12738
+ const { multiplier } = getKaminoRateBasis(reserve, recentSlotDurationMs);
12698
12739
  const currentUtilization = calculateUtilizationRatio(reserve);
12699
12740
  const curve = truncateBorrowCurve(reserve.config.borrowRateCurve.points);
12700
- return getKaminoBorrowRate(currentUtilization, curve) * slotAdjFactor;
12741
+ return getKaminoBorrowRate(currentUtilization, curve) * multiplier;
12701
12742
  }
12702
12743
  function calculateKaminoEstimatedSupplyRate(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
12703
12744
  const borrowRate = calculateKaminoEstimatedBorrowRate(reserve, recentSlotDurationMs);
@@ -12706,10 +12747,9 @@ function calculateKaminoEstimatedSupplyRate(reserve, recentSlotDurationMs = DEFA
12706
12747
  return borrowRate * currentUtilization * protocolTakeRatePct;
12707
12748
  }
12708
12749
  function calculateKaminoSupplyAPY(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
12709
- const currentUtilization = calculateUtilizationRatio(reserve);
12710
- const borrowRate = calculateKaminoEstimatedBorrowRate(reserve, recentSlotDurationMs);
12711
- const protocolTakeRatePct = 1 - reserve.config.protocolTakeRatePct / 100;
12712
- return calculateAPYFromAPR(currentUtilization * borrowRate * protocolTakeRatePct);
12750
+ const { periodsPerYear } = getKaminoRateBasis(reserve, recentSlotDurationMs);
12751
+ const supplyApr = calculateKaminoEstimatedSupplyRate(reserve, recentSlotDurationMs);
12752
+ return calculateAPYFromAPR(supplyApr, periodsPerYear);
12713
12753
  }
12714
12754
  function scaledSupplies(state) {
12715
12755
  const liqMintDecimals = new Decimal3(state.liquidity.mintDecimals.toString());
@@ -12740,7 +12780,7 @@ function getFixedHostInterestRate(reserve) {
12740
12780
  function getProtocolTakeRatePct(reserve) {
12741
12781
  return 1 - reserve.config.protocolTakeRatePct / 100;
12742
12782
  }
12743
- function generateKaminoReserveCurve(curvePoints, slotAdjustmentFactor2, fixedHostInterestRate, protocolTakeRatePct) {
12783
+ function generateKaminoReserveCurve(curvePoints, slotAdjustmentFactor2, fixedHostInterestRate, protocolTakeRatePct, periodsPerYear = SLOTS_PER_YEAR) {
12744
12784
  if (curvePoints.length === 0) {
12745
12785
  return [];
12746
12786
  }
@@ -12750,8 +12790,8 @@ function generateKaminoReserveCurve(curvePoints, slotAdjustmentFactor2, fixedHos
12750
12790
  const baseBorrowRate = getKaminoBorrowRate(utilization, curve) * slotAdjustmentFactor2;
12751
12791
  const borrowAPR = baseBorrowRate + fixedHostInterestRate;
12752
12792
  const supplyAPR = utilization * borrowAPR * protocolTakeRatePct;
12753
- const borrowAPY = calculateAPYFromAPR(borrowAPR);
12754
- const supplyAPY = calculateAPYFromAPR(supplyAPR);
12793
+ const borrowAPY = calculateAPYFromAPR(borrowAPR, periodsPerYear);
12794
+ const supplyAPY = calculateAPYFromAPR(supplyAPR, periodsPerYear);
12755
12795
  return {
12756
12796
  utilization: utilization * 100,
12757
12797
  borrowAPY: borrowAPY * 100,
@@ -12759,6 +12799,16 @@ function generateKaminoReserveCurve(curvePoints, slotAdjustmentFactor2, fixedHos
12759
12799
  };
12760
12800
  });
12761
12801
  }
12802
+ function generateKaminoReserveCurveFromReserve(reserve, recentSlotDurationMs = DEFAULT_RECENT_SLOT_DURATION_MS) {
12803
+ const { multiplier, periodsPerYear } = getKaminoRateBasis(reserve, recentSlotDurationMs);
12804
+ return generateKaminoReserveCurve(
12805
+ reserve.config.borrowRateCurve.points,
12806
+ multiplier,
12807
+ getFixedHostInterestRate(reserve),
12808
+ getProtocolTakeRatePct(reserve),
12809
+ periodsPerYear
12810
+ );
12811
+ }
12762
12812
  function getRewardPerTimeUnitSecond(reward) {
12763
12813
  const now = new Decimal3((/* @__PURE__ */ new Date()).getTime()).div(1e3);
12764
12814
  let rewardPerTimeUnitSecond = new Decimal3(0);
@@ -52505,6 +52555,6 @@ function makeGammaCompleteWithdrawalIx(accounts) {
52505
52555
  });
52506
52556
  }
52507
52557
 
52508
- export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, AccountState, AccountType, ConnectionClosed, CorpAction, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, DriftSpotBalanceType, EXPONENT_CLMM_IDL, EXPONENT_CLMM_PROGRAM_ID, EXPONENT_CORE_IDL, EXPONENT_CORE_PROGRAM_ID, EXPONENT_EVENT_AUTHORITY_SEED, EXPONENT_GENERIC_SY_PROGRAM_ID, EXPONENT_JITO_RESTAKING_SY_PROGRAM_ID, EXPONENT_KAMINO_SY_PROGRAM_ID, EXPONENT_MARGINFI_SY_PROGRAM_ID, EXPONENT_NUMBER_DENOM, EXPONENT_ORDERBOOK_PROGRAM_ID, EXPONENT_PERENA_SY_PROGRAM_ID, EXPONENT_VAULTS_PROGRAM_ID, ErrorResponse, ExponentSwapDirection, ExtensionType, FARMS_PROGRAM_ID, GAMMA_VAULT_IDL, GAMMA_VAULT_PROGRAM_ID, JUP_EXCHANGE_PRICES_PRECISION, JUP_LEND_IDL, JUP_LEND_PROGRAM_ID, JUP_LIQUIDITY_IDL, JUP_LIQUIDITY_PROGRAM_ID, JUP_MAX_REWARDS_RATE, JUP_REWARDS_PROGRAM_ID, JUP_SECONDS_PER_YEAR, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, LENGTH_SIZE, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, MintLayout, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, PriceStatus, PriceType, REFRESH_OBLIGATION_DISCRIMINATOR, SEED_BASE_REFERRER_STATE, SEED_BASE_REFERRER_TOKEN_STATE, SEED_BASE_SHORT_URL, SEED_BASE_USER_METADATA, SEED_DEPOSIT_POLICY, SEED_DEPOSIT_RECEIPT, SEED_DRIFT_SIGNER, SEED_DRIFT_STATE, SEED_FEE_RECEIVER, SEED_F_TOKEN_MINT, SEED_LENDING, SEED_LENDING_ADMIN, SEED_LENDING_MARKET_AUTH, SEED_LENDING_REWARDS_RATE_MODEL, SEED_LIQUIDITY, SEED_RATE_MODEL, SEED_RESERVE, SEED_RESERVE_COLL_MINT, SEED_RESERVE_COLL_SUPPLY, SEED_RESERVE_LIQ_SUPPLY, SEED_SPOT_MARKET, SEED_SPOT_MARKET_VAULT, SEED_USER, SEED_USER_CLAIM, SEED_USER_STATE, SEED_USER_STATS, SEED_USER_SUPPLY_POSITION, SEED_WITHDRAWAL_POLICY, SEED_WITHDRAW_ESCROW, SEED_WITHDRAW_RECEIPT, SLOTS_PER_DAY, SLOTS_PER_HOUR, SLOTS_PER_MINUTE, SLOTS_PER_SECOND, SLOTS_PER_YEAR, SPOT_MARKET_RATE_PRECISION, SPOT_MARKET_RATE_PRECISION_EXP, SPOT_MARKET_UTILIZATION_PRECISION, SPOT_MARKET_UTILIZATION_PRECISION_EXP, SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, SinglePoolInstruction, SplAccountType, SpotBalanceType, StreamError, SwapMode, SwapVersion, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, TokenAccountNotFoundError, TokenError, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, V1Client, ZERO, addSigners, approveInstructionData, buildSwapQuoteResult, buildTitanTemplate, calculateAPYFromAPR, calculateDriftBorrowAPR, calculateDriftBorrowAPY, calculateDriftBorrowRate, calculateDriftDepositRate, calculateDriftInterestRate, calculateDriftLendingAPR, calculateDriftLendingAPY, calculateDriftUtilization, calculateJupLendBorrowRate, calculateJupLendLiquiditySupplyRate, calculateJupLendNewExchangePrice, calculateJupLendRewardsRate, calculateJupLendRewardsRateForExchangePrice, calculateJupLendSupplyAPY, calculateJupLendSupplyRate, calculateJupLendTotalAssets, calculateKaminoEstimatedBorrowRate, calculateKaminoEstimatedSupplyRate, calculateKaminoSupplyAPY, calculateRewardApy, calculateSlotAdjustmentFactor, calculateUtilizationRatio, closeAccountInstructionData, createAccountIx, createApproveInstruction, createAssociatedTokenAccountIdempotentInstruction, createAssociatedTokenAccountInstruction, createCloseAccountInstruction, createInitializeAccountInstruction, createMemoInstruction, createPoolOnrampIx, createSyncNativeInstruction, createTransferCheckedInstruction, decodeDriftSpotMarketData, decodeDriftStateData, decodeDriftUserData, decodeDriftUserStatsData, decodeExponentMarketThree, decodeExponentMarketTwo, decodeExponentMarketVault, decodeExponentVault, decodeFarmDataRaw, decodeGammaLpVaultData, decodeGammaWithdrawReceiptData, decodeJupLendingRewardsRateModelData, decodeJupLendingStateData, decodeJupRateModelData, decodeJupTokenReserveData, decodeKlendObligationData, decodeKlendReserveData, decodeSwitchboardPullFeedData, deriveBaseObligation, deriveDriftSigner, deriveDriftSpotMarket, deriveDriftSpotMarketVault, deriveDriftState, deriveDriftUser, deriveDriftUserStats, deriveExponentClmmEventAuthority, deriveExponentEventAuthority, deriveFeeReceiver, deriveGammaAta, deriveGammaDepositPolicy, deriveGammaDepositReceipt, deriveGammaWithdrawEscrow, deriveGammaWithdrawReceipt, deriveGammaWithdrawalPolicy, deriveJupLendClaimAccount, deriveJupLendFTokenMint, deriveJupLendLending, deriveJupLendLendingAdmin, deriveJupLendLendingPdas, deriveJupLendLendingRewardsRateModel, deriveJupLendLiquidity, deriveJupLendLiquiditySupplyPositionPda, deriveJupLendLiquidityVaultAta, deriveJupLendRateModel, deriveJupLendTokenReserve, deriveLendingMarketAuthority, deriveObligation, deriveReferrerState, deriveReferrerTokenState, deriveReserveCollateralMint, deriveReserveCollateralSupply, deriveReserveLiquiditySupply, deriveShortUrl, deriveUserMetadata, deriveUserState, deserializeSerializedInstruction, deserializeTitanWireInstruction, driftRewardsRawToDto, driftSpotMarketRawToDto, driftStateRawToDto, driftUserRawToDto, driftUserStatsRawToDto, dtoToDriftRewardsRaw, dtoToDriftSpotMarketRaw, dtoToDriftStateRaw, dtoToDriftUserRaw, dtoToDriftUserStatsRaw, dtoToJupLendingRewardsRateModelRaw, dtoToJupLendingStateRaw, dtoToJupRateModelRaw, dtoToJupTokenReserveRaw, dtoToKaminoFarmState, dtoToKaminoObligation, dtoToKaminoReserve, encodeTitanTemplate, exponentBuyPtArgs, exponentClmmBuyPtArgs, exponentNumberToBigNumber, fetchExponentMarketThree, fetchExponentMarketTwo, fetchExponentVault, fetchExponentVaultFromMarket, fetchTitanQuoteSwapV3, findMplMetadataAddress, findPoolAddress, findPoolMintAddress, findPoolMintAddressByVoteAccount, findPoolMintAuthorityAddress, findPoolMplAuthorityAddress, findPoolOnRampAddress, findPoolStakeAddress, findPoolStakeAuthorityAddress, generateDriftReserveCurve, generateJupLendSupplyCurve, generateKaminoReserveCurve, getAccount, getAccountLen, getAllDerivedDriftAccounts, getAllDerivedJupLendAccounts, getAllDerivedKaminoAccounts, getAllRequiredMarkets, getAssociatedTokenAddressSync, getDriftRewards, getDriftTokenAmount, getFixedHostInterestRate, getJupLendRewards, getKaminoBorrowRate, getKaminoTotalSupply, getMinimumBalanceForRentExemptAccount, getMinimumBalanceForRentExemptAccountWithExtensions, getMint, getMintDecimals, getMultipleAccounts, getProtocolTakeRatePct, getReserveRewardsApy, getRewardPerTimeUnitSecond, getStakeAccount, getSwitchboardProgram, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, isSpotBalanceTypeVariant, jupLendingRewardsRateModelRawToDto, jupLendingStateRawToDto, jupRateModelRawToDto, jupTokenReserveRawToDto, kaminoFarmStateToDto, kaminoObligationToDto, kaminoReserveToDto, layout, lutToTitanWire, makeExponentClmmTradePtIx, makeExponentMergeIx, makeExponentStripIx, makeExponentTradePtIx, makeExponentWrapperMergeIx, makeGammaCompleteWithdrawalIx, makeGammaDepositIx, makeGammaWithdrawIx, makeRefreshObligationIx, makeRefreshReservesBatchIx, makeRefreshingIxs, makeSplStakePoolUpdateBalanceIx, makeUpdateJupLendRate, makeUpdateJupLendRateIx, makeUpdateSpotMarketCumulativeInterestIx, makeUpdateSpotMarketIx, parsePriceData, parsePriceInfo2 as parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, switchboardAccountCoder, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
52558
+ export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, AccountLayout, AccountState, AccountType, ConnectionClosed, CorpAction, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, DriftSpotBalanceType, EXPONENT_CLMM_IDL, EXPONENT_CLMM_PROGRAM_ID, EXPONENT_CORE_IDL, EXPONENT_CORE_PROGRAM_ID, EXPONENT_EVENT_AUTHORITY_SEED, EXPONENT_GENERIC_SY_PROGRAM_ID, EXPONENT_JITO_RESTAKING_SY_PROGRAM_ID, EXPONENT_KAMINO_SY_PROGRAM_ID, EXPONENT_MARGINFI_SY_PROGRAM_ID, EXPONENT_NUMBER_DENOM, EXPONENT_ORDERBOOK_PROGRAM_ID, EXPONENT_PERENA_SY_PROGRAM_ID, EXPONENT_VAULTS_PROGRAM_ID, ErrorResponse, ExponentSwapDirection, ExtensionType, FARMS_PROGRAM_ID, GAMMA_VAULT_IDL, GAMMA_VAULT_PROGRAM_ID, JUP_EXCHANGE_PRICES_PRECISION, JUP_LEND_IDL, JUP_LEND_PROGRAM_ID, JUP_LIQUIDITY_IDL, JUP_LIQUIDITY_PROGRAM_ID, JUP_MAX_REWARDS_RATE, JUP_REWARDS_PROGRAM_ID, JUP_SECONDS_PER_YEAR, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, KaminoInterestRateBasis, LENGTH_SIZE, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, MintLayout, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, PriceStatus, PriceType, REFRESH_OBLIGATION_DISCRIMINATOR, SECONDS_PER_YEAR, SEED_BASE_REFERRER_STATE, SEED_BASE_REFERRER_TOKEN_STATE, SEED_BASE_SHORT_URL, SEED_BASE_USER_METADATA, SEED_DEPOSIT_POLICY, SEED_DEPOSIT_RECEIPT, SEED_DRIFT_SIGNER, SEED_DRIFT_STATE, SEED_FEE_RECEIVER, SEED_F_TOKEN_MINT, SEED_LENDING, SEED_LENDING_ADMIN, SEED_LENDING_MARKET_AUTH, SEED_LENDING_REWARDS_RATE_MODEL, SEED_LIQUIDITY, SEED_RATE_MODEL, SEED_RESERVE, SEED_RESERVE_COLL_MINT, SEED_RESERVE_COLL_SUPPLY, SEED_RESERVE_LIQ_SUPPLY, SEED_SPOT_MARKET, SEED_SPOT_MARKET_VAULT, SEED_USER, SEED_USER_CLAIM, SEED_USER_STATE, SEED_USER_STATS, SEED_USER_SUPPLY_POSITION, SEED_WITHDRAWAL_POLICY, SEED_WITHDRAW_ESCROW, SEED_WITHDRAW_RECEIPT, SLOTS_PER_DAY, SLOTS_PER_HOUR, SLOTS_PER_MINUTE, SLOTS_PER_SECOND, SLOTS_PER_YEAR, SPOT_MARKET_RATE_PRECISION, SPOT_MARKET_RATE_PRECISION_EXP, SPOT_MARKET_UTILIZATION_PRECISION, SPOT_MARKET_UTILIZATION_PRECISION_EXP, SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, SinglePoolInstruction, SplAccountType, SpotBalanceType, StreamError, SwapMode, SwapVersion, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, TokenAccountNotFoundError, TokenError, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, V1Client, ZERO, addSigners, approveInstructionData, buildSwapQuoteResult, buildTitanTemplate, calculateAPYFromAPR, calculateDriftBorrowAPR, calculateDriftBorrowAPY, calculateDriftBorrowRate, calculateDriftDepositRate, calculateDriftInterestRate, calculateDriftLendingAPR, calculateDriftLendingAPY, calculateDriftUtilization, calculateJupLendBorrowRate, calculateJupLendLiquiditySupplyRate, calculateJupLendNewExchangePrice, calculateJupLendRewardsRate, calculateJupLendRewardsRateForExchangePrice, calculateJupLendSupplyAPY, calculateJupLendSupplyRate, calculateJupLendTotalAssets, calculateKaminoEstimatedBorrowRate, calculateKaminoEstimatedSupplyRate, calculateKaminoSupplyAPY, calculateRewardApy, calculateSlotAdjustmentFactor, calculateUtilizationRatio, closeAccountInstructionData, createAccountIx, createApproveInstruction, createAssociatedTokenAccountIdempotentInstruction, createAssociatedTokenAccountInstruction, createCloseAccountInstruction, createInitializeAccountInstruction, createMemoInstruction, createPoolOnrampIx, createSyncNativeInstruction, createTransferCheckedInstruction, decodeDriftSpotMarketData, decodeDriftStateData, decodeDriftUserData, decodeDriftUserStatsData, decodeExponentMarketThree, decodeExponentMarketTwo, decodeExponentMarketVault, decodeExponentVault, decodeFarmDataRaw, decodeGammaLpVaultData, decodeGammaWithdrawReceiptData, decodeJupLendingRewardsRateModelData, decodeJupLendingStateData, decodeJupRateModelData, decodeJupTokenReserveData, decodeKlendObligationData, decodeKlendReserveData, decodeSwitchboardPullFeedData, deriveBaseObligation, deriveDriftSigner, deriveDriftSpotMarket, deriveDriftSpotMarketVault, deriveDriftState, deriveDriftUser, deriveDriftUserStats, deriveExponentClmmEventAuthority, deriveExponentEventAuthority, deriveFeeReceiver, deriveGammaAta, deriveGammaDepositPolicy, deriveGammaDepositReceipt, deriveGammaWithdrawEscrow, deriveGammaWithdrawReceipt, deriveGammaWithdrawalPolicy, deriveJupLendClaimAccount, deriveJupLendFTokenMint, deriveJupLendLending, deriveJupLendLendingAdmin, deriveJupLendLendingPdas, deriveJupLendLendingRewardsRateModel, deriveJupLendLiquidity, deriveJupLendLiquiditySupplyPositionPda, deriveJupLendLiquidityVaultAta, deriveJupLendRateModel, deriveJupLendTokenReserve, deriveLendingMarketAuthority, deriveObligation, deriveReferrerState, deriveReferrerTokenState, deriveReserveCollateralMint, deriveReserveCollateralSupply, deriveReserveLiquiditySupply, deriveShortUrl, deriveUserMetadata, deriveUserState, deserializeSerializedInstruction, deserializeTitanWireInstruction, driftRewardsRawToDto, driftSpotMarketRawToDto, driftStateRawToDto, driftUserRawToDto, driftUserStatsRawToDto, dtoToDriftRewardsRaw, dtoToDriftSpotMarketRaw, dtoToDriftStateRaw, dtoToDriftUserRaw, dtoToDriftUserStatsRaw, dtoToJupLendingRewardsRateModelRaw, dtoToJupLendingStateRaw, dtoToJupRateModelRaw, dtoToJupTokenReserveRaw, dtoToKaminoFarmState, dtoToKaminoObligation, dtoToKaminoReserve, encodeTitanTemplate, exponentBuyPtArgs, exponentClmmBuyPtArgs, exponentNumberToBigNumber, fetchExponentMarketThree, fetchExponentMarketTwo, fetchExponentVault, fetchExponentVaultFromMarket, fetchTitanQuoteSwapV3, findMplMetadataAddress, findPoolAddress, findPoolMintAddress, findPoolMintAddressByVoteAccount, findPoolMintAuthorityAddress, findPoolMplAuthorityAddress, findPoolOnRampAddress, findPoolStakeAddress, findPoolStakeAuthorityAddress, generateDriftReserveCurve, generateJupLendSupplyCurve, generateKaminoReserveCurve, generateKaminoReserveCurveFromReserve, getAccount, getAccountLen, getAllDerivedDriftAccounts, getAllDerivedJupLendAccounts, getAllDerivedKaminoAccounts, getAllRequiredMarkets, getAssociatedTokenAddressSync, getDriftRewards, getDriftTokenAmount, getFixedHostInterestRate, getJupLendRewards, getKaminoBorrowRate, getKaminoInterestRateBasis, getKaminoRateBasis, getKaminoTotalSupply, getMinimumBalanceForRentExemptAccount, getMinimumBalanceForRentExemptAccountWithExtensions, getMint, getMintDecimals, getMultipleAccounts, getProtocolTakeRatePct, getReserveRewardsApy, getRewardPerTimeUnitSecond, getStakeAccount, getSwitchboardProgram, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, isSpotBalanceTypeVariant, jupLendingRewardsRateModelRawToDto, jupLendingStateRawToDto, jupRateModelRawToDto, jupTokenReserveRawToDto, kaminoFarmStateToDto, kaminoObligationToDto, kaminoReserveToDto, layout, lutToTitanWire, makeExponentClmmTradePtIx, makeExponentMergeIx, makeExponentStripIx, makeExponentTradePtIx, makeExponentWrapperMergeIx, makeGammaCompleteWithdrawalIx, makeGammaDepositIx, makeGammaWithdrawIx, makeRefreshObligationIx, makeRefreshReservesBatchIx, makeRefreshingIxs, makeSplStakePoolUpdateBalanceIx, makeUpdateJupLendRate, makeUpdateJupLendRateIx, makeUpdateSpotMarketCumulativeInterestIx, makeUpdateSpotMarketIx, parsePriceData, parsePriceInfo2 as parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, switchboardAccountCoder, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
52509
52559
  //# sourceMappingURL=vendor.js.map
52510
52560
  //# sourceMappingURL=vendor.js.map