@0dotxyz/p0-ts-sdk 2.5.5-alpha.3 → 2.5.5-alpha.5

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
@@ -136,12 +136,17 @@ declare function isFlashloan(tx: SolanaTransaction): boolean;
136
136
  declare function makeVersionedTransaction(blockhash: Blockhash, transaction: Transaction, payer: PublicKey, addressLookupTables?: AddressLookupTableAccount[]): Promise<VersionedTransaction>;
137
137
  /**
138
138
  * Splits your instructions into as many VersionedTransactions as needed
139
- * so that none exceed MAX_TX_SIZE.
139
+ * so that none exceed MAX_TX_SIZE (minus `sizeMargin`, if given) nor
140
+ * `maxAccountLocks` account locks (if given).
140
141
  */
141
142
  declare function splitInstructionsToFitTransactions(mandatoryIxs: TransactionInstruction[], ixs: TransactionInstruction[], opts: {
142
143
  blockhash: string;
143
144
  payerKey: PublicKey;
144
145
  luts: AddressLookupTableAccount[];
146
+ /** Bytes reserved below MAX_TX_SIZE, e.g. for compute-budget ixs appended at send time. */
147
+ sizeMargin?: number;
148
+ /** Also cap the total account locks per transaction (e.g. MAX_ACCOUNT_LOCKS). */
149
+ maxAccountLocks?: number;
145
150
  }): VersionedTransaction[];
146
151
  /**
147
152
  * Enhances a given transaction with additional metadata.
@@ -1269,9 +1274,7 @@ interface MakeBulkWithdrawTxParams {
1269
1274
  assetShareValueMultiplierByBank: Map<string, BigNumber>;
1270
1275
  /** Token program per withdrawn bank (base58 bank address → token program id). */
1271
1276
  tokenProgramsByBank: Map<string, PublicKey>;
1272
- addressLookupTableAccounts?: AddressLookupTableAccount[];
1273
- /** Whether the group USD rate limiter is enabled (adds an oracle to each withdraw). Default false. */
1274
- groupRateLimiterEnabled?: boolean;
1277
+ luts: AddressLookupTableAccount[];
1275
1278
  crossbarUrl?: string;
