@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/{dto-rate-model.types-IT8wckYH.d.cts → dto-rate-model.types-DnQmHIO6.d.cts} +27 -1
- package/dist/{dto-rate-model.types-IT8wckYH.d.ts → dto-rate-model.types-DnQmHIO6.d.ts} +27 -1
- package/dist/index.cjs +25818 -25831
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -25
- package/dist/index.d.ts +4 -25
- package/dist/index.js +25819 -25830
- package/dist/index.js.map +1 -1
- package/dist/instructions.cjs +3 -20
- package/dist/instructions.cjs.map +1 -1
- package/dist/instructions.d.cts +2 -2
- package/dist/instructions.d.ts +2 -2
- package/dist/instructions.js +3 -20
- package/dist/instructions.js.map +1 -1
- package/dist/{types-B5SGXpex.d.ts → types-DJqANTTA.d.cts} +1 -1
- package/dist/{types-BFLi0Ozl.d.cts → types-sisv3J7l.d.ts} +1 -1
- package/dist/vendor.cjs +70 -15
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +71 -21
- package/dist/vendor.d.ts +71 -21
- package/dist/vendor.js +66 -16
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
package/dist/vendor.d.cts
CHANGED
|
@@ -5,8 +5,8 @@ import { Buffer as Buffer$1 } from 'buffer';
|
|
|
5
5
|
import { G as GammaLpVaultRaw, a as GammaWithdrawReceiptRaw } from './types-DLZaKA17.cjs';
|
|
6
6
|
export { b as CrossbarSimulatePayload, C as CurrentResult, F as FeedResponse, O as OracleSubmission, P as PullFeedAccountData, S as SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, d as decodeSwitchboardPullFeedData, g as getSwitchboardProgram, s as switchboardAccountCoder } from './types-DLZaKA17.cjs';
|
|
7
7
|
import { Program, BorshCoder, Address } from '@coral-xyz/anchor';
|
|
8
|
-
import { K as KaminoReserve, a as KaminoObligation, j as KaminoObligationJSON, i as KaminoReserveJSON, t as
|
|
9
|
-
export {
|
|
8
|
+
import { K as KaminoReserve, a as KaminoObligation, j as KaminoObligationJSON, i as KaminoReserveJSON, t as KaminoInterestRateBasis, u as KaminoBorrowRateCurvePoint, v as KaminoFarmRewardInfo, b as KaminoFarmState, k as KaminoFarmStateJSON, H as HistoricalOracleData, w as HistoricalIndexData, P as PoolBalance, I as InsuranceFund, F as FeeStructureJSON, O as OracleGuardRailsJSON, x as FeeStructure, y as OracleGuardRails, S as SpotPosition, e as DriftUserStats, o as DriftUserStatsJSON, c as DriftUser, m as DriftUserJSON, D as DriftSpotMarket, l as DriftSpotMarketJSON, d as DriftRewards, n as DriftRewardsJSON, z as DriftSpotBalanceType, J as JupLendingState, p as JupLendingStateJSON, f as JupTokenReserve, q as JupTokenReserveJSON, g as JupLendingRewardsRateModel, r as JupLendingRewardsRateModelJSON, h as JupRateModel, s as JupRateModelJSON } from './dto-rate-model.types-DnQmHIO6.cjs';
|
|
9
|
+
export { ac as FeeTier, ad as FeeTierJSON, al as HistoricalIndexDataJSON, ak as HistoricalOracleDataJSON, an as InsuranceFundJSON, E as KaminoBorrowRateCurve, U as KaminoBorrowRateCurveJSON, V as KaminoBorrowRateCurvePointJSON, a6 as KaminoFarmRewardInfoJSON, a2 as KaminoFarmTokenInfo, a5 as KaminoFarmTokenInfoJSON, _ as KaminoObligationCollateral, a0 as KaminoObligationCollateralJSON, $ as KaminoObligationLiquidity, a1 as KaminoObligationLiquidityJSON, N as KaminoPythConfiguration, Z as KaminoPythConfigurationJSON, B as KaminoReserveCollateral, R as KaminoReserveCollateralJSON, C as KaminoReserveConfig, T as KaminoReserveConfigJSON, A as KaminoReserveLiquidity, Q as KaminoReserveLiquidityJSON, G as KaminoReserveTokenInfo, W as KaminoReserveTokenInfoJSON, a4 as KaminoRewardCurvePoint, a8 as KaminoRewardCurvePointJSON, a3 as KaminoRewardScheduleCurve, a7 as KaminoRewardScheduleCurveJSON, L as KaminoScopeConfiguration, X as KaminoScopeConfigurationJSON, M as KaminoSwitchboardConfiguration, Y as KaminoSwitchboardConfigurationJSON, ae as OrderFillerRewardStructure, af as OrderFillerRewardStructureJSON, am as PoolBalanceJSON, ag as PriceDivergenceGuardRails, ah as PriceDivergenceGuardRailsJSON, ao as SpotBalanceType, ap as SpotPositionJSON, aa as UserFeesFields, a9 as UserFeesJSON, ai as ValidityGuardRails, aj as ValidityGuardRailsJSON, ab as isSpotBalanceTypeVariant } from './dto-rate-model.types-DnQmHIO6.cjs';
|
|
10
10
|
import BN from 'bn.js';
|
|
11
11
|
import Decimal from 'decimal.js';
|
|
12
12
|
import * as _solana_buffer_layout from '@solana/buffer-layout';
|
|
@@ -8129,12 +8129,17 @@ interface ReserveConfigFields {
|
|
|
8129
8129
|
assetTier: number;
|
|
8130
8130
|
/** Flat rate that goes to the host */
|
|
8131
8131
|
hostFixedInterestRateBps: number;
|
|
8132
|
-
/**
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8132
|
+
/** Minimum deleveraging bonus in bps */
|
|
8133
|
+
minDeleveragingBonusBps: number;
|
|
8134
|
+
/** Whether cToken usage is blocked */
|
|
8135
|
+
blockCtokenUsage: number;
|
|
8136
|
+
/** Remaining interest charged on early repay, as a percentage */
|
|
8137
|
+
earlyRepayRemainingInterestPct: number;
|
|
8138
|
+
/** Emergency mode flag */
|
|
8139
|
+
emergencyMode: number;
|
|
8140
|
+
/** Interest rate basis: 0 = Legacy (slot-based), 1 = TrueApr (wall-clock) */
|
|
8141
|
+
interestRateBasis: number;
|
|
8142
|
+
/** Reserved for future use */
|
|
8138
8143
|
reserved2: Array<number>;
|
|
8139
8144
|
/** Cut of the order execution bonus that the protocol receives, as a percentage */
|
|
8140
8145
|
protocolOrderExecutionFeePct: number;
|
|
@@ -8687,6 +8692,15 @@ interface KaminoReserveCurveData {
|
|
|
8687
8692
|
reserveAddress: string;
|
|
8688
8693
|
curvePoints: KlendInterestRateCurvePoint[];
|
|
8689
8694
|
}
|
|
8695
|
+
/**
|
|
8696
|
+
* How a reserve's configured (curve) rate is turned into a realized annual rate.
|
|
8697
|
+
* `multiplier` scales the curve rate; `periodsPerYear` is the compounding
|
|
8698
|
+
* granularity used to convert APR to APY.
|
|
8699
|
+
*/
|
|
8700
|
+
interface KaminoRateBasis {
|
|
8701
|
+
multiplier: number;
|
|
8702
|
+
periodsPerYear: number;
|
|
8703
|
+
}
|
|
8690
8704
|
/**
|
|
8691
8705
|
* Linear interpolation between two points
|
|
8692
8706
|
*/
|
|
@@ -8700,11 +8714,13 @@ declare const interpolateLinear: (x: number, x0: number, y0: number, x1: number,
|
|
|
8700
8714
|
declare const getKaminoBorrowRate: (currentUtilization: number, curve: [number, number][]) => number;
|
|
8701
8715
|
/**
|
|
8702
8716
|
* Convert APR to APY using compound interest formula
|
|
8703
|
-
* APY = (1 + APR/n)^n - 1
|
|
8717
|
+
* APY = (1 + APR/n)^n - 1
|
|
8704
8718
|
* @param apr - Annual Percentage Rate as decimal (e.g., 0.05 for 5%)
|
|
8719
|
+
* @param periodsPerYear - Compounding periods per year (defaults to SLOTS_PER_YEAR;
|
|
8720
|
+
* use `getKaminoRateBasis(reserve).periodsPerYear` for basis-aware compounding)
|
|
8705
8721
|
* @returns Annual Percentage Yield as decimal
|
|
8706
8722
|
*/
|
|
8707
|
-
declare function calculateAPYFromAPR(apr: number): number;
|
|
8723
|
+
declare function calculateAPYFromAPR(apr: number, periodsPerYear?: number): number;
|
|
8708
8724
|
/**
|
|
8709
8725
|
* Calculate total supply of a reserve
|
|
8710
8726
|
* Formula: available liquidity + borrowed - protocol fees - referrer fees
|
|
@@ -8719,22 +8735,44 @@ declare function getKaminoTotalSupply(reserve: KaminoReserve): Decimal;
|
|
|
8719
8735
|
* @returns Utilization ratio (0-1, e.g., 0.75 = 75% utilized)
|
|
8720
8736
|
*/
|
|
8721
8737
|
declare function calculateUtilizationRatio(reserve: KaminoReserve): number;
|
|
8738
|
+
/**
|
|
8739
|
+
* Resolve a reserve's interest rate basis, defaulting to `Legacy` when the
|
|
8740
|
+
* field is absent (reserves serialized before it existed).
|
|
8741
|
+
* @throws if the on-chain value is not a known basis
|
|
8742
|
+
*/
|
|
8743
|
+
declare function getKaminoInterestRateBasis(reserve: KaminoReserve): KaminoInterestRateBasis;
|
|
8722
8744
|
/**
|
|
8723
8745
|
* Calculate slot adjustment factor based on recent slot duration
|
|
8724
|
-
* Used to adjust rates based on actual blockchain performance
|
|
8746
|
+
* Used to adjust Legacy-basis rates based on actual blockchain performance
|
|
8725
8747
|
* @param recentSlotDurationMs - Recent slot duration in milliseconds
|
|
8726
8748
|
* @returns Slot adjustment factor
|
|
8727
8749
|
*/
|
|
8728
8750
|
declare function slotAdjustmentFactor(recentSlotDurationMs?: number): number;
|
|
8729
8751
|
/**
|
|
8730
|
-
*
|
|
8731
|
-
*
|
|
8752
|
+
* Rate multiplier and compounding granularity for a reserve, per its
|
|
8753
|
+
* interest rate basis (1:1 with klend-sdk `KaminoReserve.rateAdjustmentFactor()`
|
|
8754
|
+
* and `accrualUnitsPerYear()`).
|
|
8755
|
+
*
|
|
8756
|
+
* - `Legacy`: curve rates are slot-year APRs, so they are scaled by the observed
|
|
8757
|
+
* slot duration and compounded per slot.
|
|
8758
|
+
* - `TrueApr`: curve rates are wall-clock APRs; `recentSlotDurationMs` is ignored
|
|
8759
|
+
* and rates compound per second.
|
|
8760
|
+
*
|
|
8761
|
+
* @param reserve - The Kamino reserve
|
|
8762
|
+
* @param recentSlotDurationMs - Observed slot duration; only read for `Legacy`
|
|
8763
|
+
* @throws for an unsupported basis, or a non-positive slot duration on `Legacy`
|
|
8764
|
+
*/
|
|
8765
|
+
declare function getKaminoRateBasis(reserve: KaminoReserve, recentSlotDurationMs?: number): KaminoRateBasis;
|
|
8766
|
+
/**
|
|
8767
|
+
* Calculate the rate multiplier for a reserve (1:1 with klend-sdk
|
|
8768
|
+
* `KaminoReserve.rateAdjustmentFactor()`): the slot adjustment factor for a
|
|
8769
|
+
* `Legacy` reserve, `1` for a `TrueApr` one.
|
|
8732
8770
|
*/
|
|
8733
|
-
declare function calculateSlotAdjustmentFactor(reserve: KaminoReserve, recentSlotDurationMs
|
|
8771
|
+
declare function calculateSlotAdjustmentFactor(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
8734
8772
|
/**
|
|
8735
8773
|
* Calculate estimated borrow rate for a reserve
|
|
8736
8774
|
* @param reserve - The reserve
|
|
8737
|
-
* @param recentSlotDurationMs - Recent slot duration (optional)
|
|
8775
|
+
* @param recentSlotDurationMs - Recent slot duration (optional; ignored for TrueApr reserves)
|
|
8738
8776
|
* @returns Borrow rate as decimal (e.g., 0.05 = 5%)
|
|
8739
8777
|
*/
|
|
8740
8778
|
declare function calculateKaminoEstimatedBorrowRate(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
@@ -8742,7 +8780,7 @@ declare function calculateKaminoEstimatedBorrowRate(reserve: KaminoReserve, rece
|
|
|
8742
8780
|
* Calculate estimated supply rate for a reserve
|
|
8743
8781
|
* Formula: borrow rate × utilization × (1 - protocol take rate)
|
|
8744
8782
|
* @param reserve - The reserve
|
|
8745
|
-
* @param recentSlotDurationMs - Recent slot duration (optional)
|
|
8783
|
+
* @param recentSlotDurationMs - Recent slot duration (optional; ignored for TrueApr reserves)
|
|
8746
8784
|
* @returns Supply rate as decimal (e.g., 0.03 = 3%)
|
|
8747
8785
|
*/
|
|
8748
8786
|
declare function calculateKaminoEstimatedSupplyRate(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
@@ -8751,7 +8789,8 @@ declare function calculateKaminoEstimatedSupplyRate(reserve: KaminoReserve, rece
|
|
|
8751
8789
|
* APY includes compounding, making it higher than APR
|
|
8752
8790
|
* Matches Kamino SDK's reserve.totalSupplyAPY()
|
|
8753
8791
|
* @param reserve - The Kamino reserve
|
|
8754
|
-
* @param recentSlotDurationMs - Recent slot duration (defaults to
|
|
8792
|
+
* @param recentSlotDurationMs - Recent slot duration (defaults to
|
|
8793
|
+
* DEFAULT_RECENT_SLOT_DURATION_MS; ignored for TrueApr reserves)
|
|
8755
8794
|
* @returns Supply APY as decimal (e.g., 0.0512 = 5.12% APY)
|
|
8756
8795
|
*/
|
|
8757
8796
|
declare function calculateKaminoSupplyAPY(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
@@ -8774,12 +8813,22 @@ declare function getProtocolTakeRatePct(reserve: KaminoReserve): number;
|
|
|
8774
8813
|
* Generate complete interest rate curve for a reserve
|
|
8775
8814
|
* Creates 101 data points from 0% to 100% utilization
|
|
8776
8815
|
* @param curvePoints - Raw curve configuration from reserve
|
|
8777
|
-
* @param slotAdjustmentFactor -
|
|
8816
|
+
* @param slotAdjustmentFactor - Rate multiplier (`calculateSlotAdjustmentFactor`;
|
|
8817
|
+
* the slot adjustment for Legacy reserves, 1 for TrueApr)
|
|
8778
8818
|
* @param fixedHostInterestRate - Fixed rate added to all borrow rates
|
|
8779
8819
|
* @param protocolTakeRatePct - Percentage kept by depositors (1 - protocol fee)
|
|
8820
|
+
* @param periodsPerYear - APY compounding periods (`getKaminoRateBasis(reserve).periodsPerYear`;
|
|
8821
|
+
* defaults to SLOTS_PER_YEAR)
|
|
8780
8822
|
* @returns Array of curve points with utilization, borrow APY, and supply APY
|
|
8781
8823
|
*/
|
|
8782
|
-
declare function generateKaminoReserveCurve(curvePoints: KaminoBorrowRateCurvePoint[], slotAdjustmentFactor: number, fixedHostInterestRate: number, protocolTakeRatePct: number): KlendInterestRateCurvePoint[];
|
|
8824
|
+
declare function generateKaminoReserveCurve(curvePoints: KaminoBorrowRateCurvePoint[], slotAdjustmentFactor: number, fixedHostInterestRate: number, protocolTakeRatePct: number, periodsPerYear?: number): KlendInterestRateCurvePoint[];
|
|
8825
|
+
/**
|
|
8826
|
+
* Generate the interest rate curve for a reserve, deriving the rate multiplier
|
|
8827
|
+
* and compounding granularity from its interest rate basis.
|
|
8828
|
+
* @param reserve - The Kamino reserve
|
|
8829
|
+
* @param recentSlotDurationMs - Recent slot duration (optional; ignored for TrueApr reserves)
|
|
8830
|
+
*/
|
|
8831
|
+
declare function generateKaminoReserveCurveFromReserve(reserve: KaminoReserve, recentSlotDurationMs?: number): KlendInterestRateCurvePoint[];
|
|
8783
8832
|
|
|
8784
8833
|
declare function getRewardPerTimeUnitSecond(reward: KaminoFarmRewardInfo): Decimal;
|
|
8785
8834
|
declare function getReserveRewardsApy(priceByMint: Record<string, number>, farmState: KaminoFarmState, reserveState: KaminoReserve): Promise<{
|
|
@@ -8811,7 +8860,8 @@ declare const SLOTS_PER_MINUTE: number;
|
|
|
8811
8860
|
declare const SLOTS_PER_HOUR: number;
|
|
8812
8861
|
declare const SLOTS_PER_DAY: number;
|
|
8813
8862
|
declare const SLOTS_PER_YEAR: number;
|
|
8814
|
-
declare const
|
|
8863
|
+
declare const SECONDS_PER_YEAR = 31536000;
|
|
8864
|
+
declare const DEFAULT_RECENT_SLOT_DURATION_MS = 350;
|
|
8815
8865
|
declare const ONE_HUNDRED_PCT_IN_BPS = 10000;
|
|
8816
8866
|
|
|
8817
8867
|
/**
|
|
@@ -36249,4 +36299,4 @@ declare function makeExponentClmmTradePtIx(accounts: ExponentClmmTradePtAccounts
|
|
|
36249
36299
|
priceSpotLimit: null;
|
|
36250
36300
|
}): TransactionInstruction;
|
|
36251
36301
|
|
|
36252
|
-
export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, type Account, AccountLayout, type AccountMeta, AccountState, AccountType, type ApproveInstructionData, type Base, type BigFractionBytesFields, type BorrowRateCurveFields, type ClientRequest, type CloseAccountInstructionData, ConnectionClosed, CorpAction, type CurvePointFields, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, type DriftIdlType, type DriftInterestRateCurvePoint, DriftRewards, DriftRewardsJSON, DriftSpotBalanceType, DriftSpotMarket, DriftSpotMarketJSON, type DriftSpotMarketRaw, type DriftState, type DriftStateJSON, DriftUser, DriftUserJSON, type DriftUserRaw, DriftUserStats, DriftUserStatsJSON, 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, type Ema, ErrorResponse, type ExponentClmmTradePtAccounts, type ExponentClmmTradePtContext, type ExponentCpiInterfaceContext, type ExponentMarketThree, type ExponentMarketThreeCpiAccounts, type ExponentMarketTwo, type ExponentMarketTwoCpiAccounts, type ExponentMergeAccounts, type ExponentMergeContext, type ExponentStripAccounts, type ExponentStripContext, ExponentSwapDirection, type ExponentTradePtAccounts, type ExponentTradePtContext, type ExponentVault, type ExponentWrapperMergeAccounts, type ExponentWrapperMergeContext, ExtensionType, FARMS_PROGRAM_ID, type FarmStateRaw, FeeStructure, FeeStructureJSON, GAMMA_VAULT_IDL, GAMMA_VAULT_PROGRAM_ID, type GammaCompleteWithdrawalAccounts, type GammaDepositAccounts, GammaLpVaultRaw, type GammaVaultIdlType, type GammaWithdrawAccounts, GammaWithdrawReceiptRaw, HistoricalIndexData, HistoricalOracleData, type InitializeAccountInstructionData, type Instruction, InsuranceFund, 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, type JupLendIdlType, type JupLendInterestRateCurvePoint, type JupLendRewardsResult, JupLendingRewardsRateModel, JupLendingRewardsRateModelJSON, type JupLendingRewardsRateModelRaw, JupLendingState, JupLendingStateJSON, type JupLendingStateRaw, type JupLiquidityIdlType, JupRateModel, JupRateModelJSON, type JupRateModelRaw, JupTokenReserve, JupTokenReserveJSON, type JupTokenReserveRaw, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, KaminoBorrowRateCurvePoint, KaminoFarmRewardInfo, KaminoFarmState, KaminoFarmStateJSON, KaminoObligation, KaminoObligationJSON, KaminoReserve, type KaminoReserveCurveData, KaminoReserveJSON, type KfarmsIdlType, type KlendIdlType, type KlendInterestRateCurvePoint, LENGTH_SIZE, type LastUpdateFields, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, type Mint, MintLayout, type Multisig, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, type ObligationCollateralFields, type ObligationLiquidityFields, type ObligationOrderFields, type ObligationRaw, OracleGuardRails, OracleGuardRailsJSON, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, type PlatformFee, PoolBalance, type Price, type PriceComponent, type PriceData, type PriceHeuristicFields, PriceStatus, PriceType, type Pubkey, type PythConfigurationFields, type QuoteSwapStreamResponse, type QuoteUpdateParams, REFRESH_OBLIGATION_DISCRIMINATOR, type RawAccount, type RawMint, type RawMultisig, type RefreshObligationAccounts, type RequestData, type ReserveCollateralFields, type ReserveConfigFields, type ReserveFeesFields, type ReserveLiquidityFields, type ReserveRaw, type ResolveExponentClmmTradePtContextParams, type ResolveExponentMergeContextParams, type ResolveExponentStripContextParams, type ResolveExponentTradePtContextParams, type ResolveExponentWrapperMergeContextParams, type ResponseData, type ResponseError, type ResponseSuccess, type ResponseWithStream, type RewardInfoFields, type RewardPerTimeUnitPointFields, type RewardScheduleCurveFields, type RoutePlanStep, 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, type ScopeConfigurationFields, type SerializedInstruction, type SerializedSwapRoute, type ServerMessage, SinglePoolInstruction, SplAccountType, SpotPosition, type StakeAccount, type StopStreamRequest, type StopStreamResponse, type StreamData, type StreamDataPayload, type StreamEnd, StreamError, type StreamStart, SwapMode, type SwapParams, type SwapQuoteRequest, type SwapQuotes, type SwapRoute, SwapVersion, type SwitchboardConfigurationFields, type SyncNativeInstructionData, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, type TitanGatewayQuoteParams, type TitanGatewayQuoteResponse, type TitanProxyExactOutResponse, type TitanProxySwapQuoteResponse, type TitanSwapQuoteResult, type TitanTemplateLut, type TitanTransactionTemplate, TokenAccountNotFoundError, TokenError, type TokenInfoFields$1 as TokenInfoFields, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, type TransactionParams, type TransactionTemplate, type TransactionTemplateLut, type TransferCheckedInstructionData, type Uint64, V1Client, type WithdrawalCapsFields, 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, 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, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, 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, parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
|
|
36302
|
+
export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, type Account, AccountLayout, type AccountMeta, AccountState, AccountType, type ApproveInstructionData, type Base, type BigFractionBytesFields, type BorrowRateCurveFields, type ClientRequest, type CloseAccountInstructionData, ConnectionClosed, CorpAction, type CurvePointFields, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, type DriftIdlType, type DriftInterestRateCurvePoint, DriftRewards, DriftRewardsJSON, DriftSpotBalanceType, DriftSpotMarket, DriftSpotMarketJSON, type DriftSpotMarketRaw, type DriftState, type DriftStateJSON, DriftUser, DriftUserJSON, type DriftUserRaw, DriftUserStats, DriftUserStatsJSON, 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, type Ema, ErrorResponse, type ExponentClmmTradePtAccounts, type ExponentClmmTradePtContext, type ExponentCpiInterfaceContext, type ExponentMarketThree, type ExponentMarketThreeCpiAccounts, type ExponentMarketTwo, type ExponentMarketTwoCpiAccounts, type ExponentMergeAccounts, type ExponentMergeContext, type ExponentStripAccounts, type ExponentStripContext, ExponentSwapDirection, type ExponentTradePtAccounts, type ExponentTradePtContext, type ExponentVault, type ExponentWrapperMergeAccounts, type ExponentWrapperMergeContext, ExtensionType, FARMS_PROGRAM_ID, type FarmStateRaw, FeeStructure, FeeStructureJSON, GAMMA_VAULT_IDL, GAMMA_VAULT_PROGRAM_ID, type GammaCompleteWithdrawalAccounts, type GammaDepositAccounts, GammaLpVaultRaw, type GammaVaultIdlType, type GammaWithdrawAccounts, GammaWithdrawReceiptRaw, HistoricalIndexData, HistoricalOracleData, type InitializeAccountInstructionData, type Instruction, InsuranceFund, 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, type JupLendIdlType, type JupLendInterestRateCurvePoint, type JupLendRewardsResult, JupLendingRewardsRateModel, JupLendingRewardsRateModelJSON, type JupLendingRewardsRateModelRaw, JupLendingState, JupLendingStateJSON, type JupLendingStateRaw, type JupLiquidityIdlType, JupRateModel, JupRateModelJSON, type JupRateModelRaw, JupTokenReserve, JupTokenReserveJSON, type JupTokenReserveRaw, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, KaminoBorrowRateCurvePoint, KaminoFarmRewardInfo, KaminoFarmState, KaminoFarmStateJSON, KaminoInterestRateBasis, KaminoObligation, KaminoObligationJSON, type KaminoRateBasis, KaminoReserve, type KaminoReserveCurveData, KaminoReserveJSON, type KfarmsIdlType, type KlendIdlType, type KlendInterestRateCurvePoint, LENGTH_SIZE, type LastUpdateFields, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, type Mint, MintLayout, type Multisig, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, type ObligationCollateralFields, type ObligationLiquidityFields, type ObligationOrderFields, type ObligationRaw, OracleGuardRails, OracleGuardRailsJSON, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, type PlatformFee, PoolBalance, type Price, type PriceComponent, type PriceData, type PriceHeuristicFields, PriceStatus, PriceType, type Pubkey, type PythConfigurationFields, type QuoteSwapStreamResponse, type QuoteUpdateParams, REFRESH_OBLIGATION_DISCRIMINATOR, type RawAccount, type RawMint, type RawMultisig, type RefreshObligationAccounts, type RequestData, type ReserveCollateralFields, type ReserveConfigFields, type ReserveFeesFields, type ReserveLiquidityFields, type ReserveRaw, type ResolveExponentClmmTradePtContextParams, type ResolveExponentMergeContextParams, type ResolveExponentStripContextParams, type ResolveExponentTradePtContextParams, type ResolveExponentWrapperMergeContextParams, type ResponseData, type ResponseError, type ResponseSuccess, type ResponseWithStream, type RewardInfoFields, type RewardPerTimeUnitPointFields, type RewardScheduleCurveFields, type RoutePlanStep, 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, type ScopeConfigurationFields, type SerializedInstruction, type SerializedSwapRoute, type ServerMessage, SinglePoolInstruction, SplAccountType, SpotPosition, type StakeAccount, type StopStreamRequest, type StopStreamResponse, type StreamData, type StreamDataPayload, type StreamEnd, StreamError, type StreamStart, SwapMode, type SwapParams, type SwapQuoteRequest, type SwapQuotes, type SwapRoute, SwapVersion, type SwitchboardConfigurationFields, type SyncNativeInstructionData, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, type TitanGatewayQuoteParams, type TitanGatewayQuoteResponse, type TitanProxyExactOutResponse, type TitanProxySwapQuoteResponse, type TitanSwapQuoteResult, type TitanTemplateLut, type TitanTransactionTemplate, TokenAccountNotFoundError, TokenError, type TokenInfoFields$1 as TokenInfoFields, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, type TransactionParams, type TransactionTemplate, type TransactionTemplateLut, type TransferCheckedInstructionData, type Uint64, V1Client, type WithdrawalCapsFields, 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, 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, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, 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, parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
|
package/dist/vendor.d.ts
CHANGED
|
@@ -5,8 +5,8 @@ import { Buffer as Buffer$1 } from 'buffer';
|
|
|
5
5
|
import { G as GammaLpVaultRaw, a as GammaWithdrawReceiptRaw } from './types-DLZaKA17.js';
|
|
6
6
|
export { b as CrossbarSimulatePayload, C as CurrentResult, F as FeedResponse, O as OracleSubmission, P as PullFeedAccountData, S as SWITCHBOARD_ONDEMANDE_PRICE_PRECISION, d as decodeSwitchboardPullFeedData, g as getSwitchboardProgram, s as switchboardAccountCoder } from './types-DLZaKA17.js';
|
|
7
7
|
import { Program, BorshCoder, Address } from '@coral-xyz/anchor';
|
|
8
|
-
import { K as KaminoReserve, a as KaminoObligation, j as KaminoObligationJSON, i as KaminoReserveJSON, t as
|
|
9
|
-
export {
|
|
8
|
+
import { K as KaminoReserve, a as KaminoObligation, j as KaminoObligationJSON, i as KaminoReserveJSON, t as KaminoInterestRateBasis, u as KaminoBorrowRateCurvePoint, v as KaminoFarmRewardInfo, b as KaminoFarmState, k as KaminoFarmStateJSON, H as HistoricalOracleData, w as HistoricalIndexData, P as PoolBalance, I as InsuranceFund, F as FeeStructureJSON, O as OracleGuardRailsJSON, x as FeeStructure, y as OracleGuardRails, S as SpotPosition, e as DriftUserStats, o as DriftUserStatsJSON, c as DriftUser, m as DriftUserJSON, D as DriftSpotMarket, l as DriftSpotMarketJSON, d as DriftRewards, n as DriftRewardsJSON, z as DriftSpotBalanceType, J as JupLendingState, p as JupLendingStateJSON, f as JupTokenReserve, q as JupTokenReserveJSON, g as JupLendingRewardsRateModel, r as JupLendingRewardsRateModelJSON, h as JupRateModel, s as JupRateModelJSON } from './dto-rate-model.types-DnQmHIO6.js';
|
|
9
|
+
export { ac as FeeTier, ad as FeeTierJSON, al as HistoricalIndexDataJSON, ak as HistoricalOracleDataJSON, an as InsuranceFundJSON, E as KaminoBorrowRateCurve, U as KaminoBorrowRateCurveJSON, V as KaminoBorrowRateCurvePointJSON, a6 as KaminoFarmRewardInfoJSON, a2 as KaminoFarmTokenInfo, a5 as KaminoFarmTokenInfoJSON, _ as KaminoObligationCollateral, a0 as KaminoObligationCollateralJSON, $ as KaminoObligationLiquidity, a1 as KaminoObligationLiquidityJSON, N as KaminoPythConfiguration, Z as KaminoPythConfigurationJSON, B as KaminoReserveCollateral, R as KaminoReserveCollateralJSON, C as KaminoReserveConfig, T as KaminoReserveConfigJSON, A as KaminoReserveLiquidity, Q as KaminoReserveLiquidityJSON, G as KaminoReserveTokenInfo, W as KaminoReserveTokenInfoJSON, a4 as KaminoRewardCurvePoint, a8 as KaminoRewardCurvePointJSON, a3 as KaminoRewardScheduleCurve, a7 as KaminoRewardScheduleCurveJSON, L as KaminoScopeConfiguration, X as KaminoScopeConfigurationJSON, M as KaminoSwitchboardConfiguration, Y as KaminoSwitchboardConfigurationJSON, ae as OrderFillerRewardStructure, af as OrderFillerRewardStructureJSON, am as PoolBalanceJSON, ag as PriceDivergenceGuardRails, ah as PriceDivergenceGuardRailsJSON, ao as SpotBalanceType, ap as SpotPositionJSON, aa as UserFeesFields, a9 as UserFeesJSON, ai as ValidityGuardRails, aj as ValidityGuardRailsJSON, ab as isSpotBalanceTypeVariant } from './dto-rate-model.types-DnQmHIO6.js';
|
|
10
10
|
import BN from 'bn.js';
|
|
11
11
|
import Decimal from 'decimal.js';
|
|
12
12
|
import * as _solana_buffer_layout from '@solana/buffer-layout';
|
|
@@ -8129,12 +8129,17 @@ interface ReserveConfigFields {
|
|
|
8129
8129
|
assetTier: number;
|
|
8130
8130
|
/** Flat rate that goes to the host */
|
|
8131
8131
|
hostFixedInterestRateBps: number;
|
|
8132
|
-
/**
|
|
8133
|
-
|
|
8134
|
-
|
|
8135
|
-
|
|
8136
|
-
|
|
8137
|
-
|
|
8132
|
+
/** Minimum deleveraging bonus in bps */
|
|
8133
|
+
minDeleveragingBonusBps: number;
|
|
8134
|
+
/** Whether cToken usage is blocked */
|
|
8135
|
+
blockCtokenUsage: number;
|
|
8136
|
+
/** Remaining interest charged on early repay, as a percentage */
|
|
8137
|
+
earlyRepayRemainingInterestPct: number;
|
|
8138
|
+
/** Emergency mode flag */
|
|
8139
|
+
emergencyMode: number;
|
|
8140
|
+
/** Interest rate basis: 0 = Legacy (slot-based), 1 = TrueApr (wall-clock) */
|
|
8141
|
+
interestRateBasis: number;
|
|
8142
|
+
/** Reserved for future use */
|
|
8138
8143
|
reserved2: Array<number>;
|
|
8139
8144
|
/** Cut of the order execution bonus that the protocol receives, as a percentage */
|
|
8140
8145
|
protocolOrderExecutionFeePct: number;
|
|
@@ -8687,6 +8692,15 @@ interface KaminoReserveCurveData {
|
|
|
8687
8692
|
reserveAddress: string;
|
|
8688
8693
|
curvePoints: KlendInterestRateCurvePoint[];
|
|
8689
8694
|
}
|
|
8695
|
+
/**
|
|
8696
|
+
* How a reserve's configured (curve) rate is turned into a realized annual rate.
|
|
8697
|
+
* `multiplier` scales the curve rate; `periodsPerYear` is the compounding
|
|
8698
|
+
* granularity used to convert APR to APY.
|
|
8699
|
+
*/
|
|
8700
|
+
interface KaminoRateBasis {
|
|
8701
|
+
multiplier: number;
|
|
8702
|
+
periodsPerYear: number;
|
|
8703
|
+
}
|
|
8690
8704
|
/**
|
|
8691
8705
|
* Linear interpolation between two points
|
|
8692
8706
|
*/
|
|
@@ -8700,11 +8714,13 @@ declare const interpolateLinear: (x: number, x0: number, y0: number, x1: number,
|
|
|
8700
8714
|
declare const getKaminoBorrowRate: (currentUtilization: number, curve: [number, number][]) => number;
|
|
8701
8715
|
/**
|
|
8702
8716
|
* Convert APR to APY using compound interest formula
|
|
8703
|
-
* APY = (1 + APR/n)^n - 1
|
|
8717
|
+
* APY = (1 + APR/n)^n - 1
|
|
8704
8718
|
* @param apr - Annual Percentage Rate as decimal (e.g., 0.05 for 5%)
|
|
8719
|
+
* @param periodsPerYear - Compounding periods per year (defaults to SLOTS_PER_YEAR;
|
|
8720
|
+
* use `getKaminoRateBasis(reserve).periodsPerYear` for basis-aware compounding)
|
|
8705
8721
|
* @returns Annual Percentage Yield as decimal
|
|
8706
8722
|
*/
|
|
8707
|
-
declare function calculateAPYFromAPR(apr: number): number;
|
|
8723
|
+
declare function calculateAPYFromAPR(apr: number, periodsPerYear?: number): number;
|
|
8708
8724
|
/**
|
|
8709
8725
|
* Calculate total supply of a reserve
|
|
8710
8726
|
* Formula: available liquidity + borrowed - protocol fees - referrer fees
|
|
@@ -8719,22 +8735,44 @@ declare function getKaminoTotalSupply(reserve: KaminoReserve): Decimal;
|
|
|
8719
8735
|
* @returns Utilization ratio (0-1, e.g., 0.75 = 75% utilized)
|
|
8720
8736
|
*/
|
|
8721
8737
|
declare function calculateUtilizationRatio(reserve: KaminoReserve): number;
|
|
8738
|
+
/**
|
|
8739
|
+
* Resolve a reserve's interest rate basis, defaulting to `Legacy` when the
|
|
8740
|
+
* field is absent (reserves serialized before it existed).
|
|
8741
|
+
* @throws if the on-chain value is not a known basis
|
|
8742
|
+
*/
|
|
8743
|
+
declare function getKaminoInterestRateBasis(reserve: KaminoReserve): KaminoInterestRateBasis;
|
|
8722
8744
|
/**
|
|
8723
8745
|
* Calculate slot adjustment factor based on recent slot duration
|
|
8724
|
-
* Used to adjust rates based on actual blockchain performance
|
|
8746
|
+
* Used to adjust Legacy-basis rates based on actual blockchain performance
|
|
8725
8747
|
* @param recentSlotDurationMs - Recent slot duration in milliseconds
|
|
8726
8748
|
* @returns Slot adjustment factor
|
|
8727
8749
|
*/
|
|
8728
8750
|
declare function slotAdjustmentFactor(recentSlotDurationMs?: number): number;
|
|
8729
8751
|
/**
|
|
8730
|
-
*
|
|
8731
|
-
*
|
|
8752
|
+
* Rate multiplier and compounding granularity for a reserve, per its
|
|
8753
|
+
* interest rate basis (1:1 with klend-sdk `KaminoReserve.rateAdjustmentFactor()`
|
|
8754
|
+
* and `accrualUnitsPerYear()`).
|
|
8755
|
+
*
|
|
8756
|
+
* - `Legacy`: curve rates are slot-year APRs, so they are scaled by the observed
|
|
8757
|
+
* slot duration and compounded per slot.
|
|
8758
|
+
* - `TrueApr`: curve rates are wall-clock APRs; `recentSlotDurationMs` is ignored
|
|
8759
|
+
* and rates compound per second.
|
|
8760
|
+
*
|
|
8761
|
+
* @param reserve - The Kamino reserve
|
|
8762
|
+
* @param recentSlotDurationMs - Observed slot duration; only read for `Legacy`
|
|
8763
|
+
* @throws for an unsupported basis, or a non-positive slot duration on `Legacy`
|
|
8764
|
+
*/
|
|
8765
|
+
declare function getKaminoRateBasis(reserve: KaminoReserve, recentSlotDurationMs?: number): KaminoRateBasis;
|
|
8766
|
+
/**
|
|
8767
|
+
* Calculate the rate multiplier for a reserve (1:1 with klend-sdk
|
|
8768
|
+
* `KaminoReserve.rateAdjustmentFactor()`): the slot adjustment factor for a
|
|
8769
|
+
* `Legacy` reserve, `1` for a `TrueApr` one.
|
|
8732
8770
|
*/
|
|
8733
|
-
declare function calculateSlotAdjustmentFactor(reserve: KaminoReserve, recentSlotDurationMs
|
|
8771
|
+
declare function calculateSlotAdjustmentFactor(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
8734
8772
|
/**
|
|
8735
8773
|
* Calculate estimated borrow rate for a reserve
|
|
8736
8774
|
* @param reserve - The reserve
|
|
8737
|
-
* @param recentSlotDurationMs - Recent slot duration (optional)
|
|
8775
|
+
* @param recentSlotDurationMs - Recent slot duration (optional; ignored for TrueApr reserves)
|
|
8738
8776
|
* @returns Borrow rate as decimal (e.g., 0.05 = 5%)
|
|
8739
8777
|
*/
|
|
8740
8778
|
declare function calculateKaminoEstimatedBorrowRate(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
@@ -8742,7 +8780,7 @@ declare function calculateKaminoEstimatedBorrowRate(reserve: KaminoReserve, rece
|
|
|
8742
8780
|
* Calculate estimated supply rate for a reserve
|
|
8743
8781
|
* Formula: borrow rate × utilization × (1 - protocol take rate)
|
|
8744
8782
|
* @param reserve - The reserve
|
|
8745
|
-
* @param recentSlotDurationMs - Recent slot duration (optional)
|
|
8783
|
+
* @param recentSlotDurationMs - Recent slot duration (optional; ignored for TrueApr reserves)
|
|
8746
8784
|
* @returns Supply rate as decimal (e.g., 0.03 = 3%)
|
|
8747
8785
|
*/
|
|
8748
8786
|
declare function calculateKaminoEstimatedSupplyRate(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
@@ -8751,7 +8789,8 @@ declare function calculateKaminoEstimatedSupplyRate(reserve: KaminoReserve, rece
|
|
|
8751
8789
|
* APY includes compounding, making it higher than APR
|
|
8752
8790
|
* Matches Kamino SDK's reserve.totalSupplyAPY()
|
|
8753
8791
|
* @param reserve - The Kamino reserve
|
|
8754
|
-
* @param recentSlotDurationMs - Recent slot duration (defaults to
|
|
8792
|
+
* @param recentSlotDurationMs - Recent slot duration (defaults to
|
|
8793
|
+
* DEFAULT_RECENT_SLOT_DURATION_MS; ignored for TrueApr reserves)
|
|
8755
8794
|
* @returns Supply APY as decimal (e.g., 0.0512 = 5.12% APY)
|
|
8756
8795
|
*/
|
|
8757
8796
|
declare function calculateKaminoSupplyAPY(reserve: KaminoReserve, recentSlotDurationMs?: number): number;
|
|
@@ -8774,12 +8813,22 @@ declare function getProtocolTakeRatePct(reserve: KaminoReserve): number;
|
|
|
8774
8813
|
* Generate complete interest rate curve for a reserve
|
|
8775
8814
|
* Creates 101 data points from 0% to 100% utilization
|
|
8776
8815
|
* @param curvePoints - Raw curve configuration from reserve
|
|
8777
|
-
* @param slotAdjustmentFactor -
|
|
8816
|
+
* @param slotAdjustmentFactor - Rate multiplier (`calculateSlotAdjustmentFactor`;
|
|
8817
|
+
* the slot adjustment for Legacy reserves, 1 for TrueApr)
|
|
8778
8818
|
* @param fixedHostInterestRate - Fixed rate added to all borrow rates
|
|
8779
8819
|
* @param protocolTakeRatePct - Percentage kept by depositors (1 - protocol fee)
|
|
8820
|
+
* @param periodsPerYear - APY compounding periods (`getKaminoRateBasis(reserve).periodsPerYear`;
|
|
8821
|
+
* defaults to SLOTS_PER_YEAR)
|
|
8780
8822
|
* @returns Array of curve points with utilization, borrow APY, and supply APY
|
|
8781
8823
|
*/
|
|
8782
|
-
declare function generateKaminoReserveCurve(curvePoints: KaminoBorrowRateCurvePoint[], slotAdjustmentFactor: number, fixedHostInterestRate: number, protocolTakeRatePct: number): KlendInterestRateCurvePoint[];
|
|
8824
|
+
declare function generateKaminoReserveCurve(curvePoints: KaminoBorrowRateCurvePoint[], slotAdjustmentFactor: number, fixedHostInterestRate: number, protocolTakeRatePct: number, periodsPerYear?: number): KlendInterestRateCurvePoint[];
|
|
8825
|
+
/**
|
|
8826
|
+
* Generate the interest rate curve for a reserve, deriving the rate multiplier
|
|
8827
|
+
* and compounding granularity from its interest rate basis.
|
|
8828
|
+
* @param reserve - The Kamino reserve
|
|
8829
|
+
* @param recentSlotDurationMs - Recent slot duration (optional; ignored for TrueApr reserves)
|
|
8830
|
+
*/
|
|
8831
|
+
declare function generateKaminoReserveCurveFromReserve(reserve: KaminoReserve, recentSlotDurationMs?: number): KlendInterestRateCurvePoint[];
|
|
8783
8832
|
|
|
8784
8833
|
declare function getRewardPerTimeUnitSecond(reward: KaminoFarmRewardInfo): Decimal;
|
|
8785
8834
|
declare function getReserveRewardsApy(priceByMint: Record<string, number>, farmState: KaminoFarmState, reserveState: KaminoReserve): Promise<{
|
|
@@ -8811,7 +8860,8 @@ declare const SLOTS_PER_MINUTE: number;
|
|
|
8811
8860
|
declare const SLOTS_PER_HOUR: number;
|
|
8812
8861
|
declare const SLOTS_PER_DAY: number;
|
|
8813
8862
|
declare const SLOTS_PER_YEAR: number;
|
|
8814
|
-
declare const
|
|
8863
|
+
declare const SECONDS_PER_YEAR = 31536000;
|
|
8864
|
+
declare const DEFAULT_RECENT_SLOT_DURATION_MS = 350;
|
|
8815
8865
|
declare const ONE_HUNDRED_PCT_IN_BPS = 10000;
|
|
8816
8866
|
|
|
8817
8867
|
/**
|
|
@@ -36249,4 +36299,4 @@ declare function makeExponentClmmTradePtIx(accounts: ExponentClmmTradePtAccounts
|
|
|
36249
36299
|
priceSpotLimit: null;
|
|
36250
36300
|
}): TransactionInstruction;
|
|
36251
36301
|
|
|
36252
|
-
export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, type Account, AccountLayout, type AccountMeta, AccountState, AccountType, type ApproveInstructionData, type Base, type BigFractionBytesFields, type BorrowRateCurveFields, type ClientRequest, type CloseAccountInstructionData, ConnectionClosed, CorpAction, type CurvePointFields, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, type DriftIdlType, type DriftInterestRateCurvePoint, DriftRewards, DriftRewardsJSON, DriftSpotBalanceType, DriftSpotMarket, DriftSpotMarketJSON, type DriftSpotMarketRaw, type DriftState, type DriftStateJSON, DriftUser, DriftUserJSON, type DriftUserRaw, DriftUserStats, DriftUserStatsJSON, 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, type Ema, ErrorResponse, type ExponentClmmTradePtAccounts, type ExponentClmmTradePtContext, type ExponentCpiInterfaceContext, type ExponentMarketThree, type ExponentMarketThreeCpiAccounts, type ExponentMarketTwo, type ExponentMarketTwoCpiAccounts, type ExponentMergeAccounts, type ExponentMergeContext, type ExponentStripAccounts, type ExponentStripContext, ExponentSwapDirection, type ExponentTradePtAccounts, type ExponentTradePtContext, type ExponentVault, type ExponentWrapperMergeAccounts, type ExponentWrapperMergeContext, ExtensionType, FARMS_PROGRAM_ID, type FarmStateRaw, FeeStructure, FeeStructureJSON, GAMMA_VAULT_IDL, GAMMA_VAULT_PROGRAM_ID, type GammaCompleteWithdrawalAccounts, type GammaDepositAccounts, GammaLpVaultRaw, type GammaVaultIdlType, type GammaWithdrawAccounts, GammaWithdrawReceiptRaw, HistoricalIndexData, HistoricalOracleData, type InitializeAccountInstructionData, type Instruction, InsuranceFund, 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, type JupLendIdlType, type JupLendInterestRateCurvePoint, type JupLendRewardsResult, JupLendingRewardsRateModel, JupLendingRewardsRateModelJSON, type JupLendingRewardsRateModelRaw, JupLendingState, JupLendingStateJSON, type JupLendingStateRaw, type JupLiquidityIdlType, JupRateModel, JupRateModelJSON, type JupRateModelRaw, JupTokenReserve, JupTokenReserveJSON, type JupTokenReserveRaw, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, KaminoBorrowRateCurvePoint, KaminoFarmRewardInfo, KaminoFarmState, KaminoFarmStateJSON, KaminoObligation, KaminoObligationJSON, KaminoReserve, type KaminoReserveCurveData, KaminoReserveJSON, type KfarmsIdlType, type KlendIdlType, type KlendInterestRateCurvePoint, LENGTH_SIZE, type LastUpdateFields, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, type Mint, MintLayout, type Multisig, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, type ObligationCollateralFields, type ObligationLiquidityFields, type ObligationOrderFields, type ObligationRaw, OracleGuardRails, OracleGuardRailsJSON, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, type PlatformFee, PoolBalance, type Price, type PriceComponent, type PriceData, type PriceHeuristicFields, PriceStatus, PriceType, type Pubkey, type PythConfigurationFields, type QuoteSwapStreamResponse, type QuoteUpdateParams, REFRESH_OBLIGATION_DISCRIMINATOR, type RawAccount, type RawMint, type RawMultisig, type RefreshObligationAccounts, type RequestData, type ReserveCollateralFields, type ReserveConfigFields, type ReserveFeesFields, type ReserveLiquidityFields, type ReserveRaw, type ResolveExponentClmmTradePtContextParams, type ResolveExponentMergeContextParams, type ResolveExponentStripContextParams, type ResolveExponentTradePtContextParams, type ResolveExponentWrapperMergeContextParams, type ResponseData, type ResponseError, type ResponseSuccess, type ResponseWithStream, type RewardInfoFields, type RewardPerTimeUnitPointFields, type RewardScheduleCurveFields, type RoutePlanStep, 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, type ScopeConfigurationFields, type SerializedInstruction, type SerializedSwapRoute, type ServerMessage, SinglePoolInstruction, SplAccountType, SpotPosition, type StakeAccount, type StopStreamRequest, type StopStreamResponse, type StreamData, type StreamDataPayload, type StreamEnd, StreamError, type StreamStart, SwapMode, type SwapParams, type SwapQuoteRequest, type SwapQuotes, type SwapRoute, SwapVersion, type SwitchboardConfigurationFields, type SyncNativeInstructionData, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, type TitanGatewayQuoteParams, type TitanGatewayQuoteResponse, type TitanProxyExactOutResponse, type TitanProxySwapQuoteResponse, type TitanSwapQuoteResult, type TitanTemplateLut, type TitanTransactionTemplate, TokenAccountNotFoundError, TokenError, type TokenInfoFields$1 as TokenInfoFields, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, type TransactionParams, type TransactionTemplate, type TransactionTemplateLut, type TransferCheckedInstructionData, type Uint64, V1Client, type WithdrawalCapsFields, 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, 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, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, 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, parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
|
|
36302
|
+
export { ACCOUNT_SIZE, ACCOUNT_TYPE_SIZE, ASSOCIATED_TOKEN_PROGRAM_ID, type Account, AccountLayout, type AccountMeta, AccountState, AccountType, type ApproveInstructionData, type Base, type BigFractionBytesFields, type BorrowRateCurveFields, type ClientRequest, type CloseAccountInstructionData, ConnectionClosed, CorpAction, type CurvePointFields, DEFAULT_RECENT_SLOT_DURATION_MS, DRIFT_IDL, DRIFT_PROGRAM_ID, type DriftIdlType, type DriftInterestRateCurvePoint, DriftRewards, DriftRewardsJSON, DriftSpotBalanceType, DriftSpotMarket, DriftSpotMarketJSON, type DriftSpotMarketRaw, type DriftState, type DriftStateJSON, DriftUser, DriftUserJSON, type DriftUserRaw, DriftUserStats, DriftUserStatsJSON, 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, type Ema, ErrorResponse, type ExponentClmmTradePtAccounts, type ExponentClmmTradePtContext, type ExponentCpiInterfaceContext, type ExponentMarketThree, type ExponentMarketThreeCpiAccounts, type ExponentMarketTwo, type ExponentMarketTwoCpiAccounts, type ExponentMergeAccounts, type ExponentMergeContext, type ExponentStripAccounts, type ExponentStripContext, ExponentSwapDirection, type ExponentTradePtAccounts, type ExponentTradePtContext, type ExponentVault, type ExponentWrapperMergeAccounts, type ExponentWrapperMergeContext, ExtensionType, FARMS_PROGRAM_ID, type FarmStateRaw, FeeStructure, FeeStructureJSON, GAMMA_VAULT_IDL, GAMMA_VAULT_PROGRAM_ID, type GammaCompleteWithdrawalAccounts, type GammaDepositAccounts, GammaLpVaultRaw, type GammaVaultIdlType, type GammaWithdrawAccounts, GammaWithdrawReceiptRaw, HistoricalIndexData, HistoricalOracleData, type InitializeAccountInstructionData, type Instruction, InsuranceFund, 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, type JupLendIdlType, type JupLendInterestRateCurvePoint, type JupLendRewardsResult, JupLendingRewardsRateModel, JupLendingRewardsRateModelJSON, type JupLendingRewardsRateModelRaw, JupLendingState, JupLendingStateJSON, type JupLendingStateRaw, type JupLiquidityIdlType, JupRateModel, JupRateModelJSON, type JupRateModelRaw, JupTokenReserve, JupTokenReserveJSON, type JupTokenReserveRaw, KFARMS_IDL, KLEND_ACCOUNT_CODER, KLEND_IDL, KLEND_PROGRAM_ID, KaminoBorrowRateCurvePoint, KaminoFarmRewardInfo, KaminoFarmState, KaminoFarmStateJSON, KaminoInterestRateBasis, KaminoObligation, KaminoObligationJSON, type KaminoRateBasis, KaminoReserve, type KaminoReserveCurveData, KaminoReserveJSON, type KfarmsIdlType, type KlendIdlType, type KlendInterestRateCurvePoint, LENGTH_SIZE, type LastUpdateFields, MAX_SLOT_DIFFERENCE, MEMO_PROGRAM_ID, MINT_SIZE, MULTISIG_SIZE, type Mint, MintLayout, type Multisig, MultisigLayout, NATIVE_MINT, ONE, ONE_HUNDRED_PCT_IN_BPS, ONE_YEAR, type ObligationCollateralFields, type ObligationLiquidityFields, type ObligationOrderFields, type ObligationRaw, OracleGuardRails, OracleGuardRailsJSON, PERCENTAGE_PRECISION, PERCENTAGE_PRECISION_EXP, type PlatformFee, PoolBalance, type Price, type PriceComponent, type PriceData, type PriceHeuristicFields, PriceStatus, PriceType, type Pubkey, type PythConfigurationFields, type QuoteSwapStreamResponse, type QuoteUpdateParams, REFRESH_OBLIGATION_DISCRIMINATOR, type RawAccount, type RawMint, type RawMultisig, type RefreshObligationAccounts, type RequestData, type ReserveCollateralFields, type ReserveConfigFields, type ReserveFeesFields, type ReserveLiquidityFields, type ReserveRaw, type ResolveExponentClmmTradePtContextParams, type ResolveExponentMergeContextParams, type ResolveExponentStripContextParams, type ResolveExponentTradePtContextParams, type ResolveExponentWrapperMergeContextParams, type ResponseData, type ResponseError, type ResponseSuccess, type ResponseWithStream, type RewardInfoFields, type RewardPerTimeUnitPointFields, type RewardScheduleCurveFields, type RoutePlanStep, 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, type ScopeConfigurationFields, type SerializedInstruction, type SerializedSwapRoute, type ServerMessage, SinglePoolInstruction, SplAccountType, SpotPosition, type StakeAccount, type StopStreamRequest, type StopStreamResponse, type StreamData, type StreamDataPayload, type StreamEnd, StreamError, type StreamStart, SwapMode, type SwapParams, type SwapQuoteRequest, type SwapQuotes, type SwapRoute, SwapVersion, type SwitchboardConfigurationFields, type SyncNativeInstructionData, TEN, TOKEN_2022_PROGRAM_ID, TOKEN_PROGRAM_ID, TYPE_SIZE, type TitanGatewayQuoteParams, type TitanGatewayQuoteResponse, type TitanProxyExactOutResponse, type TitanProxySwapQuoteResponse, type TitanSwapQuoteResult, type TitanTemplateLut, type TitanTransactionTemplate, TokenAccountNotFoundError, TokenError, type TokenInfoFields$1 as TokenInfoFields, TokenInstruction, TokenInvalidAccountError, TokenInvalidAccountOwnerError, TokenInvalidAccountSizeError, TokenInvalidInstructionDataError, TokenInvalidInstructionKeysError, TokenInvalidInstructionProgramError, TokenInvalidInstructionTypeError, TokenInvalidMintError, TokenInvalidOwnerError, TokenOwnerOffCurveError, TokenUnsupportedInstructionError, type TransactionParams, type TransactionTemplate, type TransactionTemplateLut, type TransferCheckedInstructionData, type Uint64, V1Client, type WithdrawalCapsFields, 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, 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, initializeAccountInstructionData, initializeStakedPoolIxs, initializeStakedPoolTx, instructionToTitanWire, interpolateLinear, isJitoDontFront, 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, parsePriceInfo, replenishPoolIx, resolveExponentClmmTradePtContext, resolveExponentMergeContext, resolveExponentStripContext, resolveExponentTradePtContext, resolveExponentWrapperMergeContext, resolveLookupTables, scaledSupplies, selectBestRoute, selectGatewayRoute, slotAdjustmentFactor, syncNativeInstructionData, transferCheckedInstructionData, truncateBorrowCurve, unpackAccount };
|