@0dotxyz/p0-ts-sdk 2.2.6 → 2.3.0-alpha.0
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.cjs +3655 -2885
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +294 -1
- package/dist/index.d.ts +294 -1
- package/dist/index.js +3471 -2721
- package/dist/index.js.map +1 -1
- package/dist/jupiter.cjs +13 -4
- package/dist/jupiter.cjs.map +1 -1
- package/dist/jupiter.d.cts +47 -1
- package/dist/jupiter.d.ts +47 -1
- package/dist/jupiter.js +13 -4
- package/dist/jupiter.js.map +1 -1
- package/dist/vendor.cjs +144 -0
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +122 -1
- package/dist/vendor.d.ts +122 -1
- package/dist/vendor.js +139 -2
- package/dist/vendor.js.map +1 -1
- package/package.json +4 -1
package/dist/index.d.cts
CHANGED
|
@@ -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,8 @@ interface MakeSwapCollateralTxParams {
|
|
|
1120
1247
|
};
|
|
1121
1248
|
additionalIxs?: TransactionInstruction[];
|
|
1122
1249
|
crossbarUrl?: string;
|
|
1250
|
+
/** See `MakeLoopTxParams.swapEngineRunner`. */
|
|
1251
|
+
swapEngineRunner?: SwapEngineRunner;
|
|
1123
1252
|
}
|
|
1124
1253
|
interface MakeSwapDebtTxParams {
|
|
1125
1254
|
program: MarginfiProgram;
|
|
@@ -1134,10 +1263,12 @@ interface MakeSwapDebtTxParams {
|
|
|
1134
1263
|
repayAmount?: number;
|
|
1135
1264
|
repayBank: BankType;
|
|
1136
1265
|
tokenProgram: PublicKey;
|
|
1266
|
+
marketPrice: number;
|
|
1137
1267
|
};
|
|
1138
1268
|
borrowOpts: {
|
|
1139
1269
|
borrowBank: BankType;
|
|
1140
1270
|
tokenProgram: PublicKey;
|
|
1271
|
+
marketPrice: number;
|
|
1141
1272
|
};
|
|
1142
1273
|
swapOpts: SwapOpts;
|
|
1143
1274
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
@@ -1147,6 +1278,8 @@ interface MakeSwapDebtTxParams {
|
|
|
1147
1278
|
};
|
|
1148
1279
|
additionalIxs?: TransactionInstruction[];
|
|
1149
1280
|
crossbarUrl?: string;
|
|
1281
|
+
/** See `MakeLoopTxParams.swapEngineRunner`. */
|
|
1282
|
+
swapEngineRunner?: SwapEngineRunner;
|
|
1150
1283
|
}
|
|
1151
1284
|
interface MakeSetupIxParams {
|
|
1152
1285
|
connection: Connection;
|
|
@@ -1333,6 +1466,128 @@ declare function getHealthSimulationTransactions({ projectedActiveBanks, bankMap
|
|
|
1333
1466
|
crossbarUrl?: string;
|
|
1334
1467
|
}): Promise<SolanaTransaction[]>;
|
|
1335
1468
|
|
|
1469
|
+
/**
|
|
1470
|
+
* Wire serialization for the swap engine, so the provider fan-out can run behind
|
|
1471
|
+
* an HTTP endpoint (Design B). The request intentionally omits `connection` and
|
|
1472
|
+
* per-provider `apiConfig` — the server supplies RPC + API keys from its env.
|
|
1473
|
+
*/
|
|
1474
|
+
interface SerializedInstruction {
|
|
1475
|
+
programId: string;
|
|
1476
|
+
keys: {
|
|
1477
|
+
pubkey: string;
|
|
1478
|
+
isSigner: boolean;
|
|
1479
|
+
isWritable: boolean;
|
|
1480
|
+
}[];
|
|
1481
|
+
data: string;
|
|
1482
|
+
}
|
|
1483
|
+
interface SerializedLut {
|
|
1484
|
+
key: string;
|
|
1485
|
+
addresses: string[];
|
|
1486
|
+
}
|
|
1487
|
+
interface SerializedTxFootprint {
|
|
1488
|
+
instructions: SerializedInstruction[];
|
|
1489
|
+
luts: SerializedLut[];
|
|
1490
|
+
wrapperInstructions?: SerializedInstruction[];
|
|
1491
|
+
payer: string;
|
|
1492
|
+
sizeConstraint: number;
|
|
1493
|
+
maxSwapTotalAccounts: number;
|
|
1494
|
+
}
|
|
1495
|
+
interface SerializedSwapEngineRequest {
|
|
1496
|
+
inputMint: string;
|
|
1497
|
+
outputMint: string;
|
|
1498
|
+
amountNative: number;
|
|
1499
|
+
inputDecimals: number;
|
|
1500
|
+
outputDecimals: number;
|
|
1501
|
+
slippageBps?: number;
|
|
1502
|
+
slippageMode?: "DYNAMIC" | "FIXED";
|
|
1503
|
+
platformFeeBps?: number;
|
|
1504
|
+
directRoutesOnly?: boolean;
|
|
1505
|
+
taker: string;
|
|
1506
|
+
destinationTokenAccount: string;
|
|
1507
|
+
footprint?: SerializedTxFootprint;
|
|
1508
|
+
/** Provider names only; the server attaches each provider's apiConfig. */
|
|
1509
|
+
providers: SwapProvider[];
|
|
1510
|
+
jupiterMaxAccountsLadder?: number[];
|
|
1511
|
+
}
|
|
1512
|
+
interface SerializedSwapEngineResult {
|
|
1513
|
+
swapInstructions: SerializedInstruction[];
|
|
1514
|
+
setupInstructions: SerializedInstruction[];
|
|
1515
|
+
swapLuts: SerializedLut[];
|
|
1516
|
+
quoteResponse: SwapEngineResult["quoteResponse"];
|
|
1517
|
+
outputAmountNative: string;
|
|
1518
|
+
provider: SwapProvider;
|
|
1519
|
+
}
|
|
1520
|
+
declare function serializeInstruction(ix: TransactionInstruction): SerializedInstruction;
|
|
1521
|
+
declare function deserializeInstruction(s: SerializedInstruction): TransactionInstruction;
|
|
1522
|
+
declare function serializeLut(lut: AddressLookupTableAccount): SerializedLut;
|
|
1523
|
+
declare function deserializeLut(s: SerializedLut): AddressLookupTableAccount;
|
|
1524
|
+
declare function serializeSwapEngineRequest(req: SwapEngineRequest): SerializedSwapEngineRequest;
|
|
1525
|
+
/**
|
|
1526
|
+
* Rebuild a `SwapEngineRequest` server-side. The caller supplies the RPC
|
|
1527
|
+
* `connection` and the per-provider `apiConfig` (gateway URLs + API keys) so
|
|
1528
|
+
* those never travel over the wire.
|
|
1529
|
+
*/
|
|
1530
|
+
declare function deserializeSwapEngineRequest(s: SerializedSwapEngineRequest, ctx: {
|
|
1531
|
+
connection: Connection;
|
|
1532
|
+
providerApiConfigs?: Partial<Record<SwapProvider, SwapApiConfig>>;
|
|
1533
|
+
}): SwapEngineRequest;
|
|
1534
|
+
declare function serializeSwapEngineResult(res: SwapEngineResult): SerializedSwapEngineResult;
|
|
1535
|
+
declare function deserializeSwapEngineResult(s: SerializedSwapEngineResult): SwapEngineResult;
|
|
1536
|
+
|
|
1537
|
+
/**
|
|
1538
|
+
* Map a `SwapOpts` (primary provider + fallbacks) to the engine's provider list.
|
|
1539
|
+
* The engine queries ALL of them in parallel and picks the best fitting route,
|
|
1540
|
+
* so "fallback" providers become co-equal candidates here.
|
|
1541
|
+
*/
|
|
1542
|
+
declare function swapEngineProvidersFromOpts(swapOpts: SwapOpts): SwapProviderEntry[];
|
|
1543
|
+
/** Slippage / fee fields pulled from a `SwapOpts` for an engine request. */
|
|
1544
|
+
declare function swapEngineQuoteFieldsFromOpts(swapOpts: SwapOpts): {
|
|
1545
|
+
slippageBps?: number;
|
|
1546
|
+
slippageMode?: "DYNAMIC" | "FIXED";
|
|
1547
|
+
platformFeeBps?: number;
|
|
1548
|
+
directRoutesOnly?: boolean;
|
|
1549
|
+
};
|
|
1550
|
+
|
|
1551
|
+
/**
|
|
1552
|
+
* Size the borrow amount for a debt swap from a market-price calculation.
|
|
1553
|
+
*
|
|
1554
|
+
* Provider ExactOut quotes are unreliable and Jupiter Router `/build` is
|
|
1555
|
+
* ExactIn-only, so instead of asking a provider "how much input for this output",
|
|
1556
|
+
* we borrow the no-slippage market equivalent of the repay target plus a slippage
|
|
1557
|
+
* buffer, then route ExactIn. For a full repay we add a little extra so a slight
|
|
1558
|
+
* shortfall doesn't fail the repayAll; for a partial repay we keep the buffer
|
|
1559
|
+
* tight to avoid minting more new debt than necessary.
|
|
1560
|
+
*/
|
|
1561
|
+
declare const DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS = 50;
|
|
1562
|
+
declare function computeBorrowEstimateForRepay(params: {
|
|
1563
|
+
/** Target repay amount in UI units of the repay token. */
|
|
1564
|
+
repayTargetUi: number;
|
|
1565
|
+
/** Market price (USD/UI) of the repay token. */
|
|
1566
|
+
repayMarketPrice: number;
|
|
1567
|
+
/** Market price (USD/UI) of the borrow token. */
|
|
1568
|
+
borrowMarketPrice: number;
|
|
1569
|
+
slippageBps?: number;
|
|
1570
|
+
/** Whether this repays the whole position (adds the extra buffer). */
|
|
1571
|
+
isRepayAll: boolean;
|
|
1572
|
+
repayAllExtraBufferBps?: number;
|
|
1573
|
+
}): number;
|
|
1574
|
+
|
|
1575
|
+
/**
|
|
1576
|
+
* Registry of swap providers. To add a provider: implement a `SwapAdapter` and
|
|
1577
|
+
* add one entry here — the engine picks it up automatically for any request that
|
|
1578
|
+
* lists the provider in `providers`.
|
|
1579
|
+
*/
|
|
1580
|
+
declare const SWAP_ADAPTERS: Partial<Record<SwapProvider, SwapAdapter>>;
|
|
1581
|
+
declare function getSwapAdapter(provider: SwapProvider): SwapAdapter | undefined;
|
|
1582
|
+
|
|
1583
|
+
/**
|
|
1584
|
+
* Multi-provider swap engine. Fans out to every configured provider in parallel,
|
|
1585
|
+
* keeps only routes that fit the remaining flashloan budget, and returns the one
|
|
1586
|
+
* with the highest expected output (ExactIn). The returned shape matches the
|
|
1587
|
+
* flashloan finalize seam so callers splice + patch + wrap unchanged.
|
|
1588
|
+
*/
|
|
1589
|
+
declare function runSwapEngine(req: SwapEngineRequest): Promise<SwapEngineResult>;
|
|
1590
|
+
|
|
1336
1591
|
declare const EMPTY_HEALTH_CACHE: HealthCacheRaw;
|
|
1337
1592
|
declare function decodeAccountRaw(encoded: Buffer, idl: MarginfiIdlType): MarginfiAccountRaw;
|
|
1338
1593
|
declare function parseBalanceRaw(balanceRaw: BalanceRaw): BalanceType;
|
|
@@ -2336,6 +2591,11 @@ interface ComputeMaxWithdrawForBankParams {
|
|
|
2336
2591
|
*/
|
|
2337
2592
|
declare function computeMaxWithdrawForBank(params: ComputeMaxWithdrawForBankParams): BigNumber$1;
|
|
2338
2593
|
|
|
2594
|
+
declare const getJupiterReferralFeeAccount: (mint: PublicKey) => string;
|
|
2595
|
+
declare const checkJupiterFeeAccount: (connection: Connection, mint: PublicKey) => Promise<{
|
|
2596
|
+
feeAccount: string;
|
|
2597
|
+
hasFeeAccount: boolean;
|
|
2598
|
+
}>;
|
|
2339
2599
|
declare function toJupiterConfig(apiConfig?: SwapApiConfig): JupiterClientConfig | undefined;
|
|
2340
2600
|
type GetJupiterSwapIxsForFlashloanParams = {
|
|
2341
2601
|
quoteParams: QuoteGetRequest;
|
|
@@ -2347,6 +2607,11 @@ type GetJupiterSwapIxsForFlashloanParams = {
|
|
|
2347
2607
|
};
|
|
2348
2608
|
declare const getJupiterSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, maxSwapAccounts, }: GetJupiterSwapIxsForFlashloanParams) => Promise<SwapIxsResult>;
|
|
2349
2609
|
|
|
2610
|
+
declare const checkTitanFeeAccount: (connection: Connection, mint: PublicKey) => Promise<{
|
|
2611
|
+
feeAccount: PublicKey;
|
|
2612
|
+
hasFeeAccount: boolean;
|
|
2613
|
+
feeWallet: PublicKey;
|
|
2614
|
+
}>;
|
|
2350
2615
|
type TitanQuoteParams = {
|
|
2351
2616
|
inputMint: string;
|
|
2352
2617
|
outputMint: string;
|
|
@@ -2374,6 +2639,10 @@ type GetTitanExactOutEstimateParams = {
|
|
|
2374
2639
|
apiConfig?: SwapApiConfig;
|
|
2375
2640
|
};
|
|
2376
2641
|
declare const getTitanSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, }: GetTitanSwapIxsParams) => Promise<SwapIxsResult>;
|
|
2642
|
+
/**
|
|
2643
|
+
* @deprecated Provider ExactOut quotes are unreliable; size target-output swaps
|
|
2644
|
+
* from a market-price calculation and route ExactIn instead.
|
|
2645
|
+
*/
|
|
2377
2646
|
declare const getTitanExactOutEstimate: (params: GetTitanExactOutEstimateParams) => Promise<{
|
|
2378
2647
|
otherAmountThreshold: string;
|
|
2379
2648
|
quoteResult: SwapQuoteResult;
|
|
@@ -2403,6 +2672,11 @@ type ExactOutEstimateResult = {
|
|
|
2403
2672
|
otherAmountThreshold: string;
|
|
2404
2673
|
quoteResult: SwapQuoteResult;
|
|
2405
2674
|
};
|
|
2675
|
+
/**
|
|
2676
|
+
* @deprecated Do not use provider ExactOut quotes — they are unreliable and the
|
|
2677
|
+
* Jupiter Router (`/build`) is ExactIn-only. Size a target-output swap from a
|
|
2678
|
+
* market-price calculation and route ExactIn instead (see `makeSwapDebtTx`).
|
|
2679
|
+
*/
|
|
2406
2680
|
declare const getExactOutEstimate: (params: GetExactOutEstimateParams) => Promise<ExactOutEstimateResult>;
|
|
2407
2681
|
declare function mapJupiterQuoteToSwapQuoteResult(quote: QuoteResponse): SwapQuoteResult;
|
|
2408
2682
|
|
|
@@ -2524,6 +2798,25 @@ declare function computeFlashloanSwapConstraints({ program, marginfiAccount, ban
|
|
|
2524
2798
|
};
|
|
2525
2799
|
}): Promise<FlashloanSwapConstraints>;
|
|
2526
2800
|
|
|
2801
|
+
/**
|
|
2802
|
+
* Returns true if the instruction is a marginfi deposit instruction (any integration).
|
|
2803
|
+
* Used to locate the amount-bearing deposit ix within a flashloan instruction array.
|
|
2804
|
+
*/
|
|
2805
|
+
declare function isDepositIx(ix: TransactionInstruction): boolean;
|
|
2806
|
+
/**
|
|
2807
|
+
* Rewrites the `amount` field of an already-built deposit instruction in place.
|
|
2808
|
+
*
|
|
2809
|
+
* The deferred-swap loop flow builds the deposit instruction with a market-price
|
|
2810
|
+
* estimate before the swap output is known, then patches the real swap output amount
|
|
2811
|
+
* once the swap engine has run. Because the amount is a fixed-offset little-endian u64,
|
|
2812
|
+
* this is a pure byte patch — no account/key changes — so it is safe to apply to an
|
|
2813
|
+
* instruction that is about to be (re)compiled into a flashloan transaction.
|
|
2814
|
+
*
|
|
2815
|
+
* @param ix - The deposit instruction to mutate.
|
|
2816
|
+
* @param amountNative - The new amount in native (base) units.
|
|
2817
|
+
*/
|
|
2818
|
+
declare function patchDepositAmount(ix: TransactionInstruction, amountNative: BN): void;
|
|
2819
|
+
|
|
2527
2820
|
/**
|
|
2528
2821
|
* Creates an instruction to close a Marginfi account.
|
|
2529
2822
|
*
|
|
@@ -5395,4 +5688,4 @@ declare class MarginfiAccountWrapper {
|
|
|
5395
5688
|
getClient(): Project0Client;
|
|
5396
5689
|
}
|
|
5397
5690
|
|
|
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 };
|
|
5691
|
+
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 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, 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 };
|