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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -8,8 +8,8 @@ import { Idl, Instruction, AnchorProvider, Address } from '@coral-xyz/anchor';
8
8
  import BN from 'bn.js';
9
9
  import BigNumber$1 from 'bignumber.js';
10
10
  import { R as ReserveRaw, D as DriftSpotMarket, b as DriftRewards, J as JupLendingState, g as ReserveJSON, h as ObligationJSON, i as FarmStateJSON, O as ObligationRaw, F as FarmStateRaw, j as DriftSpotMarketJSON, k as DriftUserJSON, l as DriftRewardsJSON, m as DriftUserStatsJSON, a as DriftUser, c as DriftUserStats, n as JupLendingStateJSON, o as JupTokenReserveJSON, p as JupLendingRewardsRateModelJSON, q as JupRateModelJSON, d as JupTokenReserve, e as JupLendingRewardsRateModel, f as JupRateModel } from './dto-rate-model.types-DveIB9Ll.js';
11
+ import { F as FeedResponse, b as ExponentMergeAccounts } from './merge.types-BS8s5Ck0.js';
11
12
  import { JupiterClientConfig, QuoteGetRequest, QuoteResponse } from './jupiter.js';
12
- import { F as FeedResponse } from './index-BDDVBMdM.js';
13
13
 
