@0dotxyz/p0-ts-sdk 3.0.0-next.1 → 3.0.0-next.3

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
@@ -2,7 +2,7 @@ import * as superstruct from 'superstruct';
2
2
  import { Infer } from 'superstruct';
3
3
  import * as _solana_kit from '@solana/kit';
4
4
  import { Transaction, Address, TransactionError, Instruction, TransactionSigner, AddressesByLookupTableAddress, TransactionMessage, TransactionMessageWithFeePayer, TransactionMessageWithBlockhashLifetime, BlockhashLifetimeConstraint, ReadonlyUint8Array, Rpc, GetAccountInfoApi, GetMultipleAccountsApi, GetLatestBlockhashApi, GetTokenLargestAccountsApi, SimulateTransactionApi, GetProgramAccountsApi, GetEpochInfoApi, GetMinimumBalanceForRentExemptionApi, ProgramDerivedAddress, AccountRole, Slot, EncodedAccount, SolanaRpcApi } from '@solana/kit';
5
- import { K as KaminoReserve, D as DriftSpotMarket, J as JupTokenReserve, G as GammaLpVault, a as GammaWithdrawReceipt, b as KaminoStates, c as DriftStates, d as JupLendStates } from './types-DvtvVd73.cjs';
5
+ import { K as KaminoReserve, D as DriftSpotMarket, J as JupTokenReserve, G as GammaLpVault, a as GammaWithdrawReceipt, b as GammaDepositPolicy, c as GammaWithdrawalPolicy, d as KaminoStates, e as DriftStates, f as JupLendStates } from './types-ChkgWMym.cjs';
6
6
 
