@0dotxyz/p0-ts-sdk 2.2.4 → 2.2.5-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as superstruct from 'superstruct';
2
2
  import { Infer } from 'superstruct';
3
- import { R as RiskTier, A as AssetTag, b as BankConfigFlag, O as OperationalState, c as OracleSetup, E as EmodeTag, d as EmodeEntryFlags, e as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, f as OperationalStateRaw, g as OracleSetupRaw, h as RiskTierRaw, M as MarginfiProgram, i as BankConfigOpt, j as InterestRateConfig, k as BankConfigType, l as BankConfigRaw, a as BankConfigOptRaw, m as BankType, n as EmodeSettingsType, o as BankRaw, p as EmodeSettingsRaw, q as MarginfiIdlType, r as OraclePrice, P as PriceWithConfidence, s as PriceBias, t as OraclePriceDto, H as HealthCacheFlags, u as HealthCacheStatus, v as AccountFlags, w as MarginfiAccountType, x as Amount, y as BankIntegrationMetadataMap, T as TypedAmount, z as BalanceType, C as HealthCacheType, D as EmodePair, F as ActiveEmodePair, G as ActionEmodeImpact, J as MarginRequirementType, K as EmodeImpactStatus, L as BankVaultType, N as BankIntegrationMetadataMapDto, Q as BankIntegrationMetadataDto, S as BankIntegrationMetadata, U as Bank, V as Environment, X as Project0Config, Y as MintData } from './types-CsLjciLo.cjs';
4
- export { at as AccountType, ay as AmountType, as as BankAddress, Z as BankConfig, B as BankConfigCompactRaw, av as BankMap, ar as BankMetadata, $ as BankMetadataRaw, ak as ComputeAssetUsdValueParams, ai as ComputeLiabilityUsdValueParams, ag as ComputeUsdValueParams, a4 as EmodeConfigRaw, a7 as EmodeEntry, a9 as EmodeImpact, _ as EmodeSettings, ab as GetAssetWeightParams, a1 as InterestRateConfigCompactRaw, a6 as InterestRateConfigOpt, a2 as InterestRateConfigOptRaw, au as KaminoStates, ao as MARGINFI_IDL, ax as MintDataMap, a8 as OracleConfigOpt, a3 as OracleConfigOptRaw, aw as OraclePriceMap, an as PriceWithConfidenceDto, ap as Program, a5 as RatePoint, a0 as RatePointRaw, aq as Wallet, al as computeAssetUsdValue, aj as computeLiabilityUsdValue, af as computeLoopingParams, ae as computeMaxLeverage, am as computeTvl, ah as computeUsdValue, ac as getAssetWeight, ad as getLiabilityWeight, aa as isWeightedPrice, az as resolveAmount } from './types-CsLjciLo.cjs';
3
+ import { R as RiskTier, A as AssetTag, b as BankConfigFlag, O as OperationalState, c as OracleSetup, E as EmodeTag, d as EmodeEntryFlags, e as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, f as OperationalStateRaw, g as OracleSetupRaw, h as RiskTierRaw, M as MarginfiProgram, i as BankConfigOpt, j as InterestRateConfig, k as BankConfigType, l as BankConfigRaw, a as BankConfigOptRaw, m as BankType, n as EmodeSettingsType, o as BankRaw, p as EmodeSettingsRaw, q as MarginfiIdlType, r as OraclePrice, P as PriceWithConfidence, s as PriceBias, t as OraclePriceDto, H as HealthCacheFlags, u as HealthCacheStatus, v as AccountFlags, w as MarginfiAccountType, x as Amount, y as BankIntegrationMetadataMap, T as TypedAmount, z as BalanceType, C as HealthCacheType, D as EmodePair, F as ActiveEmodePair, G as ActionEmodeImpact, J as MarginRequirementType, K as EmodeImpactStatus, L as BankVaultType, N as BankIntegrationMetadataMapDto, Q as BankIntegrationMetadataDto, S as BankIntegrationMetadata, U as Bank, V as Environment, X as Project0Config, Y as MintData } from './types-Dw9hSftB.cjs';
4
+ export { at as AccountType, ay as AmountType, as as BankAddress, Z as BankConfig, B as BankConfigCompactRaw, av as BankMap, ar as BankMetadata, $ as BankMetadataRaw, ak as ComputeAssetUsdValueParams, ai as ComputeLiabilityUsdValueParams, ag as ComputeUsdValueParams, a4 as EmodeConfigRaw, a7 as EmodeEntry, a9 as EmodeImpact, _ as EmodeSettings, ab as GetAssetWeightParams, a1 as InterestRateConfigCompactRaw, a6 as InterestRateConfigOpt, a2 as InterestRateConfigOptRaw, au as KaminoStates, ao as MARGINFI_IDL, ax as MintDataMap, a8 as OracleConfigOpt, a3 as OracleConfigOptRaw, aw as OraclePriceMap, an as PriceWithConfidenceDto, ap as Program, a5 as RatePoint, a0 as RatePointRaw, aq as Wallet, al as computeAssetUsdValue, aj as computeLiabilityUsdValue, af as computeLoopingParams, ae as computeMaxLeverage, am as computeTvl, ah as computeUsdValue, ac as getAssetWeight, ad as getLiabilityWeight, aa as isWeightedPrice, az as resolveAmount } from './types-Dw9hSftB.cjs';
5
5
  import * as _solana_web3_js from '@solana/web3.js';
6
6
  import { VersionedTransaction, Transaction, PublicKey, TransactionError, TransactionInstruction, Keypair, Signer, AddressLookupTableAccount, Blockhash, TransactionMessage, Connection, AccountInfo } from '@solana/web3.js';
7
7
  import { Idl, Instruction, AnchorProvider, Address } from '@coral-xyz/anchor';
@@ -1564,53 +1564,6 @@ declare function computeHealthComponentsFromBalances(params: ComputeHealthCompon
1564
1564
  assets: BigNumber$1;
1565
1565
  liabilities: BigNumber$1;
1566
1566
  };
1567
- /**
1568
- * Configuration for computing health components without price bias
1569
- */
1570
- interface ComputeHealthComponentsWithoutBiasParams {
1571
- /** Active account balances to compute health for */
1572
- activeBalances: BalanceType[];
1573
- /** Margin requirement type (Equity, Initial, or Maintenance) */
1574
- marginRequirement: MarginRequirementType;
1575
- /** Map of bank addresses to bank data */
1576
- banksMap: Map<string, BankType>;
1577
- /** Map of bank addresses to oracle price data */
1578
- oraclePricesByBank: Map<string, OraclePrice>;
1579
- /** Asset share value multipliers by bank address (for integrated protocols like Kamino/Drift) */
1580
- assetShareValueMultiplierByBank?: Map<string, BigNumber$1>;
1581
- /** Optional emode weight overrides by bank address */
1582
- activeEmodeWeightsByBank?: Map<string, {
1583
- assetWeightMaint: BigNumber$1;
1584
- assetWeightInit: BigNumber$1;
1585
- }>;
1586
- /** Optional banks to exclude from health calculation */
1587
- excludedBanks?: PublicKey[];
1588
- }
1589
- /**
1590
- * Computes health components (assets and liabilities) from active balances WITHOUT price bias.
1591
- *
1592
- * Key differences from `computeHealthComponentsFromBalances`:
1593
- * - Uses neutral oracle prices (no conservative bias applied)
1594
- * - Primarily used for equity calculations where unbiased values are needed
1595
- *
1596
- * @param params - Configuration object for health computation
1597
- * @returns Object containing weighted asset and liability values in USD (unbiased)
1598
- *
1599
- * @example
1600
- * ```typescript
1601
- * const { assets, liabilities } = computeHealthComponentsWithoutBiasFromBalances({
1602
- * activeBalances: account.balances.filter(b => b.active),
1603
- * marginRequirement: MarginRequirementType.Equity,
1604
- * banksMap: client.bankMap,
1605
- * oraclePricesByBank: client.oraclePriceByBank,
1606
- * assetShareValueMultiplierByBank: client.assetShareMultiplierByBank,
1607
- * });
1608
- * ```
1609
- */
1610
- declare function computeHealthComponentsWithoutBiasFromBalances(params: ComputeHealthComponentsWithoutBiasParams): {
1611
- assets: BigNumber$1;
1612
- liabilities: BigNumber$1;
1613
- };
1614
1567
  /**
1615
1568
  * Configuration for computing health cache status
1616
1569
  */
@@ -4503,19 +4456,6 @@ declare class MarginfiAccount implements MarginfiAccountType {
4503
4456
  assets: BigNumber$1;
4504
4457
  liabilities: BigNumber$1;
4505
4458
  };
4506
- /**
4507
- * Computes health components from balances without price bias.
4508
- *
4509
- * Returns weighted asset and liability values using neutral pricing
4510
- * (no conservative adjustments).
4511
- *
4512
- * @param params - Configuration for health computation (excluding activeBalances)
4513
- * @returns Object containing assets and liabilities values in USD
4514
- */
4515
- computeHealthComponentsWithoutBiasFromBalances(params: Omit<ComputeHealthComponentsWithoutBiasParams, "activeBalances">): {
4516
- assets: BigNumber$1;
4517
- liabilities: BigNumber$1;
4518
- };
4519
4459
  /**
4520
4460
  * Computes the total account value (equity).
4521
4461
  *
@@ -5455,4 +5395,4 @@ declare class MarginfiAccountWrapper {
5455
5395
  getClient(): Project0Client;
5456
5396
  }
5457
5397
 
5458
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, ActionEmodeImpact, ActiveEmodePair, type ActiveStakePoolMap, Amount, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, BalanceType, type BalanceTypeDto, Bank, type BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, type BankConfigRawDto, BankConfigType, BankIntegrationMetadata, BankIntegrationMetadataDto, BankIntegrationMetadataMap, BankIntegrationMetadataMapDto, type BankMetrics, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeHealthComponentsWithoutBiasParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, MintData, OperationalState, OperationalStateRaw, OraclePrice, OraclePriceDto, OracleSetup, OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, PriceWithConfidence, Project0Client, Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePointDto, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapApiConfig, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
5398
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, ActionEmodeImpact, ActiveEmodePair, type ActiveStakePoolMap, Amount, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, BalanceType, type BalanceTypeDto, Bank, type BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, type BankConfigRawDto, BankConfigType, BankIntegrationMetadata, BankIntegrationMetadataDto, BankIntegrationMetadataMap, BankIntegrationMetadataMapDto, type BankMetrics, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, MintData, OperationalState, OperationalStateRaw, OraclePrice, OraclePriceDto, OracleSetup, OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, PriceWithConfidence, Project0Client, Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePointDto, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapApiConfig, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as superstruct from 'superstruct';
2
2
  import { Infer } from 'superstruct';
3
- import { R as RiskTier, A as AssetTag, b as BankConfigFlag, O as OperationalState, c as OracleSetup, E as EmodeTag, d as EmodeEntryFlags, e as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, f as OperationalStateRaw, g as OracleSetupRaw, h as RiskTierRaw, M as MarginfiProgram, i as BankConfigOpt, j as InterestRateConfig, k as BankConfigType, l as BankConfigRaw, a as BankConfigOptRaw, m as BankType, n as EmodeSettingsType, o as BankRaw, p as EmodeSettingsRaw, q as MarginfiIdlType, r as OraclePrice, P as PriceWithConfidence, s as PriceBias, t as OraclePriceDto, H as HealthCacheFlags, u as HealthCacheStatus, v as AccountFlags, w as MarginfiAccountType, x as Amount, y as BankIntegrationMetadataMap, T as TypedAmount, z as BalanceType, C as HealthCacheType, D as EmodePair, F as ActiveEmodePair, G as ActionEmodeImpact, J as MarginRequirementType, K as EmodeImpactStatus, L as BankVaultType, N as BankIntegrationMetadataMapDto, Q as BankIntegrationMetadataDto, S as BankIntegrationMetadata, U as Bank, V as Environment, X as Project0Config, Y as MintData } from './types-DuCxJVOn.js';
4
- export { at as AccountType, ay as AmountType, as as BankAddress, Z as BankConfig, B as BankConfigCompactRaw, av as BankMap, ar as BankMetadata, $ as BankMetadataRaw, ak as ComputeAssetUsdValueParams, ai as ComputeLiabilityUsdValueParams, ag as ComputeUsdValueParams, a4 as EmodeConfigRaw, a7 as EmodeEntry, a9 as EmodeImpact, _ as EmodeSettings, ab as GetAssetWeightParams, a1 as InterestRateConfigCompactRaw, a6 as InterestRateConfigOpt, a2 as InterestRateConfigOptRaw, au as KaminoStates, ao as MARGINFI_IDL, ax as MintDataMap, a8 as OracleConfigOpt, a3 as OracleConfigOptRaw, aw as OraclePriceMap, an as PriceWithConfidenceDto, ap as Program, a5 as RatePoint, a0 as RatePointRaw, aq as Wallet, al as computeAssetUsdValue, aj as computeLiabilityUsdValue, af as computeLoopingParams, ae as computeMaxLeverage, am as computeTvl, ah as computeUsdValue, ac as getAssetWeight, ad as getLiabilityWeight, aa as isWeightedPrice, az as resolveAmount } from './types-DuCxJVOn.js';
3
+ import { R as RiskTier, A as AssetTag, b as BankConfigFlag, O as OperationalState, c as OracleSetup, E as EmodeTag, d as EmodeEntryFlags, e as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, f as OperationalStateRaw, g as OracleSetupRaw, h as RiskTierRaw, M as MarginfiProgram, i as BankConfigOpt, j as InterestRateConfig, k as BankConfigType, l as BankConfigRaw, a as BankConfigOptRaw, m as BankType, n as EmodeSettingsType, o as BankRaw, p as EmodeSettingsRaw, q as MarginfiIdlType, r as OraclePrice, P as PriceWithConfidence, s as PriceBias, t as OraclePriceDto, H as HealthCacheFlags, u as HealthCacheStatus, v as AccountFlags, w as MarginfiAccountType, x as Amount, y as BankIntegrationMetadataMap, T as TypedAmount, z as BalanceType, C as HealthCacheType, D as EmodePair, F as ActiveEmodePair, G as ActionEmodeImpact, J as MarginRequirementType, K as EmodeImpactStatus, L as BankVaultType, N as BankIntegrationMetadataMapDto, Q as BankIntegrationMetadataDto, S as BankIntegrationMetadata, U as Bank, V as Environment, X as Project0Config, Y as MintData } from './types-CZtn4lP8.js';
4
+ export { at as AccountType, ay as AmountType, as as BankAddress, Z as BankConfig, B as BankConfigCompactRaw, av as BankMap, ar as BankMetadata, $ as BankMetadataRaw, ak as ComputeAssetUsdValueParams, ai as ComputeLiabilityUsdValueParams, ag as ComputeUsdValueParams, a4 as EmodeConfigRaw, a7 as EmodeEntry, a9 as EmodeImpact, _ as EmodeSettings, ab as GetAssetWeightParams, a1 as InterestRateConfigCompactRaw, a6 as InterestRateConfigOpt, a2 as InterestRateConfigOptRaw, au as KaminoStates, ao as MARGINFI_IDL, ax as MintDataMap, a8 as OracleConfigOpt, a3 as OracleConfigOptRaw, aw as OraclePriceMap, an as PriceWithConfidenceDto, ap as Program, a5 as RatePoint, a0 as RatePointRaw, aq as Wallet, al as computeAssetUsdValue, aj as computeLiabilityUsdValue, af as computeLoopingParams, ae as computeMaxLeverage, am as computeTvl, ah as computeUsdValue, ac as getAssetWeight, ad as getLiabilityWeight, aa as isWeightedPrice, az as resolveAmount } from './types-CZtn4lP8.js';
5
5
  import * as _solana_web3_js from '@solana/web3.js';
6
6
  import { VersionedTransaction, Transaction, PublicKey, TransactionError, TransactionInstruction, Keypair, Signer, AddressLookupTableAccount, Blockhash, TransactionMessage, Connection, AccountInfo } from '@solana/web3.js';
7
7
  import { Idl, Instruction, AnchorProvider, Address } from '@coral-xyz/anchor';
@@ -1564,53 +1564,6 @@ declare function computeHealthComponentsFromBalances(params: ComputeHealthCompon
1564
1564
  assets: BigNumber$1;
1565
1565
  liabilities: BigNumber$1;
1566
1566
  };
1567
- /**
1568
- * Configuration for computing health components without price bias
1569
- */
1570
- interface ComputeHealthComponentsWithoutBiasParams {
1571
- /** Active account balances to compute health for */
1572
- activeBalances: BalanceType[];
1573
- /** Margin requirement type (Equity, Initial, or Maintenance) */
1574
- marginRequirement: MarginRequirementType;
1575
- /** Map of bank addresses to bank data */
1576
- banksMap: Map<string, BankType>;
1577
- /** Map of bank addresses to oracle price data */
1578
- oraclePricesByBank: Map<string, OraclePrice>;
1579
- /** Asset share value multipliers by bank address (for integrated protocols like Kamino/Drift) */
1580
- assetShareValueMultiplierByBank?: Map<string, BigNumber$1>;
1581
- /** Optional emode weight overrides by bank address */
1582
- activeEmodeWeightsByBank?: Map<string, {
1583
- assetWeightMaint: BigNumber$1;
1584
- assetWeightInit: BigNumber$1;
1585
- }>;
1586
- /** Optional banks to exclude from health calculation */
1587
- excludedBanks?: PublicKey[];
1588
- }
1589
- /**
1590
- * Computes health components (assets and liabilities) from active balances WITHOUT price bias.
1591
- *
1592
- * Key differences from `computeHealthComponentsFromBalances`:
1593
- * - Uses neutral oracle prices (no conservative bias applied)
1594
- * - Primarily used for equity calculations where unbiased values are needed
1595
- *
1596
- * @param params - Configuration object for health computation
1597
- * @returns Object containing weighted asset and liability values in USD (unbiased)
1598
- *
1599
- * @example
1600
- * ```typescript
1601
- * const { assets, liabilities } = computeHealthComponentsWithoutBiasFromBalances({
1602
- * activeBalances: account.balances.filter(b => b.active),
1603
- * marginRequirement: MarginRequirementType.Equity,
1604
- * banksMap: client.bankMap,
1605
- * oraclePricesByBank: client.oraclePriceByBank,
1606
- * assetShareValueMultiplierByBank: client.assetShareMultiplierByBank,
1607
- * });
1608
- * ```
1609
- */
1610
- declare function computeHealthComponentsWithoutBiasFromBalances(params: ComputeHealthComponentsWithoutBiasParams): {
1611
- assets: BigNumber$1;
1612
- liabilities: BigNumber$1;
1613
- };
1614
1567
  /**
1615
1568
  * Configuration for computing health cache status
1616
1569
  */
@@ -4503,19 +4456,6 @@ declare class MarginfiAccount implements MarginfiAccountType {
4503
4456
  assets: BigNumber$1;
4504
4457
  liabilities: BigNumber$1;
4505
4458
  };
4506
- /**
4507
- * Computes health components from balances without price bias.
4508
- *
4509
- * Returns weighted asset and liability values using neutral pricing
4510
- * (no conservative adjustments).
4511
- *
4512
- * @param params - Configuration for health computation (excluding activeBalances)
4513
- * @returns Object containing assets and liabilities values in USD
4514
- */
4515
- computeHealthComponentsWithoutBiasFromBalances(params: Omit<ComputeHealthComponentsWithoutBiasParams, "activeBalances">): {
4516
- assets: BigNumber$1;
4517
- liabilities: BigNumber$1;
4518
- };
4519
4459
  /**
4520
4460
  * Computes the total account value (equity).
4521
4461
  *
@@ -5455,4 +5395,4 @@ declare class MarginfiAccountWrapper {
5455
5395
  getClient(): Project0Client;
5456
5396
  }
5457
5397
 
5458
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, ActionEmodeImpact, ActiveEmodePair, type ActiveStakePoolMap, Amount, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, BalanceType, type BalanceTypeDto, Bank, type BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, type BankConfigRawDto, BankConfigType, BankIntegrationMetadata, BankIntegrationMetadataDto, BankIntegrationMetadataMap, BankIntegrationMetadataMapDto, type BankMetrics, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeHealthComponentsWithoutBiasParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, MintData, OperationalState, OperationalStateRaw, OraclePrice, OraclePriceDto, OracleSetup, OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, PriceWithConfidence, Project0Client, Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePointDto, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapApiConfig, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
5398
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, ActionEmodeImpact, ActiveEmodePair, type ActiveStakePoolMap, Amount, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, BalanceType, type BalanceTypeDto, Bank, type BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, type BankConfigRawDto, BankConfigType, BankIntegrationMetadata, BankIntegrationMetadataDto, BankIntegrationMetadataMap, BankIntegrationMetadataMapDto, type BankMetrics, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, MintData, OperationalState, OperationalStateRaw, OraclePrice, OraclePriceDto, OracleSetup, OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, PriceWithConfidence, Project0Client, Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePointDto, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapApiConfig, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
package/dist/index.js CHANGED
@@ -20851,62 +20851,6 @@ function computeHealthComponentsFromBalances(params) {
20851
20851
  }
20852
20852
  return { assets: totalAssets, liabilities: totalLiabilities };
20853
20853
  }
20854
- function computeHealthComponentsWithoutBiasFromBalances(params) {
20855
- const {
20856
- activeBalances,
20857
- banksMap,
20858
- oraclePricesByBank,
20859
- marginRequirement,
20860
- assetShareValueMultiplierByBank,
20861
- activeEmodeWeightsByBank,
20862
- excludedBanks
20863
- } = params;
20864
- const filteredBalances = activeBalances.filter(
20865
- (accountBalance) => !(excludedBanks ?? []).find((b) => b.equals(accountBalance.bankPk))
20866
- );
20867
- let totalAssets = new BigNumber3(0);
20868
- let totalLiabilities = new BigNumber3(0);
20869
- for (const accountBalance of filteredBalances) {
20870
- const bankKey = accountBalance.bankPk.toBase58();
20871
- const bank = banksMap.get(bankKey);
20872
- if (!bank) {
20873
- console.warn(
20874
- `Bank ${shortenAddress(accountBalance.bankPk)} not found, excluding from health computation`
20875
- );
20876
- continue;
20877
- }
20878
- const oraclePrice = oraclePricesByBank.get(bankKey);
20879
- if (!oraclePrice) {
20880
- console.warn(
20881
- `Price info for bank ${shortenAddress(accountBalance.bankPk)} not found, excluding from health computation`
20882
- );
20883
- continue;
20884
- }
20885
- const emodeWeight = activeEmodeWeightsByBank?.get(bankKey);
20886
- const assetShareValueMultiplier = assetShareValueMultiplierByBank?.get(bankKey);
20887
- const activeEmodeWeights = emodeWeight ? {
20888
- assetWeightInit: BigNumber3.max(
20889
- bank.config.assetWeightInit,
20890
- emodeWeight.assetWeightInit ?? bank.config.assetWeightInit
20891
- ),
20892
- assetWeightMaint: BigNumber3.max(
20893
- bank.config.assetWeightMaint,
20894
- emodeWeight.assetWeightMaint ?? bank.config.assetWeightMaint
20895
- )
20896
- } : void 0;
20897
- const { assets, liabilities } = computeBalanceUsdValue({
20898
- balance: accountBalance,
20899
- bank,
20900
- oraclePrice,
20901
- marginRequirement,
20902
- activeEmodeWeights,
20903
- assetShareValueMultiplier
20904
- });
20905
- totalAssets = totalAssets.plus(assets);
20906
- totalLiabilities = totalLiabilities.plus(liabilities);
20907
- }
20908
- return { assets: totalAssets, liabilities: totalLiabilities };
20909
- }
20910
20854
  function computeHealthCacheStatus(params) {
20911
20855
  const {
20912
20856
  activeBalances,
@@ -20915,7 +20859,7 @@ function computeHealthCacheStatus(params) {
20915
20859
  assetShareValueMultiplierByBank,
20916
20860
  activeEmodeWeightsByBank
20917
20861
  } = params;
20918
- const { assets: assetValueEquity, liabilities: liabilityValueEquity } = computeHealthComponentsWithoutBiasFromBalances({
20862
+ const { assets: assetValueEquity, liabilities: liabilityValueEquity } = computeHealthComponentsFromBalances({
20919
20863
  activeBalances,
20920
20864
  marginRequirement: 2 /* Equity */,
20921
20865
  banksMap,
@@ -48590,7 +48534,7 @@ async function simulateAccountHealthCacheWithFallback(params) {
48590
48534
  } = params;
48591
48535
  let marginfiAccount = params.marginfiAccount;
48592
48536
  const activeBalances = marginfiAccount.balances.filter((b) => b.active);
48593
- const { assets: assetValueEquity, liabilities: liabilityValueEquity } = computeHealthComponentsWithoutBiasFromBalances({
48537
+ const { assets: assetValueEquity, liabilities: liabilityValueEquity } = computeHealthComponentsFromBalances({
48594
48538
  activeBalances,
48595
48539
  banksMap,
48596
48540
  oraclePricesByBank,
@@ -51471,7 +51415,7 @@ function mergeOracleResults(results, allBanks) {
51471
51415
 
51472
51416
  // src/services/bank/utils/compute/value-computations.utils.ts
51473
51417
  function isWeightedPrice(marginRequirement) {
51474
- return marginRequirement === 0 /* Initial */;
51418
+ return marginRequirement === 0 /* Initial */ || marginRequirement === 2 /* Equity */;
51475
51419
  }
51476
51420
  function getAssetWeight(params) {
51477
51421
  const {
@@ -51482,6 +51426,12 @@ function getAssetWeight(params) {
51482
51426
  activeEmodeWeights,
51483
51427
  ignoreSoftLimits
51484
51428
  } = params;
51429
+ if (bank.config.riskTier === "Isolated" /* Isolated */) {
51430
+ return new BigNumber3(0);
51431
+ }
51432
+ if (marginRequirement === 0 /* Initial */ && bank.config.operationalState === "ReduceOnly" /* ReduceOnly */) {
51433
+ return new BigNumber3(0);
51434
+ }
51485
51435
  const assetWeightInit = BigNumber3.max(
51486
51436
  activeEmodeWeights?.assetWeightInit ?? BigNumber3(0),
51487
51437
  bank.config.assetWeightInit
@@ -51498,6 +51448,8 @@ function getAssetWeight(params) {
51498
51448
  bank,
51499
51449
  oraclePrice,
51500
51450
  assetShares: bank.totalAssetShares,
51451
+ // Unweighted (Equity => weight 1) total bank value, priced at the same time-weighted
51452
+ // low price used for the Initial balance valuation (program: maybe_get_asset_weight_init_discount).
51501
51453
  marginRequirement: 2 /* Equity */,
51502
51454
  priceBias: 0 /* Lowest */,
51503
51455
  assetShareValueMultiplier,
@@ -53920,21 +53872,6 @@ var MarginfiAccount = class _MarginfiAccount {
53920
53872
  ...params
53921
53873
  });
53922
53874
  }
53923
- /**
53924
- * Computes health components from balances without price bias.
53925
- *
53926
- * Returns weighted asset and liability values using neutral pricing
53927
- * (no conservative adjustments).
53928
- *
53929
- * @param params - Configuration for health computation (excluding activeBalances)
53930
- * @returns Object containing assets and liabilities values in USD
53931
- */
53932
- computeHealthComponentsWithoutBiasFromBalances(params) {
53933
- return computeHealthComponentsWithoutBiasFromBalances({
53934
- activeBalances: this.activeBalances,
53935
- ...params
53936
- });
53937
- }
53938
53875
  /**
53939
53876
  * Computes the total account value (equity).
53940
53877
  *
@@ -55647,6 +55584,6 @@ var EmodeSettings = class _EmodeSettings {
55647
55584
  }
55648
55585
  };
55649
55586
 
55650
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, BankVaultType, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, EMPTY_HEALTH_CACHE, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, USDC_DECIMALS, USDC_MINT, WSOL_MINT, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx3 as makeBeginFlashLoanIx, makeBorrowIx3 as makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx3 as makeDepositIx, makeDepositTx, makeDriftDepositIx3 as makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx3 as makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx3 as makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx2 as makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx2 as makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx3 as makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx3 as makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx3 as makePoolAddBankIx, makePoolConfigureBankIx3 as makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx3 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx3 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
55587
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, BankVaultType, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, EMPTY_HEALTH_CACHE, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, USDC_DECIMALS, USDC_MINT, WSOL_MINT, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx3 as makeBeginFlashLoanIx, makeBorrowIx3 as makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx3 as makeDepositIx, makeDepositTx, makeDriftDepositIx3 as makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx3 as makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx3 as makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx2 as makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx2 as makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx3 as makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx3 as makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx3 as makePoolAddBankIx, makePoolConfigureBankIx3 as makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx3 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx3 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
55651
55588
  //# sourceMappingURL=index.js.map
55652
55589
  //# sourceMappingURL=index.js.map