14
14
  interface RpcSimulateBundleTransactionResult {
15
15
  err?: TransactionError;
@@ -721,6 +721,97 @@ declare class HealthCacheSimulationError extends Error {
721
721
  constructor(message: string, mrgnErr: number | null, internalErr: number | null);
722
722
  }
723
723
 
724
+ /**
725
+ * The footprint of everything in the flashloan transaction *except* the swap.
726
+ * Drives both the Titan V3 `transactionTemplate` (precise route sizing) and the
727
+ * fit check / Jupiter account budget. `instructions` are the non-swap inner ixs
728
+ * (CU + primary + secondary), with NO begin/end-flashloan wrapper — the wrapper
729
+ * is optional context for Titan template accuracy only.
730
+ */
731
+ interface TxFootprint {
732
+ instructions: TransactionInstruction[];
733
+ luts: AddressLookupTableAccount[];
734
+ /** Begin/end-flashloan ixs, for Titan template sizing only (optional). */
735
+ wrapperInstructions?: TransactionInstruction[];
736
+ payer: PublicKey;
737
+ /** Available swap byte budget (net of the flashloan wrapper). */
738
+ sizeConstraint: number;
739
+ /** Available swap account-slot budget (net of the flashloan wrapper). */
740
+ maxSwapTotalAccounts: number;
741
+ }
742
+ /** Provider-agnostic swap request handed to the engine. */
743
+ interface SwapEngineRequest {
744
+ inputMint: string;
745
+ outputMint: string;
746
+ /** ExactIn input amount in native (base) units. */
747
+ amountNative: number;
748
+ inputDecimals: number;
749
+ outputDecimals: number;
750
+ slippageBps?: number;
751
+ slippageMode?: "DYNAMIC" | "FIXED";
752
+ platformFeeBps?: number;
753
+ directRoutesOnly?: boolean;
754
+ taker: PublicKey;
755
+ destinationTokenAccount: PublicKey;
756
+ connection: Connection;
757
+ /** Required for the build path; ignored by the ExactOut estimate path. */
758
+ footprint?: TxFootprint;
759
+ /** Ordered providers to query (each with its own apiConfig). */
760
+ providers: SwapProviderEntry[];
761
+ /** Optional override for the Jupiter maxAccounts ladder. */
762
+ jupiterMaxAccountsLadder?: number[];
763
+ }
764
+ /** A single route returned by a provider adapter, before the engine fit check. */
765
+ interface ProviderSwapRoute {
766
+ provider: SwapProvider;
767
+ swapInstructions: TransactionInstruction[];
768
+ setupInstructions: TransactionInstruction[];
769
+ luts: AddressLookupTableAccount[];
770
+ /** Expected output (ExactIn) in native units. */
771
+ outAmountNative: BN;
772
+ /** Minimum guaranteed output after slippage, in native units. */
773
+ otherAmountThresholdNative: BN;
774
+ quoteResult: SwapQuoteResult;
775
+ /** Optional label for diagnostics (e.g. Jupiter maxAccounts rung). */
776
+ label?: string;
777
+ }
778
+ /** A provider route annotated with the engine's fit verdict. */
779
+ interface SwapCandidate extends ProviderSwapRoute {
780
+ fullTxSize: number;
781
+ totalAccounts: number;
782
+ fits: boolean;
783
+ }
784
+ /** Engine output — the exact shape the flashloan finalize step consumes. */
785
+ interface SwapEngineResult {
786
+ swapInstructions: TransactionInstruction[];
787
+ setupInstructions: TransactionInstruction[];
788
+ swapLuts: AddressLookupTableAccount[];
789
+ quoteResponse: SwapQuoteResult;
790
+ outputAmountNative: BN;
791
+ /** Winning provider, for diagnostics. */
792
+ provider: SwapProvider;
793
+ }
794
+ /**
795
+ * Pluggable engine executor. Defaults to the in-process `runSwapEngine`; the app
796
+ * injects a runner that forwards to the server-side `/api/tx/swap-engine` so the
797
+ * provider fan-out happens once, server-side (Design B).
798
+ */
799
+ type SwapEngineRunner = (req: SwapEngineRequest) => Promise<SwapEngineResult>;
800
+ /**
801
+ * A provider implementation. Add a provider = add an adapter + register it.
802
+ *
803
+ * Note: there is intentionally no ExactOut capability here. Provider ExactOut
804
+ * quotes are unreliable and Jupiter Router `/build` is ExactIn-only, so callers
805
+ * that need a target output (e.g. swap-debt) size the input from a market-price
806
+ * calculation and route ExactIn instead.
807
+ */
808
+ interface SwapAdapter {
809
+ name: SwapProvider;
810
+ supportsBuild: boolean;
811
+ /** Fetch one or more candidate routes (Jupiter returns several rungs). */
812
+ buildCandidates(req: SwapEngineRequest, apiConfig?: SwapApiConfig): Promise<ProviderSwapRoute[]>;
813
+ }
814
+
724
815
  declare enum SwapProvider {
725
816
  JUPITER = "JUPITER",
726
817
  TITAN = "TITAN",
@@ -728,6 +819,10 @@ declare enum SwapProvider {
728
819
  }
729
820
  interface SwapApiConfig {
730
821
  basePath?: string;
822
+ /** WebSocket endpoint (e.g. `wss://<host>/api/v1/ws`). Used by the Titan V3
823
+ * adapter, which sends the full footprint template inline over the socket to
824
+ * avoid the gateway GET's URL-length limit. */
825
+ wsUrl?: string;
731
826
  apiKey?: string;
732
827
  headers?: Record<string, string>;
733
828
  }
@@ -1050,11 +1145,13 @@ interface MakeLoopTxParams {
1050
1145
  depositBank: BankType;
1051
1146
  tokenProgram: PublicKey;
1052
1147
  loopMode: "DEPOSIT" | "BORROW";
1148
+ marketPrice: number;
1053
1149
  };
1054
1150
  borrowOpts: {
1055
1151
  borrowAmount: number;
1056
1152
  borrowBank: BankType;
1057
1153
  tokenProgram: PublicKey;
1154
+ marketPrice: number;
1058
1155
  };
1059
1156
  swapOpts: SwapOpts;
1060
1157
  addressLookupTableAccounts?: AddressLookupTableAccount[];
@@ -1064,6 +1161,34 @@ interface MakeLoopTxParams {
1064
1161
  };
1065
1162
  additionalIxs?: TransactionInstruction[];
1066
1163
  crossbarUrl?: string;
1164
+ /**
1165
+ * Optional override for how the swap engine runs. Defaults to the in-process
1166
+ * `runSwapEngine`; the app injects a runner that forwards to `/api/tx/swap-engine`
1167
+ * so the multi-provider fan-out happens server-side.
1168
+ */
1169
+ swapEngineRunner?: SwapEngineRunner;
1170
+ }
1171
+ /**
1172
+ * Describes a loop flashloan that has been built up to — but not including — the swap.
1173
+ * Handed off to the swap engine, which selects a route against the remaining tx budget
1174
+ * and returns the swap instruction(s) to splice into `innerIxs` at `swapSlotIndex`.
1175
+ *
1176
+ * The flashloan wrapper (begin/end-FL) is intentionally NOT part of `innerIxs`; its size
1177
+ * and account cost are already accounted for in `sizeConstraint` / `maxSwapTotalAccounts`.
1178
+ */
1179
+ interface LoopFlashloanDescriptor {
1180
+ innerIxs: TransactionInstruction[];
1181
+ swapSlotIndex: number;
1182
+ depositIxIndex: number;
1183
+ inputMint: string;
1184
+ outputMint: string;
1185
+ inputDecimals: number;
1186
+ outputDecimals: number;
1187
+ inAmountNative: number;
1188
+ destinationTokenAccount: PublicKey;
1189
+ sizeConstraint: number;
1190
+ maxSwapTotalAccounts: number;
1191
+ luts: AddressLookupTableAccount[];
1067
1192
  }
1068
1193
  interface MakeRepayWithCollatTxParams {
1069
1194
  program: MarginfiProgram;
@@ -1093,6 +1218,8 @@ interface MakeRepayWithCollatTxParams {
1093
1218
  };
1094
1219
  additionalIxs?: TransactionInstruction[];
1095
1220
  crossbarUrl?: string;
1221
+ /** See `MakeLoopTxParams.swapEngineRunner`. */
1222
+ swapEngineRunner?: SwapEngineRunner;
1096
1223
  }
1097
1224
  interface MakeSwapCollateralTxParams {
1098
1225
  program: MarginfiProgram;
@@ -1120,6 +1247,65 @@ interface MakeSwapCollateralTxParams {
1120
1247
  };
1121
1248
  additionalIxs?: TransactionInstruction[];
1122
1249
  crossbarUrl?: string;
1250
+ /** See `MakeLoopTxParams.swapEngineRunner`. */
1251
+ swapEngineRunner?: SwapEngineRunner;
1252
+ }
1253
+ /**
1254
+ * Params for {@link makeRollPtTx} — rolling a matured Exponent PT collateral position
1255
+ * into its next-maturity PT.
1256
+ *
1257
+ * The roll deliberately splits the two legs to avoid AMM slippage on the matured side:
1258
+ * 1. withdraw the old PT, then `merge` it 1:1 into the underlying (Exponent, no slippage)
1259
+ * 2. swap the underlying into the new PT via the swap engine (Titan/Jupiter route)
1260
+ * 3. deposit the new PT.
1261
+ *
1262
+ * The Exponent-account resolution (decoding the maturity `Vault`) and the redeemed-amount
1263
+ * sizing (from `Vault.final_sy_exchange_rate`) are the caller's responsibility and are
1264
+ * passed in via `mergeAccounts` / `underlying` / `redeemedAmountNative`.
1265
+ */
1266
+ interface MakeRollPtTxParams {
1267
+ program: MarginfiProgram;
1268
+ marginfiAccount: MarginfiAccountType;
1269
+ connection: Connection;
1270
+ bankMap: Map<string, BankType>;
1271
+ oraclePrices: Map<string, OraclePrice>;
1272
+ bankMetadataMap: BankIntegrationMetadataMap;
1273
+ assetShareValueMultiplierByBank: Map<string, BigNumber>;
1274
+ withdrawOpts: {
1275
+ totalPositionAmount: number;
1276
+ withdrawAmount?: number;
1277
+ /** The expiring (matured) PT bank. */
1278
+ withdrawBank: BankType;
1279
+ tokenProgram: PublicKey;
1280
+ };
1281
+ depositOpts: {
1282
+ /** The successor (next-maturity) PT bank. */
1283
+ depositBank: BankType;
1284
+ tokenProgram: PublicKey;
1285
+ };
1286
+ /** Resolved Exponent `merge` accounts for the matured vault (see ExponentMergeAccounts). */
1287
+ mergeAccounts: ExponentMergeAccounts;
1288
+ /** The token `merge` outputs and the swap consumes (the vault's SY/underlying). */
1289
+ underlying: {
1290
+ mint: PublicKey;
1291
+ decimals: number;
1292
+ tokenProgram?: PublicKey;
1293
+ };
1294
+ /**
1295
+ * Native amount of `underlying` the `merge` will yield (≈ PT amount × the vault's
1296
+ * `final_sy_exchange_rate`; for a matured vault redemption is fixed). Drives the
1297
+ * engine quote for the buy leg.
1298
+ */
1299
+ redeemedAmountNative: bigint;
1300
+ swapOpts: SwapOpts;
1301
+ addressLookupTableAccounts?: AddressLookupTableAccount[];
1302
+ overrideInferAccounts?: {
1303
+ group?: PublicKey;
1304
+ authority?: PublicKey;
1305
+ };
1306
+ crossbarUrl?: string;
1307
+ /** See `MakeLoopTxParams.swapEngineRunner`. */
1308
+ swapEngineRunner?: SwapEngineRunner;
1123
1309
  }
1124
1310
  interface MakeSwapDebtTxParams {
1125
1311
  program: MarginfiProgram;
@@ -1134,10 +1320,12 @@ interface MakeSwapDebtTxParams {
1134
1320
  repayAmount?: number;
1135
1321
  repayBank: BankType;
1136
1322
  tokenProgram: PublicKey;
1323
+ marketPrice: number;
1137
1324
  };
1138
1325
  borrowOpts: {
1139
1326
  borrowBank: BankType;
1140
1327
  tokenProgram: PublicKey;
1328
+ marketPrice: number;
1141
1329
  };
1142
1330
  swapOpts: SwapOpts;
1143
1331
  addressLookupTableAccounts?: AddressLookupTableAccount[];
@@ -1147,6 +1335,8 @@ interface MakeSwapDebtTxParams {
1147
1335
  };
1148
1336
  additionalIxs?: TransactionInstruction[];
1149
1337
  crossbarUrl?: string;
1338
+ /** See `MakeLoopTxParams.swapEngineRunner`. */
1339
+ swapEngineRunner?: SwapEngineRunner;
1150
1340
  }
1151
1341
  interface MakeSetupIxParams {
1152
1342
  connection: Connection;
@@ -1333,6 +1523,128 @@ declare function getHealthSimulationTransactions({ projectedActiveBanks, bankMap
1333
1523
  crossbarUrl?: string;
1334
1524
  }): Promise<SolanaTransaction[]>;
1335
1525
 
1526
+ /**
1527
+ * Wire serialization for the swap engine, so the provider fan-out can run behind
1528
+ * an HTTP endpoint (Design B). The request intentionally omits `connection` and
1529
+ * per-provider `apiConfig` — the server supplies RPC + API keys from its env.
1530
+ */
1531
+ interface SerializedInstruction {
1532
+ programId: string;
1533
+ keys: {
1534
+ pubkey: string;
1535
+ isSigner: boolean;
1536
+ isWritable: boolean;
1537
+ }[];
1538
+ data: string;
1539
+ }
1540
+ interface SerializedLut {
1541
+ key: string;
1542
+ addresses: string[];
1543
+ }
1544
+ interface SerializedTxFootprint {
1545
+ instructions: SerializedInstruction[];
1546
+ luts: SerializedLut[];
1547
+ wrapperInstructions?: SerializedInstruction[];
1548
+ payer: string;
1549
+ sizeConstraint: number;
1550
+ maxSwapTotalAccounts: number;
1551
+ }
1552
+ interface SerializedSwapEngineRequest {
1553
+ inputMint: string;
1554
+ outputMint: string;
1555
+ amountNative: number;
1556
+ inputDecimals: number;
1557
+ outputDecimals: number;
1558
+ slippageBps?: number;
1559
+ slippageMode?: "DYNAMIC" | "FIXED";
1560
+ platformFeeBps?: number;
1561
+ directRoutesOnly?: boolean;
1562
+ taker: string;
1563
+ destinationTokenAccount: string;
1564
+ footprint?: SerializedTxFootprint;
1565
+ /** Provider names only; the server attaches each provider's apiConfig. */
1566
+ providers: SwapProvider[];
1567
+ jupiterMaxAccountsLadder?: number[];
1568
+ }
1569
+ interface SerializedSwapEngineResult {
1570
+ swapInstructions: SerializedInstruction[];
1571
+ setupInstructions: SerializedInstruction[];
1572
+ swapLuts: SerializedLut[];
1573
+ quoteResponse: SwapEngineResult["quoteResponse"];
1574
+ outputAmountNative: string;
1575
+ provider: SwapProvider;
1576
+ }
1577
+ declare function serializeInstruction(ix: TransactionInstruction): SerializedInstruction;
1578
+ declare function deserializeInstruction(s: SerializedInstruction): TransactionInstruction;
1579
+ declare function serializeLut(lut: AddressLookupTableAccount): SerializedLut;
1580
+ declare function deserializeLut(s: SerializedLut): AddressLookupTableAccount;
1581
+ declare function serializeSwapEngineRequest(req: SwapEngineRequest): SerializedSwapEngineRequest;
1582
+ /**
1583
+ * Rebuild a `SwapEngineRequest` server-side. The caller supplies the RPC
1584
+ * `connection` and the per-provider `apiConfig` (gateway URLs + API keys) so
1585
+ * those never travel over the wire.
1586
+ */
1587
+ declare function deserializeSwapEngineRequest(s: SerializedSwapEngineRequest, ctx: {
1588
+ connection: Connection;
1589
+ providerApiConfigs?: Partial<Record<SwapProvider, SwapApiConfig>>;
1590
+ }): SwapEngineRequest;
1591
+ declare function serializeSwapEngineResult(res: SwapEngineResult): SerializedSwapEngineResult;
1592
+ declare function deserializeSwapEngineResult(s: SerializedSwapEngineResult): SwapEngineResult;
1593
+
1594
+ /**
1595
+ * Map a `SwapOpts` (primary provider + fallbacks) to the engine's provider list.
1596
+ * The engine queries ALL of them in parallel and picks the best fitting route,
1597
+ * so "fallback" providers become co-equal candidates here.
1598
+ */
1599
+ declare function swapEngineProvidersFromOpts(swapOpts: SwapOpts): SwapProviderEntry[];
1600
+ /** Slippage / fee fields pulled from a `SwapOpts` for an engine request. */
1601
+ declare function swapEngineQuoteFieldsFromOpts(swapOpts: SwapOpts): {
1602
+ slippageBps?: number;
1603
+ slippageMode?: "DYNAMIC" | "FIXED";
1604
+ platformFeeBps?: number;
1605
+ directRoutesOnly?: boolean;
1606
+ };
1607
+
1608
+ /**
1609
+ * Size the borrow amount for a debt swap from a market-price calculation.
1610
+ *
1611
+ * Provider ExactOut quotes are unreliable and Jupiter Router `/build` is
1612
+ * ExactIn-only, so instead of asking a provider "how much input for this output",
1613
+ * we borrow the no-slippage market equivalent of the repay target plus a slippage
1614
+ * buffer, then route ExactIn. For a full repay we add a little extra so a slight
1615
+ * shortfall doesn't fail the repayAll; for a partial repay we keep the buffer
1616
+ * tight to avoid minting more new debt than necessary.
1617
+ */
1618
+ declare const DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS = 50;
1619
+ declare function computeBorrowEstimateForRepay(params: {
1620
+ /** Target repay amount in UI units of the repay token. */
1621
+ repayTargetUi: number;
1622
+ /** Market price (USD/UI) of the repay token. */
1623
+ repayMarketPrice: number;
1624
+ /** Market price (USD/UI) of the borrow token. */
1625
+ borrowMarketPrice: number;
1626
+ slippageBps?: number;
1627
+ /** Whether this repays the whole position (adds the extra buffer). */
1628
+ isRepayAll: boolean;
1629
+ repayAllExtraBufferBps?: number;
1630
+ }): number;
1631
+
1632
+ /**
1633
+ * Registry of swap providers. To add a provider: implement a `SwapAdapter` and
1634
+ * add one entry here — the engine picks it up automatically for any request that
1635
+ * lists the provider in `providers`.
1636
+ */
1637
+ declare const SWAP_ADAPTERS: Partial<Record<SwapProvider, SwapAdapter>>;
1638
+ declare function getSwapAdapter(provider: SwapProvider): SwapAdapter | undefined;
1639
+
1640
+ /**
1641
+ * Multi-provider swap engine. Fans out to every configured provider in parallel,
1642
+ * keeps only routes that fit the remaining flashloan budget, and returns the one
1643
+ * with the highest expected output (ExactIn). The returned shape matches the
1644
+ * flashloan finalize seam so callers splice + patch + wrap unchanged.
1645
+ */
1646
+ declare function runSwapEngine(req: SwapEngineRequest): Promise<SwapEngineResult>;
1647
+
1336
1648
  declare const EMPTY_HEALTH_CACHE: HealthCacheRaw;
1337
1649
  declare function decodeAccountRaw(encoded: Buffer, idl: MarginfiIdlType): MarginfiAccountRaw;
1338
1650
  declare function parseBalanceRaw(balanceRaw: BalanceRaw): BalanceType;
@@ -2336,6 +2648,11 @@ interface ComputeMaxWithdrawForBankParams {
2336
2648
  */
2337
2649
  declare function computeMaxWithdrawForBank(params: ComputeMaxWithdrawForBankParams): BigNumber$1;
2338
2650
 
2651
+ declare const getJupiterReferralFeeAccount: (mint: PublicKey) => string;
2652
+ declare const checkJupiterFeeAccount: (connection: Connection, mint: PublicKey) => Promise<{
2653
+ feeAccount: string;
2654
+ hasFeeAccount: boolean;
2655
+ }>;
2339
2656
  declare function toJupiterConfig(apiConfig?: SwapApiConfig): JupiterClientConfig | undefined;
2340
2657
  type GetJupiterSwapIxsForFlashloanParams = {
2341
2658
  quoteParams: QuoteGetRequest;
@@ -2347,6 +2664,11 @@ type GetJupiterSwapIxsForFlashloanParams = {
2347
2664
  };
2348
2665
  declare const getJupiterSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, maxSwapAccounts, }: GetJupiterSwapIxsForFlashloanParams) => Promise<SwapIxsResult>;
2349
2666
 
2667
+ declare const checkTitanFeeAccount: (connection: Connection, mint: PublicKey) => Promise<{
2668
+ feeAccount: PublicKey;
2669
+ hasFeeAccount: boolean;
2670
+ feeWallet: PublicKey;
2671
+ }>;
2350
2672
  type TitanQuoteParams = {
2351
2673
  inputMint: string;
2352
2674
  outputMint: string;
@@ -2374,6 +2696,10 @@ type GetTitanExactOutEstimateParams = {
2374
2696
  apiConfig?: SwapApiConfig;
2375
2697
  };
2376
2698
  declare const getTitanSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, }: GetTitanSwapIxsParams) => Promise<SwapIxsResult>;
2699
+ /**
2700
+ * @deprecated Provider ExactOut quotes are unreliable; size target-output swaps
2701
+ * from a market-price calculation and route ExactIn instead.
2702
+ */
2377
2703
  declare const getTitanExactOutEstimate: (params: GetTitanExactOutEstimateParams) => Promise<{
2378
2704
  otherAmountThreshold: string;
2379
2705
  quoteResult: SwapQuoteResult;
@@ -2403,6 +2729,11 @@ type ExactOutEstimateResult = {
2403
2729
  otherAmountThreshold: string;
2404
2730
  quoteResult: SwapQuoteResult;
2405
2731
  };
2732
+ /**
2733
+ * @deprecated Do not use provider ExactOut quotes — they are unreliable and the
2734
+ * Jupiter Router (`/build`) is ExactIn-only. Size a target-output swap from a
2735
+ * market-price calculation and route ExactIn instead (see `makeSwapDebtTx`).
2736
+ */
2406
2737
  declare const getExactOutEstimate: (params: GetExactOutEstimateParams) => Promise<ExactOutEstimateResult>;
2407
2738
  declare function mapJupiterQuoteToSwapQuoteResult(quote: QuoteResponse): SwapQuoteResult;
2408
2739
 
@@ -2524,6 +2855,25 @@ declare function computeFlashloanSwapConstraints({ program, marginfiAccount, ban
2524
2855
  };
2525
2856
  }): Promise<FlashloanSwapConstraints>;
2526
2857
 
2858
+ /**
2859
+ * Returns true if the instruction is a marginfi deposit instruction (any integration).
2860
+ * Used to locate the amount-bearing deposit ix within a flashloan instruction array.
2861
+ */
2862
+ declare function isDepositIx(ix: TransactionInstruction): boolean;
2863
+ /**
2864
+ * Rewrites the `amount` field of an already-built deposit instruction in place.
2865
+ *
2866
+ * The deferred-swap loop flow builds the deposit instruction with a market-price
2867
+ * estimate before the swap output is known, then patches the real swap output amount
2868
+ * once the swap engine has run. Because the amount is a fixed-offset little-endian u64,
2869
+ * this is a pure byte patch — no account/key changes — so it is safe to apply to an
2870
+ * instruction that is about to be (re)compiled into a flashloan transaction.
2871
+ *
2872
+ * @param ix - The deposit instruction to mutate.
2873
+ * @param amountNative - The new amount in native (base) units.
2874
+ */
2875
+ declare function patchDepositAmount(ix: TransactionInstruction, amountNative: BN): void;
2876
+
2527
2877
  /**
2528
2878
  * Creates an instruction to close a Marginfi account.
2529
2879
  *
@@ -3002,6 +3352,25 @@ declare function makeSwapDebtTx(params: MakeSwapDebtTxParams): Promise<{
3002
3352
  quoteResponse: SwapQuoteResult | undefined;
3003
3353
  }>;
3004
3354
 
3355
+ /**
3356
+ * Roll a matured Exponent PT collateral position into its next-maturity PT, in one
3357
+ * flash-loan-wrapped bundle:
3358
+ *
3359
+ * withdraw PT_old → Exponent `merge` (PT_old → underlying, 1:1, no slippage)
3360
+ * → swap-engine (underlying → PT_new, Titan/Jupiter) → deposit PT_new
3361
+ *
3362
+ * Splitting the legs this way avoids paying AMM slippage to sell the matured PT — only
3363
+ * the buy side (acquiring the new, liquid PT) routes through the swap engine.
3364
+ *
3365
+ * PT banks are ordinary SPL-collateral banks, so the standard withdraw/deposit builders
3366
+ * are used; the only Exponent-specific instruction is `merge`. Mirrors `makeSwapCollateralTx`.
3367
+ */
3368
+ declare function makeRollPtTx(params: MakeRollPtTxParams): Promise<{
3369
+ transactions: ExtendedV0Transaction[];
3370
+ actionTxIndex: number;
3371
+ quoteResponse: SwapQuoteResult | undefined;
3372
+ }>;
3373
+
3005
3374
  type MakeSmartCrankSwbFeedIxParams = {
3006
3375
  marginfiAccount: MarginfiAccountType;
3007
3376
  bankMap: Map<string, BankType>;
@@ -5395,4 +5764,4 @@ declare class MarginfiAccountWrapper {
5395
5764
  getClient(): Project0Client;
5396
5765
  }
5397
5766
 
5398
- export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, 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, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, 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, 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, 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 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, 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 PythOracleServiceOpts, type RatePointDto, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapApiConfig, 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, TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkMultipleOraclesCrankability, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, 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, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, 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, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, 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, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
5767
+ export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, 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, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, 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, 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 RatePointDto, RiskTier, RiskTierRaw, SINGLE_POOL_PROGRAM_ID, 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, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, 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, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, 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, 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, isDepositIx, isFlashloan, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, 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, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, runSwapEngine, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };