@0dotxyz/p0-ts-sdk 2.7.1-alpha.1 → 2.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,13 +1,13 @@
1
1
  import * as superstruct from 'superstruct';
2
2
  import { Infer } from 'superstruct';
3
- import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRateLimiterType, p as BankRaw, q as BankRateLimiterRaw, r as EmodeSettingsRaw, s as MarginfiIdlType, t as OraclePrice, P as PriceWithConfidence, u as PriceBias, v as OraclePriceDto, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as Amount, C as BankIntegrationMetadataMap, T as TypedAmount, D as BalanceType, F as HealthCacheType, G as EmodePair, J as ActiveEmodePair, K as ActionEmodeImpact, L as MarginRequirementType, N as EmodeImpactStatus, Q as BankVaultType, S as RateLimitWindowType, U as BankIntegrationMetadataMapDto, V as BankIntegrationMetadataDto, X as BankIntegrationMetadata, Y as Bank, Z as Environment, _ as Project0Config, $ as MintData } from './types-BFLi0Ozl.cjs';
4
- export { ax as AccountType, aC as AmountType, aw as BankAddress, a0 as BankConfig, B as BankConfigCompactRaw, az as BankMap, av as BankMetadata, a3 as BankMetadataRaw, ao as ComputeAssetUsdValueParams, am as ComputeLiabilityUsdValueParams, ak as ComputeUsdValueParams, a8 as EmodeConfigRaw, ab as EmodeEntry, ad as EmodeImpact, a1 as EmodeSettings, af as GetAssetWeightParams, a5 as InterestRateConfigCompactRaw, aa as InterestRateConfigOpt, a6 as InterestRateConfigOptRaw, ay as KaminoStates, as as MARGINFI_IDL, aB as MintDataMap, ac as OracleConfigOpt, a7 as OracleConfigOptRaw, aA as OraclePriceMap, ar as PriceWithConfidenceDto, at as Program, a2 as RateLimitWindowRaw, a9 as RatePoint, a4 as RatePointRaw, au as Wallet, ap as computeAssetUsdValue, an as computeLiabilityUsdValue, aj as computeLoopingParams, ai as computeMaxLeverage, aq as computeTvl, al as computeUsdValue, ag as getAssetWeight, ah as getLiabilityWeight, ae as isWeightedPrice, aD as resolveAmount } from './types-BFLi0Ozl.cjs';
3
+ import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRateLimiterType, p as BankRaw, q as BankRateLimiterRaw, r as EmodeSettingsRaw, s as MarginfiIdlType, t as OraclePrice, P as PriceWithConfidence, u as PriceBias, v as OraclePriceDto, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as Amount, C as BankIntegrationMetadataMap, T as TypedAmount, D as BalanceType, F as HealthCacheType, G as EmodePair, J as ActiveEmodePair, K as ActionEmodeImpact, L as MarginRequirementType, N as EmodeImpactStatus, Q as BankVaultType, S as BankIntegrationMetadataMapDto, U as BankIntegrationMetadataDto, V as BankIntegrationMetadata, X as Bank, Y as Environment, Z as Project0Config, _ as MintData } from './types-DzbVhEfo.cjs';
4
+ export { ax as AccountType, aC as AmountType, aw as BankAddress, $ as BankConfig, B as BankConfigCompactRaw, az as BankMap, av as BankMetadata, a2 as BankMetadataRaw, ao as ComputeAssetUsdValueParams, am as ComputeLiabilityUsdValueParams, ak as ComputeUsdValueParams, a7 as EmodeConfigRaw, ab as EmodeEntry, ad as EmodeImpact, a0 as EmodeSettings, af as GetAssetWeightParams, a4 as InterestRateConfigCompactRaw, a9 as InterestRateConfigOpt, a5 as InterestRateConfigOptRaw, ay as KaminoStates, as as MARGINFI_IDL, aB as MintDataMap, ac as OracleConfigOpt, a6 as OracleConfigOptRaw, aA as OraclePriceMap, ar as PriceWithConfidenceDto, at as Program, a1 as RateLimitWindowRaw, aa as RateLimitWindowType, a8 as RatePoint, a3 as RatePointRaw, au as Wallet, ap as computeAssetUsdValue, an as computeLiabilityUsdValue, aj as computeLoopingParams, ai as computeMaxLeverage, aq as computeTvl, al as computeUsdValue, ag as getAssetWeight, ah as getLiabilityWeight, ae as isWeightedPrice, aD as resolveAmount } from './types-DzbVhEfo.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';
8
8
  import BN from 'bn.js';
