@0dotxyz/p0-ts-sdk 2.5.5-alpha.8 → 2.5.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,17 +136,12 @@ 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 (minus `sizeMargin`, if given) nor
140
- * `maxAccountLocks` account locks (if given).
139
+ * so that none exceed MAX_TX_SIZE.
141
140
  */
142
141
  declare function splitInstructionsToFitTransactions(mandatoryIxs: TransactionInstruction[], ixs: TransactionInstruction[], opts: {
143
142
  blockhash: string;
144
143
  payerKey: PublicKey;
145
144
  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;
150
145
  }): VersionedTransaction[];
151
146
  /**
152
147
  * Enhances a given transaction with additional metadata.
@@ -929,24 +924,9 @@ interface SwapProviderConfig {
929
924
  }
930
925
  interface SwapOpts {
931
926
  swapConfig?: SwapProviderConfig;
932
- /**
933
- * Pin an exact, caller-reviewed swap route instead of running the swap engine.
934
- *
935
- * The caller owns ATA setup for the route, the route's input amount MUST equal the flow's swap
936
- * input (e.g. the loop's borrow amount), and the route MUST pay out to the flow's destination
937
- * token account. `quoteResponse.otherAmountThreshold` (guaranteed min-out, native units) sizes
938
- * the follow-up amount — e.g. the loop's deposit byte-patch — exactly like an engine-selected
939
- * route would. For dynamic caller-controlled routing (inspect/veto routes at build time),
940
- * prefer `swapEngineRunner`.
941
- *
942
- * Note: the bridged `makeBridged*Tx` fallbacks are disabled when a pinned route is supplied —
943
- * a pinned route belongs to the direct pair and cannot be spliced into SDK-composed legs.
944
- */
945
927
  swapIxs?: {
946
928
  instructions: TransactionInstruction[];
947
929
  lookupTables: AddressLookupTableAccount[];
948
- /** The pinned route's quote; `otherAmountThreshold` must be the route's min-out (native). */
949
- quoteResponse: SwapQuoteResult;
950
930
  };
951
931
  }
952
932
  interface SwapQuoteResult {
@@ -1235,88 +1215,6 @@ interface MakeFlashLoanTxParams {
1235
1215
  isSync?: boolean;
1236
1216
  signers?: Signer[];
1237
1217
  }
1238
- type TransferPositionSide = "collateral" | "debt";
1239
- interface MakeTransferPositionsTxParams {
1240
- program: MarginfiProgram;
1241
- connection: Connection;
1242
- /** Source account A (positions move out of this account). */
1243
- marginfiAccount: MarginfiAccountType;
1244
- /** Banks whose A-positions to move; the side is inferred from A's balance. */
1245
- bankAddresses: PublicKey[];
1246
- /** Destination account B. Omit to create a fresh account inside the flashloan tx. */
1247
- destinationAccount?: MarginfiAccountType;
1248
- /** Only used when `destinationAccount` is omitted. */
1249
- createDestinationOpts?: {
1250
- accountIndex?: number;
1251
- thirdPartyId?: number;
1252
- };
1253
- bankMap: Map<string, BankType>;
1254
- oraclePrices: Map<string, OraclePrice>;
1255
- bankMetadataMap: BankIntegrationMetadataMap;
1256
- assetShareValueMultiplierByBank: Map<string, BigNumber>;
1257
- /** Token program per transferred bank (base58 bank address → token program id). */
1258
- tokenProgramsByBank: Map<string, PublicKey>;
1259
- addressLookupTableAccounts?: AddressLookupTableAccount[];
1260
- /** Head-room added to each borrow over the estimated debt for interest accrual. Default 10 bps. */
1261
- borrowPaddingBps?: number;
1262
- /** Max positions per transfer; a larger selection is rejected. Default 5. */
1263
- maxPositions?: number;
1264
- /** Whether the group USD rate limiter is enabled (adds an oracle to each withdraw). Default false. */
1265
- groupRateLimiterEnabled?: boolean;
1266
- crossbarUrl?: string;
1267
- overrideInferAccounts?: {
1268
- group?: PublicKey;
1269
- authority?: PublicKey;
1270
- };
1271
- }
1272
- interface TransferPositionsResult {
1273
- /** Ordered for sequential execution: [setup/crank txs…, flashloan tx]. */
1274
- transactions: ExtendedV0Transaction[];
1275
- /** Index of the flashloan tx in `transactions`. */
1276
- actionTxIndex: number;
1277
- /** The destination account (passed-in, or the projected account created in the tx). */
1278
- destinationAccount: MarginfiAccountType;
1279
- }
1280
- interface MakeBulkWithdrawTxParams {
1281
- program: MarginfiProgram;
1282
- connection: Connection;
1283
- marginfiAccount: MarginfiAccountType;
1284
- /** Banks whose FULL positions to withdraw, in execution order. */
1285
- bankAddresses: PublicKey[];
1286
- bankMap: Map<string, BankType>;
1287
- oraclePrices: Map<string, OraclePrice>;
1288
- bankMetadataMap: BankIntegrationMetadataMap;
1289
- assetShareValueMultiplierByBank: Map<string, BigNumber>;
1290
- /** Token program per withdrawn bank (base58 bank address → token program id). */
1291
- tokenProgramsByBank: Map<string, PublicKey>;
1292
- luts: AddressLookupTableAccount[];
1293
- crossbarUrl?: string;
1294
- overrideInferAccounts?: {
1295
- group?: PublicKey;
1296
- authority?: PublicKey;
1297
- };
1298
- }
1299
- interface MakeBulkRepayTxParams {
1300
- program: MarginfiProgram;
1301
- connection: Connection;
1302
- marginfiAccount: MarginfiAccountType;
1303
- /** Banks whose FULL debts to repay from the wallet. */
1304
- bankAddresses: PublicKey[];
1305
- bankMap: Map<string, BankType>;
1306
- /** Token program per repaid bank (base58 bank address → token program id). */
1307
- tokenProgramsByBank: Map<string, PublicKey>;
1308
- addressLookupTableAccounts?: AddressLookupTableAccount[];
1309
- overrideInferAccounts?: {
1310
- group?: PublicKey;
1311
- authority?: PublicKey;
1312
- };
1313
- }
1314
- interface BulkLendTxsResult {
1315
- /** Ordered for sequential execution: [setup/crank txs…, action txs…]. */
1316
- transactions: ExtendedV0Transaction[];
1317
- /** Index of the first action tx in `transactions`. */
1318
- actionTxIndex: number;
1319
- }
1320
1218
  interface MakeLoopTxParams {
1321
1219
  program: MarginfiProgram;
1322
1220
  marginfiAccount: MarginfiAccountType;
@@ -1350,11 +1248,6 @@ interface MakeLoopTxParams {
1350
1248
  * Optional override for how the swap engine runs. Defaults to the in-process
1351
1249
  * `runSwapEngine`; the app injects a runner that forwards to `/api/tx/swap-engine`
1352
1250
  * so the multi-provider fan-out happens server-side.
1353
- *
1354
- * Also the seam for caller-controlled routing: wrap the default runner to inspect, veto, or
1355
- * replace the selected route before it's spliced into the flashloan (see
1356
- * `examples/16c-loop-pinned-route.ts`). For a fully static, pre-reviewed route use
1357
- * `swapOpts.swapIxs` instead.
1358
1251
  */
1359
1252
  swapEngineRunner?: SwapEngineRunner;
1360
1253
  }
@@ -2601,7 +2494,7 @@ declare function computeTotalOutstandingEmissions(balance: BalanceType, bank: Ba
2601
2494
  * - Including all active banks (excluding any in the exclusion list)
2602
2495
  * - Reserving inactive slots for mandatory banks that aren't currently active
2603
2496
  *
2604
- * @param account - The marginfi account whose balances are evaluated
2497
+ * @param balances - Current account balances
2605
2498
  * @param banksMap - Map of bank addresses to bank data
2606
2499
  * @param mandatoryBanks - Banks that must be included (e.g., for pending transactions)
2607
2500
  * @param excludedBanks - Banks to exclude from health checks
@@ -2609,20 +2502,15 @@ declare function computeTotalOutstandingEmissions(balance: BalanceType, bank: Ba
2609
2502
  *
2610
2503
  * @example
2611
2504
  * ```typescript
2612
- * const healthCheckBanks = computeHealthCheckAccounts({
2613
- * account,
2505
+ * const healthCheckBanks = computeHealthCheckAccounts(
2506
+ * account.balances,
2614
2507
  * banksMap,
2615
- * mandatoryBanks: [newBankToDeposit], // Not active yet but will be
2616
- * excludedBanks: [closingBank], // Being closed in this transaction
2617
- * });
2508
+ * [newBankToDeposit], // Mandatory: not active yet but will be
2509
+ * [closingBank] // Excluded: being closed in this transaction
2510
+ * );
2618
2511
  * ```
2619
2512
  */
2620
- declare function computeHealthCheckAccounts({ account, banksMap, mandatoryBanks, excludedBanks, }: {
2621
- account: MarginfiAccountType;
2622
- banksMap: Map<string, BankType>;
2623
- mandatoryBanks?: PublicKey[];
2624
- excludedBanks?: PublicKey[];
2625
- }): BankType[];
2513
+ declare function computeHealthCheckAccounts(balances: BalanceType[], banksMap: Map<string, BankType>, mandatoryBanks?: PublicKey[], excludedBanks?: PublicKey[]): BankType[];
2626
2514
  /**
2627
2515
  * Converts bank objects to health check account metas (public keys).
2628
2516
  *
@@ -2644,17 +2532,14 @@ declare function computeHealthCheckAccounts({ account, banksMap, mandatoryBanks,
2644
2532
  *
2645
2533
  * @example
2646
2534
  * ```typescript
2647
- * const healthAccounts = computeHealthAccountMetas({
2648
- * banksToInclude: [usdcBank, solBank, kaminoUsdcBank],
2649
- * });
2535
+ * const healthAccounts = computeHealthAccountMetas(
2536
+ * [usdcBank, solBank, kaminoUsdcBank],
2537
+ * true // Enable sorting for optimal transaction size
2538
+ * );
2650
2539
  * // Returns: [bank1, oracle1, bank2, oracle2, bank3, oracle3, kaminoReserve3, ...]
2651
2540
  * ```
2652
2541
  */
2653
- declare function computeHealthAccountMetas({ banksToInclude, enableSorting, trailingBanks, }: {
2654
- banksToInclude: BankType[];
2655
- enableSorting?: boolean;
2656
- trailingBanks?: BankType[];
2657
- }): PublicKey[];
2542
+ declare function computeHealthAccountMetas(banksToInclude: BankType[], enableSorting?: boolean, trailingBanks?: BankType[]): PublicKey[];
2658
2543
  /**
2659
2544
  * Projects which banks will be active after a series of instructions execute.
2660
2545
  *
@@ -2663,8 +2548,7 @@ declare function computeHealthAccountMetas({ banksToInclude, enableSorting, trai
2663
2548
  * health check account inclusion by predicting which banks are relevant.
2664
2549
  *
2665
2550
  * **Note**: This does NOT simulate Cross-Program Invocations (CPI). Only direct
2666
- * marginfi instructions are considered. Instructions operating on a different
2667
- * marginfi account than `account` are ignored.
2551
+ * marginfi instructions are considered.
2668
2552
  *
2669
2553
  * Supported instructions:
2670
2554
  * - Deposits: `lendingAccountDeposit`, `kaminoDeposit`, `driftDeposit`, `solendDeposit`
@@ -2672,26 +2556,22 @@ declare function computeHealthAccountMetas({ banksToInclude, enableSorting, trai
2672
2556
  * - Repays: `lendingAccountRepay`
2673
2557
  * - Withdrawals: `lendingAccountWithdraw`, `kaminoWithdraw`, `driftWithdraw`, `solendWithdraw`
2674
2558
  *
2675
- * @param account - The marginfi account whose balances are projected
2559
+ * @param balances - Current account balances
2676
2560
  * @param instructions - Instructions to simulate
2677
2561
  * @param program - Marginfi program for instruction decoding
2678
2562
  * @returns Array of bank public keys that will be active after instruction execution
2679
2563
  *
2680
2564
  * @example
2681
2565
  * ```typescript
2682
- * const projectedBanks = computeProjectedActiveBanksNoCpi({
2683
- * account,
2684
- * instructions: [depositIx, borrowIx],
2685
- * program: marginfiProgram,
2686
- * });
2566
+ * const projectedBanks = computeProjectedActiveBanksNoCpi(
2567
+ * account.balances,
2568
+ * [depositIx, borrowIx],
2569
+ * marginfiProgram
2570
+ * );
2687
2571
  * // Use projectedBanks for health check account selection
2688
2572
  * ```
2689
2573
  */
2690
- declare function computeProjectedActiveBanksNoCpi({ account, instructions, program, }: {
2691
- account: MarginfiAccountType;
2692
- instructions: TransactionInstruction[];
2693
- program: MarginfiProgram;
2694
- }): PublicKey[];
2574
+ declare function computeProjectedActiveBanksNoCpi(balances: BalanceType[], instructions: TransactionInstruction[], program: MarginfiProgram): PublicKey[];
2695
2575
  /**
2696
2576
  * Computes projected balances after applying a series of instructions.
2697
2577
  *
@@ -2700,13 +2580,12 @@ declare function computeProjectedActiveBanksNoCpi({ account, instructions, progr
2700
2580
  * than `computeProjectedActiveBanksNoCpi` which only tracks active banks.
2701
2581
  *
2702
2582
  * **Note**: This does NOT simulate Cross-Program Invocations (CPI). Only direct
2703
- * marginfi instructions are considered. Instructions operating on a different
2704
- * marginfi account than `account` are ignored.
2583
+ * marginfi instructions are considered.
2705
2584
  *
2706
2585
  * **Integrated Protocols**: For Kamino/Drift deposits, the `assetShareValueMultiplierByBank`
2707
2586
  * is used to convert cToken amounts to actual asset quantities before computing shares.
2708
2587
  *
2709
- * @param account - The marginfi account whose balances are projected
2588
+ * @param balances - Current account balances
2710
2589
  * @param instructions - Instructions to simulate
2711
2590
  * @param program - Marginfi program for instruction decoding
2712
2591
  * @param banksMap - Map of bank addresses to bank data (needed for share value conversion)
@@ -2718,24 +2597,18 @@ declare function computeProjectedActiveBanksNoCpi({ account, instructions, progr
2718
2597
  *
2719
2598
  * @example
2720
2599
  * ```typescript
2721
- * const result = computeProjectedActiveBalancesNoCpi({
2722
- * account,
2723
- * instructions: [depositIx, borrowIx],
2724
- * program: marginfiProgram,
2600
+ * const result = computeProjectedActiveBalancesNoCpi(
2601
+ * account.balances,
2602
+ * [depositIx, borrowIx],
2603
+ * marginfiProgram,
2725
2604
  * banksMap,
2726
- * assetShareValueMultiplierByBank,
2727
- * });
2605
+ * { [driftBankAddress]: driftMultiplier }
2606
+ * );
2728
2607
  * console.log(`Projected ${result.projectedBalances.length} balances`);
2729
2608
  * console.log(`Impacted ${result.impactedAssetsBanks.length} asset banks`);
2730
2609
  * ```
2731
2610
  */
2732
- declare function computeProjectedActiveBalancesNoCpi({ account, instructions, program, banksMap, assetShareValueMultiplierByBank, }: {
2733
- account: MarginfiAccountType;
2734
- instructions: TransactionInstruction[];
2735
- program: MarginfiProgram;
2736
- banksMap: Map<string, BankType>;
2737
- assetShareValueMultiplierByBank: Map<string, BigNumber$1>;
2738
- }): {
2611
+ declare function computeProjectedActiveBalancesNoCpi(balances: BalanceType[], instructions: TransactionInstruction[], program: MarginfiProgram, banksMap: Map<string, BankType>, assetShareValueMultiplierByBank: Map<string, BigNumber$1>): {
2739
2612
  projectedBalances: BalanceType[];
2740
2613
  impactedAssetsBanks: string[];
2741
2614
  impactedLiabilityBanks: string[];
@@ -2982,28 +2855,6 @@ declare const getTitanExactOutEstimate: (params: GetTitanExactOutEstimateParams)
2982
2855
  quoteResult: SwapQuoteResult;
2983
2856
  }>;
2984
2857
 
2985
- /** The canonical shape a resolved pinned route yields — mirrors an engine-selected route. */
2986
- interface ResolvedPinnedSwapRoute {
2987
- swapInstructions: TransactionInstruction[];
2988
- setupInstructions: TransactionInstruction[];
2989
- lookupTables: AddressLookupTableAccount[];
2990
- quoteResponse: SwapQuoteResult;
2991
- /** The route's guaranteed min-out (native) — what sizes the follow-up amount (deposit patch). */
2992
- outputAmountNative: BN;
2993
- }
2994
- /**
2995
- * Resolve a caller-pinned swap route (`swapOpts.swapIxs`) into the engine-result shape, validating
2996
- * the quote so a pinned route can never silently size a zero follow-up amount:
2997
- *
2998
- * - `otherAmountThreshold` (min-out) must be a positive integer — it becomes the loop's deposit
2999
- * byte-patch, exactly like an engine-selected route's min-out.
3000
- * - `inAmount` must equal the flow's swap input (e.g. the loop's borrow, native units) — a
3001
- * mismatch means the route was quoted for a different size than the flow will actually swap.
3002
- *
3003
- * Throws plain `Error`s (not `TransactionBuildingError`) so caller-input mistakes are never
3004
- * classified as decomposable swap failures (which would wrongly engage the bridged fallback).
3005
- */
3006
- declare function resolvePinnedSwapRoute(swapIxs: NonNullable<SwapOpts["swapIxs"]>, expectedInAmountNative: BN | number): ResolvedPinnedSwapRoute;
3007
2858
  type GetSwapIxsForFlashloanParams = {
3008
2859
  inputMint: string;
3009
2860
  outputMint: string;
@@ -3084,7 +2935,11 @@ interface FlashloanSwapConstraints {
3084
2935
  */
3085
2936
  declare function computeFlashLoanNonSwapBudget({ program, marginfiAccount, ixs, bankMap, addressLookupTableAccounts, }: {
3086
2937
  program: MarginfiProgram;
3087
- marginfiAccount: MarginfiAccountType;
2938
+ marginfiAccount: {
2939
+ address: PublicKey;
2940
+ authority: PublicKey;
2941
+ balances: BalanceType[];
2942
+ };
3088
2943
  ixs: TransactionInstruction[];
3089
2944
  bankMap: Map<string, BankType>;
3090
2945
  addressLookupTableAccounts: AddressLookupTableAccount[];
@@ -3170,146 +3025,47 @@ declare function isDepositIx(ix: TransactionInstruction): boolean;
3170
3025
  declare function patchDepositAmount(ix: TransactionInstruction, amountNative: BN): void;
3171
3026
 
3172
3027
  /**
3173
- * Bridge-token candidate filtering for bridged (double-hop) swaps.
3174
- *
3175
- * A **bridge token** is NOT a cross-chain bridge: it is the high-liquidity intermediate token
3176
- * (e.g. USDC or wSOL) that a swap `A → C` is routed *through* — as `A → bridge` + `bridge → C` in
3177
- * one atomic bundle — when the direct swap can't fit a single transaction or has no route. This
3178
- * module owns the mechanical filtering of bridge-token candidates; ordering (product policy) and
3179
- * the one-call builders live in `bridge-routing.utils.ts` and the `makeBridged*Tx` actions.
3180
- */
3181
- /**
3182
- * The side of the marginfi account the bridge token sits on while the bridged bundle executes:
3183
- * - `deposit` — the bridge token is held as *collateral* (a collateral-swap deposits it between
3184
- * the two legs: withdraw source → deposit bridge, then withdraw bridge → deposit destination).
3185
- * - `borrow` — the bridge token is held as *debt* (a debt-swap or loop borrows it in the first
3186
- * leg and repays it exactly in the second).
3187
- */
3188
- type BridgeTokenSide = "deposit" | "borrow";
3189
- /**
3190
- * Whether routing through `bridgeBankPk` as the bridge token would conflict with a position the
3191
- * account already holds on that bank. marginfi forbids holding an asset and a liability on the
3192
- * same bank, so the conflict is always *opposite-side*: a deposit-side bridge conflicts with an
3193
- * existing liability there, a borrow-side bridge with an existing asset. Same-side positions are
3194
- * fine (partial-withdraw / exact-repay handle them).
3195
- */
3196
- declare function accountConflictsWithBridgeBank(marginfiAccount: MarginfiAccountType, bridgeBankPk: PublicKey, bridgeTokenSide: BridgeTokenSide): boolean;
3197
- interface ResolveBridgeCandidateBanksParams {
3198
- /** Candidate bridge-token mints, highest priority first (product policy — see
3199
- * `bridge-routing.utils.ts` for the default ordering and the per-call override). */
3200
- prioritizedBridgeCandidateMints: PublicKey[];
3201
- /** Banks to resolve the candidate mints against — typically all banks in the marginfi group. */
3202
- groupBanks: BankType[];
3203
- /** The account the bridged legs run against (for the conflict check). */
3028
+ * Which side of a bridged (double-hop) swap touches the bridge token:
3029
+ * - `deposit` — the bridge is *deposited* (e.g. collateral-swap: source → bridge → dest).
3030
+ * - `borrow` — the bridge is *borrowed* (e.g. debt-swap / loop: borrow bridge, then repay it).
3031
+ */
3032
+ type BridgeSide = "deposit" | "borrow";
3033
+ /**
3034
+ * Whether routing through `bankPk` as the bridge would conflict with an existing position on the
3035
+ * account. marginfi forbids holding an asset and a liability on the same bank, so the conflict is
3036
+ * always *opposite-side*: a deposit-side bridge conflicts with an existing liability there, a
3037
+ * borrow-side bridge with an existing asset. Same-side positions are fine (partial-withdraw /
3038
+ * exact-repay handle them).
3039
+ */
3040
+ declare function accountConflictsWithBridge(account: MarginfiAccountType, bankPk: PublicKey, side: BridgeSide): boolean;
3041
+ interface ResolveBridgeBanksParams {
3042
+ /** Candidate bridge mints in priority order (caller-owned product policy). */
3043
+ orderedBridgeMints: PublicKey[];
3044
+ /** Banks to resolve mints against (e.g. all of the group's banks). */
3045
+ banks: BankType[];
3046
+ /** The account the bridge legs run against (for the conflict check). */
3204
3047
  marginfiAccount: MarginfiAccountType;
3205
- /** Which side the bridge token is held on — picks the standard-bank filter and the conflict
3206
- * rule. */
3207
- bridgeTokenSide: BridgeTokenSide;
3048
+ /** Which side the bridge is used on — picks the standard-bank filter and the conflict rule. */
3049
+ side: BridgeSide;
3208
3050
  }
3209
3051
  /**
3210
- * Resolve prioritized bridge-token candidate *mints* into candidate *banks*, partitioned into
3211
- * those safe to route through and those blocked by an existing account position.
3052
+ * Resolve an ordered list of candidate bridge *mints* into usable bridge *banks*, partitioned into
3053
+ * those safe to route through and those that conflict with an existing position.
3212
3054
  *
3213
3055
  * For each mint (deduped, in priority order) it picks the standard bank that fits the side
3214
3056
  * ({@link isStandardBorrowable} for `borrow`, {@link isStandardDepositable} for `deposit`) — this
3215
3057
  * skips integration wrappers (`6200`) and `ReduceOnly` banks (`6017`) — then splits by
3216
- * {@link accountConflictsWithBridgeBank}. The caller supplies the prioritized mint list (product
3217
- * policy); this owns only the mechanical filtering.
3058
+ * {@link accountConflictsWithBridge}. The caller supplies the ordered mint list (product policy);
3059
+ * this owns only the mechanical filtering.
3218
3060
  *
3219
- * @returns `usableBridgeBanks` (safe to route through, in priority order) and
3220
- * `conflictingBridgeBanks` (resolvable but blocked by an opposite-side position — useful for
3221
- * surfacing a "close that position" message).
3061
+ * @returns `bridges` (usable, in priority order) and `conflicts` (resolvable but blocked by an
3062
+ * opposite-side position — useful for surfacing a "close that position" message).
3222
3063
  */
3223
- declare function resolveBridgeCandidateBanks(params: ResolveBridgeCandidateBanksParams): {
3224
- usableBridgeBanks: BankType[];
3225
- conflictingBridgeBanks: BankType[];
3064
+ declare function resolveBridgeBanks(params: ResolveBridgeBanksParams): {
3065
+ bridges: BankType[];
3066
+ conflicts: BankType[];
3226
3067
  };
3227
3068
 
3228
- /**
3229
- * Shared support for the bridged (double-hop) one-call builders.
3230
- *
3231
- * A **bridge token** is NOT a cross-chain bridge: it is the high-liquidity intermediate token
3232
- * (e.g. USDC or wSOL) a swap is routed *through*. When a direct collateral-swap / debt-swap /
3233
- * loop `A → C` can't be built — the swap doesn't fit one tx (size / account-locks) or has no
3234
- * route — it can still succeed decomposed into `A → bridge` + `bridge → C`, submitted as ONE
3235
- * atomic Jito bundle. The per-flow builders live next to their direct builders
3236
- * (`makeBridgedLoopTx` in `../actions/loop.ts`, `makeBridgedSwapCollateralTx` in
3237
- * `../actions/swap-collateral.ts`, `makeBridgedSwapDebtTx` in `../actions/swap-debt.ts`); this
3238
- * module owns the flow-agnostic routing support: candidate ordering/selection, the
3239
- * candidate-iteration loop (abort / skip-on-failure / conflict surfacing), token-program
3240
- * resolution, and the shared leg context.
3241
- *
3242
- * Candidate *ordering* is product policy: it defaults to {@link DEFAULT_BRIDGE_MINTS} and can be
3243
- * overridden per call via {@link BridgeOpts.bridgeCandidateMints} (e.g. a correlation-aware
3244
- * ordering). Candidate *filtering* (standard-bank resolution, opposite-side conflicts) is
3245
- * mechanical and lives in {@link resolveBridgeCandidateBanks}.
3246
- */
3247
- /** Default bridge-token candidates, most-liquid first. */
3248
- declare const DEFAULT_BRIDGE_MINTS: PublicKey[];
3249
- /** Per-call knobs for the bridged fallback of the `makeBridged*Tx` builders. */
3250
- interface BridgeOpts {
3251
- /**
3252
- * Candidate bridge-token mints, highest priority first. Defaults to
3253
- * {@link DEFAULT_BRIDGE_MINTS} (USDC, wSOL, USDT). Source/destination mints are always skipped.
3254
- */
3255
- bridgeCandidateMints?: PublicKey[];
3256
- /** Known token programs by mint (base58) — skips the per-mint RPC owner lookup. */
3257
- tokenProgramByMint?: Map<string, PublicKey>;
3258
- /** Override the bundle-size ceiling (see `composeBridgedSwap`). */
3259
- maxBundleTxs?: number;
3260
- abortSignal?: AbortSignal;
3261
- }
3262
- /** Result of a `makeBridged*Tx` builder — the direct build's result, or the bridged bundle. */
3263
- interface BridgedTxResult {
3264
- transactions: SolanaTransaction[];
3265
- /** Index of the tx that completes the action (the direct action tx, or the bundle's last leg). */
3266
- actionTxIndex: number;
3267
- quoteResponse: SwapQuoteResult | undefined;
3268
- /** The bridge token's mint — set only when the bridged double-hop path was used. */
3269
- bridgeMint?: PublicKey;
3270
- /** true → send as ONE atomic Jito bundle (bridged legs are one operation / integration
3271
- * refreshes go stale within a slot); false → sequential sends are safe (cranked oracles
3272
- * allow ≥ ~1 min staleness). */
3273
- mustBeAtomicBundle: boolean;
3274
- }
3275
- /** A mint's token program: the cache (seedable by the caller), else the mint account's owner. */
3276
- declare function resolveTokenProgramForMint(mint: PublicKey, connection: Connection, tokenProgramCacheByMint: Map<string, PublicKey>): Promise<PublicKey>;
3277
- /**
3278
- * Bridge-token candidate banks for routing `source → bridge → destination`, in priority order,
3279
- * partitioned into usable and conflict-blocked. Source/destination mints are excluded from the
3280
- * candidates (a token can't bridge itself).
3281
- */
3282
- declare function selectSwapBridges(args: {
3283
- sourceMint: PublicKey;
3284
- destinationMint: PublicKey;
3285
- bankMap: Map<string, BankType>;
3286
- marginfiAccount: MarginfiAccountType;
3287
- bridgeTokenSide: BridgeTokenSide;
3288
- bridgeCandidateMints?: PublicKey[];
3289
- }): {
3290
- usableBridgeBanks: BankType[];
3291
- conflictingBridgeBanks: BankType[];
3292
- };
3293
- /**
3294
- * Try each usable bridge-token candidate in priority order until one composes a bundle. A
3295
- * `buildBundleThroughBridge` that returns null or throws (build failure) moves on to the next
3296
- * candidate; abort errors always propagate. When NO candidate is usable but some were dropped
3297
- * solely for an existing opposite-side position, throws
3298
- * `TransactionBuildingError.bridgeConflict` (the caller-facing "close that position" signal);
3299
- * otherwise resolves null and the caller rethrows the direct build's error.
3300
- */
3301
- declare function tryBridgeCandidates(args: {
3302
- usableBridgeBanks: BankType[];
3303
- conflictingBridgeBanks: BankType[];
3304
- bridgeTokenSide: BridgeTokenSide;
3305
- abortSignal?: AbortSignal;
3306
- /** Build the two-leg bundle through one candidate bank; null = didn't work, try the next. */
3307
- buildBundleThroughBridge: (bridgeBank: BankType) => Promise<BridgedTxResult | null>;
3308
- }): Promise<BridgedTxResult | null>;
3309
- /** The flow context shared verbatim by both legs of every bridged build. */
3310
- type SharedBridgeLegContext = Pick<MakeSwapDebtTxParams, "program" | "marginfiAccount" | "connection" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "assetShareValueMultiplierByBank" | "swapOpts" | "addressLookupTableAccounts" | "overrideInferAccounts" | "crossbarUrl" | "swapEngineRunner">;
3311
- declare function sharedBridgeLegContext(params: SharedBridgeLegContext): SharedBridgeLegContext;
3312
-
3313
3069
  /**
3314
3070
  * Creates an instruction to close a Marginfi account.
3315
3071
  *
@@ -3407,7 +3163,7 @@ declare function makeCreateAccountIxWithProjection(props: {
3407
3163
  declare function makeCreateMarginfiAccountTx(program: MarginfiProgram, authority: PublicKey, groupAddress: PublicKey, addressLookupTables: AddressLookupTableAccount[], accountIndex: number, thirdPartyId?: number): Promise<SolanaTransaction>;
3408
3164
  declare function makeCreateMarginfiAccountIx(program: MarginfiProgram, authority: PublicKey, groupAddress: PublicKey, accountIndex: number, thirdPartyId?: number): Promise<TransactionInstruction>;
3409
3165
  declare function makeSetupIx({ connection, authority, tokens }: MakeSetupIxParams): Promise<TransactionInstruction[]>;
3410
- declare function makePulseHealthIx(program: MarginfiProgram, marginfiAccount: MarginfiAccountType, banks: Map<string, BankType>, mandatoryBanks: PublicKey[], excludedBanks: PublicKey[]): Promise<{
3166
+ declare function makePulseHealthIx(program: MarginfiProgram, marginfiAccountPk: PublicKey, banks: Map<string, BankType>, balances: BalanceType[], mandatoryBanks: PublicKey[], excludedBanks: PublicKey[]): Promise<{
3411
3167
  instructions: TransactionInstruction[];
3412
3168
  keys: never[];
3413
3169
  }>;
@@ -3667,23 +3423,7 @@ declare function makeLoopTx(params: MakeLoopTxParams): Promise<{
3667
3423
  transactions: ExtendedV0Transaction[];
3668
3424
  actionTxIndex: number;
3669
3425
  quoteResponse: SwapQuoteResult | undefined;
3670
- /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3671
- * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3672
- mustBeAtomicBundle: boolean;
3673
3426
  }>;
3674
- interface MakeBridgedLoopTxParams extends MakeLoopTxParams {
3675
- bridgeOpts?: BridgeOpts;
3676
- }
3677
- /**
3678
- * {@link makeLoopTx} with a transparent bridged fallback: if the direct loop's borrow→deposit swap
3679
- * can't fit one tx or has no route, loop P borrowing a value-equivalent amount of a bridge token,
3680
- * then debt-swap the bridge debt → X, as one atomic bundle.
3681
- *
3682
- * Intended for existing accounts — a fresh account's loop has a minimal footprint and fits the
3683
- * direct path, so callers creating the account in the same flow should call {@link makeLoopTx}
3684
- * directly.
3685
- */
3686
- declare function makeBridgedLoopTx(params: MakeBridgedLoopTxParams): Promise<BridgedTxResult>;
3687
3427
 
3688
3428
  /**
3689
3429
  * Creates a repay instruction for repaying borrowed assets to a Marginfi bank.
@@ -3743,7 +3483,6 @@ declare function makeRepayWithCollatTx(params: MakeRepayWithCollatTxParams): Pro
3743
3483
  transactions: ExtendedV0Transaction[];
3744
3484
  swapQuote: SwapQuoteResult | undefined;
3745
3485
  amountToRepay: number;
3746
- mustBeAtomicBundle: boolean;
3747
3486
  }>;
3748
3487
 
3749
3488
  declare function makeBeginFlashLoanIx(program: MarginfiProgram, marginfiAccountPk: PublicKey, endIndex: number, authority?: PublicKey, isSync?: boolean): Promise<InstructionsWrapper>;
@@ -3773,19 +3512,7 @@ declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promi
3773
3512
  transactions: ExtendedV0Transaction[];
3774
3513
  actionTxIndex: number;
3775
3514
  quoteResponse: SwapQuoteResult | undefined;
3776
- /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3777
- * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3778
- mustBeAtomicBundle: boolean;
3779
3515
  }>;
3780
- interface MakeBridgedSwapCollateralTxParams extends MakeSwapCollateralTxParams {
3781
- bridgeOpts?: BridgeOpts;
3782
- }
3783
- /**
3784
- * {@link makeSwapCollateralTx} with a transparent bridged fallback: if the direct swap `A → C`
3785
- * can't fit one tx or has no route, decompose it into `A → bridge` + `bridge → C` through a
3786
- * high-liquidity bridge collateral, composed into one atomic bundle.
3787
- */
3788
- declare function makeBridgedSwapCollateralTx(params: MakeBridgedSwapCollateralTxParams): Promise<BridgedTxResult>;
3789
3516
 
3790
3517
  /**
3791
3518
  * Creates transactions to swap one debt position to another using a flash loan.
@@ -3810,21 +3537,7 @@ declare function makeSwapDebtTx(params: MakeSwapDebtTxParams): Promise<{
3810
3537
  transactions: ExtendedV0Transaction[];
3811
3538
  actionTxIndex: number;
3812
3539
  quoteResponse: SwapQuoteResult | undefined;
3813
- /** true → send as ONE atomic Jito bundle (integration refreshes go stale within a slot);
3814
- * false → sequential sends are safe (cranked oracles allow ≥ ~1 min staleness). */
3815
- mustBeAtomicBundle: boolean;
3816
3540
  }>;
3817
- interface MakeBridgedSwapDebtTxParams extends MakeSwapDebtTxParams {
3818
- bridgeOpts?: BridgeOpts;
3819
- }
3820
- /**
3821
- * {@link makeSwapDebtTx} with a transparent bridged fallback: if the direct debt swap `A → C`
3822
- * (repay A by borrowing C) can't fit one tx or has no route, decompose it into `A → bridge` +
3823
- * `bridge → C` through a borrowable bridge debt, as one atomic bundle. The first leg repays A by
3824
- * borrowing the bridge; the second leg repays exactly the bridge the first leg borrowed and
3825
- * borrows C.
3826
- */
3827
- declare function makeBridgedSwapDebtTx(params: MakeBridgedSwapDebtTxParams): Promise<BridgedTxResult>;
3828
3541
 
3829
3542
  /**
3830
3543
  * Roll a matured Exponent PT collateral position into its next-maturity PT, so the **full
@@ -3906,107 +3619,6 @@ declare function mergeBridgeQuotesLoop(firstLeg: SwapQuoteResult, secondLeg: Swa
3906
3619
  */
3907
3620
  declare function composeBridgedSwap(params: ComposeBridgedSwapParams): Promise<ComposeBridgedSwapResult | null>;
3908
3621
 
3909
- interface ClassifiedPosition {
3910
- bankAddress: PublicKey;
3911
- side: TransferPositionSide;
3912
- /** UI amount of the position (collateral: withdrawn from A / deposited to B; debt: repaid on A). */
3913
- uiAmount: BigNumber;
3914
- bank: BankType;
3915
- tokenProgram: PublicKey;
3916
- }
3917
- /**
3918
- * Validate the selection, infer each position's side, and resolve its UI amount. Correctness of the
3919
- * transfer itself (both accounts staying healthy) is enforced on-chain by the flashloan's end health
3920
- * check on A and each borrow's health check on B — so no client-side health/USD math is needed.
3921
- */
3922
- declare function classifyAndValidate(params: MakeTransferPositionsTxParams): ClassifiedPosition[];
3923
- interface BuildContext {
3924
- program: MarginfiProgram;
3925
- accountA: MarginfiAccountType;
3926
- accountB: MarginfiAccountType;
3927
- bankMap: Map<string, BankType>;
3928
- bankMetadataMap: BankIntegrationMetadataMap;
3929
- assetShareValueMultiplierByBank: Map<string, BigNumber>;
3930
- borrowPaddingBps: number;
3931
- groupRateLimiterEnabled: boolean;
3932
- overrideInferAccounts?: {
3933
- group?: PublicKey;
3934
- authority?: PublicKey;
3935
- };
3936
- /** Banks the destination account already holds before the transfer starts. */
3937
- destPreexistingBanks: BankType[];
3938
- }
3939
- /**
3940
- * Build one collateral position's withdraw-from-A + deposit-into-B instructions, dispatching to the
3941
- * right builder for the bank's asset tag. This is the single place that defines which banks the
3942
- * action supports: `DEFAULT`/`SOL`/`STAKED` use the standard withdraw/deposit; `KAMINO`/`JUPLEND`
3943
- * use their dedicated builders (which lock the integration's reserve/vault accounts and, for Kamino,
3944
- * convert the underlying UI amount to cToken units); anything else throws
3945
- * `TRANSFER_POSITIONS_UNSUPPORTED_BANK`. The reserve/rate state each integration builder needs is
3946
- * read from `bankMetadataMap`; the on-chain refresh those reads depend on is emitted separately in
3947
- * `buildIntegrationRefreshIxs`.
3948
- *
3949
- * `observationBanksOverride` controls the withdraw leg's health pack (empty while A is flashloaned
3950
- * with the group limiter off; the withdrawn bank's oracle when it is on). The deposit leg runs no
3951
- * health check, so it needs none.
3952
- */
3953
- declare function buildCollateralLegIxs(ctx: BuildContext, position: ClassifiedPosition, isSync: boolean, observationBanksOverride: ReturnType<typeof computeHealthAccountMetas>): Promise<{
3954
- withdrawIxs: TransactionInstruction[];
3955
- depositIxs: TransactionInstruction[];
3956
- }>;
3957
- /**
3958
- * Atomically move a selected set of positions from account A to account B in a single flashloan.
3959
- * Per position: collateral → `withdraw(A)` + `deposit(B)`; debt → `borrow(B)` + `repay(A)`. Returns
3960
- * unsigned transactions ordered for sequential execution (setup/refresh + crank first, then the
3961
- * flashloan); the caller signs and sends them.
3962
- *
3963
- * The whole transfer must fit one v0 transaction — the selection is capped at `maxPositions`
3964
- * (default 5), and the built flashloan is size-checked, throwing `TRANSFER_POSITIONS_UNSPLITTABLE`
3965
- * if it still overflows (possible with several integration positions). Transfer larger sets in
3966
- * batches. Correctness (both accounts staying healthy) is enforced on-chain: `endFL(A)` checks A's
3967
- * remainder and each `borrow(B)` checks B — no client-side health prediction.
3968
- *
3969
- * Supported asset tags: `DEFAULT`/`SOL`/`STAKED` on either leg, and the collateral-only integrations
3970
- * `KAMINO`/`JUPLEND` on the collateral leg (dedicated builders + a preceding reserve/rate refresh).
3971
- * `DRIFT`/`SOLEND` are rejected.
3972
- *
3973
- * Runtime notes:
3974
- * - Each borrow-before-repay transiently spikes the debt bank's rate-limit window; a bank near its
3975
- * cap can revert with `BankHourly/DailyRateLimitExceeded`. The whole flashloan reverts atomically,
3976
- * so this is safe and retryable — treat it as such.
3977
- * - Integration (Kamino/JupLend) reserve/rate refresh rides in the prelude transaction and requires
3978
- * `bankMetadataMap` to carry fresh `kaminoStates`/`jupLendStates`.
3979
- * - All transactions share one blockhash; execute them in order within its validity window.
3980
- * - Dust (borrow padding minus accrued interest; withdraw-all/cToken-conversion excess) remains in
3981
- * the wallet ATAs.
3982
- */
3983
- declare function makeTransferPositionsTx(params: MakeTransferPositionsTxParams): Promise<TransferPositionsResult>;
3984
-
3985
- /**
3986
- * Withdraw the FULL position of every given bank, packing as many withdraws
3987
- * per transaction as fit the size/lock limits. Venue dispatch (Kamino /
3988
- * JupLend / Drift / standard) and the per-instruction health packs live here:
3989
- * each withdraw's remaining accounts exclude every bank already closed by the
3990
- * withdraws before it — across the whole ordered batch — because the on-chain
3991
- * health check runs against the account's live (shrinking) balance set.
3992
- *
3993
- * The returned transactions MUST land as one atomic Jito bundle (same slot,
3994
- * sequential): the integration refreshes (Kamino reserves + obligations, rate
3995
- * cranks) live in a single prelude tx rather than in each withdraw tx, and
3996
- * Klend's slot-based staleness checks only stay satisfied when the withdraws
3997
- * execute in the refresh's slot.
3998
- *
3999
- * Returns `[ATA setup txs…, crank tx?, refresh tx?, withdraw txs…]`;
4000
- * `actionTxIndex` points at the first withdraw tx.
4001
- */
4002
- declare function makeBulkWithdrawTx(params: MakeBulkWithdrawTxParams): Promise<BulkLendTxsResult>;
4003
- /**
4004
- * Repay the FULL debt of every given bank from the wallet, packing as many
4005
- * repays per transaction as fit. Repays carry no health pack and need no
4006
- * oracle cranks, so most batches are a single transaction.
4007
- */
4008
- declare function makeBulkRepayTx(params: MakeBulkRepayTxParams): Promise<BulkLendTxsResult>;
4009
-
4010
3622
  type MakeSmartCrankSwbFeedIxParams = {
4011
3623
  marginfiAccount: MarginfiAccountType;
4012
3624
  bankMap: Map<string, BankType>;
@@ -4027,25 +3639,6 @@ declare function makeSmartCrankSwbFeedIx(params: MakeSmartCrankSwbFeedIxParams):
4027
3639
  instructions: TransactionInstruction[];
4028
3640
  luts: AddressLookupTableAccount[];
4029
3641
  }>;
4030
- type MakeSmartCrankSwbFeedIxForAccountsParams = Omit<MakeSmartCrankSwbFeedIxParams, "marginfiAccount"> & {
4031
- /**
4032
- * Accounts targeted by instructions in the set. Each account is projected against
4033
- * the instructions that operate on it (the projection filters by account), so the
4034
- * same full instruction list serves every account. The first account's authority
4035
- * pays the feed updates.
4036
- */
4037
- marginfiAccounts: MarginfiAccountType[];
4038
- };
4039
- /**
4040
- * Multi-account variant of {@link makeSmartCrankSwbFeedIx} for instruction sets that
4041
- * span several marginfi accounts (e.g. transferring positions: the source is cranked
4042
- * against its withdraws, the destination against its projected post-transfer
4043
- * deposits). Overlapping feeds across accounts are cranked once.
4044
- */
4045
- declare function makeSmartCrankSwbFeedIxForAccounts(params: MakeSmartCrankSwbFeedIxForAccountsParams): Promise<{
4046
- instructions: TransactionInstruction[];
4047
- luts: AddressLookupTableAccount[];
4048
- }>;
4049
3642
  declare const DEFAULT_CROSSBAR_URL = "https://crossbar.0.xyz";
4050
3643
  declare const DEFAULT_FALLBACK_CROSSBAR_URL = "https://crossbar.switchboard.xyz";
4051
3644
  declare function makeCrankSwbFeedIx(marginfiAccount: MarginfiAccountType, bankMap: Map<string, BankType>, newBanksPk: PublicKey[], provider: AnchorProvider, crossbarUrl?: string): Promise<{
@@ -4116,23 +3709,6 @@ declare function makeUpdateDriftMarketIxs(marginfiAccount: MarginfiAccountType,
4116
3709
  */
4117
3710
  declare function makeUpdateJupLendRateIxs(marginfiAccount: MarginfiAccountType, bankMap: Map<string, BankType>, banksToExclude: PublicKey[], bankMetadataMap: BankIntegrationMetadataMap): InstructionsWrapper;
4118
3711
 
4119
- /**
4120
- * Groups the per-integration refresh/update instructions (Kamino reserve refresh,
4121
- * Drift spot market update, JupLend rate update) into a single wrapper.
4122
- *
4123
- * JupLend and Drift action instructions update their own bank via CPI, so the bank
4124
- * being acted on is excluded from those updates. Kamino has no such CPI, so the
4125
- * action bank must be explicitly included in the refresh set instead.
4126
- *
4127
- * @param marginfiAccount - The marginfi account containing active bank balances
4128
- * @param bankMap - Map of bank addresses (base58) to bank instances
4129
- * @param banksToExclude - Banks skipped for the JupLend/Drift updates (their CPI already updates them)
4130
- * @param bankMetadataMap - Map containing Bank-specific metadata (integration states)
4131
- * @param kaminoNewBanksPk - Banks to union into the Kamino refresh set, defaults to `banksToExclude`
4132
- * @returns InstructionsWrapper with instructions ordered kamino -> drift -> juplend
4133
- */
4134
- declare function makeRefreshIntegrationBanksIxs(marginfiAccount: MarginfiAccountType, bankMap: Map<string, BankType>, banksToExclude: PublicKey[], bankMetadataMap: BankIntegrationMetadataMap, kaminoNewBanksPk?: PublicKey[]): InstructionsWrapper;
4135
-
4136
3712
  type ValidatorVoteAccountByBank = {
4137
3713
  [address: string]: string;
4138
3714
  };
@@ -4437,14 +4013,6 @@ declare function computeBankBorrowApy(bank: BankType): number;
4437
4013
  */
4438
4014
  declare function computeBankMetrics(params: ComputeBankMetricsParams): BankMetrics;
4439
4015
 
4440
- /**
4441
- * Lookup-or-throw helpers for action-builder inputs. The optional `makeError`
4442
- * lets callers throw their own typed error (e.g. a TransactionBuildingError
4443
- * with user-facing copy) instead of a plain Error.
4444
- */
4445
- declare function requireBank(bankMap: Map<string, BankType>, address: PublicKey, makeError?: (message: string) => Error): BankType;
4446
- declare function requireTokenProgram(tokenProgramsByBank: Map<string, PublicKey>, address: PublicKey, makeError?: (message: string) => Error): PublicKey;
4447
-
4448
4016
  /**
4449
4017
  * Fee state cache - stores information from the global FeeState
4450
4018
  * so the FeeState can be omitted on certain instructions
@@ -5062,11 +4630,7 @@ declare enum TransactionBuildingErrorCode {
5062
4630
  DRIFT_STATE_NOT_FOUND = "DRIFT_STATE_NOT_FOUND",
5063
4631
  JUPLEND_STATE_NOT_FOUND = "JUPLEND_STATE_NOT_FOUND",
5064
4632
  SWITCHBOARD_FEED_UPDATE_FAILED = "SWITCHBOARD_FEED_UPDATE_FAILED",
5065
- SWAP_QUOTE_FAILED = "SWAP_QUOTE_FAILED",
5066
- TRANSFER_POSITIONS_INVALID_SELECTION = "TRANSFER_POSITIONS_INVALID_SELECTION",
5067
- TRANSFER_POSITIONS_UNSUPPORTED_BANK = "TRANSFER_POSITIONS_UNSUPPORTED_BANK",
5068
- TRANSFER_POSITIONS_UNSPLITTABLE = "TRANSFER_POSITIONS_UNSPLITTABLE",
5069
- BRIDGE_CONFLICT = "BRIDGE_CONFLICT"
4633
+ SWAP_QUOTE_FAILED = "SWAP_QUOTE_FAILED"
5070
4634
  }
5071
4635
  /**
5072
4636
  * Typed details for each error code
@@ -5126,30 +4690,6 @@ interface TransactionBuildingErrorDetails {
5126
4690
  outputMint: string;
5127
4691
  reason: string;
5128
4692
  };
5129
- [TransactionBuildingErrorCode.TRANSFER_POSITIONS_INVALID_SELECTION]: {
5130
- reason: string;
5131
- bankAddresses: string[];
5132
- };
5133
- [TransactionBuildingErrorCode.TRANSFER_POSITIONS_UNSUPPORTED_BANK]: {
5134
- bankAddress: string;
5135
- assetTag: number;
5136
- bankSymbol?: string;
5137
- };
5138
- [TransactionBuildingErrorCode.TRANSFER_POSITIONS_UNSPLITTABLE]: {
5139
- reason: string;
5140
- sizeBytes?: number;
5141
- accountCount?: number;
5142
- };
5143
- [TransactionBuildingErrorCode.BRIDGE_CONFLICT]: {
5144
- /** Bridge-token candidate banks blocked by an existing opposite-side account position. */
5145
- conflictingBanks: Array<{
5146
- bankAddress: string;
5147
- mint: string;
5148
- symbol?: string;
5149
- }>;
5150
- /** Whether the bridge token would have been held as collateral ("deposit") or debt ("borrow"). */
5151
- bridgeTokenSide: "deposit" | "borrow";
5152
- };
5153
4693
  }
5154
4694
  /**
5155
4695
  * Error thrown during transaction building in the SDK.
@@ -5197,32 +4737,6 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
5197
4737
  * Failed to get a swap quote from any provider
5198
4738
  */
5199
4739
  static swapQuoteFailed(provider: string, inputMint: string, outputMint: string, reason: string): TransactionBuildingError<TransactionBuildingErrorCode.SWAP_QUOTE_FAILED>;
5200
- /**
5201
- * The requested set of positions to transfer is invalid (inactive bank on the source,
5202
- * destination overlap, capacity/slot conflict, group/authority mismatch, etc.).
5203
- */
5204
- static transferPositionsInvalidSelection(reason: string, bankAddresses: string[]): TransactionBuildingError<TransactionBuildingErrorCode.TRANSFER_POSITIONS_INVALID_SELECTION>;
5205
- /**
5206
- * A selected position lives in a bank whose asset tag is not supported by transfer-positions
5207
- * (v1 supports DEFAULT and STAKED only).
5208
- */
5209
- static transferPositionsUnsupportedBank(bankAddress: string, assetTag: number, bankSymbol?: string): TransactionBuildingError<TransactionBuildingErrorCode.TRANSFER_POSITIONS_UNSUPPORTED_BANK>;
5210
- /**
5211
- * The built transfer transaction exceeds the v0 size / account-lock limits even at the position
5212
- * cap (most likely several integration positions whose reserve accounts overflow the 64-lock cap).
5213
- * Retry with fewer positions in the selection.
5214
- */
5215
- static transferPositionsUnsplittable(reason: string, sizeBytes?: number, accountCount?: number): TransactionBuildingError<TransactionBuildingErrorCode.TRANSFER_POSITIONS_UNSPLITTABLE>;
5216
- /**
5217
- * A bridged (double-hop) swap could not route because every bridge-token candidate bank
5218
- * conflicts with an existing opposite-side position on the account (marginfi forbids holding an
5219
- * asset and a liability on the same bank).
5220
- */
5221
- static bridgeConflict(conflictingBanks: Array<{
5222
- bankAddress: string;
5223
- mint: string;
5224
- symbol?: string;
5225
- }>, bridgeTokenSide: "deposit" | "borrow"): TransactionBuildingError<TransactionBuildingErrorCode.BRIDGE_CONFLICT>;
5226
4740
  /**
5227
4741
  * Generic escape hatch for custom errors
5228
4742
  */
@@ -5239,13 +4753,6 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
5239
4753
  * (which would otherwise throw a raw serialization `RangeError`) as `SWAP_SIZE_EXCEEDED_LOOP`.
5240
4754
  */
5241
4755
  declare function isDecomposableSwapError(e: unknown): e is TransactionBuildingError;
5242
- /**
5243
- * Whether a build failure is a bridged-swap conflict: the direct build failed AND every
5244
- * bridge-token candidate was blocked by an existing opposite-side position on the account.
5245
- * Narrows to the typed details (`conflictingBanks`, `bridgeTokenSide`) so callers can surface a
5246
- * "close that position or pick a different pair" message.
5247
- */
5248
- declare function isBridgeConflictError(e: unknown): e is TransactionBuildingError<TransactionBuildingErrorCode.BRIDGE_CONFLICT>;
5249
4756
 
5250
4757
  declare const PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED: Buffer<ArrayBuffer>;
5251
4758
  declare const PDA_BANK_INSURANCE_VAULT_AUTH_SEED: Buffer<ArrayBuffer>;
@@ -5429,7 +4936,6 @@ declare const PRIORITY_TX_SIZE: number;
5429
4936
  declare const WSOL_MINT: PublicKey;
5430
4937
  declare const LST_MINT: PublicKey;
5431
4938
  declare const USDC_MINT: PublicKey;
5432
- declare const USDT_MINT: PublicKey;
5433
4939
  declare const USDC_DECIMALS = 6;
5434
4940
 
5435
4941
  declare class Balance implements BalanceType {
@@ -5919,67 +5425,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
5919
5425
  transactions: ExtendedV0Transaction[];
5920
5426
  actionTxIndex: number;
5921
5427
  quoteResponse: SwapQuoteResult | undefined;
5922
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
5923
- * false → sequential sends are safe. */
5924
- mustBeAtomicBundle: boolean;
5925
5428
  }>;
5926
- /**
5927
- * Atomically move a selected set of positions from this account to a destination account
5928
- * (same authority, same group) using flashloans, auto-splitting across transactions as needed.
5929
- *
5930
- * @see {@link makeTransferPositionsTx} for detailed implementation
5931
- */
5932
- makeTransferPositionsTx(params: Omit<MakeTransferPositionsTxParams, "marginfiAccount">): Promise<TransferPositionsResult>;
5933
- /**
5934
- * Creates a loop transaction with a transparent bridged (double-hop) fallback.
5935
- *
5936
- * One call: tries the direct {@link makeLoopTx} first; if its borrow→deposit swap can't fit one
5937
- * transaction (size / account-locks) or has no route, it loops the deposit asset against a
5938
- * value-equivalent borrow of a high-liquidity bridge token, then debt-swaps the bridge debt to
5939
- * the requested borrow asset — both legs composed into ONE atomic Jito bundle.
5940
- *
5941
- * Bridge candidates default to USDC → wSOL → USDT and can be reordered/overridden via
5942
- * `params.bridgeOpts.bridgeCandidateMints`; `bridgeOpts` also accepts known token programs (skips RPC
5943
- * lookups), a bundle-size ceiling, and an abort signal. `result.bridgeMint` is set only when the
5944
- * bridged path was used.
5945
- *
5946
- * Intended for existing accounts — a fresh account's loop fits the direct path, so flows that
5947
- * create the account in the same action should call {@link makeLoopTx} directly.
5948
- *
5949
- * @param params - Loop transaction parameters plus optional `bridgeOpts`
5950
- * @returns Object containing transactions, action index, merged swap quote, and the bridge mint
5951
- *
5952
- * @see {@link makeBridgedLoopTx} for detailed implementation
5953
- */
5954
- makeBridgedLoopTx(params: Omit<MakeBridgedLoopTxParams, "marginfiAccount">): Promise<BridgedTxResult>;
5955
- /**
5956
- * Creates a collateral-swap transaction with a transparent bridged (double-hop) fallback.
5957
- *
5958
- * One call: tries the direct {@link makeSwapCollateralTx} first; if the swap `A → C` can't fit
5959
- * one transaction or has no route, it decomposes into `A → bridge` + `bridge → C` through a
5960
- * high-liquidity bridge collateral, both legs composed into ONE atomic Jito bundle. See
5961
- * {@link makeBridgedLoopTx} for the `bridgeOpts` knobs.
5962
- *
5963
- * @param params - Swap collateral transaction parameters plus optional `bridgeOpts`
5964
- * @returns Object containing transactions, action index, merged swap quote, and the bridge mint
5965
- *
5966
- * @see {@link makeBridgedSwapCollateralTx} for detailed implementation
5967
- */
5968
- makeBridgedSwapCollateralTx(params: Omit<MakeBridgedSwapCollateralTxParams, "marginfiAccount">): Promise<BridgedTxResult>;
5969
- /**
5970
- * Creates a debt-swap transaction with a transparent bridged (double-hop) fallback.
5971
- *
5972
- * One call: tries the direct {@link makeSwapDebtTx} first; if the swap `A → C` can't fit one
5973
- * transaction or has no route, the first leg repays A by borrowing a bridge token and the second
5974
- * leg repays exactly that bridge debt while borrowing C — both legs composed into ONE atomic
5975
- * Jito bundle. See {@link makeBridgedLoopTx} for the `bridgeOpts` knobs.
5976
- *
5977
- * @param params - Swap debt transaction parameters plus optional `bridgeOpts`
5978
- * @returns Object containing transactions, action index, merged swap quote, and the bridge mint
5979
- *
5980
- * @see {@link makeBridgedSwapDebtTx} for detailed implementation
5981
- */
5982
- makeBridgedSwapDebtTx(params: Omit<MakeBridgedSwapDebtTxParams, "marginfiAccount">): Promise<BridgedTxResult>;
5983
5429
  /**
5984
5430
  * Creates a transaction to repay debt using collateral.
5985
5431
  *
@@ -6012,9 +5458,6 @@ declare class MarginfiAccount implements MarginfiAccountType {
6012
5458
  transactions: ExtendedV0Transaction[];
6013
5459
  swapQuote: SwapQuoteResult | undefined;
6014
5460
  amountToRepay: number;
6015
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6016
- * false → sequential sends are safe. */
6017
- mustBeAtomicBundle: boolean;
6018
5461
  }>;
6019
5462
  /**
6020
5463
  * Creates a transaction to swap one collateral position to another using a flash loan.
@@ -6049,9 +5492,6 @@ declare class MarginfiAccount implements MarginfiAccountType {
6049
5492
  transactions: ExtendedV0Transaction[];
6050
5493
  actionTxIndex: number;
6051
5494
  quoteResponse: SwapQuoteResult | undefined;
6052
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6053
- * false → sequential sends are safe. */
6054
- mustBeAtomicBundle: boolean;
6055
5495
  }>;
6056
5496
  /**
6057
5497
  * Creates a transaction to roll a matured Exponent PT collateral position into its
@@ -6098,9 +5538,6 @@ declare class MarginfiAccount implements MarginfiAccountType {
6098
5538
  transactions: ExtendedV0Transaction[];
6099
5539
  actionTxIndex: number;
6100
5540
  quoteResponse: SwapQuoteResult | undefined;
6101
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6102
- * false → sequential sends are safe. */
6103
- mustBeAtomicBundle: boolean;
6104
5541
  }>;
6105
5542
  /**
6106
5543
  * Creates a deposit transaction.
@@ -6461,18 +5898,7 @@ declare class MarginfiAccountWrapper {
6461
5898
  transactions: ExtendedV0Transaction[];
6462
5899
  actionTxIndex: number;
6463
5900
  quoteResponse: SwapQuoteResult | undefined;
6464
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6465
- * false → sequential sends are safe. */
6466
- mustBeAtomicBundle: boolean;
6467
5901
  }>;
6468
- /**
6469
- * Atomically move a selected set of positions from this account to a destination account with
6470
- * auto-injected client data.
6471
- *
6472
- * Auto-injects: program, connection, marginfiAccount, bankMap, oraclePrices, bankMetadataMap,
6473
- * assetShareValueMultiplierByBank, addressLookupTables, tokenProgramsByBank, groupRateLimiterEnabled.
6474
- */
6475
- makeTransferPositionsTx(params: Omit<MakeTransferPositionsTxParams, "program" | "connection" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "assetShareValueMultiplierByBank" | "addressLookupTableAccounts" | "tokenProgramsByBank" | "groupRateLimiterEnabled">): Promise<TransferPositionsResult>;
6476
5902
  /**
6477
5903
  * Creates a repay with collateral transaction with auto-injected client data.
6478
5904
  *
@@ -6484,9 +5910,6 @@ declare class MarginfiAccountWrapper {
6484
5910
  transactions: ExtendedV0Transaction[];
6485
5911
  swapQuote: SwapQuoteResult | undefined;
6486
5912
  amountToRepay: number;
6487
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6488
- * false → sequential sends are safe. */
6489
- mustBeAtomicBundle: boolean;
6490
5913
  }>;
6491
5914
  /**
6492
5915
  * Creates a swap collateral transaction with auto-injected client data.
@@ -6502,9 +5925,6 @@ declare class MarginfiAccountWrapper {
6502
5925
  transactions: ExtendedV0Transaction[];
6503
5926
  actionTxIndex: number;
6504
5927
  quoteResponse: SwapQuoteResult | undefined;
6505
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6506
- * false → sequential sends are safe. */
6507
- mustBeAtomicBundle: boolean;
6508
5928
  }>;
6509
5929
  /**
6510
5930
  * Rolls a matured Exponent PT collateral position into its next-maturity PT, with
@@ -6534,56 +5954,7 @@ declare class MarginfiAccountWrapper {
6534
5954
  transactions: ExtendedV0Transaction[];
6535
5955
  actionTxIndex: number;
6536
5956
  quoteResponse: SwapQuoteResult | undefined;
6537
- /** true → send as ONE atomic Jito bundle (bridged legs / integration refreshes);
6538
- * false → sequential sends are safe. */
6539
- mustBeAtomicBundle: boolean;
6540
5957
  }>;
6541
- /**
6542
- * Creates a loop (leverage) transaction with a transparent bridged (double-hop) fallback and
6543
- * auto-injected client data.
6544
- *
6545
- * One call: tries the direct {@link makeLoopTx} first; if its borrow→deposit swap can't fit one
6546
- * transaction or has no route, it loops the deposit asset against a value-equivalent borrow of a
6547
- * bridge token (USDC/wSOL/USDT by default, override via `bridgeOpts.bridgeCandidateMints`) and
6548
- * debt-swaps that bridge debt to the requested borrow asset — one atomic Jito bundle.
6549
- * `result.bridgeMint` is set only when the bridged path was used.
6550
- *
6551
- * Auto-injects: program, marginfiAccount, bankMap, oraclePrices, bankMetadataMap,
6552
- * addressLookupTables, assetShareValueMultiplierByBank
6553
- *
6554
- * @param params - Loop parameters (user provides: connection, depositOpts, borrowOpts, swapOpts, bridgeOpts?, etc.)
6555
- */
6556
- makeBridgedLoopTx(params: Omit<MakeBridgedLoopTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts" | "assetShareValueMultiplierByBank">): Promise<BridgedTxResult>;
6557
- /**
6558
- * Creates a collateral-swap transaction with a transparent bridged (double-hop) fallback and
6559
- * auto-injected client data.
6560
- *
6561
- * One call: tries the direct {@link makeSwapCollateralTx} first; if the swap `A → C` can't fit
6562
- * one transaction or has no route, it decomposes into `A → bridge` + `bridge → C` through a
6563
- * bridge token, composed as one atomic Jito bundle. `result.bridgeMint` is set only when the
6564
- * bridged path was used.
6565
- *
6566
- * Auto-injects: program, marginfiAccount, bankMap, oraclePrices, bankMetadataMap,
6567
- * addressLookupTables, assetShareValueMultiplierByBank
6568
- *
6569
- * @param params - Swap collateral parameters (user provides: connection, withdrawOpts, depositOpts, swapOpts, bridgeOpts?, etc.)
6570
- */
6571
- makeBridgedSwapCollateralTx(params: Omit<MakeBridgedSwapCollateralTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts" | "assetShareValueMultiplierByBank">): Promise<BridgedTxResult>;
6572
- /**
6573
- * Creates a debt-swap transaction with a transparent bridged (double-hop) fallback and
6574
- * auto-injected client data.
6575
- *
6576
- * One call: tries the direct {@link makeSwapDebtTx} first; if the swap `A → C` can't fit one
6577
- * transaction or has no route, the first leg repays A by borrowing a bridge token and the second
6578
- * leg repays exactly that bridge debt while borrowing C — one atomic Jito bundle.
6579
- * `result.bridgeMint` is set only when the bridged path was used.
6580
- *
6581
- * Auto-injects: program, marginfiAccount, bankMap, oraclePrices, bankMetadataMap,
6582
- * addressLookupTables, assetShareValueMultiplierByBank
6583
- *
6584
- * @param params - Swap debt parameters (user provides: connection, repayOpts, borrowOpts, swapOpts, bridgeOpts?, etc.)
6585
- */
6586
- makeBridgedSwapDebtTx(params: Omit<MakeBridgedSwapDebtTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts" | "assetShareValueMultiplierByBank">): Promise<BridgedTxResult>;
6587
5958
  /**
6588
5959
  * Creates a deposit transaction with auto-injected client data.
6589
5960
  *
@@ -6788,4 +6159,4 @@ declare class MarginfiAccountWrapper {
6788
6159
  getClient(): Project0Client;
6789
6160
  }
6790
6161
 
6791
- 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, type ResolvedPinnedSwapRoute, 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, resolvePinnedSwapRoute, 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 };
6162
+ 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 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 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 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 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, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, 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, 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, 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, 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 };