7
7
  interface RpcSimulateBundleTransactionResult {
8
8
  err?: TransactionError;
@@ -854,9 +854,13 @@ declare enum HealthCacheFlags {
854
854
  */
855
855
  ORACLE_OK = 4
856
856
  }
857
+ /** Where an account's `healthCache` values come from. */
857
858
  declare enum HealthCacheStatus {
859
+ /** As stored on-chain, not refreshed since the account's last instruction */
858
860
  UNSET = 0,
861
+ /** Refreshed by a simulated `pulse_health`: values, prices and flags come from the program */
859
862
  ONCHAIN = 1,
863
+ /** Computed locally from balances and oracle prices after the simulation failed; no prices or flags */
860
864
  COMPUTED = 2
861
865
  }
862
866
  interface HealthCacheType {
@@ -1059,6 +1063,8 @@ declare enum SwapProvider {
1059
1063
  DFLOW = "DFLOW"
1060
1064
  }
1061
1065
  interface SwapApiConfig {
1066
+ /** @deprecated Unused: the Jupiter adapter calls the Router `/build` endpoint and the Titan
1067
+ * adapter quotes over `wsUrl`. Will be removed in a future release. */
1062
1068
  basePath?: string;
1063
1069
  /** WebSocket endpoint (e.g. `wss://<host>/api/v1/ws`). Used by the Titan V3
1064
1070
  * adapter, which sends the full footprint template inline over the socket to
@@ -5251,6 +5257,18 @@ declare function fetchGammaLpVault(rpc: Rpc<GetAccountInfoApi>, lpVault: Address
5251
5257
  * @throws if the receipt account isn't a `WithdrawReceipt`
5252
5258
  */
5253
5259
  declare function fetchGammaWithdrawReceipt(rpc: Rpc<GetAccountInfoApi>, user: Address, lpVault: Address): Promise<GammaWithdrawReceipt | null>;
5260
+ /**
5261
+ * Fetches `lpVault`'s deposit policy: its deposit cap and pause switch. `null` when the vault has no
5262
+ * deposit policy account.
5263
+ * @throws if the account isn't a `DepositPolicy`
5264
+ */
5265
+ declare function fetchGammaDepositPolicy(rpc: Rpc<GetAccountInfoApi>, lpVault: Address): Promise<GammaDepositPolicy | null>;
5266
+ /**
5267
+ * Fetches `lpVault`'s withdrawal policy: its withdrawal fee and rolling hourly/daily caps. `null`
5268
+ * when the vault has no withdrawal policy account.
5269
+ * @throws if the account isn't a `WithdrawalPolicy`
5270
+ */
5271
+ declare function fetchGammaWithdrawalPolicy(rpc: Rpc<GetAccountInfoApi>, lpVault: Address): Promise<GammaWithdrawalPolicy | null>;
5254
5272
  /** Token program owning `assetsMint`: Token-2022 when it owns it, the Token program otherwise. */
5255
5273
  declare function resolveVaultTokenProgram(rpc: Rpc<GetAccountInfoApi>, assetsMint: Address): Promise<Address>;
5256
5274
 
@@ -6534,7 +6552,7 @@ declare class MarginfiAccountWrapper {
6534
6552
  makeRepayIx(bankAddress: Address, amount: Amount, repayAll?: boolean, opts?: MakeRepayIxOpts): Promise<_solana_kit.Instruction<string, readonly (_solana_kit.AccountLookupMeta<string, string> | _solana_kit.AccountMeta<string>)[]>[]>;
6535
6553
  /**
6536
6554
  * Withdraw instructions for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
6537
- * balance.
6555
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
6538
6556
  * @throws Error if `amount` isn't positive without `withdrawAll`
6539
6557
  */
6540
6558
  makeWithdrawIx(bankAddress: Address, amount: Amount, withdrawAll?: boolean, opts?: MakeWithdrawIxOpts): Promise<_solana_kit.Instruction<string, readonly (_solana_kit.AccountLookupMeta<string, string> | _solana_kit.AccountMeta<string>)[]>[]>;
@@ -6549,7 +6567,7 @@ declare class MarginfiAccountWrapper {
6549
6567
  makeRepayTx(bankAddress: Address, amount: Amount, repayAll?: boolean, opts?: MakeRepayIxOpts): Promise<SolanaTransaction>;
6550
6568
  /**
6551
6569
  * Withdraw transaction for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
6552
- * balance.
6570
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
6553
6571
  */
6554
6572
  makeWithdrawTx(bankAddress: Address, amount: Amount, withdrawAll?: boolean, opts?: MakeWithdrawIxOpts): Promise<SolanaTransaction>;
6555
6573
  /** Borrow transaction for `amount` (UI units) from `bankAddress`. */
@@ -6691,4 +6709,4 @@ declare class MarginfiAccountWrapper {
6691
6709
  getClient(): Project0Client;
6692
6710
  }
6693
6711
 
6694
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, AccountFlags, AccountType, type ActionEmodeImpact, type ActionTxParams, type ActiveEmodePair, type AddBankConfig, type Amount, type AmountType, type AppendPremiumRefreshParams, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigDto, type BankConfigFastOpt, BankConfigFlag, type BankConfigGovOpt, type BankConfigOpt, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataMap, type BankMap, type BankMetadata, type BankMetrics, type BankOutflowRateLimit, type BankRateLimiterDto, type BankRateLimiterType, type BankType, type BankTypeDto, type BankVenueStates, type BridgeLeg, type BridgeOpts, type BridgedTxResult, type BuildContext, type BulkLendTxsResult, CIRCUIT_BREAKER_ENABLED_FLAG, type ClassifiedPosition, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxDepositForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputePremiumRatesParams, type ComputeUsdValueParams, ConfigRaw, DEFAULT_ADDRESS, DEFAULT_BRIDGE_MINTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_BALANCE_THRESHOLD, EXECUTION_HEADROOM_SECONDS, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsType, EmodeTag, type Environment, FLASHLOAN_ENABLED_FLAG, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InterestRateConfig, type InterestRateConfigDto, type InterestRateConfigOpt, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, KAMINO_MARKET_EMERGENCY_FLAG, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_BALANCES, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_COSTLY_POSITIONS, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeBeginFlashLoanIxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBridgedLoopTxParams, type MakeBridgedSwapCollateralTxParams, type MakeBridgedSwapDebtTxParams, type MakeBridgedTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, type MakeCloseAccountIxOpts, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeCloseOrderIxOpts, type MakeCloseOrderIxParams, type MakeCloseOrderTxParams, type MakeCreateAccountIxOpts, type MakeCreateAccountIxParams, type MakeCreateAccountTxParams, type MakeCreateMissingAtaIxsParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeEndFlashLoanIxParams, type MakeFlashLoanTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeOrderChangesIxsParams, type MakeOrderChangesTxParams, type MakePlaceOrderIxOpts, type MakePlaceOrderIxParams, type MakePlaceOrderTxParams, type MakePremiumRefreshIxsParams, type MakePulseHealthIxOpts, type MakePulseHealthIxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferAccountIxOpts, type MakeTransferAccountIxParams, type MakeTransferAccountTxParams, type MakeTransferPositionsTxParams, type MakeUpdateOrderTxParams, type MakeVaultCompleteWithdrawalIxParams, type MakeVaultCompleteWithdrawalTxParams, type MakeVaultDepositIxParams, type MakeVaultDepositTxParams, type MakeVaultDepositWithSwapTxParams, type MakeVaultWithdrawIxParams, type MakeVaultWithdrawTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, MarginfiAccount, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupType, type MarginfiGroupTypeDto, type MintAuthorityBalance, type MintData, type MintDataMap, type MultiplierAccountState, type MultiplierAccountStates, OperationalState, type OracleConfigOpt, type OracleMultiplierBankInput, type OracleMultiplierServiceOpts, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type OracleSourceKey, type OrderChangesParams, type OrderTrigger, type OrderTriggerKind, type OrderTriggerParams, type OrderType, 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, PDA_ORDER_SEED, PREMIUM_ACTIVE_FLAG, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PremiumAction, type PremiumCollateralBreakdown, type PremiumEntry, type PremiumImpact, type PremiumRefreshParams, type PrependOrderClosesParams, PriceBias, type PriceWithConfidence, type PriceWithConfidenceDto, Project0Client, type Project0Config, Project0ConfigRaw, type ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowType, type RatePoint, type RatePointDto, type ResolvedPinnedSwapRoute, RiskTier, type RollPtOpts, type RollQuoteSimResult, type RollQuoteSimulator, type RollQuoteTokenBalance, SECONDS_PER_YEAR, SEND_PIPELINE_ROOM, SINGLE_POOL_PROGRAM_ID, SIZING_BLOCKHASH, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_ACCOUNT_SIZE, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type ScopeOracleServiceOpts, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SolanaTransaction, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, type SwapFlowRpc, type SwapFlowTxParams, type SwapFlowTxResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, TOKEN_2022_PROGRAM_ID, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, type TransactionFormat, TransactionType, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, type TypedAmount, U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, V1_TRANSACTION_CONFIG, VENUE_AVAILABLE_LIQUIDITY_BUFFER, WSOL_MINT, type WrapSolOpts, type WrappedI80F48, ZERO_ORACLE_KEY, addOracleToBanksIx, adjustPriceComponent, appendPremiumRefresh, aprToApy, apyToApr, balanceToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, buildOrderTrigger, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compareAddressBytes, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalancePremium, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankOutflowRateLimit, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccounts, computeHealthCacheStatus, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeOracleMultiplier, computeOracleMultipliers, computeOrderPairNetValue, computePremiumBreakdown, computePremiumImpact, computePremiumRatesByBank, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computePtMultiplier, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeStakedBankMultipliers, computeTvl, computeUsdValue, computeUtilizationRate, computeVenueAvailableLiquidity, configureScopeOracleIx, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeBank, decodeMarginfiAccount, decodeMultiplierAccount, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deriveOrderPda, deserializeInstruction, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankRateLimiter, dtoToEmodeSettings, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, exceedsCostlyPositionLimit, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchGlobalFeeWallet, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMultipleBanks, fetchMultiplierAccountStates, fetchMultiplierAccountStatesFromAPI, fetchOracleData, fetchOracleMultipliers, fetchOracleMultipliersFromAPI, fetchOracleMultipliersFromChain, fetchOrderFees, fetchOrdersForAccount, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchScopeOracleData, fetchScopeOraclePricesFromAPI, fetchScopeOraclePricesFromChain, filterRouteSetupIxs, findRandomAvailableAccountIndex, fitsInOneTransaction, freezeBankConfigIx, generateDummyMarginfiAccount, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankLiquidationFees, getConfig, getEffectiveDepositLimit, getEmodePairs, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleMultiplierBankInput, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBankCircuitBreakerHalted, isBorrowLimitActive, isBridgeConflictError, isCostlyBank, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBridgedTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseAccountIx, makeCloseAccountTx, makeCloseOrderIx, makeCloseOrderTx, makeCreateAccountIx, makeCreateAccountIxWithProjection, makeCreateAccountTx, makeCreateAccountTxWithProjection, makeCreateMissingAtaIxs, makeDepositIx, makeDepositTx, makeEndFlashLoanIx, makeFlashLoanTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makeOrderChangesIxs, makeOrderChangesTx, makePlaceOrderIx, makePlaceOrderTx, makePoolAddBankIx, makePoolConfigureBankGovIx, makePoolConfigureBankIx, makePreludeTxs, makePremiumRefreshIxs, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSwapCollateralTx, makeSwapDebtTx, makeTransactionMessage, makeTransferAccountIx, makeTransferAccountTx, makeTransferPositionsTx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateOrderTx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapPythBanksToOraclePrices, marginfiAccountToDto, maxSlippageU32ToPercent, nativeToUi, needsPremiumRefresh, oraclePriceToDto, parseEmodeTag, parseOraclePriceData as parsePriceInfo, parseRpcPythPriceData, patchDepositAmount, percentToMaxSlippageU32, prependOrderCloses, rateFromU32, requireBank, requireTokenProgram, resolveAmount, resolveOrderLegs, resolvePinnedSwapRoute, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeInstruction, serializeSwapEngineRequest, serializeSwapEngineResult, setOraclePriceIx, shortenAddress, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toAccountRole, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, withKaminoReserveEmergency, withLookupTables, wrappedI80F48toBigNumber };
6712
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, AccountFlags, AccountType, type ActionEmodeImpact, type ActionTxParams, type ActiveEmodePair, type AddBankConfig, type Amount, type AmountType, type AppendPremiumRefreshParams, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigDto, type BankConfigFastOpt, BankConfigFlag, type BankConfigGovOpt, type BankConfigOpt, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataMap, type BankMap, type BankMetadata, type BankMetrics, type BankOutflowRateLimit, type BankRateLimiterDto, type BankRateLimiterType, type BankType, type BankTypeDto, type BankVenueStates, type BridgeLeg, type BridgeOpts, type BridgedTxResult, type BuildContext, type BulkLendTxsResult, CIRCUIT_BREAKER_ENABLED_FLAG, type ClassifiedPosition, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxDepositForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputePremiumRatesParams, type ComputeUsdValueParams, ConfigRaw, DEFAULT_ADDRESS, DEFAULT_BRIDGE_MINTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_BALANCE_THRESHOLD, EXECUTION_HEADROOM_SECONDS, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsType, EmodeTag, type Environment, FLASHLOAN_ENABLED_FLAG, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InterestRateConfig, type InterestRateConfigDto, type InterestRateConfigOpt, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, KAMINO_MARKET_EMERGENCY_FLAG, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_BALANCES, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_COSTLY_POSITIONS, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeBeginFlashLoanIxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBridgedLoopTxParams, type MakeBridgedSwapCollateralTxParams, type MakeBridgedSwapDebtTxParams, type MakeBridgedTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, type MakeCloseAccountIxOpts, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeCloseOrderIxOpts, type MakeCloseOrderIxParams, type MakeCloseOrderTxParams, type MakeCreateAccountIxOpts, type MakeCreateAccountIxParams, type MakeCreateAccountTxParams, type MakeCreateMissingAtaIxsParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeEndFlashLoanIxParams, type MakeFlashLoanTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeOrderChangesIxsParams, type MakeOrderChangesTxParams, type MakePlaceOrderIxOpts, type MakePlaceOrderIxParams, type MakePlaceOrderTxParams, type MakePremiumRefreshIxsParams, type MakePulseHealthIxOpts, type MakePulseHealthIxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferAccountIxOpts, type MakeTransferAccountIxParams, type MakeTransferAccountTxParams, type MakeTransferPositionsTxParams, type MakeUpdateOrderTxParams, type MakeVaultCompleteWithdrawalIxParams, type MakeVaultCompleteWithdrawalTxParams, type MakeVaultDepositIxParams, type MakeVaultDepositTxParams, type MakeVaultDepositWithSwapTxParams, type MakeVaultWithdrawIxParams, type MakeVaultWithdrawTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, MarginfiAccount, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupType, type MarginfiGroupTypeDto, type MintAuthorityBalance, type MintData, type MintDataMap, type MultiplierAccountState, type MultiplierAccountStates, OperationalState, type OracleConfigOpt, type OracleMultiplierBankInput, type OracleMultiplierServiceOpts, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type OracleSourceKey, type OrderChangesParams, type OrderTrigger, type OrderTriggerKind, type OrderTriggerParams, type OrderType, 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, PDA_ORDER_SEED, PREMIUM_ACTIVE_FLAG, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PremiumAction, type PremiumCollateralBreakdown, type PremiumEntry, type PremiumImpact, type PremiumRefreshParams, type PrependOrderClosesParams, PriceBias, type PriceWithConfidence, type PriceWithConfidenceDto, Project0Client, type Project0Config, Project0ConfigRaw, type ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowType, type RatePoint, type RatePointDto, type ResolvedPinnedSwapRoute, RiskTier, type RollPtOpts, type RollQuoteSimResult, type RollQuoteSimulator, type RollQuoteTokenBalance, SECONDS_PER_YEAR, SEND_PIPELINE_ROOM, SINGLE_POOL_PROGRAM_ID, SIZING_BLOCKHASH, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_ACCOUNT_SIZE, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type ScopeOracleServiceOpts, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SolanaTransaction, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, type SwapFlowRpc, type SwapFlowTxParams, type SwapFlowTxResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, TOKEN_2022_PROGRAM_ID, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, type TransactionFormat, TransactionType, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, type TypedAmount, U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, V1_TRANSACTION_CONFIG, VENUE_AVAILABLE_LIQUIDITY_BUFFER, WSOL_MINT, type WrapSolOpts, type WrappedI80F48, ZERO_ORACLE_KEY, addOracleToBanksIx, adjustPriceComponent, appendPremiumRefresh, aprToApy, apyToApr, balanceToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, buildOrderTrigger, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compareAddressBytes, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalancePremium, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankOutflowRateLimit, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccounts, computeHealthCacheStatus, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeOracleMultiplier, computeOracleMultipliers, computeOrderPairNetValue, computePremiumBreakdown, computePremiumImpact, computePremiumRatesByBank, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computePtMultiplier, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeStakedBankMultipliers, computeTvl, computeUsdValue, computeUtilizationRate, computeVenueAvailableLiquidity, configureScopeOracleIx, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeBank, decodeMarginfiAccount, decodeMultiplierAccount, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deriveOrderPda, deserializeInstruction, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankRateLimiter, dtoToEmodeSettings, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, exceedsCostlyPositionLimit, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaDepositPolicy, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchGammaWithdrawalPolicy, fetchGlobalFeeWallet, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMultipleBanks, fetchMultiplierAccountStates, fetchMultiplierAccountStatesFromAPI, fetchOracleData, fetchOracleMultipliers, fetchOracleMultipliersFromAPI, fetchOracleMultipliersFromChain, fetchOrderFees, fetchOrdersForAccount, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchScopeOracleData, fetchScopeOraclePricesFromAPI, fetchScopeOraclePricesFromChain, filterRouteSetupIxs, findRandomAvailableAccountIndex, fitsInOneTransaction, freezeBankConfigIx, generateDummyMarginfiAccount, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankLiquidationFees, getConfig, getEffectiveDepositLimit, getEmodePairs, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleMultiplierBankInput, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBankCircuitBreakerHalted, isBorrowLimitActive, isBridgeConflictError, isCostlyBank, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBridgedTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseAccountIx, makeCloseAccountTx, makeCloseOrderIx, makeCloseOrderTx, makeCreateAccountIx, makeCreateAccountIxWithProjection, makeCreateAccountTx, makeCreateAccountTxWithProjection, makeCreateMissingAtaIxs, makeDepositIx, makeDepositTx, makeEndFlashLoanIx, makeFlashLoanTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makeOrderChangesIxs, makeOrderChangesTx, makePlaceOrderIx, makePlaceOrderTx, makePoolAddBankIx, makePoolConfigureBankGovIx, makePoolConfigureBankIx, makePreludeTxs, makePremiumRefreshIxs, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSwapCollateralTx, makeSwapDebtTx, makeTransactionMessage, makeTransferAccountIx, makeTransferAccountTx, makeTransferPositionsTx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateOrderTx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapPythBanksToOraclePrices, marginfiAccountToDto, maxSlippageU32ToPercent, nativeToUi, needsPremiumRefresh, oraclePriceToDto, parseEmodeTag, parseOraclePriceData as parsePriceInfo, parseRpcPythPriceData, patchDepositAmount, percentToMaxSlippageU32, prependOrderCloses, rateFromU32, requireBank, requireTokenProgram, resolveAmount, resolveOrderLegs, resolvePinnedSwapRoute, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeInstruction, serializeSwapEngineRequest, serializeSwapEngineResult, setOraclePriceIx, shortenAddress, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toAccountRole, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, withKaminoReserveEmergency, withLookupTables, wrappedI80F48toBigNumber };
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as superstruct from 'superstruct';
2
2
  import { Infer } from 'superstruct';
3
3
  import * as _solana_kit from '@solana/kit';
4
4
  import { Transaction, Address, TransactionError, Instruction, TransactionSigner, AddressesByLookupTableAddress, TransactionMessage, TransactionMessageWithFeePayer, TransactionMessageWithBlockhashLifetime, BlockhashLifetimeConstraint, ReadonlyUint8Array, Rpc, GetAccountInfoApi, GetMultipleAccountsApi, GetLatestBlockhashApi, GetTokenLargestAccountsApi, SimulateTransactionApi, GetProgramAccountsApi, GetEpochInfoApi, GetMinimumBalanceForRentExemptionApi, ProgramDerivedAddress, AccountRole, Slot, EncodedAccount, SolanaRpcApi } from '@solana/kit';
5
- import { K as KaminoReserve, D as DriftSpotMarket, J as JupTokenReserve, G as GammaLpVault, a as GammaWithdrawReceipt, b as KaminoStates, c as DriftStates, d as JupLendStates } from './types-DvtvVd73.js';
5
+ import { K as KaminoReserve, D as DriftSpotMarket, J as JupTokenReserve, G as GammaLpVault, a as GammaWithdrawReceipt, b as GammaDepositPolicy, c as GammaWithdrawalPolicy, d as KaminoStates, e as DriftStates, f as JupLendStates } from './types-ChkgWMym.js';
6
6
 
7
7
  interface RpcSimulateBundleTransactionResult {
8
8
  err?: TransactionError;
@@ -854,9 +854,13 @@ declare enum HealthCacheFlags {
854
854
  */
855
855
  ORACLE_OK = 4
856
856
  }
857
+ /** Where an account's `healthCache` values come from. */
857
858
  declare enum HealthCacheStatus {
859
+ /** As stored on-chain, not refreshed since the account's last instruction */
858
860
  UNSET = 0,
861
+ /** Refreshed by a simulated `pulse_health`: values, prices and flags come from the program */
859
862
  ONCHAIN = 1,
863
+ /** Computed locally from balances and oracle prices after the simulation failed; no prices or flags */
860
864
  COMPUTED = 2
861
865
  }
862
866
  interface HealthCacheType {
@@ -1059,6 +1063,8 @@ declare enum SwapProvider {
1059
1063
  DFLOW = "DFLOW"
1060
1064
  }
1061
1065
  interface SwapApiConfig {
1066
+ /** @deprecated Unused: the Jupiter adapter calls the Router `/build` endpoint and the Titan
1067
+ * adapter quotes over `wsUrl`. Will be removed in a future release. */
1062
1068
  basePath?: string;
1063
1069
  /** WebSocket endpoint (e.g. `wss://<host>/api/v1/ws`). Used by the Titan V3
1064
1070
  * adapter, which sends the full footprint template inline over the socket to
@@ -5251,6 +5257,18 @@ declare function fetchGammaLpVault(rpc: Rpc<GetAccountInfoApi>, lpVault: Address
5251
5257
  * @throws if the receipt account isn't a `WithdrawReceipt`
5252
5258
  */
5253
5259
  declare function fetchGammaWithdrawReceipt(rpc: Rpc<GetAccountInfoApi>, user: Address, lpVault: Address): Promise<GammaWithdrawReceipt | null>;
5260
+ /**
5261
+ * Fetches `lpVault`'s deposit policy: its deposit cap and pause switch. `null` when the vault has no
5262
+ * deposit policy account.
5263
+ * @throws if the account isn't a `DepositPolicy`
5264
+ */
5265
+ declare function fetchGammaDepositPolicy(rpc: Rpc<GetAccountInfoApi>, lpVault: Address): Promise<GammaDepositPolicy | null>;
5266
+ /**
5267
+ * Fetches `lpVault`'s withdrawal policy: its withdrawal fee and rolling hourly/daily caps. `null`
5268
+ * when the vault has no withdrawal policy account.
5269
+ * @throws if the account isn't a `WithdrawalPolicy`
5270
+ */
5271
+ declare function fetchGammaWithdrawalPolicy(rpc: Rpc<GetAccountInfoApi>, lpVault: Address): Promise<GammaWithdrawalPolicy | null>;
5254
5272
  /** Token program owning `assetsMint`: Token-2022 when it owns it, the Token program otherwise. */
5255
5273
  declare function resolveVaultTokenProgram(rpc: Rpc<GetAccountInfoApi>, assetsMint: Address): Promise<Address>;
5256
5274
 
@@ -6534,7 +6552,7 @@ declare class MarginfiAccountWrapper {
6534
6552
  makeRepayIx(bankAddress: Address, amount: Amount, repayAll?: boolean, opts?: MakeRepayIxOpts): Promise<_solana_kit.Instruction<string, readonly (_solana_kit.AccountLookupMeta<string, string> | _solana_kit.AccountMeta<string>)[]>[]>;
6535
6553
  /**
6536
6554
  * Withdraw instructions for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
6537
- * balance.
6555
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
6538
6556
  * @throws Error if `amount` isn't positive without `withdrawAll`
6539
6557
  */
6540
6558
  makeWithdrawIx(bankAddress: Address, amount: Amount, withdrawAll?: boolean, opts?: MakeWithdrawIxOpts): Promise<_solana_kit.Instruction<string, readonly (_solana_kit.AccountLookupMeta<string, string> | _solana_kit.AccountMeta<string>)[]>[]>;
@@ -6549,7 +6567,7 @@ declare class MarginfiAccountWrapper {
6549
6567
  makeRepayTx(bankAddress: Address, amount: Amount, repayAll?: boolean, opts?: MakeRepayIxOpts): Promise<SolanaTransaction>;
6550
6568
  /**
6551
6569
  * Withdraw transaction for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
6552
- * balance.
6570
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
6553
6571
  */
6554
6572
  makeWithdrawTx(bankAddress: Address, amount: Amount, withdrawAll?: boolean, opts?: MakeWithdrawIxOpts): Promise<SolanaTransaction>;
6555
6573
  /** Borrow transaction for `amount` (UI units) from `bankAddress`. */
@@ -6691,4 +6709,4 @@ declare class MarginfiAccountWrapper {
6691
6709
  getClient(): Project0Client;
6692
6710
  }
6693
6711
 
6694
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, AccountFlags, AccountType, type ActionEmodeImpact, type ActionTxParams, type ActiveEmodePair, type AddBankConfig, type Amount, type AmountType, type AppendPremiumRefreshParams, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigDto, type BankConfigFastOpt, BankConfigFlag, type BankConfigGovOpt, type BankConfigOpt, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataMap, type BankMap, type BankMetadata, type BankMetrics, type BankOutflowRateLimit, type BankRateLimiterDto, type BankRateLimiterType, type BankType, type BankTypeDto, type BankVenueStates, type BridgeLeg, type BridgeOpts, type BridgedTxResult, type BuildContext, type BulkLendTxsResult, CIRCUIT_BREAKER_ENABLED_FLAG, type ClassifiedPosition, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxDepositForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputePremiumRatesParams, type ComputeUsdValueParams, ConfigRaw, DEFAULT_ADDRESS, DEFAULT_BRIDGE_MINTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_BALANCE_THRESHOLD, EXECUTION_HEADROOM_SECONDS, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsType, EmodeTag, type Environment, FLASHLOAN_ENABLED_FLAG, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InterestRateConfig, type InterestRateConfigDto, type InterestRateConfigOpt, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, KAMINO_MARKET_EMERGENCY_FLAG, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_BALANCES, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_COSTLY_POSITIONS, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeBeginFlashLoanIxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBridgedLoopTxParams, type MakeBridgedSwapCollateralTxParams, type MakeBridgedSwapDebtTxParams, type MakeBridgedTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, type MakeCloseAccountIxOpts, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeCloseOrderIxOpts, type MakeCloseOrderIxParams, type MakeCloseOrderTxParams, type MakeCreateAccountIxOpts, type MakeCreateAccountIxParams, type MakeCreateAccountTxParams, type MakeCreateMissingAtaIxsParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeEndFlashLoanIxParams, type MakeFlashLoanTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeOrderChangesIxsParams, type MakeOrderChangesTxParams, type MakePlaceOrderIxOpts, type MakePlaceOrderIxParams, type MakePlaceOrderTxParams, type MakePremiumRefreshIxsParams, type MakePulseHealthIxOpts, type MakePulseHealthIxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferAccountIxOpts, type MakeTransferAccountIxParams, type MakeTransferAccountTxParams, type MakeTransferPositionsTxParams, type MakeUpdateOrderTxParams, type MakeVaultCompleteWithdrawalIxParams, type MakeVaultCompleteWithdrawalTxParams, type MakeVaultDepositIxParams, type MakeVaultDepositTxParams, type MakeVaultDepositWithSwapTxParams, type MakeVaultWithdrawIxParams, type MakeVaultWithdrawTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, MarginfiAccount, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupType, type MarginfiGroupTypeDto, type MintAuthorityBalance, type MintData, type MintDataMap, type MultiplierAccountState, type MultiplierAccountStates, OperationalState, type OracleConfigOpt, type OracleMultiplierBankInput, type OracleMultiplierServiceOpts, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type OracleSourceKey, type OrderChangesParams, type OrderTrigger, type OrderTriggerKind, type OrderTriggerParams, type OrderType, 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, PDA_ORDER_SEED, PREMIUM_ACTIVE_FLAG, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PremiumAction, type PremiumCollateralBreakdown, type PremiumEntry, type PremiumImpact, type PremiumRefreshParams, type PrependOrderClosesParams, PriceBias, type PriceWithConfidence, type PriceWithConfidenceDto, Project0Client, type Project0Config, Project0ConfigRaw, type ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowType, type RatePoint, type RatePointDto, type ResolvedPinnedSwapRoute, RiskTier, type RollPtOpts, type RollQuoteSimResult, type RollQuoteSimulator, type RollQuoteTokenBalance, SECONDS_PER_YEAR, SEND_PIPELINE_ROOM, SINGLE_POOL_PROGRAM_ID, SIZING_BLOCKHASH, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_ACCOUNT_SIZE, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type ScopeOracleServiceOpts, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SolanaTransaction, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, type SwapFlowRpc, type SwapFlowTxParams, type SwapFlowTxResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, TOKEN_2022_PROGRAM_ID, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, type TransactionFormat, TransactionType, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, type TypedAmount, U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, V1_TRANSACTION_CONFIG, VENUE_AVAILABLE_LIQUIDITY_BUFFER, WSOL_MINT, type WrapSolOpts, type WrappedI80F48, ZERO_ORACLE_KEY, addOracleToBanksIx, adjustPriceComponent, appendPremiumRefresh, aprToApy, apyToApr, balanceToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, buildOrderTrigger, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compareAddressBytes, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalancePremium, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankOutflowRateLimit, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccounts, computeHealthCacheStatus, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeOracleMultiplier, computeOracleMultipliers, computeOrderPairNetValue, computePremiumBreakdown, computePremiumImpact, computePremiumRatesByBank, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computePtMultiplier, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeStakedBankMultipliers, computeTvl, computeUsdValue, computeUtilizationRate, computeVenueAvailableLiquidity, configureScopeOracleIx, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeBank, decodeMarginfiAccount, decodeMultiplierAccount, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deriveOrderPda, deserializeInstruction, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankRateLimiter, dtoToEmodeSettings, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, exceedsCostlyPositionLimit, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchGlobalFeeWallet, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMultipleBanks, fetchMultiplierAccountStates, fetchMultiplierAccountStatesFromAPI, fetchOracleData, fetchOracleMultipliers, fetchOracleMultipliersFromAPI, fetchOracleMultipliersFromChain, fetchOrderFees, fetchOrdersForAccount, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchScopeOracleData, fetchScopeOraclePricesFromAPI, fetchScopeOraclePricesFromChain, filterRouteSetupIxs, findRandomAvailableAccountIndex, fitsInOneTransaction, freezeBankConfigIx, generateDummyMarginfiAccount, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankLiquidationFees, getConfig, getEffectiveDepositLimit, getEmodePairs, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleMultiplierBankInput, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBankCircuitBreakerHalted, isBorrowLimitActive, isBridgeConflictError, isCostlyBank, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBridgedTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseAccountIx, makeCloseAccountTx, makeCloseOrderIx, makeCloseOrderTx, makeCreateAccountIx, makeCreateAccountIxWithProjection, makeCreateAccountTx, makeCreateAccountTxWithProjection, makeCreateMissingAtaIxs, makeDepositIx, makeDepositTx, makeEndFlashLoanIx, makeFlashLoanTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makeOrderChangesIxs, makeOrderChangesTx, makePlaceOrderIx, makePlaceOrderTx, makePoolAddBankIx, makePoolConfigureBankGovIx, makePoolConfigureBankIx, makePreludeTxs, makePremiumRefreshIxs, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSwapCollateralTx, makeSwapDebtTx, makeTransactionMessage, makeTransferAccountIx, makeTransferAccountTx, makeTransferPositionsTx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateOrderTx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapPythBanksToOraclePrices, marginfiAccountToDto, maxSlippageU32ToPercent, nativeToUi, needsPremiumRefresh, oraclePriceToDto, parseEmodeTag, parseOraclePriceData as parsePriceInfo, parseRpcPythPriceData, patchDepositAmount, percentToMaxSlippageU32, prependOrderCloses, rateFromU32, requireBank, requireTokenProgram, resolveAmount, resolveOrderLegs, resolvePinnedSwapRoute, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeInstruction, serializeSwapEngineRequest, serializeSwapEngineResult, setOraclePriceIx, shortenAddress, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toAccountRole, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, withKaminoReserveEmergency, withLookupTables, wrappedI80F48toBigNumber };
6712
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, AccountFlags, AccountType, type ActionEmodeImpact, type ActionTxParams, type ActiveEmodePair, type AddBankConfig, type Amount, type AmountType, type AppendPremiumRefreshParams, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigDto, type BankConfigFastOpt, BankConfigFlag, type BankConfigGovOpt, type BankConfigOpt, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataMap, type BankMap, type BankMetadata, type BankMetrics, type BankOutflowRateLimit, type BankRateLimiterDto, type BankRateLimiterType, type BankType, type BankTypeDto, type BankVenueStates, type BridgeLeg, type BridgeOpts, type BridgedTxResult, type BuildContext, type BulkLendTxsResult, CIRCUIT_BREAKER_ENABLED_FLAG, type ClassifiedPosition, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxDepositForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputePremiumRatesParams, type ComputeUsdValueParams, ConfigRaw, DEFAULT_ADDRESS, DEFAULT_BRIDGE_MINTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_BALANCE_THRESHOLD, EXECUTION_HEADROOM_SECONDS, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsType, EmodeTag, type Environment, FLASHLOAN_ENABLED_FLAG, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InterestRateConfig, type InterestRateConfigDto, type InterestRateConfigOpt, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, KAMINO_MARKET_EMERGENCY_FLAG, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_BALANCES, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_COSTLY_POSITIONS, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeBeginFlashLoanIxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBridgedLoopTxParams, type MakeBridgedSwapCollateralTxParams, type MakeBridgedSwapDebtTxParams, type MakeBridgedTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, type MakeCloseAccountIxOpts, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeCloseOrderIxOpts, type MakeCloseOrderIxParams, type MakeCloseOrderTxParams, type MakeCreateAccountIxOpts, type MakeCreateAccountIxParams, type MakeCreateAccountTxParams, type MakeCreateMissingAtaIxsParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeEndFlashLoanIxParams, type MakeFlashLoanTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeOrderChangesIxsParams, type MakeOrderChangesTxParams, type MakePlaceOrderIxOpts, type MakePlaceOrderIxParams, type MakePlaceOrderTxParams, type MakePremiumRefreshIxsParams, type MakePulseHealthIxOpts, type MakePulseHealthIxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferAccountIxOpts, type MakeTransferAccountIxParams, type MakeTransferAccountTxParams, type MakeTransferPositionsTxParams, type MakeUpdateOrderTxParams, type MakeVaultCompleteWithdrawalIxParams, type MakeVaultCompleteWithdrawalTxParams, type MakeVaultDepositIxParams, type MakeVaultDepositTxParams, type MakeVaultDepositWithSwapTxParams, type MakeVaultWithdrawIxParams, type MakeVaultWithdrawTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, MarginfiAccount, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupType, type MarginfiGroupTypeDto, type MintAuthorityBalance, type MintData, type MintDataMap, type MultiplierAccountState, type MultiplierAccountStates, OperationalState, type OracleConfigOpt, type OracleMultiplierBankInput, type OracleMultiplierServiceOpts, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type OracleSourceKey, type OrderChangesParams, type OrderTrigger, type OrderTriggerKind, type OrderTriggerParams, type OrderType, 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, PDA_ORDER_SEED, PREMIUM_ACTIVE_FLAG, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PremiumAction, type PremiumCollateralBreakdown, type PremiumEntry, type PremiumImpact, type PremiumRefreshParams, type PrependOrderClosesParams, PriceBias, type PriceWithConfidence, type PriceWithConfidenceDto, Project0Client, type Project0Config, Project0ConfigRaw, type ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowType, type RatePoint, type RatePointDto, type ResolvedPinnedSwapRoute, RiskTier, type RollPtOpts, type RollQuoteSimResult, type RollQuoteSimulator, type RollQuoteTokenBalance, SECONDS_PER_YEAR, SEND_PIPELINE_ROOM, SINGLE_POOL_PROGRAM_ID, SIZING_BLOCKHASH, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_ACCOUNT_SIZE, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type ScopeOracleServiceOpts, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SolanaTransaction, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, type SwapFlowRpc, type SwapFlowTxParams, type SwapFlowTxResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, TOKEN_2022_PROGRAM_ID, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, type TransactionFormat, TransactionType, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, type TypedAmount, U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, V1_TRANSACTION_CONFIG, VENUE_AVAILABLE_LIQUIDITY_BUFFER, WSOL_MINT, type WrapSolOpts, type WrappedI80F48, ZERO_ORACLE_KEY, addOracleToBanksIx, adjustPriceComponent, appendPremiumRefresh, aprToApy, apyToApr, balanceToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, buildOrderTrigger, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compareAddressBytes, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalancePremium, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankOutflowRateLimit, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccounts, computeHealthCacheStatus, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeOracleMultiplier, computeOracleMultipliers, computeOrderPairNetValue, computePremiumBreakdown, computePremiumImpact, computePremiumRatesByBank, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computePtMultiplier, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeStakedBankMultipliers, computeTvl, computeUsdValue, computeUtilizationRate, computeVenueAvailableLiquidity, configureScopeOracleIx, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeBank, decodeMarginfiAccount, decodeMultiplierAccount, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deriveOrderPda, deserializeInstruction, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankRateLimiter, dtoToEmodeSettings, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, exceedsCostlyPositionLimit, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaDepositPolicy, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchGammaWithdrawalPolicy, fetchGlobalFeeWallet, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMultipleBanks, fetchMultiplierAccountStates, fetchMultiplierAccountStatesFromAPI, fetchOracleData, fetchOracleMultipliers, fetchOracleMultipliersFromAPI, fetchOracleMultipliersFromChain, fetchOrderFees, fetchOrdersForAccount, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchScopeOracleData, fetchScopeOraclePricesFromAPI, fetchScopeOraclePricesFromChain, filterRouteSetupIxs, findRandomAvailableAccountIndex, fitsInOneTransaction, freezeBankConfigIx, generateDummyMarginfiAccount, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankLiquidationFees, getConfig, getEffectiveDepositLimit, getEmodePairs, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleMultiplierBankInput, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBankCircuitBreakerHalted, isBorrowLimitActive, isBridgeConflictError, isCostlyBank, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBridgedTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseAccountIx, makeCloseAccountTx, makeCloseOrderIx, makeCloseOrderTx, makeCreateAccountIx, makeCreateAccountIxWithProjection, makeCreateAccountTx, makeCreateAccountTxWithProjection, makeCreateMissingAtaIxs, makeDepositIx, makeDepositTx, makeEndFlashLoanIx, makeFlashLoanTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makeOrderChangesIxs, makeOrderChangesTx, makePlaceOrderIx, makePlaceOrderTx, makePoolAddBankIx, makePoolConfigureBankGovIx, makePoolConfigureBankIx, makePreludeTxs, makePremiumRefreshIxs, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSwapCollateralTx, makeSwapDebtTx, makeTransactionMessage, makeTransferAccountIx, makeTransferAccountTx, makeTransferPositionsTx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateOrderTx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapPythBanksToOraclePrices, marginfiAccountToDto, maxSlippageU32ToPercent, nativeToUi, needsPremiumRefresh, oraclePriceToDto, parseEmodeTag, parseOraclePriceData as parsePriceInfo, parseRpcPythPriceData, patchDepositAmount, percentToMaxSlippageU32, prependOrderCloses, rateFromU32, requireBank, requireTokenProgram, resolveAmount, resolveOrderLegs, resolvePinnedSwapRoute, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeInstruction, serializeSwapEngineRequest, serializeSwapEngineResult, setOraclePriceIx, shortenAddress, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toAccountRole, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, withKaminoReserveEmergency, withLookupTables, wrappedI80F48toBigNumber };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { address, blockhash, getBase58Decoder, getAddressEncoder, AccountRole, upgradeRoleToSigner, getProgramDerivedAddress, getU16Encoder, getBase64EncodedWireTransaction, getTransactionMessageSize, getTransactionMessageSizeLimit, pipe, createTransactionMessage, setTransactionMessageFeePayerSigner, setTransactionMessageLifetimeUsingBlockhash, appendTransactionMessageInstructions, setTransactionMessageConfig, compressTransactionMessageUsingAddressLookupTables, fetchEncodedAccount, parseBase64RpcAccount, unwrapOption, getBase64Decoder, isWritableRole, isSignerRole, getBase64Encoder, fetchAddressesForLookupTables, getAddressDecoder, createNoopSigner, compileTransactionMessage, fetchEncodedAccounts, assertAccountExists, compileTransaction, generateKeyPairSigner, getU32Decoder, isInstructionWithData, containsBytes, fetchJsonParsedAccounts, assertAccountDecoded, getU64Encoder, SolanaError, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, assertIsInstructionWithAccounts, getStructDecoder, fixDecoderSize, getU8Decoder, getI64Decoder, getU64Decoder, getI32Decoder, getU16Decoder, getArrayDecoder, getBytesDecoder, getBytesEncoder, upgradeRoleToWritable, addDecoderSizePrefix, getUtf8Decoder, fixEncoderSize, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, transformEncoder, getStructEncoder, getOptionEncoder, getU8Encoder, getU32Encoder, getBooleanEncoder, getArrayEncoder, getDiscriminatedUnionDecoder, getUnitDecoder, getTupleDecoder, getU128Decoder, getBooleanDecoder, getI16Decoder, getEnumDecoder, getF64Encoder, getOptionDecoder, getEnumEncoder, getDiscriminatedUnionEncoder, decodeAccount, getF64Decoder } from '@solana/kit';
1
+ import { address, blockhash, getBase58Decoder, getAddressEncoder, AccountRole, upgradeRoleToSigner, getProgramDerivedAddress, getU16Encoder, getBase64EncodedWireTransaction, getTransactionMessageSize, getTransactionMessageSizeLimit, pipe, createTransactionMessage, setTransactionMessageFeePayerSigner, setTransactionMessageLifetimeUsingBlockhash, appendTransactionMessageInstructions, setTransactionMessageConfig, compressTransactionMessageUsingAddressLookupTables, fetchEncodedAccount, parseBase64RpcAccount, unwrapOption, getBase64Decoder, isWritableRole, isSignerRole, getBase64Encoder, fetchAddressesForLookupTables, getAddressDecoder, createNoopSigner, compileTransactionMessage, fetchEncodedAccounts, assertAccountExists, compileTransaction, generateKeyPairSigner, getU32Decoder, isInstructionWithData, containsBytes, fetchJsonParsedAccounts, assertAccountDecoded, getU64Encoder, SolanaError, SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE, assertIsInstructionWithAccounts, getStructDecoder, fixDecoderSize, getU8Decoder, getI64Decoder, getU64Decoder, getI32Decoder, getU16Decoder, getArrayDecoder, getBytesDecoder, getBytesEncoder, upgradeRoleToWritable, addDecoderSizePrefix, getUtf8Decoder, getBooleanDecoder, fixEncoderSize, SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION, SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS, transformEncoder, getStructEncoder, getOptionEncoder, getU8Encoder, getU32Encoder, getBooleanEncoder, getArrayEncoder, getDiscriminatedUnionDecoder, getUnitDecoder, getTupleDecoder, getU128Decoder, getI16Decoder, getEnumDecoder, getF64Encoder, getOptionDecoder, getEnumEncoder, getDiscriminatedUnionEncoder, decodeAccount, getF64Decoder } from '@solana/kit';
2
2
  import { object, string, enums, array, assert } from 'superstruct';
3
3
  import { BigNumber } from 'bignumber.js';
4
4
  import { Decimal } from 'decimal.js';
@@ -18237,7 +18237,6 @@ function deserializeJupiterInstruction(instruction) {
18237
18237
  function toJupiterConfig(apiConfig) {
18238
18238
  if (!apiConfig) return void 0;
18239
18239
  return {
18240
- basePath: apiConfig.basePath,
18241
18240
  apiKey: apiConfig.apiKey,
18242
18241
  headers: apiConfig.headers
18243
18242
  };
@@ -20185,14 +20184,16 @@ async function simulateAccountHealthCacheWithFallback(params) {
20185
20184
  marginfiAccount,
20186
20185
  bankIntegrationMap
20187
20186
  });
20188
- marginfiAccount = parseMarginfiAccountRaw(params.marginfiAccount.address, {
20189
- ...simulatedAccount,
20187
+ const simulated = parseMarginfiAccountRaw(params.marginfiAccount.address, simulatedAccount);
20188
+ marginfiAccount = {
20189
+ ...simulated,
20190
20190
  healthCache: {
20191
- ...simulatedAccount.healthCache,
20192
- assetValueEquity: bigNumberToWrappedI80F48(assetValueEquity),
20193
- liabilityValueEquity: bigNumberToWrappedI80F48(liabilityValueEquity)
20191
+ ...simulated.healthCache,
20192
+ assetValueEquity,
20193
+ liabilityValueEquity,
20194
+ simulationStatus: 1 /* ONCHAIN */
20194
20195
  }
20195
- });
20196
+ };
20196
20197
  } catch (e) {
20197
20198
  const { assets: assetValueMaint, liabilities: liabilityValueMaint } = computeHealthComponentsFromBalances({
20198
20199
  activeBalances,
@@ -22998,6 +22999,25 @@ async function makeMergeStakeAccountsTx({
22998
22999
  type: "MERGE_STAKE_ACCOUNTS" /* MERGE_STAKE_ACCOUNTS */
22999
23000
  };
23000
23001
  }
23002
+ var DEPOSIT_POLICY_DISCRIMINATOR = new Uint8Array([
23003
+ 159,
23004
+ 243,
23005
+ 65,
23006
+ 242,
23007
+ 81,
23008
+ 27,
23009
+ 41,
23010
+ 167
23011
+ ]);
23012
+ function getDepositPolicyDecoder() {
23013
+ return getStructDecoder([
23014
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
23015
+ ["lpVault", getAddressDecoder()],
23016
+ ["capacityAssets", getU64Decoder()],
23017
+ ["depositsPaused", getBooleanDecoder()],
23018
+ ["bump", getU8Decoder()]
23019
+ ]);
23020
+ }
23001
23021
  var LP_VAULT_DISCRIMINATOR = new Uint8Array([
23002
23022
  189,
23003
23023
  45,
@@ -23031,6 +23051,30 @@ function getLpVaultDecoder() {
23031
23051
  ["keeperAuthority", getAddressDecoder()]
23032
23052
  ]);
23033
23053
  }
23054
+ var WITHDRAWAL_POLICY_DISCRIMINATOR = new Uint8Array([
23055
+ 52,
23056
+ 231,
23057
+ 68,
23058
+ 59,
23059
+ 247,
23060
+ 250,
23061
+ 119,
23062
+ 244
23063
+ ]);
23064
+ function getWithdrawalPolicyDecoder() {
23065
+ return getStructDecoder([
23066
+ ["discriminator", fixDecoderSize(getBytesDecoder(), 8)],
23067
+ ["lpVault", getAddressDecoder()],
23068
+ ["withdrawalFeeBps", getU16Decoder()],
23069
+ ["hourlyWithdrawalCapBps", getU16Decoder()],
23070
+ ["dailyWithdrawalCapBps", getU16Decoder()],
23071
+ ["hourlyWithdrawnAssets", getU64Decoder()],
23072
+ ["dailyWithdrawnAssets", getU64Decoder()],
23073
+ ["hourlyWindowStart", getI64Decoder()],
23074
+ ["dailyWindowStart", getI64Decoder()],
23075
+ ["bump", getU8Decoder()]
23076
+ ]);
23077
+ }
23034
23078
  var WITHDRAW_RECEIPT_DISCRIMINATOR = new Uint8Array([
23035
23079
  132,
23036
23080
  238,
@@ -23602,6 +23646,28 @@ function decodeGammaWithdrawReceipt(data) {
23602
23646
  "Gamma WithdrawReceipt"
23603
23647
  );
23604
23648
  }
23649
+ function decodeGammaDepositPolicy(data) {
23650
+ return decodeAccountData(
23651
+ data,
23652
+ DEPOSIT_POLICY_DISCRIMINATOR,
23653
+ getDepositPolicyDecoder(),
23654
+ "Gamma DepositPolicy"
23655
+ );
23656
+ }
23657
+ function decodeGammaWithdrawalPolicy(data) {
23658
+ return decodeAccountData(
23659
+ data,
23660
+ WITHDRAWAL_POLICY_DISCRIMINATOR,
23661
+ getWithdrawalPolicyDecoder(),
23662
+ "Gamma WithdrawalPolicy"
23663
+ );
23664
+ }
23665
+ function deriveGammaDepositPolicy(lpVault) {
23666
+ return findDepositPolicyPda({ lpVault });
23667
+ }
23668
+ function deriveGammaWithdrawalPolicy(lpVault) {
23669
+ return findWithdrawalPolicyPda({ lpVault });
23670
+ }
23605
23671
  function deriveGammaWithdrawReceipt(user, lpVault) {
23606
23672
  return findWithdrawReceiptPda({ crossChainWithdrawer: user, lpVault });
23607
23673
  }
@@ -23620,6 +23686,16 @@ async function fetchGammaWithdrawReceipt(rpc, user, lpVault) {
23620
23686
  const account = await fetchEncodedAccount(rpc, receipt);
23621
23687
  return account.exists ? decodeGammaWithdrawReceipt(account.data) : null;
23622
23688
  }
23689
+ async function fetchGammaDepositPolicy(rpc, lpVault) {
23690
+ const [policy] = await deriveGammaDepositPolicy(lpVault);
23691
+ const account = await fetchEncodedAccount(rpc, policy);
23692
+ return account.exists ? decodeGammaDepositPolicy(account.data) : null;
23693
+ }
23694
+ async function fetchGammaWithdrawalPolicy(rpc, lpVault) {
23695
+ const [policy] = await deriveGammaWithdrawalPolicy(lpVault);
23696
+ const account = await fetchEncodedAccount(rpc, policy);
23697
+ return account.exists ? decodeGammaWithdrawalPolicy(account.data) : null;
23698
+ }
23623
23699
  async function resolveVaultTokenProgram(rpc, assetsMint) {
23624
23700
  const account = await fetchEncodedAccount(rpc, assetsMint);
23625
23701
  return account.exists && account.programAddress === TOKEN_2022_PROGRAM_ID ? TOKEN_2022_PROGRAM_ID : TOKEN_PROGRAM_ADDRESS;
@@ -24690,7 +24766,7 @@ var MarginfiAccountWrapper = class {
24690
24766
  }
24691
24767
  /**
24692
24768
  * Withdraw instructions for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
24693
- * balance.
24769
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
24694
24770
  * @throws Error if `amount` isn't positive without `withdrawAll`
24695
24771
  */
24696
24772
  async makeWithdrawIx(bankAddress, amount, withdrawAll = false, opts = {}) {
@@ -24701,7 +24777,10 @@ var MarginfiAccountWrapper = class {
24701
24777
  ...await this.lendingContext(bankAddress),
24702
24778
  amount,
24703
24779
  withdrawAll,
24704
- opts
24780
+ opts: {
24781
+ groupRateLimiterEnabled: isGroupRateLimiterEnabled(this.client.group.rateLimiter),
24782
+ ...opts
24783
+ }
24705
24784
  });
24706
24785
  }
24707
24786
  /**
@@ -24731,14 +24810,17 @@ var MarginfiAccountWrapper = class {
24731
24810
  }
24732
24811
  /**
24733
24812
  * Withdraw transaction for `amount` (UI units) from `bankAddress`; `withdrawAll` closes the
24734
- * balance.
24813
+ * balance. `opts.groupRateLimiterEnabled` defaults to the group's limiter state.
24735
24814
  */
24736
24815
  async makeWithdrawTx(bankAddress, amount, withdrawAll = false, opts = {}) {
24737
24816
  return this.account.makeWithdrawTx({
24738
24817
  ...await this.lendingContext(bankAddress),
24739
24818
  amount,
24740
24819
  withdrawAll,
24741
- opts
24820
+ opts: {
24821
+ groupRateLimiterEnabled: isGroupRateLimiterEnabled(this.client.group.rateLimiter),
24822
+ ...opts
24823
+ }
24742
24824
  });
24743
24825
  }
24744
24826
  /** Borrow transaction for `amount` (UI units) from `bankAddress`. */
@@ -25344,6 +25426,6 @@ var HealthCache = class _HealthCache {
25344
25426
  }
25345
25427
  };
25346
25428
 
25347
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, CIRCUIT_BREAKER_ENABLED_FLAG, DEFAULT_ADDRESS, DEFAULT_BRIDGE_MINTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_BALANCE_THRESHOLD, EXECUTION_HEADROOM_SECONDS, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, KAMINO_MARKET_EMERGENCY_FLAG, LST_MINT, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_BALANCES, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_COSTLY_POSITIONS, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup2 as OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PDA_ORDER_SEED, PREMIUM_ACTIVE_FLAG, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier2 as RiskTier, SECONDS_PER_YEAR, SEND_PIPELINE_ROOM, SINGLE_POOL_PROGRAM_ID, SIZING_BLOCKHASH, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_ACCOUNT_SIZE, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TOKEN_2022_PROGRAM_ID, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, U64_MAX2 as U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, V1_TRANSACTION_CONFIG, VENUE_AVAILABLE_LIQUIDITY_BUFFER, WSOL_MINT, ZERO_ORACLE_KEY, addOracleToBanksIx, adjustPriceComponent, appendPremiumRefresh, aprToApy, apyToApr, balanceToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, buildOrderTrigger, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compareAddressBytes, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalancePremium, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankOutflowRateLimit, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccounts, computeHealthCacheStatus, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeOracleMultiplier, computeOracleMultipliers, computeOrderPairNetValue, computePremiumBreakdown, computePremiumImpact, computePremiumRatesByBank, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computePtMultiplier, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeStakedBankMultipliers, computeTvl, computeUsdValue, computeUtilizationRate, computeVenueAvailableLiquidity, configureScopeOracleIx, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeBank, decodeMarginfiAccount, decodeMultiplierAccount, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deriveOrderPda, deserializeInstruction, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankRateLimiter, dtoToEmodeSettings, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, exceedsCostlyPositionLimit, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchGlobalFeeWallet, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMultipleBanks, fetchMultiplierAccountStates, fetchMultiplierAccountStatesFromAPI, fetchOracleData, fetchOracleMultipliers, fetchOracleMultipliersFromAPI, fetchOracleMultipliersFromChain, fetchOrderFees, fetchOrdersForAccount, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchScopeOracleData, fetchScopeOraclePricesFromAPI, fetchScopeOraclePricesFromChain, filterRouteSetupIxs, findRandomAvailableAccountIndex, fitsInOneTransaction, freezeBankConfigIx, generateDummyMarginfiAccount, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankLiquidationFees, getConfig, getEffectiveDepositLimit, getEmodePairs, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleMultiplierBankInput, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBankCircuitBreakerHalted, isBorrowLimitActive, isBridgeConflictError, isCostlyBank, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx2 as makeBeginFlashLoanIx, makeBorrowIx2 as makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBridgedTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseAccountIx2 as makeCloseAccountIx, makeCloseAccountTx, makeCloseOrderIx2 as makeCloseOrderIx, makeCloseOrderTx, makeCreateAccountIx, makeCreateAccountIxWithProjection, makeCreateAccountTx, makeCreateAccountTxWithProjection, makeCreateMissingAtaIxs, makeDepositIx2 as makeDepositIx, makeDepositTx, makeEndFlashLoanIx2 as makeEndFlashLoanIx, makeFlashLoanTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makeOrderChangesIxs, makeOrderChangesTx, makePlaceOrderIx2 as makePlaceOrderIx, makePlaceOrderTx, makePoolAddBankIx2 as makePoolAddBankIx, makePoolConfigureBankGovIx2 as makePoolConfigureBankGovIx, makePoolConfigureBankIx2 as makePoolConfigureBankIx, makePreludeTxs, makePremiumRefreshIxs, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx2 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSwapCollateralTx, makeSwapDebtTx, makeTransactionMessage, makeTransferAccountIx, makeTransferAccountTx, makeTransferPositionsTx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateOrderTx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeWithdrawIx2 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapPythBanksToOraclePrices, marginfiAccountToDto, maxSlippageU32ToPercent, nativeToUi, needsPremiumRefresh, oraclePriceToDto, parseEmodeTag, parseOraclePriceData as parsePriceInfo, parseRpcPythPriceData, patchDepositAmount, percentToMaxSlippageU32, prependOrderCloses, rateFromU32, requireBank, requireTokenProgram, resolveAmount, resolveOrderLegs, resolvePinnedSwapRoute, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeInstruction, serializeSwapEngineRequest, serializeSwapEngineResult, setOraclePriceIx, shortenAddress, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toAccountRole, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, withKaminoReserveEmergency, withLookupTables, wrappedI80F48toBigNumber };
25429
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, AssetTag, BUNDLE_TX_SIZE, Balance, Bank, BankConfig, BankConfigFlag, CIRCUIT_BREAKER_ENABLED_FLAG, DEFAULT_ADDRESS, DEFAULT_BRIDGE_MINTS, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, EMPTY_BALANCE_THRESHOLD, EXECUTION_HEADROOM_SECONDS, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodeSettings, EmodeTag, FLASHLOAN_ENABLED_FLAG, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, HealthCacheSimulationError, HealthCacheStatus, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, KAMINO_MARKET_EMERGENCY_FLAG, LST_MINT, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_BALANCES, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_COSTLY_POSITIONS, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, MarginRequirementType, MarginfiAccount, MarginfiAccountWrapper, MarginfiGroup, OperationalState, OracleSetup2 as OracleSetup, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PDA_ORDER_SEED, PREMIUM_ACTIVE_FLAG, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, PriceBias, Project0Client, RiskTier2 as RiskTier, SECONDS_PER_YEAR, SEND_PIPELINE_ROOM, SINGLE_POOL_PROGRAM_ID, SIZING_BLOCKHASH, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_ACCOUNT_SIZE, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, SwapProvider, TOKEN_2022_PROGRAM_ID, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionBuildingError, TransactionBuildingErrorCode, TransactionConfigMap, TransactionType, U64_MAX2 as U64_MAX, USDC_DECIMALS, USDC_MINT, USDT_MINT, V1_TRANSACTION_CONFIG, VENUE_AVAILABLE_LIQUIDITY_BUFFER, WSOL_MINT, ZERO_ORACLE_KEY, addOracleToBanksIx, adjustPriceComponent, appendPremiumRefresh, aprToApy, apyToApr, balanceToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, buildOrderTrigger, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compareAddressBytes, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeAccrualProjectionSeconds, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalancePremium, computeBalanceUsdValue, computeBankAvailableLiquidity, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankOutflowRateLimit, computeBankPoolSize, computeBankProjectedAvailableLiquidity, computeBankRateLimitRemaining, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeGroupRateLimitRemainingUsd, computeHealthAccounts, computeHealthCacheStatus, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxDepositForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeOracleMultiplier, computeOracleMultipliers, computeOrderPairNetValue, computePremiumBreakdown, computePremiumImpact, computePremiumRatesByBank, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computePtMultiplier, computeQuantity, computeQuantityUi, computeRateLimitWindowRemainingCapacity, computeRateLimiterRemainingCapacity, computeRemainingCapacity, computeStakedBankMultipliers, computeTvl, computeUsdValue, computeUtilizationRate, computeVenueAvailableLiquidity, configureScopeOracleIx, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeBank, decodeMarginfiAccount, decodeMultiplierAccount, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deriveOrderPda, deserializeInstruction, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankRateLimiter, dtoToEmodeSettings, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, exceedsCostlyPositionLimit, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchGammaDepositPolicy, fetchGammaLpVault, fetchGammaWithdrawReceipt, fetchGammaWithdrawalPolicy, fetchGlobalFeeWallet, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMultipleBanks, fetchMultiplierAccountStates, fetchMultiplierAccountStatesFromAPI, fetchOracleData, fetchOracleMultipliers, fetchOracleMultipliersFromAPI, fetchOracleMultipliersFromChain, fetchOrderFees, fetchOrdersForAccount, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchScopeOracleData, fetchScopeOraclePricesFromAPI, fetchScopeOraclePricesFromChain, filterRouteSetupIxs, findRandomAvailableAccountIndex, fitsInOneTransaction, freezeBankConfigIx, generateDummyMarginfiAccount, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankLiquidationFees, getConfig, getEffectiveDepositLimit, getEmodePairs, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleMultiplierBankInput, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBankCircuitBreakerHalted, isBorrowLimitActive, isBridgeConflictError, isCostlyBank, isDecomposableSwapError, isDepositIx, isDepositLimitActive, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isWeightedPrice, isWholePosition, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx2 as makeBeginFlashLoanIx, makeBorrowIx2 as makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBridgedTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseAccountIx2 as makeCloseAccountIx, makeCloseAccountTx, makeCloseOrderIx2 as makeCloseOrderIx, makeCloseOrderTx, makeCreateAccountIx, makeCreateAccountIxWithProjection, makeCreateAccountTx, makeCreateAccountTxWithProjection, makeCreateMissingAtaIxs, makeDepositIx2 as makeDepositIx, makeDepositTx, makeEndFlashLoanIx2 as makeEndFlashLoanIx, makeFlashLoanTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makeOrderChangesIxs, makeOrderChangesTx, makePlaceOrderIx2 as makePlaceOrderIx, makePlaceOrderTx, makePoolAddBankIx2 as makePoolAddBankIx, makePoolConfigureBankGovIx2 as makePoolConfigureBankGovIx, makePoolConfigureBankIx2 as makePoolConfigureBankIx, makePreludeTxs, makePremiumRefreshIxs, makePriorityFeeMicroIx, makePulseHealthIx2 as makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx2 as makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSwapCollateralTx, makeSwapDebtTx, makeTransactionMessage, makeTransferAccountIx, makeTransferAccountTx, makeTransferPositionsTx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateOrderTx, makeVaultCompleteWithdrawalIx, makeVaultCompleteWithdrawalTx, makeVaultDepositIx, makeVaultDepositTx, makeVaultDepositWithSwapTx, makeVaultWithdrawIx, makeVaultWithdrawTx, makeWithdrawIx2 as makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapPythBanksToOraclePrices, marginfiAccountToDto, maxSlippageU32ToPercent, nativeToUi, needsPremiumRefresh, oraclePriceToDto, parseEmodeTag, parseOraclePriceData as parsePriceInfo, parseRpcPythPriceData, patchDepositAmount, percentToMaxSlippageU32, prependOrderCloses, rateFromU32, requireBank, requireTokenProgram, resolveAmount, resolveOrderLegs, resolvePinnedSwapRoute, resolveVaultTokenProgram, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeInstruction, serializeSwapEngineRequest, serializeSwapEngineResult, setOraclePriceIx, shortenAddress, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toAccountRole, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, withKaminoReserveEmergency, withLookupTables, wrappedI80F48toBigNumber };
25348
25430
  //# sourceMappingURL=index.js.map
25349
25431
  //# sourceMappingURL=index.js.map