9
9
  import BigNumber$1 from 'bignumber.js';
10
- import { K as KaminoReserve, D as DriftSpotMarket, d as DriftRewards, J as JupLendingState, f as JupTokenReserve, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, a as KaminoObligation, b as KaminoFarmState, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, c as DriftUser, e as DriftUserStats, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON, g as JupLendingRewardsRateModel, h as JupRateModel } from './dto-rate-model.types-IT8wckYH.cjs';
10
+ import { K as KaminoReserve, D as DriftSpotMarket, d as DriftRewards, J as JupLendingState, i as KaminoReserveJSON, j as KaminoObligationJSON, k as KaminoFarmStateJSON, a as KaminoObligation, b as KaminoFarmState, l as DriftSpotMarketJSON, m as DriftUserJSON, n as DriftRewardsJSON, o as DriftUserStatsJSON, c as DriftUser, e as DriftUserStats, p as JupLendingStateJSON, q as JupTokenReserveJSON, r as JupLendingRewardsRateModelJSON, s as JupRateModelJSON, f as JupTokenReserve, g as JupLendingRewardsRateModel, h as JupRateModel } from './dto-rate-model.types-IT8wckYH.cjs';
11
11
  import { JupiterClientConfig, QuoteGetRequest, QuoteResponse } from './jupiter.cjs';
12
12
  import { F as FeedResponse, G as GammaLpVaultRaw, a as GammaWithdrawReceiptRaw } from './types-DLZaKA17.cjs';
13
13
  import { Buffer as Buffer$1 } from 'buffer';
@@ -2870,16 +2870,6 @@ interface ComputeMaxBorrowForBankParams {
2870
2870
  volatilityFactor?: number;
2871
2871
  /** Active e-mode pair for applying e-mode weights */
2872
2872
  activePair?: ActiveEmodePair;
2873
- /**
2874
- * Group-level rate limiter (USD windows). When provided and enabled, the result is also clamped
2875
- * to the group's remaining outflow capacity converted at the unbiased realtime price.
2876
- */
2877
- groupRateLimiter?: BankRateLimiterType;
2878
- /**
2879
- * Skip the bank-level clamps (remaining borrow cap, available liquidity, bank/group rate
2880
- * limiters) and return the purely health-based amount (default: false)
2881
- */
2882
- ignoreBankLimits?: boolean;
2883
2873
  }
2884
2874
  /**
2885
2875
  * Calculates the maximum amount that can be borrowed from a bank.
@@ -2889,9 +2879,6 @@ interface ComputeMaxBorrowForBankParams {
2889
2879
  * - **Isolated tier constraints**: Isolated assets cannot be borrowed with active debt
2890
2880
  * - **E-mode weights**: Enhanced weights for assets in the same e-mode category
2891
2881
  * - **Oracle prices**: Conservative pricing (lowest for assets, highest for liabilities)
2892
- * - **Bank limits**: Remaining borrow cap (`borrowLimit - totalBorrows`, interest-buffered),
2893
- * available liquidity (`totalDeposits - totalBorrows`), the bank's net-outflow rate limiter and
2894
- * (if `groupRateLimiter` is provided) the group's USD rate limiter — unless `ignoreBankLimits`
2895
2882
  *
2896
2883
  * **Isolated Asset Rules:**
2897
2884
  * - Cannot borrow isolated assets if other liabilities exist
@@ -2904,11 +2891,7 @@ interface ComputeMaxBorrowForBankParams {
2904
2891
  * ((fc - min(fc, ucb)) / (price_highest * liab_weight))
2905
2892
  * Else:
2906
2893
  * maxBorrow = existingAssets + ((fc - ucb) / (price_highest * liab_weight))
2907
- *
2908
- * maxBorrow = min(maxBorrow, remainingBorrowCap, availableLiquidity, rateLimitRemaining)
2909
2894
  * ```
2910
- * All liability-denominated terms are divided by `(1 + protocolOriginationFee)` because the
2911
- * program books the origination fee as additional borrowed liability.
2912
2895
  * Where:
2913
2896
  * - `fc` = free collateral (with volatility factor)
2914
2897
  * - `ucb` = untied collateral for bank (existing deposits)
@@ -2948,23 +2931,6 @@ interface ComputeMaxWithdrawForBankParams {
2948
2931
  volatilityFactor?: number;
2949
2932
  /** Active e-mode pair for applying e-mode weights */
2950
2933
  activePair?: ActiveEmodePair;
2951
- /**
2952
- * Group-level rate limiter (USD windows). When provided and enabled, the result is also clamped
2953
- * to the group's remaining outflow capacity converted at the unbiased realtime price.
2954
- */
2955
- groupRateLimiter?: BankRateLimiterType;
2956
- /**
2957
- * Venue-side account states for integrated banks (Kamino/Drift/JupLend), e.g.
2958
- * `client.bankIntegrationMap[bankAddress]`. When provided, the result is also clamped to the
2959
- * venue's own idle liquidity — the marginfi-level totals only describe what marginfi has
2960
- * delegated, so a fully utilized venue reserve correctly reports 0 withdrawable.
2961
- */
2962
- venueStates?: BankVenueStates;
2963
- /**
2964
- * Skip the bank-level clamps (available liquidity, venue liquidity, bank/group rate limiters)
2965
- * and return the purely health-based amount (default: false)
2966
- */
2967
- ignoreBankLimits?: boolean;
2968
2934
  }
2969
2935
  /**
2970
2936
  * Calculates the maximum amount that can be withdrawn from a bank.
@@ -2974,10 +2940,6 @@ interface ComputeMaxWithdrawForBankParams {
2974
2940
  * - **Asset weights**: Risk-adjusted value of deposits (Initial and Maintenance)
2975
2941
  * - **E-mode weights**: Enhanced weights for assets in the same e-mode category
2976
2942
  * - **Oracle prices**: Conservative pricing to ensure safe withdrawals
2977
- * - **Bank limits**: Result is clamped to available liquidity (`totalDeposits - totalBorrows`),
2978
- * the bank's net-outflow rate limiter, (if `groupRateLimiter` is provided) the group's USD
2979
- * rate limiter and (if `venueStates` is provided) the integrated venue's idle liquidity —
2980
- * unless `ignoreBankLimits` is set
2981
2943
  *
2982
2944
  * **Key Differences from Max Borrow:**
2983
2945
  * - Uses both Initial and Maintenance asset weights
@@ -3005,44 +2967,6 @@ interface ComputeMaxWithdrawForBankParams {
3005
2967
  * ```
3006
2968
  */
3007
2969
  declare function computeMaxWithdrawForBank(params: ComputeMaxWithdrawForBankParams): BigNumber$1;
3008
- /**
3009
- * Configuration for computing maximum deposit amount for a bank
3010
- */
3011
- interface ComputeMaxDepositForBankParams {
3012
- /** Map of banks by their address */
3013
- banksMap: Map<string, BankType>;
3014
- /** The bank address to compute max deposit for */
3015
- bankAddress: PublicKey;
3016
- /**
3017
- * Asset share value multipliers by bank address (for integrated protocols like Kamino/Drift and
3018
- * staked-collateral banks). The bank's `depositLimit` is denominated in its native share units;
3019
- * the multiplier converts the remaining capacity to underlying UI units.
3020
- */
3021
- assetShareValueMultiplierByBank?: Map<string, BigNumber$1>;
3022
- /** Wallet token balance in UI units; if provided, the result is capped to it */
3023
- walletBalance?: BigNumber$1 | number;
3024
- }
3025
- /**
3026
- * Calculates the maximum amount that can be deposited into a bank.
3027
- *
3028
- * Deposits are not constrained by account health, only by the bank's deposit cap
3029
- * (`depositLimit - totalDeposits`, buffered for interest accrued since the last update)
3030
- * and, optionally, the caller's wallet balance.
3031
- *
3032
- * @param params - Configuration object for max deposit computation
3033
- * @returns Maximum amount that can be deposited (in UI units)
3034
- *
3035
- * @example
3036
- * ```typescript
3037
- * const maxDeposit = computeMaxDepositForBank({
3038
- * banksMap: client.bankMap,
3039
- * bankAddress: usdcBankPk,
3040
- * assetShareValueMultiplierByBank: client.assetShareValueMultiplierByBank,
3041
- * walletBalance: 1_000, // UI units
3042
- * });
3043
- * ```
3044
- */
3045
- declare function computeMaxDepositForBank(params: ComputeMaxDepositForBankParams): BigNumber$1;
3046
2970
 
3047
2971
  declare const getJupiterReferralFeeAccount: (mint: PublicKey) => string;
3048
2972
  declare const checkJupiterFeeAccount: (connection: Connection, mint: PublicKey) => Promise<{
@@ -4440,42 +4364,12 @@ declare const fetchMultipleBanks: (program: MarginfiProgram, opts?: {
4440
4364
  data: BankRaw;
4441
4365
  }[]>;
4442
4366
 
4443
- /** On-chain sentinel: a deposit/borrow limit equal to `u64::MAX` means "no limit". */
4444
- declare const U64_MAX: BigNumber$1;
4445
- /** Mirrors `BankConfig::is_deposit_limit_active` (limit != u64::MAX). */
4446
- declare function isDepositLimitActive(bank: BankType): boolean;
4447
- /** Mirrors `BankConfig::is_borrow_limit_active` (limit != u64::MAX). */
4448
- declare function isBorrowLimitActive(bank: BankType): boolean;
4449
- /**
4450
- * The deposit limit in the same units as `totalAssetShares * assetShareValue`.
4451
- *
4452
- * For Drift banks the program compares the limit against the 9-decimal scaled balance, so it
4453
- * scales `deposit_limit` (mint decimals) by `10^(9 - mint_decimals)` first
4454
- * (`scale_drift_deposit_limit`). All other banks compare the raw limit.
4455
- */
4456
- declare function getEffectiveDepositLimit(bank: BankType): BigNumber$1;
4457
4367
  declare function computeInterestRates(bank: BankType): {
4458
4368
  lendingRate: BigNumber$1;
4459
4369
  borrowingRate: BigNumber$1;
4460
4370
  };
4461
4371
  declare function computeBaseInterestRate(bank: BankType): BigNumber$1;
4462
4372
  declare function computeUtilizationRate(bank: BankType): BigNumber$1;
4463
- /** Mirrors the program's `SECONDS_PER_YEAR` (365 days, no leap adjustment). */
4464
- declare const SECONDS_PER_YEAR: number;
4465
- /**
4466
- * Minimum execution headroom (seconds) assumed between computing a bank-bounded amount and the
4467
- * transaction landing on-chain. Interest keeps accruing in that window, so bounds that depend on
4468
- * accrued interest are projected at least this far ahead.
4469
- */
4470
- declare const EXECUTION_HEADROOM_SECONDS = 120;
4471
- /**
4472
- * Seconds of interest accrual to project for a bank-bounded amount: the program accrues
4473
- * `now - lastUpdate` of interest before applying its checks, and the tx lands some time after
4474
- * `now`. Uses `max(2 * age, age + EXECUTION_HEADROOM_SECONDS)` — at least as conservative as the
4475
- * historical "2x accrued" buffer, and never less than the execution headroom even for a bank that
4476
- * was touched a second ago.
4477
- */
4478
- declare function computeAccrualProjectionSeconds(bank: BankType, nowSeconds?: number): number;
4479
4373
  declare function computeRemainingCapacity(bank: BankType): {
4480
4374
  depositCapacity: BigNumber$1;
4481
4375
  borrowCapacity: BigNumber$1;
@@ -4562,33 +4456,13 @@ declare function computeBankTotalBorrowsUsd(bank: BankType, oraclePrice: OracleP
4562
4456
  */
4563
4457
  declare function computeBankPoolSize(bank: BankType, assetShareValueMultiplier?: BigNumber$1): number;
4564
4458
  /**
4565
- * Available bank liquidity in UI units = max(0, totalDeposits - totalBorrows).
4566
- *
4567
- * This is the amount the bank's liquidity vault can actually pay out for a withdraw or borrow,
4568
- * independent of any account-level health constraints.
4569
- */
4570
- declare function computeBankAvailableLiquidity(bank: BankType, assetShareValueMultiplier?: BigNumber$1): BigNumber$1;
4571
- /**
4572
- * Remaining deposit capacity in UI units (cap minus deposits, accounting for accrued interest),
4573
- * clamped at 0. `Infinity` when the bank's deposit limit is inactive (`u64::MAX`).
4574
- *
4575
- * For integrated banks this is in the bank's share units (cToken / Drift scaled balance);
4576
- * multiply by the bank's `assetShareValueMultiplier` to convert to underlying tokens.
4459
+ * Remaining deposit capacity in UI units (cap minus deposits, accounting for accrued interest).
4577
4460
  */
4578
4461
  declare function computeBankDepositCapRemaining(bank: BankType): number;
4579
4462
  /**
4580
- * Remaining borrow capacity in UI units (cap minus borrows, accounting for accrued interest),
4581
- * clamped at 0. `Infinity` when the bank's borrow limit is inactive (`u64::MAX`).
4463
+ * Remaining borrow capacity in UI units (cap minus borrows, accounting for accrued interest).
4582
4464
  */
4583
4465
  declare function computeBankBorrowCapRemaining(bank: BankType): number;
4584
- /**
4585
- * Available liquidity (UI units) projected through interest accrual: `computeBankAvailableLiquidity`
4586
- * minus the net liquidity drain of accrual (`liabilities * borrowRate - assets * lendingRate`,
4587
- * annualized) over {@link computeAccrualProjectionSeconds}. The program runs `accrue_interest`
4588
- * before its `check_utilization_ratio` (assets >= liabilities) check on withdraws and borrows,
4589
- * so this is the amount that can actually leave the bank when the tx lands.
4590
- */
4591
- declare function computeBankProjectedAvailableLiquidity(bank: BankType, assetShareValueMultiplier?: BigNumber$1): BigNumber$1;
4592
4466
  /**
4593
4467
  * Supply APY, compounded from the base lending rate via the shared `aprToApy` helper.
4594
4468
  */
@@ -4615,73 +4489,6 @@ declare function computeBankMetrics(params: ComputeBankMetricsParams): BankMetri
4615
4489
  declare function requireBank(bankMap: Map<string, BankType>, address: PublicKey, makeError?: (message: string) => Error): BankType;
4616
4490
  declare function requireTokenProgram(tokenProgramsByBank: Map<string, PublicKey>, address: PublicKey, makeError?: (message: string) => Error): PublicKey;
4617
4491
 
4618
- /**
4619
- * Remaining outflow capacity of a single sliding rate-limit window at `nowSeconds`,
4620
- * mirroring the on-chain `RateLimitWindow::effective_remaining_capacity` (read-only —
4621
- * applies the pending window roll-over without mutating state).
4622
- *
4623
- * Units match the window: native tokens for bank-level limiters, USD for group-level.
4624
- *
4625
- * @returns Remaining capacity, or `null` when the window is disabled (`maxOutflow == 0`)
4626
- */
4627
- declare function computeRateLimitWindowRemainingCapacity(window: RateLimitWindowType, nowSeconds: number): BigNumber$1 | null;
4628
- /**
4629
- * Remaining outflow capacity across both (hourly, daily) windows of a rate limiter:
4630
- * the minimum of the enabled windows, in the limiter's native units.
4631
- *
4632
- * @returns Remaining capacity, or `null` when no window is enabled (no rate limiting)
4633
- */
4634
- declare function computeRateLimiterRemainingCapacity(rateLimiter: BankRateLimiterType | undefined, nowSeconds: number): BigNumber$1 | null;
4635
- /**
4636
- * Remaining bank-level rate-limit outflow capacity (withdraws + borrows) in UI units of the
4637
- * bank's mint, clamped at 0.
4638
- *
4639
- * @returns Remaining capacity in UI units, or `null` when the bank has no rate limiter enabled
4640
- */
4641
- declare function computeBankRateLimitRemaining(bank: BankType, nowSeconds?: number): BigNumber$1 | null;
4642
- /**
4643
- * Remaining group-level rate-limit outflow capacity in USD, clamped at 0.
4644
- *
4645
- * @returns Remaining capacity in USD, or `null` when the group has no rate limiter enabled
4646
- */
4647
- declare function computeGroupRateLimitRemainingUsd(rateLimiter: BankRateLimiterType | undefined, nowSeconds?: number): BigNumber$1 | null;
4648
-
4649
- /**
4650
- * The venue-side account states needed to derive an integrated bank's true liquidity.
4651
- *
4652
- * Structurally compatible with `BankIntegrationMetadata` (`client.bankIntegrationMap[address]`),
4653
- * so that map's entries can be passed directly.
4654
- */
4655
- interface BankVenueStates {
4656
- kaminoStates?: {
4657
- reserveState: KaminoReserve;
4658
- };
4659
- driftStates?: {
4660
- spotMarketState: DriftSpotMarket;
4661
- };
4662
- jupLendStates?: {
4663
- jupTokenReserveState: JupTokenReserve;
4664
- };
4665
- }
4666
- /**
4667
- * Safety buffer applied to venue idle liquidity. Venue reserve states are snapshots refreshed on
4668
- * the caller's cadence, and unlike the marginfi bank we don't project the venue's own interest
4669
- * accrual, so the effective withdrawable amount can drift slightly below what the cached state
4670
- * reports. Shave ~50 bps to avoid simulation failures right at the reported cap.
4671
- */
4672
- declare const VENUE_AVAILABLE_LIQUIDITY_BUFFER = 0.995;
4673
- /**
4674
- * Idle liquidity of the external venue backing an integrated bank (Kamino reserve, Drift spot
4675
- * market, JupLend token reserve), in UI units of the underlying token, with
4676
- * {@link VENUE_AVAILABLE_LIQUIDITY_BUFFER} applied.
4677
- *
4678
- * For integrated banks the marginfi-level totals only describe what marginfi has delegated to the
4679
- * venue — the venue's own utilization is the true cap on withdrawals (a fully utilized Kamino
4680
- * reserve pays out nothing even if marginfi's position is large). Returns `undefined` for banks
4681
- * without an external venue (DEFAULT/SOL/STAKED) or when the relevant venue state is missing.
4682
- */
4683
- declare function computeVenueAvailableLiquidity(bank: BankType, venueStates?: BankVenueStates): BigNumber$1 | undefined;
4684
-
4685
4492
  /**
4686
4493
  * Fee state cache - stores information from the global FeeState
4687
4494
  * so the FeeState can be omitted on certain instructions
@@ -6038,18 +5845,6 @@ declare class MarginfiAccount implements MarginfiAccountType {
6038
5845
  * @see {@link computeMaxWithdrawForBank} for implementation details
6039
5846
  */
6040
5847
  computeMaxWithdrawForBank(params: Omit<ComputeMaxWithdrawForBankParams, "account">): BigNumber$1;
6041
- /**
6042
- * Calculates the maximum amount that can be deposited into a bank.
6043
- *
6044
- * Deposits are not constrained by account health, only by the bank's remaining deposit cap
6045
- * and (optionally) the wallet balance.
6046
- *
6047
- * @param params - Configuration for max deposit computation
6048
- * @returns Maximum depositable amount in UI units
6049
- *
6050
- * @see {@link computeMaxDepositForBank} for implementation details
6051
- */
6052
- computeMaxDepositForBank(params: ComputeMaxDepositForBankParams): BigNumber$1;
6053
5848
  /**
6054
5849
  * Gets the banks required for health check calculations.
6055
5850
  *
@@ -7106,8 +6901,6 @@ declare class MarginfiAccountWrapper {
7106
6901
  */
7107
6902
  computeMaxBorrowForBank(bankAddress: PublicKey, opts?: {
7108
6903
  volatilityFactor?: number;
7109
- /** Skip bank-level clamps (remaining borrow cap, available liquidity, rate limiters) */
7110
- ignoreBankLimits?: boolean;
7111
6904
  }): BigNumber$1;
7112
6905
  /**
7113
6906
  * Computes max withdraw for a bank with auto-injected client data.
@@ -7117,19 +6910,6 @@ declare class MarginfiAccountWrapper {
7117
6910
  */
7118
6911
  computeMaxWithdrawForBank(bankAddress: PublicKey, opts?: {
7119
6912
  volatilityFactor?: number;
7120
- /** Skip bank-level clamps (available liquidity, rate limiters) */
7121
- ignoreBankLimits?: boolean;
7122
- }): BigNumber$1;
7123
- /**
7124
- * Computes max deposit for a bank with auto-injected client data.
7125
- *
7126
- * Bounded by the bank's remaining deposit cap and, if provided, the wallet balance.
7127
- *
7128
- * @param bankAddress - Bank address to check max deposit for
7129
- * @param opts - Optional wallet balance (UI units) to cap the result
7130
- */
7131
- computeMaxDepositForBank(bankAddress: PublicKey, opts?: {
7132
- walletBalance?: BigNumber$1 | number;
7133
6913
  }): BigNumber$1;
7134
6914
  /**
7135
6915
  * Computes active emode pairs for custom emode pair sets.
@@ -7170,10 +6950,11 @@ declare class MarginfiAccountWrapper {
7170
6950
  * 0.1.10 inserts required accounts into six instructions (positional wire
7171
6951
  * break, both directions). For the three the SDK executes or simulates
7172
6952
  * (end-flashloan, transfer, pulse-health), the builders in `instructions.ts`
7173
- * build 0.1.10-style and inline-remove the inserted account while the target
7174
- * program still runs 0.1.9 — decided by the announced upgrade time below.
6953
+ * AND their duplicates in `sync-instructions.ts` build 0.1.10-style and
6954
+ * inline-remove the inserted account while the target program still runs
6955
+ * 0.1.9 — decided by the announced upgrade time below.
7175
6956
  *
7176
- * TODO(upgrade): delete this file (and the three inline checks) once the
6957
+ * TODO(upgrade): delete this file (and the six inline checks) once the
7177
6958
  * upgrade is final.
7178
6959
  */
7179
6960
  /**
@@ -7184,4 +6965,4 @@ declare const MARGINFI_V0_1_10_ACTIVATION: Record<string, number>;
7184
6965
  /** Whether `programId` runs program 0.1.10 at `atUnixSeconds` (default: now). */
7185
6966
  declare function isMarginfiV0110Live(programId: PublicKey, atUnixSeconds?: number): boolean;
7186
6967
 
7187
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, 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, type BankRateLimiterDto, BankRateLimiterRaw, type BankRateLimiterRawDto, BankRateLimiterType, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type BankVenueStates, type BridgeOpts, type BridgeTokenSide, type BridgedSwapLeg, type BridgedTxResult, type BuildContext, type BulkLendTxsResult, type ClassifiedPosition, type ComposeBridgedSwapParams, type ComposeBridgedSwapResult, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxDepositForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_BRIDGE_MINTS, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, EXECUTION_HEADROOM_SECONDS, 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, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MARGINFI_V0_1_10_ACTIVATION, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBridgedLoopTxParams, type MakeBridgedSwapCollateralTxParams, type MakeBridgedSwapDebtTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, 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 MakeRollPtTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferPositionsTxParams, type MakeVaultCompleteWithdrawalIxParams, type MakeVaultCompleteWithdrawalTxParams, type MakeVaultDepositIxParams, type MakeVaultDepositTxParams, type MakeVaultDepositWithSwapTxParams, type MakeVaultWithdrawIxParams, type MakeVaultWithdrawTxParams, 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, type MintAuthorityBalance, 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 ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowRawDto, RateLimitWindowType, type RatePointDto, type ResolveBridgeCandidateBanksParams, type ResolvedPinnedSwapRoute, RiskTier, RiskTierRaw, type RollPtOpts, type RollQuoteSimResult, type RollQuoteSimulator, type RollQuoteTokenBalance, SECONDS_PER_YEAR, SINGLE_POOL_PROGRAM_ID, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SharedBridgeLegContext, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, 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, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, TypedAmount, U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, VENUE_AVAILABLE_LIQUIDITY_BUFFER, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountConflictsWithBridgeBank, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compileFlashloanPrecheck, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, computeVenueAvailableLiquidity, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEffectiveDepositLimit, getEmodePairs, getExactOutEstimate, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBorrowLimitActive, isBridgeConflictError, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isMarginfiV0110Live, isStandardBorrowable, isStandardDepositable, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, 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, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSmartCrankSwbFeedIxForAccounts, makeSwapCollateralTx, makeSwapDebtTx, makeTransferPositionsTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, mergeBridgeQuotesDebt, mergeBridgeQuotesLoop, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, requireBank, requireTokenProgram, resolveBridgeCandidateBanks, resolvePinnedSwapRoute, resolveTokenProgramForMint, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, selectSwapBridges, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, sharedBridgeLegContext, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, tryBridgeCandidates, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
6968
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, 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, type BankRateLimiterDto, BankRateLimiterRaw, type BankRateLimiterRawDto, BankRateLimiterType, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type BridgeOpts, type BridgeTokenSide, type BridgedSwapLeg, type BridgedTxResult, type BuildContext, type BulkLendTxsResult, type ClassifiedPosition, type ComposeBridgedSwapParams, type ComposeBridgedSwapResult, 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_BRIDGE_MINTS, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, 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, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MARGINFI_V0_1_10_ACTIVATION, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBridgedLoopTxParams, type MakeBridgedSwapCollateralTxParams, type MakeBridgedSwapDebtTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, 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 MakeRollPtTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferPositionsTxParams, type MakeVaultCompleteWithdrawalIxParams, type MakeVaultCompleteWithdrawalTxParams, type MakeVaultDepositIxParams, type MakeVaultDepositTxParams, type MakeVaultDepositWithSwapTxParams, type MakeVaultWithdrawIxParams, type MakeVaultWithdrawTxParams, 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, type MintAuthorityBalance, 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 ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowRawDto, type RatePointDto, type ResolveBridgeCandidateBanksParams, type ResolvedPinnedSwapRoute, RiskTier, RiskTierRaw, type RollPtOpts, type RollQuoteSimResult, type RollQuoteSimulator, type RollQuoteTokenBalance, SINGLE_POOL_PROGRAM_ID, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SharedBridgeLegContext, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, 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, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, TypedAmount, USDC_DECIMALS, USDC_MINT, USDT_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountConflictsWithBridgeBank, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compileFlashloanPrecheck, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, 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, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBridgeConflictError, isDecomposableSwapError, isDepositIx, isFlashloan, isGroupRateLimiterEnabled, isMarginfiV0110Live, isStandardBorrowable, isStandardDepositable, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, 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, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSmartCrankSwbFeedIxForAccounts, makeSwapCollateralTx, makeSwapDebtTx, makeTransferPositionsTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, mergeBridgeQuotesDebt, mergeBridgeQuotesLoop, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, requireBank, requireTokenProgram, resolveBridgeCandidateBanks, resolvePinnedSwapRoute, resolveTokenProgramForMint, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, selectSwapBridges, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, sharedBridgeLegContext, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, tryBridgeCandidates, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };