@0dotxyz/p0-ts-sdk 2.7.1 → 2.7.2
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/README.md +9 -2
- package/dist/index.cjs +2118 -229
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +226 -6
- package/dist/index.d.ts +226 -6
- package/dist/index.js +2103 -230
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/{types-Ctm1kvCr.d.ts → types-B5SGXpex.d.ts} +1 -1
- package/dist/{types-DzbVhEfo.d.cts → types-BFLi0Ozl.d.cts} +1 -1
- package/dist/vendor.cjs +2016 -645
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +1932 -834
- package/dist/vendor.d.ts +1932 -834
- package/dist/vendor.js +2016 -645
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
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
|
|
4
|
-
export { ax as AccountType, aC as AmountType, aw as BankAddress,
|
|
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';
|
|
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, 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,
|
|
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';
|
|
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,6 +2870,16 @@ 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;
|
|
2873
2883
|
}
|
|
2874
2884
|
/**
|
|
2875
2885
|
* Calculates the maximum amount that can be borrowed from a bank.
|
|
@@ -2879,6 +2889,9 @@ interface ComputeMaxBorrowForBankParams {
|
|
|
2879
2889
|
* - **Isolated tier constraints**: Isolated assets cannot be borrowed with active debt
|
|
2880
2890
|
* - **E-mode weights**: Enhanced weights for assets in the same e-mode category
|
|
2881
2891
|
* - **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`
|
|
2882
2895
|
*
|
|
2883
2896
|
* **Isolated Asset Rules:**
|
|
2884
2897
|
* - Cannot borrow isolated assets if other liabilities exist
|
|
@@ -2891,7 +2904,11 @@ interface ComputeMaxBorrowForBankParams {
|
|
|
2891
2904
|
* ((fc - min(fc, ucb)) / (price_highest * liab_weight))
|
|
2892
2905
|
* Else:
|
|
2893
2906
|
* maxBorrow = existingAssets + ((fc - ucb) / (price_highest * liab_weight))
|
|
2907
|
+
*
|
|
2908
|
+
* maxBorrow = min(maxBorrow, remainingBorrowCap, availableLiquidity, rateLimitRemaining)
|
|
2894
2909
|
* ```
|
|
2910
|
+
* All liability-denominated terms are divided by `(1 + protocolOriginationFee)` because the
|
|
2911
|
+
* program books the origination fee as additional borrowed liability.
|
|
2895
2912
|
* Where:
|
|
2896
2913
|
* - `fc` = free collateral (with volatility factor)
|
|
2897
2914
|
* - `ucb` = untied collateral for bank (existing deposits)
|
|
@@ -2931,6 +2948,23 @@ interface ComputeMaxWithdrawForBankParams {
|
|
|
2931
2948
|
volatilityFactor?: number;
|
|
2932
2949
|
/** Active e-mode pair for applying e-mode weights */
|
|
2933
2950
|
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;
|
|
2934
2968
|
}
|
|
2935
2969
|
/**
|
|
2936
2970
|
* Calculates the maximum amount that can be withdrawn from a bank.
|
|
@@ -2940,6 +2974,10 @@ interface ComputeMaxWithdrawForBankParams {
|
|
|
2940
2974
|
* - **Asset weights**: Risk-adjusted value of deposits (Initial and Maintenance)
|
|
2941
2975
|
* - **E-mode weights**: Enhanced weights for assets in the same e-mode category
|
|
2942
2976
|
* - **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
|
|
2943
2981
|
*
|
|
2944
2982
|
* **Key Differences from Max Borrow:**
|
|
2945
2983
|
* - Uses both Initial and Maintenance asset weights
|
|
@@ -2967,6 +3005,44 @@ interface ComputeMaxWithdrawForBankParams {
|
|
|
2967
3005
|
* ```
|
|
2968
3006
|
*/
|
|
2969
3007
|
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;
|
|
2970
3046
|
|
|
2971
3047
|
declare const getJupiterReferralFeeAccount: (mint: PublicKey) => string;
|
|
2972
3048
|
declare const checkJupiterFeeAccount: (connection: Connection, mint: PublicKey) => Promise<{
|
|
@@ -4364,12 +4440,42 @@ declare const fetchMultipleBanks: (program: MarginfiProgram, opts?: {
|
|
|
4364
4440
|
data: BankRaw;
|
|
4365
4441
|
}[]>;
|
|
4366
4442
|
|
|
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;
|
|
4367
4457
|
declare function computeInterestRates(bank: BankType): {
|
|
4368
4458
|
lendingRate: BigNumber$1;
|
|
4369
4459
|
borrowingRate: BigNumber$1;
|
|
4370
4460
|
};
|
|
4371
4461
|
declare function computeBaseInterestRate(bank: BankType): BigNumber$1;
|
|
4372
4462
|
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;
|
|
4373
4479
|
declare function computeRemainingCapacity(bank: BankType): {
|
|
4374
4480
|
depositCapacity: BigNumber$1;
|
|
4375
4481
|
borrowCapacity: BigNumber$1;
|
|
@@ -4456,13 +4562,33 @@ declare function computeBankTotalBorrowsUsd(bank: BankType, oraclePrice: OracleP
|
|
|
4456
4562
|
*/
|
|
4457
4563
|
declare function computeBankPoolSize(bank: BankType, assetShareValueMultiplier?: BigNumber$1): number;
|
|
4458
4564
|
/**
|
|
4459
|
-
*
|
|
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.
|
|
4460
4577
|
*/
|
|
4461
4578
|
declare function computeBankDepositCapRemaining(bank: BankType): number;
|
|
4462
4579
|
/**
|
|
4463
|
-
* Remaining borrow capacity in UI units (cap minus borrows, accounting for accrued interest)
|
|
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`).
|
|
4464
4582
|
*/
|
|
4465
4583
|
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;
|
|
4466
4592
|
/**
|
|
4467
4593
|
* Supply APY, compounded from the base lending rate via the shared `aprToApy` helper.
|
|
4468
4594
|
*/
|
|
@@ -4489,6 +4615,73 @@ declare function computeBankMetrics(params: ComputeBankMetricsParams): BankMetri
|
|
|
4489
4615
|
declare function requireBank(bankMap: Map<string, BankType>, address: PublicKey, makeError?: (message: string) => Error): BankType;
|
|
4490
4616
|
declare function requireTokenProgram(tokenProgramsByBank: Map<string, PublicKey>, address: PublicKey, makeError?: (message: string) => Error): PublicKey;
|
|
4491
4617
|
|
|
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
|
+
|
|
4492
4685
|
/**
|
|
4493
4686
|
* Fee state cache - stores information from the global FeeState
|
|
4494
4687
|
* so the FeeState can be omitted on certain instructions
|
|
@@ -5845,6 +6038,18 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
5845
6038
|
* @see {@link computeMaxWithdrawForBank} for implementation details
|
|
5846
6039
|
*/
|
|
5847
6040
|
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;
|
|
5848
6053
|
/**
|
|
5849
6054
|
* Gets the banks required for health check calculations.
|
|
5850
6055
|
*
|
|
@@ -6901,6 +7106,8 @@ declare class MarginfiAccountWrapper {
|
|
|
6901
7106
|
*/
|
|
6902
7107
|
computeMaxBorrowForBank(bankAddress: PublicKey, opts?: {
|
|
6903
7108
|
volatilityFactor?: number;
|
|
7109
|
+
/** Skip bank-level clamps (remaining borrow cap, available liquidity, rate limiters) */
|
|
7110
|
+
ignoreBankLimits?: boolean;
|
|
6904
7111
|
}): BigNumber$1;
|
|
6905
7112
|
/**
|
|
6906
7113
|
* Computes max withdraw for a bank with auto-injected client data.
|
|
@@ -6910,6 +7117,19 @@ declare class MarginfiAccountWrapper {
|
|
|
6910
7117
|
*/
|
|
6911
7118
|
computeMaxWithdrawForBank(bankAddress: PublicKey, opts?: {
|
|
6912
7119
|
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;
|
|
6913
7133
|
}): BigNumber$1;
|
|
6914
7134
|
/**
|
|
6915
7135
|
* Computes active emode pairs for custom emode pair sets.
|
|
@@ -6965,4 +7185,4 @@ declare const MARGINFI_V0_1_10_ACTIVATION: Record<string, number>;
|
|
|
6965
7185
|
/** Whether `programId` runs program 0.1.10 at `atUnixSeconds` (default: now). */
|
|
6966
7186
|
declare function isMarginfiV0110Live(programId: PublicKey, atUnixSeconds?: number): boolean;
|
|
6967
7187
|
|
|
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 };
|
|
7188
|
+
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 };
|