1276
1279
  overrideInferAccounts?: {
1277
1280
  group?: PublicKey;
@@ -2578,7 +2581,7 @@ declare function computeTotalOutstandingEmissions(balance: BalanceType, bank: Ba
2578
2581
  * - Including all active banks (excluding any in the exclusion list)
2579
2582
  * - Reserving inactive slots for mandatory banks that aren't currently active
2580
2583
  *
2581
- * @param balances - Current account balances
2584
+ * @param account - The marginfi account whose balances are evaluated
2582
2585
  * @param banksMap - Map of bank addresses to bank data
2583
2586
  * @param mandatoryBanks - Banks that must be included (e.g., for pending transactions)
2584
2587
  * @param excludedBanks - Banks to exclude from health checks
@@ -2586,15 +2589,20 @@ declare function computeTotalOutstandingEmissions(balance: BalanceType, bank: Ba
2586
2589
  *
2587
2590
  * @example
2588
2591
  * ```typescript
2589
- * const healthCheckBanks = computeHealthCheckAccounts(
2590
- * account.balances,
2592
+ * const healthCheckBanks = computeHealthCheckAccounts({
2593
+ * account,
2591
2594
  * banksMap,
2592
- * [newBankToDeposit], // Mandatory: not active yet but will be
2593
- * [closingBank] // Excluded: being closed in this transaction
2594
- * );
2595
+ * mandatoryBanks: [newBankToDeposit], // Not active yet but will be
2596
+ * excludedBanks: [closingBank], // Being closed in this transaction
2597
+ * });
2595
2598
  * ```
2596
2599
  */
2597
- declare function computeHealthCheckAccounts(balances: BalanceType[], banksMap: Map<string, BankType>, mandatoryBanks?: PublicKey[], excludedBanks?: PublicKey[]): BankType[];
2600
+ declare function computeHealthCheckAccounts({ account, banksMap, mandatoryBanks, excludedBanks, }: {
2601
+ account: MarginfiAccountType;
2602
+ banksMap: Map<string, BankType>;
2603
+ mandatoryBanks?: PublicKey[];
2604
+ excludedBanks?: PublicKey[];
2605
+ }): BankType[];
2598
2606
  /**
2599
2607
  * Converts bank objects to health check account metas (public keys).
2600
2608
  *
@@ -2616,14 +2624,17 @@ declare function computeHealthCheckAccounts(balances: BalanceType[], banksMap: M
2616
2624
  *
2617
2625
  * @example
2618
2626
  * ```typescript
2619
- * const healthAccounts = computeHealthAccountMetas(
2620
- * [usdcBank, solBank, kaminoUsdcBank],
2621
- * true // Enable sorting for optimal transaction size
2622
- * );
2627
+ * const healthAccounts = computeHealthAccountMetas({
2628
+ * banksToInclude: [usdcBank, solBank, kaminoUsdcBank],
2629
+ * });
2623
2630
  * // Returns: [bank1, oracle1, bank2, oracle2, bank3, oracle3, kaminoReserve3, ...]
2624
2631
  * ```
2625
2632
  */
2626
- declare function computeHealthAccountMetas(banksToInclude: BankType[], enableSorting?: boolean, trailingBanks?: BankType[]): PublicKey[];
2633
+ declare function computeHealthAccountMetas({ banksToInclude, enableSorting, trailingBanks, }: {
2634
+ banksToInclude: BankType[];
2635
+ enableSorting?: boolean;
2636
+ trailingBanks?: BankType[];
2637
+ }): PublicKey[];
2627
2638
  /**
2628
2639
  * Projects which banks will be active after a series of instructions execute.
2629
2640
  *
@@ -2632,7 +2643,8 @@ declare function computeHealthAccountMetas(banksToInclude: BankType[], enableSor
2632
2643
  * health check account inclusion by predicting which banks are relevant.
2633
2644
  *
2634
2645
  * **Note**: This does NOT simulate Cross-Program Invocations (CPI). Only direct
2635
- * marginfi instructions are considered.
2646
+ * marginfi instructions are considered. Instructions operating on a different
2647
+ * marginfi account than `account` are ignored.
2636
2648
  *
2637
2649
  * Supported instructions:
2638
2650
  * - Deposits: `lendingAccountDeposit`, `kaminoDeposit`, `driftDeposit`, `solendDeposit`
@@ -2640,22 +2652,26 @@ declare function computeHealthAccountMetas(banksToInclude: BankType[], enableSor
2640
2652
  * - Repays: `lendingAccountRepay`
2641
2653
  * - Withdrawals: `lendingAccountWithdraw`, `kaminoWithdraw`, `driftWithdraw`, `solendWithdraw`
2642
2654
  *
2643
- * @param balances - Current account balances
2655
+ * @param account - The marginfi account whose balances are projected
2644
2656
  * @param instructions - Instructions to simulate
2645
2657
  * @param program - Marginfi program for instruction decoding
2646
2658
  * @returns Array of bank public keys that will be active after instruction execution
2647
2659
  *
2648
2660
  * @example
2649
2661
  * ```typescript
2650
- * const projectedBanks = computeProjectedActiveBanksNoCpi(
2651
- * account.balances,
2652
- * [depositIx, borrowIx],
2653
- * marginfiProgram
2654
- * );
2662
+ * const projectedBanks = computeProjectedActiveBanksNoCpi({
2663
+ * account,
2664
+ * instructions: [depositIx, borrowIx],
2665
+ * program: marginfiProgram,
2666
+ * });
2655
2667
  * // Use projectedBanks for health check account selection
2656
2668
  * ```
2657
2669
  */
2658
- declare function computeProjectedActiveBanksNoCpi(balances: BalanceType[], instructions: TransactionInstruction[], program: MarginfiProgram): PublicKey[];
2670
+ declare function computeProjectedActiveBanksNoCpi({ account, instructions, program, }: {
2671
+ account: MarginfiAccountType;
2672
+ instructions: TransactionInstruction[];
2673
+ program: MarginfiProgram;
2674
+ }): PublicKey[];
2659
2675
  /**
2660
2676
  * Computes projected balances after applying a series of instructions.
2661
2677
  *
@@ -2664,12 +2680,13 @@ declare function computeProjectedActiveBanksNoCpi(balances: BalanceType[], instr
2664
2680
  * than `computeProjectedActiveBanksNoCpi` which only tracks active banks.
2665
2681
  *
2666
2682
  * **Note**: This does NOT simulate Cross-Program Invocations (CPI). Only direct
2667
- * marginfi instructions are considered.
2683
+ * marginfi instructions are considered. Instructions operating on a different
2684
+ * marginfi account than `account` are ignored.
2668
2685
  *
2669
2686
  * **Integrated Protocols**: For Kamino/Drift deposits, the `assetShareValueMultiplierByBank`
2670
2687
  * is used to convert cToken amounts to actual asset quantities before computing shares.
2671
2688
  *
2672
- * @param balances - Current account balances
2689
+ * @param account - The marginfi account whose balances are projected
2673
2690
  * @param instructions - Instructions to simulate
2674
2691
  * @param program - Marginfi program for instruction decoding
2675
2692
  * @param banksMap - Map of bank addresses to bank data (needed for share value conversion)
@@ -2681,18 +2698,24 @@ declare function computeProjectedActiveBanksNoCpi(balances: BalanceType[], instr
2681
2698
  *
2682
2699
  * @example
2683
2700
  * ```typescript
2684
- * const result = computeProjectedActiveBalancesNoCpi(
2685
- * account.balances,
2686
- * [depositIx, borrowIx],
2687
- * marginfiProgram,
2701
+ * const result = computeProjectedActiveBalancesNoCpi({
2702
+ * account,
2703
+ * instructions: [depositIx, borrowIx],
2704
+ * program: marginfiProgram,
2688
2705
  * banksMap,
2689
- * { [driftBankAddress]: driftMultiplier }
2690
- * );
2706
+ * assetShareValueMultiplierByBank,
2707
+ * });
2691
2708
  * console.log(`Projected ${result.projectedBalances.length} balances`);
2692
2709
  * console.log(`Impacted ${result.impactedAssetsBanks.length} asset banks`);
2693
2710
  * ```
2694
2711
  */
2695
- declare function computeProjectedActiveBalancesNoCpi(balances: BalanceType[], instructions: TransactionInstruction[], program: MarginfiProgram, banksMap: Map<string, BankType>, assetShareValueMultiplierByBank: Map<string, BigNumber$1>): {
2712
+ declare function computeProjectedActiveBalancesNoCpi({ account, instructions, program, banksMap, assetShareValueMultiplierByBank, }: {
2713
+ account: MarginfiAccountType;
2714
+ instructions: TransactionInstruction[];
2715
+ program: MarginfiProgram;
2716
+ banksMap: Map<string, BankType>;
2717
+ assetShareValueMultiplierByBank: Map<string, BigNumber$1>;
2718
+ }): {
2696
2719
  projectedBalances: BalanceType[];
2697
2720
  impactedAssetsBanks: string[];
2698
2721
  impactedLiabilityBanks: string[];
@@ -3019,11 +3042,7 @@ interface FlashloanSwapConstraints {
3019
3042
  */
3020
3043
  declare function computeFlashLoanNonSwapBudget({ program, marginfiAccount, ixs, bankMap, addressLookupTableAccounts, }: {
3021
3044
  program: MarginfiProgram;
3022
- marginfiAccount: {
3023
- address: PublicKey;
3024
- authority: PublicKey;
3025
- balances: BalanceType[];
3026
- };
3045
+ marginfiAccount: MarginfiAccountType;
3027
3046
  ixs: TransactionInstruction[];
3028
3047
  bankMap: Map<string, BankType>;
3029
3048
  addressLookupTableAccounts: AddressLookupTableAccount[];
@@ -3109,46 +3128,141 @@ declare function isDepositIx(ix: TransactionInstruction): boolean;
3109
3128
  declare function patchDepositAmount(ix: TransactionInstruction, amountNative: BN): void;
3110
3129
 
3111
3130
  /**
3112
- * Which side of a bridged (double-hop) swap touches the bridge token:
3113
- * - `deposit` — the bridge is *deposited* (e.g. collateral-swap: source → bridge → dest).
3114
- * - `borrow` — the bridge is *borrowed* (e.g. debt-swap / loop: borrow bridge, then repay it).
3115
- */
3116
- type BridgeSide = "deposit" | "borrow";
3117
- /**
3118
- * Whether routing through `bankPk` as the bridge would conflict with an existing position on the
3119
- * account. marginfi forbids holding an asset and a liability on the same bank, so the conflict is
3120
- * always *opposite-side*: a deposit-side bridge conflicts with an existing liability there, a
3121
- * borrow-side bridge with an existing asset. Same-side positions are fine (partial-withdraw /
3122
- * exact-repay handle them).
3123
- */
3124
- declare function accountConflictsWithBridge(account: MarginfiAccountType, bankPk: PublicKey, side: BridgeSide): boolean;
3125
- interface ResolveBridgeBanksParams {
3126
- /** Candidate bridge mints in priority order (caller-owned product policy). */
3127
- orderedBridgeMints: PublicKey[];
3128
- /** Banks to resolve mints against (e.g. all of the group's banks). */
3129
- banks: BankType[];
3130
- /** The account the bridge legs run against (for the conflict check). */
3131
+ * Bridge-token candidate filtering for bridged (double-hop) swaps.
3132
+ *
3133
+ * A **bridge token** is NOT a cross-chain bridge: it is the high-liquidity intermediate token
3134
+ * (e.g. USDC or wSOL) that a swap `A → C` is routed *through* — as `A → bridge` + `bridge → C` in
3135
+ * one atomic bundle — when the direct swap can't fit a single transaction or has no route. This
3136
+ * module owns the mechanical filtering of bridge-token candidates; ordering (product policy) and
3137
+ * the one-call builders live in `bridge-routing.utils.ts` and the `makeBridged*Tx` actions.
3138
+ */
3139
+ /**
3140
+ * The side of the marginfi account the bridge token sits on while the bridged bundle executes:
3141
+ * - `deposit` — the bridge token is held as *collateral* (a collateral-swap deposits it between
3142
+ * the two legs: withdraw source → deposit bridge, then withdraw bridge → deposit destination).
3143
+ * - `borrow` — the bridge token is held as *debt* (a debt-swap or loop borrows it in the first
3144
+ * leg and repays it exactly in the second).
3145
+ */
3146
+ type BridgeTokenSide = "deposit" | "borrow";
3147
+ /**
3148
+ * Whether routing through `bridgeBankPk` as the bridge token would conflict with a position the
3149
+ * account already holds on that bank. marginfi forbids holding an asset and a liability on the
3150
+ * same bank, so the conflict is always *opposite-side*: a deposit-side bridge conflicts with an
3151
+ * existing liability there, a borrow-side bridge with an existing asset. Same-side positions are
3152
+ * fine (partial-withdraw / exact-repay handle them).
3153
+ */
3154
+ declare function accountConflictsWithBridgeBank(marginfiAccount: MarginfiAccountType, bridgeBankPk: PublicKey, bridgeTokenSide: BridgeTokenSide): boolean;
3155
+ interface ResolveBridgeCandidateBanksParams {
3156
+ /** Candidate bridge-token mints, highest priority first (product policy — see
3157
+ * `bridge-routing.utils.ts` for the default ordering and the per-call override). */
3158
+ prioritizedBridgeCandidateMints: PublicKey[];
3159
+ /** Banks to resolve the candidate mints against — typically all banks in the marginfi group. */
3160
+ groupBanks: BankType[];
3161
+ /** The account the bridged legs run against (for the conflict check). */
3131
3162
  marginfiAccount: MarginfiAccountType;
3132
- /** Which side the bridge is used on — picks the standard-bank filter and the conflict rule. */
3133
- side: BridgeSide;
3163
+ /** Which side the bridge token is held on — picks the standard-bank filter and the conflict
3164
+ * rule. */
3165
+ bridgeTokenSide: BridgeTokenSide;
3134
3166
  }
3135
3167
  /**
3136
- * Resolve an ordered list of candidate bridge *mints* into usable bridge *banks*, partitioned into
3137
- * those safe to route through and those that conflict with an existing position.
3168
+ * Resolve prioritized bridge-token candidate *mints* into candidate *banks*, partitioned into
3169
+ * those safe to route through and those blocked by an existing account position.
3138
3170
  *
3139
3171
  * For each mint (deduped, in priority order) it picks the standard bank that fits the side
3140
3172
  * ({@link isStandardBorrowable} for `borrow`, {@link isStandardDepositable} for `deposit`) — this
3141
3173
  * skips integration wrappers (`6200`) and `ReduceOnly` banks (`6017`) — then splits by
3142
- * {@link accountConflictsWithBridge}. The caller supplies the ordered mint list (product policy);
3143
- * this owns only the mechanical filtering.
3174
+ * {@link accountConflictsWithBridgeBank}. The caller supplies the prioritized mint list (product
3175
+ * policy); this owns only the mechanical filtering.
3144
3176
  *
3145
- * @returns `bridges` (usable, in priority order) and `conflicts` (resolvable but blocked by an
3146
- * opposite-side position — useful for surfacing a "close that position" message).
3177
+ * @returns `usableBridgeBanks` (safe to route through, in priority order) and
3178
+ * `conflictingBridgeBanks` (resolvable but blocked by an opposite-side position — useful for
3179
+ * surfacing a "close that position" message).
3147
3180
  */
3148
- declare function resolveBridgeBanks(params: ResolveBridgeBanksParams): {
3149
- bridges: BankType[];
3150
- conflicts: BankType[];
3181
+ declare function resolveBridgeCandidateBanks(params: ResolveBridgeCandidateBanksParams): {
3182
+ usableBridgeBanks: BankType[];
3183
+ conflictingBridgeBanks: BankType[];
3184
+ };
3185
+
3186
+ /**
3187
+ * Shared support for the bridged (double-hop) one-call builders.
3188
+ *
3189
+ * A **bridge token** is NOT a cross-chain bridge: it is the high-liquidity intermediate token
3190
+ * (e.g. USDC or wSOL) a swap is routed *through*. When a direct collateral-swap / debt-swap /
3191
+ * loop `A → C` can't be built — the swap doesn't fit one tx (size / account-locks) or has no
3192
+ * route — it can still succeed decomposed into `A → bridge` + `bridge → C`, submitted as ONE
3193
+ * atomic Jito bundle. The per-flow builders live next to their direct builders
3194
+ * (`makeBridgedLoopTx` in `../actions/loop.ts`, `makeBridgedSwapCollateralTx` in
3195
+ * `../actions/swap-collateral.ts`, `makeBridgedSwapDebtTx` in `../actions/swap-debt.ts`); this
3196
+ * module owns the flow-agnostic routing support: candidate ordering/selection, the
3197
+ * candidate-iteration loop (abort / skip-on-failure / conflict surfacing), token-program
3198
+ * resolution, and the shared leg context.
3199
+ *
3200
+ * Candidate *ordering* is product policy: it defaults to {@link DEFAULT_BRIDGE_MINTS} and can be
3201
+ * overridden per call via {@link BridgeOpts.bridgeCandidateMints} (e.g. a correlation-aware
3202
+ * ordering). Candidate *filtering* (standard-bank resolution, opposite-side conflicts) is
3203
+ * mechanical and lives in {@link resolveBridgeCandidateBanks}.
3204
+ */
3205
+ /** Default bridge-token candidates, most-liquid first. */
3206
+ declare const DEFAULT_BRIDGE_MINTS: PublicKey[];
3207
+ /** Per-call knobs for the bridged fallback of the `makeBridged*Tx` builders. */
3208
+ interface BridgeOpts {
3209
+ /**
3210
+ * Candidate bridge-token mints, highest priority first. Defaults to
3211
+ * {@link DEFAULT_BRIDGE_MINTS} (USDC, wSOL, USDT). Source/destination mints are always skipped.
3212
+ */
3213
+ bridgeCandidateMints?: PublicKey[];
3214
+ /** Known token programs by mint (base58) — skips the per-mint RPC owner lookup. */
3215
+ tokenProgramByMint?: Map<string, PublicKey>;
3216
+ /** Override the bundle-size ceiling (see `composeBridgedSwap`). */
3217
+ maxBundleTxs?: number;
3218
+ abortSignal?: AbortSignal;
3219
+ }
3220
+ /** Result of a `makeBridged*Tx` builder — the direct build's result, or the bridged bundle. */
3221
+ interface BridgedTxResult {
3222
+ transactions: SolanaTransaction[];
3223
+ /** Index of the tx that completes the action (the direct action tx, or the bundle's last leg). */
3224
+ actionTxIndex: number;
3225
+ quoteResponse: SwapQuoteResult | undefined;
3226
+ /** The bridge token's mint — set only when the bridged double-hop path was used. */
3227
+ bridgeMint?: PublicKey;
3228
+ }
3229
+ /** A mint's token program: the cache (seedable by the caller), else the mint account's owner. */
3230
+ declare function resolveTokenProgramForMint(mint: PublicKey, connection: Connection, tokenProgramCacheByMint: Map<string, PublicKey>): Promise<PublicKey>;
3231
+ /**
3232
+ * Bridge-token candidate banks for routing `source → bridge → destination`, in priority order,
3233
+ * partitioned into usable and conflict-blocked. Source/destination mints are excluded from the
3234
+ * candidates (a token can't bridge itself).
3235
+ */
3236
+ declare function selectSwapBridges(args: {
3237
+ sourceMint: PublicKey;
3238
+ destinationMint: PublicKey;
3239
+ bankMap: Map<string, BankType>;
3240
+ marginfiAccount: MarginfiAccountType;
3241
+ bridgeTokenSide: BridgeTokenSide;
3242
+ bridgeCandidateMints?: PublicKey[];
3243
+ }): {
3244
+ usableBridgeBanks: BankType[];
3245
+ conflictingBridgeBanks: BankType[];
3151
3246
  };
3247
+ /**
3248
+ * Try each usable bridge-token candidate in priority order until one composes a bundle. A
3249
+ * `buildBundleThroughBridge` that returns null or throws (build failure) moves on to the next
3250
+ * candidate; abort errors always propagate. When NO candidate is usable but some were dropped
3251
+ * solely for an existing opposite-side position, throws
3252
+ * `TransactionBuildingError.bridgeConflict` (the caller-facing "close that position" signal);
3253
+ * otherwise resolves null and the caller rethrows the direct build's error.
3254
+ */
3255
+ declare function tryBridgeCandidates(args: {
3256
+ usableBridgeBanks: BankType[];
3257
+ conflictingBridgeBanks: BankType[];
3258
+ bridgeTokenSide: BridgeTokenSide;
3259
+ abortSignal?: AbortSignal;
3260
+ /** Build the two-leg bundle through one candidate bank; null = didn't work, try the next. */
3261
+ buildBundleThroughBridge: (bridgeBank: BankType) => Promise<BridgedTxResult | null>;
3262
+ }): Promise<BridgedTxResult | null>;
3263
+ /** The flow context shared verbatim by both legs of every bridged build. */
3264
+ type SharedBridgeLegContext = Pick<MakeSwapDebtTxParams, "program" | "marginfiAccount" | "connection" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "assetShareValueMultiplierByBank" | "swapOpts" | "addressLookupTableAccounts" | "overrideInferAccounts" | "crossbarUrl" | "swapEngineRunner">;
3265
+ declare function sharedBridgeLegContext(params: SharedBridgeLegContext): SharedBridgeLegContext;
3152
3266
 
3153
3267
  /**
3154
3268
  * Creates an instruction to close a Marginfi account.
@@ -3247,7 +3361,7 @@ declare function makeCreateAccountIxWithProjection(props: {
3247
3361
  declare function makeCreateMarginfiAccountTx(program: MarginfiProgram, authority: PublicKey, groupAddress: PublicKey, addressLookupTables: AddressLookupTableAccount[], accountIndex: number, thirdPartyId?: number): Promise<SolanaTransaction>;
3248
3362
  declare function makeCreateMarginfiAccountIx(program: MarginfiProgram, authority: PublicKey, groupAddress: PublicKey, accountIndex: number, thirdPartyId?: number): Promise<TransactionInstruction>;
3249
3363
  declare function makeSetupIx({ connection, authority, tokens }: MakeSetupIxParams): Promise<TransactionInstruction[]>;
3250
- declare function makePulseHealthIx(program: MarginfiProgram, marginfiAccountPk: PublicKey, banks: Map<string, BankType>, balances: BalanceType[], mandatoryBanks: PublicKey[], excludedBanks: PublicKey[]): Promise<{
3364
+ declare function makePulseHealthIx(program: MarginfiProgram, marginfiAccount: MarginfiAccountType, banks: Map<string, BankType>, mandatoryBanks: PublicKey[], excludedBanks: PublicKey[]): Promise<{
3251
3365
  instructions: TransactionInstruction[];
3252
3366
  keys: never[];
3253
3367
  }>;
@@ -3508,6 +3622,19 @@ declare function makeLoopTx(params: MakeLoopTxParams): Promise<{
3508
3622
  actionTxIndex: number;
3509
3623
  quoteResponse: SwapQuoteResult | undefined;
3510
3624
  }>;
3625
+ interface MakeBridgedLoopTxParams extends MakeLoopTxParams {
3626
+ bridgeOpts?: BridgeOpts;
3627
+ }
3628
+ /**
3629
+ * {@link makeLoopTx} with a transparent bridged fallback: if the direct loop's borrow→deposit swap
3630
+ * can't fit one tx or has no route, loop P borrowing a value-equivalent amount of a bridge token,
3631
+ * then debt-swap the bridge debt → X, as one atomic bundle.
3632
+ *
3633
+ * Intended for existing accounts — a fresh account's loop has a minimal footprint and fits the
3634
+ * direct path, so callers creating the account in the same flow should call {@link makeLoopTx}
3635
+ * directly.
3636
+ */
3637
+ declare function makeBridgedLoopTx(params: MakeBridgedLoopTxParams): Promise<BridgedTxResult>;
3511
3638
 
3512
3639
  /**
3513
3640
  * Creates a repay instruction for repaying borrowed assets to a Marginfi bank.
@@ -3597,6 +3724,15 @@ declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promi
3597
3724
  actionTxIndex: number;
3598
3725
  quoteResponse: SwapQuoteResult | undefined;
3599
3726
  }>;
3727
+ interface MakeBridgedSwapCollateralTxParams extends MakeSwapCollateralTxParams {
3728
+ bridgeOpts?: BridgeOpts;
3729
+ }
3730
+ /**
3731
+ * {@link makeSwapCollateralTx} with a transparent bridged fallback: if the direct swap `A → C`
3732
+ * can't fit one tx or has no route, decompose it into `A → bridge` + `bridge → C` through a
3733
+ * high-liquidity bridge collateral, composed into one atomic bundle.
3734
+ */
3735
+ declare function makeBridgedSwapCollateralTx(params: MakeBridgedSwapCollateralTxParams): Promise<BridgedTxResult>;
3600
3736
 
3601
3737
  /**
3602
3738
  * Creates transactions to swap one debt position to another using a flash loan.
@@ -3622,6 +3758,17 @@ declare function makeSwapDebtTx(params: MakeSwapDebtTxParams): Promise<{
3622
3758
  actionTxIndex: number;
3623
3759
  quoteResponse: SwapQuoteResult | undefined;
3624
3760
  }>;
3761
+ interface MakeBridgedSwapDebtTxParams extends MakeSwapDebtTxParams {
3762
+ bridgeOpts?: BridgeOpts;
3763
+ }
3764
+ /**
3765
+ * {@link makeSwapDebtTx} with a transparent bridged fallback: if the direct debt swap `A → C`
3766
+ * (repay A by borrowing C) can't fit one tx or has no route, decompose it into `A → bridge` +
3767
+ * `bridge → C` through a borrowable bridge debt, as one atomic bundle. The first leg repays A by
3768
+ * borrowing the bridge; the second leg repays exactly the bridge the first leg borrowed and
3769
+ * borrows C.
3770
+ */
3771
+ declare function makeBridgedSwapDebtTx(params: MakeBridgedSwapDebtTxParams): Promise<BridgedTxResult>;
3625
3772
 
3626
3773
  /**
3627
3774
  * Roll a matured Exponent PT collateral position into its next-maturity PT, so the **full
@@ -3787,8 +3934,14 @@ declare function makeTransferPositionsTx(params: MakeTransferPositionsTxParams):
3787
3934
  * withdraws before it — across the whole ordered batch — because the on-chain
3788
3935
  * health check runs against the account's live (shrinking) balance set.
3789
3936
  *
3790
- * Returns `[ATA setup txs…, crank tx?, withdraw txs…]` ordered for sequential
3791
- * execution; `actionTxIndex` points at the first withdraw tx.
3937
+ * The returned transactions MUST land as one atomic Jito bundle (same slot,
3938
+ * sequential): the integration refreshes (Kamino reserves + obligations, rate
3939
+ * cranks) live in a single prelude tx rather than in each withdraw tx, and
3940
+ * Klend's slot-based staleness checks only stay satisfied when the withdraws
3941
+ * execute in the refresh's slot.
3942
+ *
3943
+ * Returns `[ATA setup txs…, crank tx?, refresh tx?, withdraw txs…]`;
3944
+ * `actionTxIndex` points at the first withdraw tx.
3792
3945
  */
3793
3946
  declare function makeBulkWithdrawTx(params: MakeBulkWithdrawTxParams): Promise<BulkLendTxsResult>;
3794
3947
  /**
@@ -3818,6 +3971,25 @@ declare function makeSmartCrankSwbFeedIx(params: MakeSmartCrankSwbFeedIxParams):
3818
3971
  instructions: TransactionInstruction[];
3819
3972
  luts: AddressLookupTableAccount[];
3820
3973
  }>;
3974
+ type MakeSmartCrankSwbFeedIxForAccountsParams = Omit<MakeSmartCrankSwbFeedIxParams, "marginfiAccount"> & {
3975
+ /**
3976
+ * Accounts targeted by instructions in the set. Each account is projected against
3977
+ * the instructions that operate on it (the projection filters by account), so the
3978
+ * same full instruction list serves every account. The first account's authority
3979
+ * pays the feed updates.
3980
+ */
3981
+ marginfiAccounts: MarginfiAccountType[];
3982
+ };
3983
+ /**
3984
+ * Multi-account variant of {@link makeSmartCrankSwbFeedIx} for instruction sets that
3985
+ * span several marginfi accounts (e.g. transferring positions: the source is cranked
3986
+ * against its withdraws, the destination against its projected post-transfer
3987
+ * deposits). Overlapping feeds across accounts are cranked once.
3988
+ */
3989
+ declare function makeSmartCrankSwbFeedIxForAccounts(params: MakeSmartCrankSwbFeedIxForAccountsParams): Promise<{
3990
+ instructions: TransactionInstruction[];
3991
+ luts: AddressLookupTableAccount[];
3992
+ }>;
3821
3993
  declare const DEFAULT_CROSSBAR_URL = "https://crossbar.0.xyz";
3822
3994
  declare const DEFAULT_FALLBACK_CROSSBAR_URL = "https://crossbar.switchboard.xyz";
3823
3995
  declare function makeCrankSwbFeedIx(marginfiAccount: MarginfiAccountType, bankMap: Map<string, BankType>, newBanksPk: PublicKey[], provider: AnchorProvider, crossbarUrl?: string): Promise<{
@@ -3888,6 +4060,23 @@ declare function makeUpdateDriftMarketIxs(marginfiAccount: MarginfiAccountType,
3888
4060
  */
3889
4061
  declare function makeUpdateJupLendRateIxs(marginfiAccount: MarginfiAccountType, bankMap: Map<string, BankType>, banksToExclude: PublicKey[], bankMetadataMap: BankIntegrationMetadataMap): InstructionsWrapper;
3890
4062
 
4063
+ /**
4064
+ * Groups the per-integration refresh/update instructions (Kamino reserve refresh,
4065
+ * Drift spot market update, JupLend rate update) into a single wrapper.
4066
+ *
4067
+ * JupLend and Drift action instructions update their own bank via CPI, so the bank
4068
+ * being acted on is excluded from those updates. Kamino has no such CPI, so the
4069
+ * action bank must be explicitly included in the refresh set instead.
4070
+ *
4071
+ * @param marginfiAccount - The marginfi account containing active bank balances
4072
+ * @param bankMap - Map of bank addresses (base58) to bank instances
4073
+ * @param banksToExclude - Banks skipped for the JupLend/Drift updates (their CPI already updates them)
4074
+ * @param bankMetadataMap - Map containing Bank-specific metadata (integration states)
4075
+ * @param kaminoNewBanksPk - Banks to union into the Kamino refresh set, defaults to `banksToExclude`
4076
+ * @returns InstructionsWrapper with instructions ordered kamino -> drift -> juplend
4077
+ */
4078
+ declare function makeRefreshIntegrationBanksIxs(marginfiAccount: MarginfiAccountType, bankMap: Map<string, BankType>, banksToExclude: PublicKey[], bankMetadataMap: BankIntegrationMetadataMap, kaminoNewBanksPk?: PublicKey[]): InstructionsWrapper;
4079
+
3891
4080
  type ValidatorVoteAccountByBank = {
3892
4081
  [address: string]: string;
3893
4082
  };
@@ -4820,7 +5009,8 @@ declare enum TransactionBuildingErrorCode {
4820
5009
  SWAP_QUOTE_FAILED = "SWAP_QUOTE_FAILED",
4821
5010
  TRANSFER_POSITIONS_INVALID_SELECTION = "TRANSFER_POSITIONS_INVALID_SELECTION",
4822
5011
  TRANSFER_POSITIONS_UNSUPPORTED_BANK = "TRANSFER_POSITIONS_UNSUPPORTED_BANK",
4823
- TRANSFER_POSITIONS_UNSPLITTABLE = "TRANSFER_POSITIONS_UNSPLITTABLE"
5012
+ TRANSFER_POSITIONS_UNSPLITTABLE = "TRANSFER_POSITIONS_UNSPLITTABLE",
5013
+ BRIDGE_CONFLICT = "BRIDGE_CONFLICT"
4824
5014
  }
4825
5015
  /**
4826
5016
  * Typed details for each error code
@@ -4894,6 +5084,16 @@ interface TransactionBuildingErrorDetails {
4894
5084
  sizeBytes?: number;
4895
5085
  accountCount?: number;
4896
5086
  };
5087
+ [TransactionBuildingErrorCode.BRIDGE_CONFLICT]: {
5088
+ /** Bridge-token candidate banks blocked by an existing opposite-side account position. */
5089
+ conflictingBanks: Array<{
5090
+ bankAddress: string;
5091
+ mint: string;
5092
+ symbol?: string;
5093
+ }>;
5094
+ /** Whether the bridge token would have been held as collateral ("deposit") or debt ("borrow"). */
5095
+ bridgeTokenSide: "deposit" | "borrow";
5096
+ };
4897
5097
  }
4898
5098
  /**
4899
5099
  * Error thrown during transaction building in the SDK.
@@ -4957,6 +5157,16 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
4957
5157
  * Retry with fewer positions in the selection.
4958
5158
  */
4959
5159
  static transferPositionsUnsplittable(reason: string, sizeBytes?: number, accountCount?: number): TransactionBuildingError<TransactionBuildingErrorCode.TRANSFER_POSITIONS_UNSPLITTABLE>;
5160
+ /**
5161
+ * A bridged (double-hop) swap could not route because every bridge-token candidate bank
5162
+ * conflicts with an existing opposite-side position on the account (marginfi forbids holding an
5163
+ * asset and a liability on the same bank).
5164
+ */
5165
+ static bridgeConflict(conflictingBanks: Array<{
5166
+ bankAddress: string;
5167
+ mint: string;
5168
+ symbol?: string;
5169
+ }>, bridgeTokenSide: "deposit" | "borrow"): TransactionBuildingError<TransactionBuildingErrorCode.BRIDGE_CONFLICT>;
4960
5170
  /**
4961
5171
  * Generic escape hatch for custom errors
4962
5172
  */
@@ -4973,6 +5183,13 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
4973
5183
  * (which would otherwise throw a raw serialization `RangeError`) as `SWAP_SIZE_EXCEEDED_LOOP`.
4974
5184
  */
4975
5185
  declare function isDecomposableSwapError(e: unknown): e is TransactionBuildingError;
5186
+ /**
5187
+ * Whether a build failure is a bridged-swap conflict: the direct build failed AND every
5188
+ * bridge-token candidate was blocked by an existing opposite-side position on the account.
5189
+ * Narrows to the typed details (`conflictingBanks`, `bridgeTokenSide`) so callers can surface a
5190
+ * "close that position or pick a different pair" message.
5191
+ */
5192
+ declare function isBridgeConflictError(e: unknown): e is TransactionBuildingError<TransactionBuildingErrorCode.BRIDGE_CONFLICT>;
4976
5193
 
4977
5194
  declare const PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED: Buffer<ArrayBuffer>;
4978
5195
  declare const PDA_BANK_INSURANCE_VAULT_AUTH_SEED: Buffer<ArrayBuffer>;
@@ -5156,6 +5373,7 @@ declare const PRIORITY_TX_SIZE: number;
5156
5373
  declare const WSOL_MINT: PublicKey;
5157
5374
  declare const LST_MINT: PublicKey;
5158
5375
  declare const USDC_MINT: PublicKey;
5376
+ declare const USDT_MINT: PublicKey;
5159
5377
  declare const USDC_DECIMALS = 6;
5160
5378
 
5161
5379
  declare class Balance implements BalanceType {
@@ -5653,6 +5871,56 @@ declare class MarginfiAccount implements MarginfiAccountType {
5653
5871
  * @see {@link makeTransferPositionsTx} for detailed implementation
5654
5872
  */
5655
5873
  makeTransferPositionsTx(params: Omit<MakeTransferPositionsTxParams, "marginfiAccount">): Promise<TransferPositionsResult>;
5874
+ /**
5875
+ * Creates a loop transaction with a transparent bridged (double-hop) fallback.
5876
+ *
5877
+ * One call: tries the direct {@link makeLoopTx} first; if its borrow→deposit swap can't fit one
5878
+ * transaction (size / account-locks) or has no route, it loops the deposit asset against a
5879
+ * value-equivalent borrow of a high-liquidity bridge token, then debt-swaps the bridge debt to
5880
+ * the requested borrow asset — both legs composed into ONE atomic Jito bundle.
5881
+ *
5882
+ * Bridge candidates default to USDC → wSOL → USDT and can be reordered/overridden via
5883
+ * `params.bridgeOpts.bridgeCandidateMints`; `bridgeOpts` also accepts known token programs (skips RPC
5884
+ * lookups), a bundle-size ceiling, and an abort signal. `result.bridgeMint` is set only when the
5885
+ * bridged path was used.
5886
+ *
5887
+ * Intended for existing accounts — a fresh account's loop fits the direct path, so flows that
5888
+ * create the account in the same action should call {@link makeLoopTx} directly.
5889
+ *
5890
+ * @param params - Loop transaction parameters plus optional `bridgeOpts`
5891
+ * @returns Object containing transactions, action index, merged swap quote, and the bridge mint
5892
+ *
5893
+ * @see {@link makeBridgedLoopTx} for detailed implementation
5894
+ */
5895
+ makeBridgedLoopTx(params: Omit<MakeBridgedLoopTxParams, "marginfiAccount">): Promise<BridgedTxResult>;
5896
+ /**
5897
+ * Creates a collateral-swap transaction with a transparent bridged (double-hop) fallback.
5898
+ *
5899
+ * One call: tries the direct {@link makeSwapCollateralTx} first; if the swap `A → C` can't fit
5900
+ * one transaction or has no route, it decomposes into `A → bridge` + `bridge → C` through a
5901
+ * high-liquidity bridge collateral, both legs composed into ONE atomic Jito bundle. See
5902
+ * {@link makeBridgedLoopTx} for the `bridgeOpts` knobs.
5903
+ *
5904
+ * @param params - Swap collateral transaction parameters plus optional `bridgeOpts`
5905
+ * @returns Object containing transactions, action index, merged swap quote, and the bridge mint
5906
+ *
5907
+ * @see {@link makeBridgedSwapCollateralTx} for detailed implementation
5908
+ */
5909
+ makeBridgedSwapCollateralTx(params: Omit<MakeBridgedSwapCollateralTxParams, "marginfiAccount">): Promise<BridgedTxResult>;
5910
+ /**
5911
+ * Creates a debt-swap transaction with a transparent bridged (double-hop) fallback.
5912
+ *
5913
+ * One call: tries the direct {@link makeSwapDebtTx} first; if the swap `A → C` can't fit one
5914
+ * transaction or has no route, the first leg repays A by borrowing a bridge token and the second
5915
+ * leg repays exactly that bridge debt while borrowing C — both legs composed into ONE atomic
5916
+ * Jito bundle. See {@link makeBridgedLoopTx} for the `bridgeOpts` knobs.
5917
+ *
5918
+ * @param params - Swap debt transaction parameters plus optional `bridgeOpts`
5919
+ * @returns Object containing transactions, action index, merged swap quote, and the bridge mint
5920
+ *
5921
+ * @see {@link makeBridgedSwapDebtTx} for detailed implementation
5922
+ */
5923
+ makeBridgedSwapDebtTx(params: Omit<MakeBridgedSwapDebtTxParams, "marginfiAccount">): Promise<BridgedTxResult>;
5656
5924
  /**
5657
5925
  * Creates a transaction to repay debt using collateral.
5658
5926
  *
@@ -6190,6 +6458,52 @@ declare class MarginfiAccountWrapper {
6190
6458
  actionTxIndex: number;
6191
6459
  quoteResponse: SwapQuoteResult | undefined;
6192
6460
  }>;
6461
+ /**
6462
+ * Creates a loop (leverage) transaction with a transparent bridged (double-hop) fallback and
6463
+ * auto-injected client data.
6464
+ *
6465
+ * One call: tries the direct {@link makeLoopTx} first; if its borrow→deposit swap can't fit one
6466
+ * transaction or has no route, it loops the deposit asset against a value-equivalent borrow of a
6467
+ * bridge token (USDC/wSOL/USDT by default, override via `bridgeOpts.bridgeCandidateMints`) and
6468
+ * debt-swaps that bridge debt to the requested borrow asset — one atomic Jito bundle.
6469
+ * `result.bridgeMint` is set only when the bridged path was used.
6470
+ *
6471
+ * Auto-injects: program, marginfiAccount, bankMap, oraclePrices, bankMetadataMap,
6472
+ * addressLookupTables, assetShareValueMultiplierByBank
6473
+ *
6474
+ * @param params - Loop parameters (user provides: connection, depositOpts, borrowOpts, swapOpts, bridgeOpts?, etc.)
6475
+ */
6476
+ makeBridgedLoopTx(params: Omit<MakeBridgedLoopTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts" | "assetShareValueMultiplierByBank">): Promise<BridgedTxResult>;
6477
+ /**
6478
+ * Creates a collateral-swap transaction with a transparent bridged (double-hop) fallback and
6479
+ * auto-injected client data.
6480
+ *
6481
+ * One call: tries the direct {@link makeSwapCollateralTx} first; if the swap `A → C` can't fit
6482
+ * one transaction or has no route, it decomposes into `A → bridge` + `bridge → C` through a
6483
+ * bridge token, composed as one atomic Jito bundle. `result.bridgeMint` is set only when the
6484
+ * bridged path was used.
6485
+ *
6486
+ * Auto-injects: program, marginfiAccount, bankMap, oraclePrices, bankMetadataMap,
6487
+ * addressLookupTables, assetShareValueMultiplierByBank
6488
+ *
6489
+ * @param params - Swap collateral parameters (user provides: connection, withdrawOpts, depositOpts, swapOpts, bridgeOpts?, etc.)
6490
+ */
6491
+ makeBridgedSwapCollateralTx(params: Omit<MakeBridgedSwapCollateralTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts" | "assetShareValueMultiplierByBank">): Promise<BridgedTxResult>;
6492
+ /**
6493
+ * Creates a debt-swap transaction with a transparent bridged (double-hop) fallback and
6494
+ * auto-injected client data.
6495
+ *
6496
+ * One call: tries the direct {@link makeSwapDebtTx} first; if the swap `A → C` can't fit one
6497
+ * transaction or has no route, the first leg repays A by borrowing a bridge token and the second
6498
+ * leg repays exactly that bridge debt while borrowing C — one atomic Jito bundle.
6499
+ * `result.bridgeMint` is set only when the bridged path was used.
6500
+ *
6501
+ * Auto-injects: program, marginfiAccount, bankMap, oraclePrices, bankMetadataMap,
6502
+ * addressLookupTables, assetShareValueMultiplierByBank
6503
+ *
6504
+ * @param params - Swap debt parameters (user provides: connection, repayOpts, borrowOpts, swapOpts, bridgeOpts?, etc.)
6505
+ */
6506
+ makeBridgedSwapDebtTx(params: Omit<MakeBridgedSwapDebtTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts" | "assetShareValueMultiplierByBank">): Promise<BridgedTxResult>;
6193
6507
  /**
6194
6508
  * Creates a deposit transaction with auto-injected client data.
6195
6509
  *
@@ -6394,4 +6708,4 @@ declare class MarginfiAccountWrapper {
6394
6708
  getClient(): Project0Client;
6395
6709
  }
6396
6710
 
6397
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, AccountFlags, ActionEmodeImpact, ActiveEmodePair, type ActiveStakePoolMap, Amount, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, BalanceType, type BalanceTypeDto, Bank, type BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, type BankConfigRawDto, BankConfigType, BankIntegrationMetadata, BankIntegrationMetadataDto, BankIntegrationMetadataMap, BankIntegrationMetadataMapDto, type BankMetrics, type BankRateLimiterDto, BankRateLimiterRaw, type BankRateLimiterRawDto, BankRateLimiterType, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type BridgeSide, type BridgedSwapLeg, type BuildContext, type BulkLendTxsResult, type ClassifiedPosition, type ComposeBridgedSwapParams, type ComposeBridgedSwapResult, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferPositionsTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, type MintAuthorityBalance, MintData, OperationalState, OperationalStateRaw, OraclePrice, OraclePriceDto, OracleSetup, OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, PriceWithConfidence, Project0Client, Project0Config, Project0ConfigRaw, type ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowRawDto, type RatePointDto, type ResolveBridgeBanksParams, RiskTier, RiskTierRaw, type RollPtOpts, SINGLE_POOL_PROGRAM_ID, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountConflictsWithBridge, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compileFlashloanPrecheck, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isDecomposableSwapError, isDepositIx, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTransferPositionsTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, mergeBridgeQuotesDebt, mergeBridgeQuotesLoop, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, requireBank, requireTokenProgram, resolveBridgeBanks, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
6711
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, AccountFlags, ActionEmodeImpact, ActiveEmodePair, type ActiveStakePoolMap, Amount, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, BalanceType, type BalanceTypeDto, Bank, type BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, type BankConfigRawDto, BankConfigType, BankIntegrationMetadata, BankIntegrationMetadataDto, BankIntegrationMetadataMap, BankIntegrationMetadataMapDto, type BankMetrics, type BankRateLimiterDto, BankRateLimiterRaw, type BankRateLimiterRawDto, BankRateLimiterType, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type BridgeOpts, type BridgeTokenSide, type BridgedSwapLeg, type BridgedTxResult, type BuildContext, type BulkLendTxsResult, type ClassifiedPosition, type ComposeBridgedSwapParams, type ComposeBridgedSwapResult, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_BRIDGE_MINTS, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeBridgedLoopTxParams, type MakeBridgedSwapCollateralTxParams, type MakeBridgedSwapDebtTxParams, type MakeBulkRepayTxParams, type MakeBulkWithdrawTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeTransferPositionsTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, type MintAuthorityBalance, MintData, OperationalState, OperationalStateRaw, OraclePrice, OraclePriceDto, OracleSetup, OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, PriceWithConfidence, Project0Client, Project0Config, Project0ConfigRaw, type ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowRawDto, type RatePointDto, type ResolveBridgeCandidateBanksParams, RiskTier, RiskTierRaw, type RollPtOpts, SINGLE_POOL_PROGRAM_ID, STAKED_ORACLE_DISABLED_FLAG, STAKED_ORACLE_USES_ONRAMP_FLAG, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SharedBridgeLegContext, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, type TransferPositionSide, type TransferPositionsResult, type TxFootprint, TypedAmount, USDC_DECIMALS, USDC_MINT, USDT_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountConflictsWithBridgeBank, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, buildCollateralLegIxs, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, classifyAndValidate, compileFlashloanPrecheck, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getFallbackPricesByFeedId, getFallbackPricesForMints, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isBridgeConflictError, isDecomposableSwapError, isDepositIx, isFlashloan, isGroupRateLimiterEnabled, isStandardBorrowable, isStandardDepositable, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBridgedLoopTx, makeBridgedSwapCollateralTx, makeBridgedSwapDebtTx, makeBulkRepayTx, makeBulkWithdrawTx, makeBundleTipIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshIntegrationBanksIxs, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSmartCrankSwbFeedIxForAccounts, makeSwapCollateralTx, makeSwapDebtTx, makeTransferPositionsTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, mergeBridgeQuotesDebt, mergeBridgeQuotesLoop, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, requireBank, requireTokenProgram, resolveBridgeCandidateBanks, resolveTokenProgramForMint, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, selectSwapBridges, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, sharedBridgeLegContext, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBankRateLimiterDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, tryBridgeCandidates, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };