@0dotxyz/p0-ts-sdk 2.2.0-alpha.4 → 2.2.0-beta.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.cjs +3708 -1770
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +286 -196
- package/dist/index.d.ts +286 -196
- package/dist/index.js +3695 -1766
- package/dist/index.js.map +1 -1
- package/dist/vendor.cjs +1780 -30
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +288 -23
- package/dist/vendor.d.ts +288 -23
- package/dist/vendor.js +1771 -30
- package/dist/vendor.js.map +1 -1
- package/package.json +3 -4
package/dist/index.d.cts
CHANGED
|
@@ -14407,6 +14407,8 @@ declare function addTransactionMetadata<T extends Transaction | VersionedTransac
|
|
|
14407
14407
|
*/
|
|
14408
14408
|
declare function getTxSize(tx: VersionedTransaction | Transaction): number;
|
|
14409
14409
|
declare function getAccountKeys(tx: VersionedTransaction | Transaction, lookupTableAccounts: AddressLookupTableAccount[]): number;
|
|
14410
|
+
declare function getWritableAccountKeys(tx: VersionedTransaction | Transaction): number;
|
|
14411
|
+
declare function getTotalAccountKeys(tx: VersionedTransaction | Transaction): number;
|
|
14410
14412
|
|
|
14411
14413
|
/**
|
|
14412
14414
|
* Decodes a Solana transaction instruction using the provided Interface Definition Language (IDL).
|
|
@@ -15551,6 +15553,55 @@ declare class HealthCacheSimulationError extends Error {
|
|
|
15551
15553
|
constructor(message: string, mrgnErr: number | null, internalErr: number | null);
|
|
15552
15554
|
}
|
|
15553
15555
|
|
|
15556
|
+
declare enum SwapProvider {
|
|
15557
|
+
JUPITER = "JUPITER",
|
|
15558
|
+
TITAN = "TITAN",
|
|
15559
|
+
DFLOW = "DFLOW"
|
|
15560
|
+
}
|
|
15561
|
+
interface SwapApiConfig {
|
|
15562
|
+
basePath?: string;
|
|
15563
|
+
apiKey?: string;
|
|
15564
|
+
headers?: Record<string, string>;
|
|
15565
|
+
}
|
|
15566
|
+
interface SwapProviderEntry {
|
|
15567
|
+
provider: SwapProvider;
|
|
15568
|
+
apiConfig?: SwapApiConfig;
|
|
15569
|
+
}
|
|
15570
|
+
interface SwapProviderConfig {
|
|
15571
|
+
provider: SwapProvider;
|
|
15572
|
+
slippageMode: "DYNAMIC" | "FIXED";
|
|
15573
|
+
slippageBps: number;
|
|
15574
|
+
platformFeeBps: number;
|
|
15575
|
+
directRoutesOnly?: boolean;
|
|
15576
|
+
apiConfig?: SwapApiConfig;
|
|
15577
|
+
fallbackProviders?: SwapProviderEntry[];
|
|
15578
|
+
}
|
|
15579
|
+
interface SwapOpts {
|
|
15580
|
+
swapConfig?: SwapProviderConfig;
|
|
15581
|
+
swapIxs?: {
|
|
15582
|
+
instructions: TransactionInstruction[];
|
|
15583
|
+
lookupTables: AddressLookupTableAccount[];
|
|
15584
|
+
};
|
|
15585
|
+
}
|
|
15586
|
+
interface SwapQuoteResult {
|
|
15587
|
+
inAmount: string;
|
|
15588
|
+
outAmount: string;
|
|
15589
|
+
otherAmountThreshold: string;
|
|
15590
|
+
slippageBps: number;
|
|
15591
|
+
platformFee?: {
|
|
15592
|
+
amount: string;
|
|
15593
|
+
feeBps: number;
|
|
15594
|
+
};
|
|
15595
|
+
priceImpactPct?: string;
|
|
15596
|
+
contextSlot?: number;
|
|
15597
|
+
timeTaken?: number;
|
|
15598
|
+
}
|
|
15599
|
+
interface SwapIxsResult {
|
|
15600
|
+
swapInstructions: TransactionInstruction[];
|
|
15601
|
+
setupInstructions: TransactionInstruction[];
|
|
15602
|
+
addressLookupTableAddresses: AddressLookupTableAccount[];
|
|
15603
|
+
quoteResponse: SwapQuoteResult;
|
|
15604
|
+
}
|
|
15554
15605
|
interface MakeDepositIxOpts {
|
|
15555
15606
|
wrapAndUnwrapSol?: boolean;
|
|
15556
15607
|
wSolBalanceUi?: number;
|
|
@@ -15737,12 +15788,6 @@ interface MakeBorrowIxOpts {
|
|
|
15737
15788
|
group?: PublicKey;
|
|
15738
15789
|
authority?: PublicKey;
|
|
15739
15790
|
};
|
|
15740
|
-
/**
|
|
15741
|
-
* Additional banks to include in the health check calculation.
|
|
15742
|
-
* Useful for combined operations where a deposit precedes the borrow
|
|
15743
|
-
* and the deposited bank needs to be considered for health calculation.
|
|
15744
|
-
*/
|
|
15745
|
-
additionalHealthCheckBanks?: PublicKey[];
|
|
15746
15791
|
}
|
|
15747
15792
|
interface MakeBorrowIxParams {
|
|
15748
15793
|
program: MarginfiProgram;
|
|
@@ -15822,19 +15867,7 @@ interface MakeLoopTxParams {
|
|
|
15822
15867
|
borrowBank: BankType;
|
|
15823
15868
|
tokenProgram: PublicKey;
|
|
15824
15869
|
};
|
|
15825
|
-
swapOpts:
|
|
15826
|
-
jupiterOptions?: {
|
|
15827
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
15828
|
-
slippageBps: number;
|
|
15829
|
-
platformFeeBps: number;
|
|
15830
|
-
directRoutesOnly?: boolean;
|
|
15831
|
-
configParams?: ConfigurationParameters;
|
|
15832
|
-
};
|
|
15833
|
-
swapIxs?: {
|
|
15834
|
-
instructions: TransactionInstruction[];
|
|
15835
|
-
lookupTables: AddressLookupTableAccount[];
|
|
15836
|
-
};
|
|
15837
|
-
};
|
|
15870
|
+
swapOpts: SwapOpts;
|
|
15838
15871
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
15839
15872
|
overrideInferAccounts?: {
|
|
15840
15873
|
group?: PublicKey;
|
|
@@ -15863,19 +15896,7 @@ interface MakeRepayWithCollatTxParams {
|
|
|
15863
15896
|
totalPositionAmount: number;
|
|
15864
15897
|
repayAmount?: number;
|
|
15865
15898
|
};
|
|
15866
|
-
swapOpts:
|
|
15867
|
-
jupiterOptions?: {
|
|
15868
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
15869
|
-
slippageBps: number;
|
|
15870
|
-
platformFeeBps: number;
|
|
15871
|
-
directRoutesOnly?: boolean;
|
|
15872
|
-
configParams?: ConfigurationParameters;
|
|
15873
|
-
};
|
|
15874
|
-
swapIxs?: {
|
|
15875
|
-
instructions: TransactionInstruction[];
|
|
15876
|
-
lookupTables: AddressLookupTableAccount[];
|
|
15877
|
-
};
|
|
15878
|
-
};
|
|
15899
|
+
swapOpts: SwapOpts;
|
|
15879
15900
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
15880
15901
|
overrideInferAccounts?: {
|
|
15881
15902
|
group?: PublicKey;
|
|
@@ -15902,15 +15923,7 @@ interface MakeSwapCollateralTxParams {
|
|
|
15902
15923
|
depositBank: BankType;
|
|
15903
15924
|
tokenProgram: PublicKey;
|
|
15904
15925
|
};
|
|
15905
|
-
swapOpts:
|
|
15906
|
-
jupiterOptions?: {
|
|
15907
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
15908
|
-
slippageBps: number;
|
|
15909
|
-
platformFeeBps: number;
|
|
15910
|
-
directRoutesOnly?: boolean;
|
|
15911
|
-
configParams?: ConfigurationParameters;
|
|
15912
|
-
};
|
|
15913
|
-
};
|
|
15926
|
+
swapOpts: SwapOpts;
|
|
15914
15927
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
15915
15928
|
overrideInferAccounts?: {
|
|
15916
15929
|
group?: PublicKey;
|
|
@@ -15937,15 +15950,7 @@ interface MakeSwapDebtTxParams {
|
|
|
15937
15950
|
borrowBank: BankType;
|
|
15938
15951
|
tokenProgram: PublicKey;
|
|
15939
15952
|
};
|
|
15940
|
-
swapOpts:
|
|
15941
|
-
jupiterOptions?: {
|
|
15942
|
-
slippageMode: "DYNAMIC" | "FIXED";
|
|
15943
|
-
slippageBps: number;
|
|
15944
|
-
platformFeeBps: number;
|
|
15945
|
-
directRoutesOnly?: boolean;
|
|
15946
|
-
configParams?: ConfigurationParameters;
|
|
15947
|
-
};
|
|
15948
|
-
};
|
|
15953
|
+
swapOpts: SwapOpts;
|
|
15949
15954
|
addressLookupTableAccounts?: AddressLookupTableAccount[];
|
|
15950
15955
|
overrideInferAccounts?: {
|
|
15951
15956
|
group?: PublicKey;
|
|
@@ -15962,35 +15967,6 @@ interface MakeSetupIxParams {
|
|
|
15962
15967
|
tokenProgram: PublicKey;
|
|
15963
15968
|
}[];
|
|
15964
15969
|
}
|
|
15965
|
-
interface MakeMintStakedLstIxParams {
|
|
15966
|
-
amount: Amount;
|
|
15967
|
-
authority: PublicKey;
|
|
15968
|
-
stakeAccountPk: PublicKey;
|
|
15969
|
-
validator: PublicKey;
|
|
15970
|
-
connection: Connection;
|
|
15971
|
-
}
|
|
15972
|
-
interface MakeMintStakedLstTxParams extends MakeMintStakedLstIxParams {
|
|
15973
|
-
luts: AddressLookupTableAccount[];
|
|
15974
|
-
blockhash?: string;
|
|
15975
|
-
}
|
|
15976
|
-
interface MakeRedeemStakedLstIxParams {
|
|
15977
|
-
amount: Amount;
|
|
15978
|
-
authority: PublicKey;
|
|
15979
|
-
validator: PublicKey;
|
|
15980
|
-
connection: Connection;
|
|
15981
|
-
}
|
|
15982
|
-
interface MakeRedeemStakedLstTxParams extends MakeRedeemStakedLstIxParams {
|
|
15983
|
-
luts: AddressLookupTableAccount[];
|
|
15984
|
-
blockhash?: string;
|
|
15985
|
-
}
|
|
15986
|
-
interface MakeMergeStakeAccountsTxParams {
|
|
15987
|
-
authority: PublicKey;
|
|
15988
|
-
sourceStakeAccount: PublicKey;
|
|
15989
|
-
destinationStakeAccount: PublicKey;
|
|
15990
|
-
connection: Connection;
|
|
15991
|
-
luts: AddressLookupTableAccount[];
|
|
15992
|
-
blockhash?: string;
|
|
15993
|
-
}
|
|
15994
15970
|
|
|
15995
15971
|
/**
|
|
15996
15972
|
* A combination of banks that need to be cranked
|
|
@@ -17217,19 +17193,76 @@ interface ComputeMaxWithdrawForBankParams {
|
|
|
17217
17193
|
*/
|
|
17218
17194
|
declare function computeMaxWithdrawForBank(params: ComputeMaxWithdrawForBankParams): BigNumber$1;
|
|
17219
17195
|
|
|
17196
|
+
declare function toJupiterConfig(apiConfig?: SwapApiConfig): ConfigurationParameters | undefined;
|
|
17220
17197
|
type GetJupiterSwapIxsForFlashloanParams = {
|
|
17221
17198
|
quoteParams: QuoteGetRequest;
|
|
17222
17199
|
authority: PublicKey;
|
|
17223
17200
|
connection: Connection;
|
|
17224
17201
|
destinationTokenAccount: PublicKey;
|
|
17225
|
-
|
|
17202
|
+
apiConfig?: SwapApiConfig;
|
|
17203
|
+
maxSwapAccounts?: number;
|
|
17226
17204
|
};
|
|
17227
|
-
declare const getJupiterSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount,
|
|
17228
|
-
|
|
17229
|
-
|
|
17230
|
-
|
|
17231
|
-
|
|
17232
|
-
|
|
17205
|
+
declare const getJupiterSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, maxSwapAccounts, }: GetJupiterSwapIxsForFlashloanParams) => Promise<SwapIxsResult>;
|
|
17206
|
+
|
|
17207
|
+
type TitanQuoteParams = {
|
|
17208
|
+
inputMint: string;
|
|
17209
|
+
outputMint: string;
|
|
17210
|
+
amount: number;
|
|
17211
|
+
swapMode: "ExactIn" | "ExactOut";
|
|
17212
|
+
slippageBps?: number;
|
|
17213
|
+
platformFeeBps?: number;
|
|
17214
|
+
directRoutesOnly?: boolean;
|
|
17215
|
+
sizeConstraint?: number;
|
|
17216
|
+
maxSwapAccounts?: number;
|
|
17217
|
+
maxSwapTotalAccounts?: number;
|
|
17218
|
+
};
|
|
17219
|
+
type GetTitanSwapIxsParams = {
|
|
17220
|
+
quoteParams: TitanQuoteParams;
|
|
17221
|
+
authority: PublicKey;
|
|
17222
|
+
connection: Connection;
|
|
17223
|
+
destinationTokenAccount: PublicKey;
|
|
17224
|
+
apiConfig?: SwapApiConfig;
|
|
17225
|
+
};
|
|
17226
|
+
type GetTitanExactOutEstimateParams = {
|
|
17227
|
+
inputMint: string;
|
|
17228
|
+
outputMint: string;
|
|
17229
|
+
amount: number;
|
|
17230
|
+
slippageBps?: number;
|
|
17231
|
+
apiConfig?: SwapApiConfig;
|
|
17232
|
+
};
|
|
17233
|
+
declare const getTitanSwapIxsForFlashloan: ({ quoteParams, authority, connection, destinationTokenAccount, apiConfig, }: GetTitanSwapIxsParams) => Promise<SwapIxsResult>;
|
|
17234
|
+
declare const getTitanExactOutEstimate: (params: GetTitanExactOutEstimateParams) => Promise<{
|
|
17235
|
+
otherAmountThreshold: string;
|
|
17236
|
+
quoteResult: SwapQuoteResult;
|
|
17237
|
+
}>;
|
|
17238
|
+
|
|
17239
|
+
type GetSwapIxsForFlashloanParams = {
|
|
17240
|
+
inputMint: string;
|
|
17241
|
+
outputMint: string;
|
|
17242
|
+
amount: number;
|
|
17243
|
+
swapMode: "ExactIn" | "ExactOut";
|
|
17244
|
+
authority: PublicKey;
|
|
17245
|
+
connection: Connection;
|
|
17246
|
+
destinationTokenAccount: PublicKey;
|
|
17247
|
+
swapOpts: SwapOpts;
|
|
17248
|
+
sizeConstraint?: number;
|
|
17249
|
+
maxSwapAccounts?: number;
|
|
17250
|
+
maxSwapTotalAccounts?: number;
|
|
17251
|
+
};
|
|
17252
|
+
declare const getSwapIxsForFlashloan: (params: GetSwapIxsForFlashloanParams) => Promise<SwapIxsResult>;
|
|
17253
|
+
type GetExactOutEstimateParams = {
|
|
17254
|
+
inputMint: string;
|
|
17255
|
+
outputMint: string;
|
|
17256
|
+
amount: number;
|
|
17257
|
+
swapOpts: SwapOpts;
|
|
17258
|
+
connection: Connection;
|
|
17259
|
+
};
|
|
17260
|
+
type ExactOutEstimateResult = {
|
|
17261
|
+
otherAmountThreshold: string;
|
|
17262
|
+
quoteResult: SwapQuoteResult;
|
|
17263
|
+
};
|
|
17264
|
+
declare const getExactOutEstimate: (params: GetExactOutEstimateParams) => Promise<ExactOutEstimateResult>;
|
|
17265
|
+
declare function mapJupiterQuoteToSwapQuoteResult(quote: QuoteResponse): SwapQuoteResult;
|
|
17233
17266
|
|
|
17234
17267
|
declare function computeClosePositionTokenAmount(position: {
|
|
17235
17268
|
amount: number;
|
|
@@ -17240,6 +17273,117 @@ declare function isWholePosition(position: {
|
|
|
17240
17273
|
isLending: boolean;
|
|
17241
17274
|
}, amount: number, mintDecimals: number): boolean;
|
|
17242
17275
|
|
|
17276
|
+
/**
|
|
17277
|
+
* Synchronous flashloan TX size estimator.
|
|
17278
|
+
*
|
|
17279
|
+
* Estimates the serialized size of a V0 flashloan transaction without compiling
|
|
17280
|
+
* or serializing the message. This allows us to synchronously compute the byte
|
|
17281
|
+
* overhead of non-swap instructions and determine how much budget remains for
|
|
17282
|
+
* the swap IX (e.g. Titan).
|
|
17283
|
+
*
|
|
17284
|
+
* Thoroughly tested using R&D scripts (rnd-flashloan-size.ts) and cross-referenced
|
|
17285
|
+
* against actual serialized transaction sizes across all action types (Loop, Repay,
|
|
17286
|
+
* SwapCollateral, SwapDebt) and asset tag variants (Standard, Kamino, Drift).
|
|
17287
|
+
*/
|
|
17288
|
+
|
|
17289
|
+
/**
|
|
17290
|
+
* Estimate the serialized size of a V0 transaction from its instructions and LUTs.
|
|
17291
|
+
* Simulates the key resolution logic of TransactionMessage.compileToV0Message
|
|
17292
|
+
* without actually compiling or serializing the message.
|
|
17293
|
+
*/
|
|
17294
|
+
declare function computeV0TxSize(ixs: TransactionInstruction[], payerKey: PublicKey, luts: AddressLookupTableAccount[]): {
|
|
17295
|
+
size: number;
|
|
17296
|
+
accountCount: number;
|
|
17297
|
+
writableAccountCount: number;
|
|
17298
|
+
};
|
|
17299
|
+
interface FlashloanSwapConstraints {
|
|
17300
|
+
/** Available bytes for swap instruction(s) */
|
|
17301
|
+
sizeConstraint: number;
|
|
17302
|
+
/** Available writable account slots for swap instruction(s) */
|
|
17303
|
+
maxSwapWritableAccounts: number;
|
|
17304
|
+
/** Available total account slots for swap instruction(s) */
|
|
17305
|
+
maxSwapTotalAccounts: number;
|
|
17306
|
+
}
|
|
17307
|
+
/**
|
|
17308
|
+
* Compute the available byte budget and account budget for swap instructions
|
|
17309
|
+
* in a flashloan TX. Compiles a real V0 message and serializes it for an exact
|
|
17310
|
+
* non-swap byte count.
|
|
17311
|
+
*
|
|
17312
|
+
* @param ixs - The non-swap IXs (CU requests + primary + secondary).
|
|
17313
|
+
* Must NOT include BeginFL/EndFL — those are synthesized internally.
|
|
17314
|
+
*/
|
|
17315
|
+
declare function computeFlashLoanNonSwapBudget({ program, marginfiAccount, ixs, bankMap, addressLookupTableAccounts, }: {
|
|
17316
|
+
program: MarginfiProgram;
|
|
17317
|
+
marginfiAccount: {
|
|
17318
|
+
address: PublicKey;
|
|
17319
|
+
authority: PublicKey;
|
|
17320
|
+
balances: BalanceType[];
|
|
17321
|
+
};
|
|
17322
|
+
ixs: TransactionInstruction[];
|
|
17323
|
+
bankMap: Map<string, BankType>;
|
|
17324
|
+
addressLookupTableAccounts: AddressLookupTableAccount[];
|
|
17325
|
+
}): FlashloanSwapConstraints;
|
|
17326
|
+
interface FlashloanPrecheckResult {
|
|
17327
|
+
/** Exact serialized size of the full flashloan TX */
|
|
17328
|
+
fullTxSize: number;
|
|
17329
|
+
/** How many bytes over MAX_TX_SIZE (negative = under budget) */
|
|
17330
|
+
overshoot: number;
|
|
17331
|
+
/** Total writable accounts in the full TX */
|
|
17332
|
+
writableAccounts: number;
|
|
17333
|
+
/** Total accounts (static + LUT) in the full TX */
|
|
17334
|
+
totalAccounts: number;
|
|
17335
|
+
}
|
|
17336
|
+
/**
|
|
17337
|
+
* Compile the full flashloan TX (all IXs + all LUTs) and return exact size info.
|
|
17338
|
+
* Call this AFTER receiving swap IXs but BEFORE makeFlashLoanTx to detect overflows
|
|
17339
|
+
* early with good diagnostics.
|
|
17340
|
+
*
|
|
17341
|
+
* Uses a dummy blockhash (same 32 bytes as a real one) so the size is exact.
|
|
17342
|
+
*/
|
|
17343
|
+
declare function compileFlashloanPrecheck({ allIxs, payer, luts, sizeConstraint, swapIxCount, swapLutCount, }: {
|
|
17344
|
+
allIxs: TransactionInstruction[];
|
|
17345
|
+
payer: PublicKey;
|
|
17346
|
+
luts: AddressLookupTableAccount[];
|
|
17347
|
+
sizeConstraint: number;
|
|
17348
|
+
swapIxCount: number;
|
|
17349
|
+
swapLutCount: number;
|
|
17350
|
+
}): FlashloanPrecheckResult;
|
|
17351
|
+
type FlashloanBudgetIx = {
|
|
17352
|
+
type: "borrow";
|
|
17353
|
+
bank: BankType;
|
|
17354
|
+
tokenProgram: PublicKey;
|
|
17355
|
+
} | {
|
|
17356
|
+
type: "repay";
|
|
17357
|
+
bank: BankType;
|
|
17358
|
+
tokenProgram: PublicKey;
|
|
17359
|
+
} | {
|
|
17360
|
+
type: "deposit";
|
|
17361
|
+
bank: BankType;
|
|
17362
|
+
tokenProgram: PublicKey;
|
|
17363
|
+
} | {
|
|
17364
|
+
type: "withdraw";
|
|
17365
|
+
bank: BankType;
|
|
17366
|
+
tokenProgram: PublicKey;
|
|
17367
|
+
};
|
|
17368
|
+
/**
|
|
17369
|
+
* Compute flashloan swap constraints by building dummy primary + secondary IXs
|
|
17370
|
+
* and measuring the remaining TX budget. Replaces the duplicated switch/case
|
|
17371
|
+
* blocks in each action file.
|
|
17372
|
+
*/
|
|
17373
|
+
declare function computeFlashloanSwapConstraints({ program, marginfiAccount, bankMap, addressLookupTableAccounts, bankMetadataMap, primaryIx, secondaryIx, overrideInferAccounts, }: {
|
|
17374
|
+
program: MarginfiProgram;
|
|
17375
|
+
marginfiAccount: MarginfiAccountType;
|
|
17376
|
+
bankMap: Map<string, BankType>;
|
|
17377
|
+
addressLookupTableAccounts: AddressLookupTableAccount[];
|
|
17378
|
+
bankMetadataMap: BankIntegrationMetadataMap;
|
|
17379
|
+
primaryIx: FlashloanBudgetIx;
|
|
17380
|
+
secondaryIx: FlashloanBudgetIx;
|
|
17381
|
+
overrideInferAccounts?: {
|
|
17382
|
+
group?: PublicKey;
|
|
17383
|
+
authority?: PublicKey;
|
|
17384
|
+
};
|
|
17385
|
+
}): Promise<FlashloanSwapConstraints>;
|
|
17386
|
+
|
|
17243
17387
|
/**
|
|
17244
17388
|
* Creates an instruction to close a Marginfi account.
|
|
17245
17389
|
*
|
|
@@ -17574,7 +17718,7 @@ declare function makeJuplendDepositTx(params: MakeJuplendDepositTxParams): Promi
|
|
|
17574
17718
|
declare function makeLoopTx(params: MakeLoopTxParams): Promise<{
|
|
17575
17719
|
transactions: ExtendedV0Transaction[];
|
|
17576
17720
|
actionTxIndex: number;
|
|
17577
|
-
quoteResponse:
|
|
17721
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
17578
17722
|
}>;
|
|
17579
17723
|
|
|
17580
17724
|
/**
|
|
@@ -17633,7 +17777,7 @@ declare function makeRepayIx({ program, bank, tokenProgram, amount, authority, a
|
|
|
17633
17777
|
declare function makeRepayTx(params: MakeRepayTxParams): Promise<ExtendedTransaction>;
|
|
17634
17778
|
declare function makeRepayWithCollatTx(params: MakeRepayWithCollatTxParams): Promise<{
|
|
17635
17779
|
transactions: ExtendedV0Transaction[];
|
|
17636
|
-
swapQuote:
|
|
17780
|
+
swapQuote: SwapQuoteResult | undefined;
|
|
17637
17781
|
amountToRepay: number;
|
|
17638
17782
|
}>;
|
|
17639
17783
|
|
|
@@ -17661,14 +17805,14 @@ declare function makeClearEmissionsIx(program: MarginfiProgram, marginfiAccount:
|
|
|
17661
17805
|
* oraclePrices,
|
|
17662
17806
|
* withdrawOpts: { totalPositionAmount: 10, withdrawBank: jitoSolBank, tokenProgram },
|
|
17663
17807
|
* depositOpts: { depositBank: mSolBank, tokenProgram },
|
|
17664
|
-
* swapOpts: {
|
|
17808
|
+
* swapOpts: { swapConfig: { provider: SwapProvider.JUPITER, slippageMode: "DYNAMIC", slippageBps: 50, platformFeeBps: 0 } },
|
|
17665
17809
|
* // ...
|
|
17666
17810
|
* });
|
|
17667
17811
|
*/
|
|
17668
17812
|
declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promise<{
|
|
17669
17813
|
transactions: ExtendedV0Transaction[];
|
|
17670
17814
|
actionTxIndex: number;
|
|
17671
|
-
quoteResponse:
|
|
17815
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
17672
17816
|
}>;
|
|
17673
17817
|
|
|
17674
17818
|
/**
|
|
@@ -17686,53 +17830,16 @@ declare function makeSwapCollateralTx(params: MakeSwapCollateralTxParams): Promi
|
|
|
17686
17830
|
* oraclePrices,
|
|
17687
17831
|
* repayOpts: { totalPositionAmount: 100, repayBank: usdcBank, tokenProgram },
|
|
17688
17832
|
* borrowOpts: { borrowBank: solBank, tokenProgram },
|
|
17689
|
-
* swapOpts: {
|
|
17833
|
+
* swapOpts: { swapConfig: { provider: SwapProvider.JUPITER, slippageMode: "DYNAMIC", slippageBps: 50, platformFeeBps: 0 } },
|
|
17690
17834
|
* // ...
|
|
17691
17835
|
* });
|
|
17692
17836
|
*/
|
|
17693
17837
|
declare function makeSwapDebtTx(params: MakeSwapDebtTxParams): Promise<{
|
|
17694
17838
|
transactions: ExtendedV0Transaction[];
|
|
17695
17839
|
actionTxIndex: number;
|
|
17696
|
-
quoteResponse:
|
|
17840
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
17697
17841
|
}>;
|
|
17698
17842
|
|
|
17699
|
-
/**
|
|
17700
|
-
* Creates instructions to convert a native stake account into LST tokens.
|
|
17701
|
-
*
|
|
17702
|
-
* Steps:
|
|
17703
|
-
* 1. Create LST ATA if needed
|
|
17704
|
-
* 2. Split stake account if partial amount
|
|
17705
|
-
* 3. Authorize staker + withdrawer to pool
|
|
17706
|
-
* 4. Deposit stake into pool → user receives LST
|
|
17707
|
-
*/
|
|
17708
|
-
declare function makeMintStakedLstIx(params: MakeMintStakedLstIxParams): Promise<InstructionsWrapper>;
|
|
17709
|
-
/**
|
|
17710
|
-
* Creates a versioned transaction to convert a native stake account into LST tokens.
|
|
17711
|
-
*/
|
|
17712
|
-
declare function makeMintStakedLstTx(params: MakeMintStakedLstTxParams): Promise<ExtendedV0Transaction>;
|
|
17713
|
-
|
|
17714
|
-
/**
|
|
17715
|
-
* Creates instructions to convert LST tokens back to a native stake account.
|
|
17716
|
-
*
|
|
17717
|
-
* Steps:
|
|
17718
|
-
* 1. Create new stake account (rent-exempt)
|
|
17719
|
-
* 2. Approve pool mint authority to burn LST
|
|
17720
|
-
* 3. Withdraw stake from pool → user receives stake account
|
|
17721
|
-
*/
|
|
17722
|
-
declare function makeRedeemStakedLstIx(params: MakeRedeemStakedLstIxParams): Promise<InstructionsWrapper>;
|
|
17723
|
-
/**
|
|
17724
|
-
* Creates a versioned transaction to convert LST tokens back to a native stake account.
|
|
17725
|
-
*/
|
|
17726
|
-
declare function makeRedeemStakedLstTx(params: MakeRedeemStakedLstTxParams): Promise<ExtendedV0Transaction>;
|
|
17727
|
-
|
|
17728
|
-
/**
|
|
17729
|
-
* Creates a versioned transaction to merge two stake accounts.
|
|
17730
|
-
*
|
|
17731
|
-
* The source stake account will be merged into the destination stake account.
|
|
17732
|
-
* Both accounts must share the same authorized staker/withdrawer and vote account.
|
|
17733
|
-
*/
|
|
17734
|
-
declare function makeMergeStakeAccountsTx(params: MakeMergeStakeAccountsTxParams): Promise<ExtendedV0Transaction>;
|
|
17735
|
-
|
|
17736
17843
|
type MakeSmartCrankSwbFeedIxParams = {
|
|
17737
17844
|
marginfiAccount: MarginfiAccountType;
|
|
17738
17845
|
bankMap: Map<string, BankType>;
|
|
@@ -18531,30 +18638,6 @@ declare function validatorStakeGroupToDto(validatorStakeGroup: ValidatorStakeGro
|
|
|
18531
18638
|
|
|
18532
18639
|
declare function dtoToValidatorStakeGroup(validatorStakeGroupDto: ValidatorStakeGroupDto): ValidatorStakeGroup;
|
|
18533
18640
|
|
|
18534
|
-
/**
|
|
18535
|
-
* Metadata for a staked bank entry.
|
|
18536
|
-
* Sourced from hardcoded JSON — update via `metadata.data.ts` until dynamic fetching is implemented.
|
|
18537
|
-
*/
|
|
18538
|
-
interface StakedBankMetadata {
|
|
18539
|
-
bankAddress: string;
|
|
18540
|
-
validatorVoteAccount: string;
|
|
18541
|
-
tokenAddress: string;
|
|
18542
|
-
tokenName: string;
|
|
18543
|
-
tokenSymbol: string;
|
|
18544
|
-
}
|
|
18545
|
-
/**
|
|
18546
|
-
* Returns a Map of bankAddress → StakedBankMetadata (lazy-cached).
|
|
18547
|
-
*
|
|
18548
|
-
* @remarks Uses hardcoded data. TODO: Replace with dynamic API fetch.
|
|
18549
|
-
*/
|
|
18550
|
-
declare function getStakedBankMetadataMap(): Map<string, StakedBankMetadata>;
|
|
18551
|
-
/**
|
|
18552
|
-
* Returns a Record of bankAddress → validatorVoteAccount (lazy-cached).
|
|
18553
|
-
*
|
|
18554
|
-
* @remarks Uses hardcoded data. TODO: Replace with dynamic API fetch.
|
|
18555
|
-
*/
|
|
18556
|
-
declare function getValidatorVoteAccountByBank(): Record<string, string>;
|
|
18557
|
-
|
|
18558
18641
|
/**
|
|
18559
18642
|
* Temporary Module for Functions Pending Refactoring
|
|
18560
18643
|
*
|
|
@@ -19059,10 +19142,14 @@ declare function getConfig(environment?: Environment, overrides?: Partial<Omit<P
|
|
|
19059
19142
|
declare enum TransactionBuildingErrorCode {
|
|
19060
19143
|
JUPITER_SWAP_SIZE_EXCEEDED_REPAY = "JUPITER_SWAP_SIZE_EXCEEDED_REPAY",
|
|
19061
19144
|
JUPITER_SWAP_SIZE_EXCEEDED_LOOP = "JUPITER_SWAP_SIZE_EXCEEDED_LOOP",
|
|
19145
|
+
SWAP_SIZE_EXCEEDED_LOOP = "SWAP_SIZE_EXCEEDED_LOOP",
|
|
19146
|
+
SWAP_SIZE_EXCEEDED_REPAY = "SWAP_SIZE_EXCEEDED_REPAY",
|
|
19062
19147
|
ORACLE_CRANK_FAILED = "ORACLE_CRANK_FAILED",
|
|
19063
19148
|
KAMINO_RESERVE_NOT_FOUND = "KAMINO_RESERVE_NOT_FOUND",
|
|
19064
19149
|
DRIFT_STATE_NOT_FOUND = "DRIFT_STATE_NOT_FOUND",
|
|
19065
|
-
JUPLEND_STATE_NOT_FOUND = "JUPLEND_STATE_NOT_FOUND"
|
|
19150
|
+
JUPLEND_STATE_NOT_FOUND = "JUPLEND_STATE_NOT_FOUND",
|
|
19151
|
+
SWITCHBOARD_FEED_UPDATE_FAILED = "SWITCHBOARD_FEED_UPDATE_FAILED",
|
|
19152
|
+
SWAP_QUOTE_FAILED = "SWAP_QUOTE_FAILED"
|
|
19066
19153
|
}
|
|
19067
19154
|
/**
|
|
19068
19155
|
* Typed details for each error code
|
|
@@ -19076,6 +19163,16 @@ interface TransactionBuildingErrorDetails {
|
|
|
19076
19163
|
bytes: number;
|
|
19077
19164
|
accountKeys: number;
|
|
19078
19165
|
};
|
|
19166
|
+
[TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_LOOP]: {
|
|
19167
|
+
bytes: number;
|
|
19168
|
+
accountKeys: number;
|
|
19169
|
+
provider?: string;
|
|
19170
|
+
};
|
|
19171
|
+
[TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_REPAY]: {
|
|
19172
|
+
bytes: number;
|
|
19173
|
+
accountKeys: number;
|
|
19174
|
+
provider?: string;
|
|
19175
|
+
};
|
|
19079
19176
|
[TransactionBuildingErrorCode.ORACLE_CRANK_FAILED]: {
|
|
19080
19177
|
uncrankableLiabilities: Array<{
|
|
19081
19178
|
bankAddress: string;
|
|
@@ -19105,6 +19202,16 @@ interface TransactionBuildingErrorDetails {
|
|
|
19105
19202
|
bankMint: string;
|
|
19106
19203
|
bankSymbol?: string;
|
|
19107
19204
|
};
|
|
19205
|
+
[TransactionBuildingErrorCode.SWITCHBOARD_FEED_UPDATE_FAILED]: {
|
|
19206
|
+
oracleKeys: string[];
|
|
19207
|
+
reason: string;
|
|
19208
|
+
};
|
|
19209
|
+
[TransactionBuildingErrorCode.SWAP_QUOTE_FAILED]: {
|
|
19210
|
+
provider: string;
|
|
19211
|
+
inputMint: string;
|
|
19212
|
+
outputMint: string;
|
|
19213
|
+
reason: string;
|
|
19214
|
+
};
|
|
19108
19215
|
}
|
|
19109
19216
|
/**
|
|
19110
19217
|
* Error thrown during transaction building in the SDK.
|
|
@@ -19120,6 +19227,8 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
|
|
|
19120
19227
|
*/
|
|
19121
19228
|
static jupiterSwapSizeExceededLoop(bytes: number, accountKeys: number): TransactionBuildingError<TransactionBuildingErrorCode.JUPITER_SWAP_SIZE_EXCEEDED_LOOP>;
|
|
19122
19229
|
static jupiterSwapSizeExceededRepay(bytes: number, accountKeys: number): TransactionBuildingError<TransactionBuildingErrorCode.JUPITER_SWAP_SIZE_EXCEEDED_REPAY>;
|
|
19230
|
+
static swapSizeExceededLoop(bytes: number, accountKeys: number, provider?: string): TransactionBuildingError<TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_LOOP>;
|
|
19231
|
+
static swapSizeExceededRepay(bytes: number, accountKeys: number, provider?: string): TransactionBuildingError<TransactionBuildingErrorCode.SWAP_SIZE_EXCEEDED_REPAY>;
|
|
19123
19232
|
/**
|
|
19124
19233
|
* Failed to crank oracles for one or more banks
|
|
19125
19234
|
*/
|
|
@@ -19146,6 +19255,14 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
|
|
|
19146
19255
|
* Failed to find JupLend state for a bank
|
|
19147
19256
|
*/
|
|
19148
19257
|
static jupLendStateNotFound(bankAddress: string, bankMint: string, bankSymbol?: string): TransactionBuildingError<TransactionBuildingErrorCode.JUPLEND_STATE_NOT_FOUND>;
|
|
19258
|
+
/**
|
|
19259
|
+
* Failed to update Switchboard price feeds
|
|
19260
|
+
*/
|
|
19261
|
+
static switchboardFeedUpdateFailed(oracleKeys: string[], reason: string): TransactionBuildingError<TransactionBuildingErrorCode.SWITCHBOARD_FEED_UPDATE_FAILED>;
|
|
19262
|
+
/**
|
|
19263
|
+
* Failed to get a swap quote from any provider
|
|
19264
|
+
*/
|
|
19265
|
+
static swapQuoteFailed(provider: string, inputMint: string, outputMint: string, reason: string): TransactionBuildingError<TransactionBuildingErrorCode.SWAP_QUOTE_FAILED>;
|
|
19149
19266
|
/**
|
|
19150
19267
|
* Generic escape hatch for custom errors
|
|
19151
19268
|
*/
|
|
@@ -19310,6 +19427,8 @@ declare const HOURS_PER_YEAR: number;
|
|
|
19310
19427
|
declare const MAX_U64: string;
|
|
19311
19428
|
|
|
19312
19429
|
declare const MAX_TX_SIZE: number;
|
|
19430
|
+
declare const MAX_WRITABLE_ACCOUNTS = 64;
|
|
19431
|
+
declare const MAX_ACCOUNT_LOCKS = 64;
|
|
19313
19432
|
declare const BUNDLE_TX_SIZE: number;
|
|
19314
19433
|
declare const PRIORITY_TX_SIZE: number;
|
|
19315
19434
|
|
|
@@ -19812,7 +19931,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19812
19931
|
* @param params.oraclePrices - Map of current oracle prices
|
|
19813
19932
|
* @param params.depositOpts - Deposit configuration (bank, amount, mode)
|
|
19814
19933
|
* @param params.borrowOpts - Borrow configuration (bank, amount)
|
|
19815
|
-
* @param params.swapOpts -
|
|
19934
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
19816
19935
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
19817
19936
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
19818
19937
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -19827,7 +19946,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19827
19946
|
makeLoopTx(params: Omit<MakeLoopTxParams, "marginfiAccount">): Promise<{
|
|
19828
19947
|
transactions: ExtendedV0Transaction[];
|
|
19829
19948
|
actionTxIndex: number;
|
|
19830
|
-
quoteResponse:
|
|
19949
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
19831
19950
|
}>;
|
|
19832
19951
|
/**
|
|
19833
19952
|
* Creates a transaction to repay debt using collateral.
|
|
@@ -19844,7 +19963,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19844
19963
|
* @param params.oraclePrices - Map of current oracle prices
|
|
19845
19964
|
* @param params.withdrawOpts - Withdraw configuration (bank, amount)
|
|
19846
19965
|
* @param params.repayOpts - Repay configuration (bank, optional amount)
|
|
19847
|
-
* @param params.swapOpts -
|
|
19966
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
19848
19967
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
19849
19968
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
19850
19969
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -19859,7 +19978,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19859
19978
|
*/
|
|
19860
19979
|
makeRepayWithCollatTx(params: Omit<MakeRepayWithCollatTxParams, "marginfiAccount">): Promise<{
|
|
19861
19980
|
transactions: ExtendedV0Transaction[];
|
|
19862
|
-
swapQuote:
|
|
19981
|
+
swapQuote: SwapQuoteResult | undefined;
|
|
19863
19982
|
amountToRepay: number;
|
|
19864
19983
|
}>;
|
|
19865
19984
|
/**
|
|
@@ -19878,7 +19997,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19878
19997
|
* @param params.oraclePrices - Map of current oracle prices
|
|
19879
19998
|
* @param params.withdrawOpts - Withdraw configuration (bank, amount, tokenProgram)
|
|
19880
19999
|
* @param params.depositOpts - Deposit configuration (bank, tokenProgram)
|
|
19881
|
-
* @param params.swapOpts -
|
|
20000
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
19882
20001
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
19883
20002
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
19884
20003
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -19894,7 +20013,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19894
20013
|
makeSwapCollateralTx(params: Omit<MakeSwapCollateralTxParams, "marginfiAccount">): Promise<{
|
|
19895
20014
|
transactions: ExtendedV0Transaction[];
|
|
19896
20015
|
actionTxIndex: number;
|
|
19897
|
-
quoteResponse:
|
|
20016
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
19898
20017
|
}>;
|
|
19899
20018
|
/**
|
|
19900
20019
|
* Creates a transaction to swap one debt position to another using a flash loan.
|
|
@@ -19912,7 +20031,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19912
20031
|
* @param params.oraclePrices - Map of current oracle prices
|
|
19913
20032
|
* @param params.repayOpts - Repay configuration (bank, amount, tokenProgram)
|
|
19914
20033
|
* @param params.borrowOpts - Borrow configuration (bank, tokenProgram)
|
|
19915
|
-
* @param params.swapOpts -
|
|
20034
|
+
* @param params.swapOpts - Swap configuration (venue, slippage, fees)
|
|
19916
20035
|
* @param params.addressLookupTableAccounts - Address lookup tables
|
|
19917
20036
|
* @param params.overrideInferAccounts - Optional account overrides
|
|
19918
20037
|
* @param params.additionalIxs - Additional instructions to include
|
|
@@ -19927,7 +20046,7 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
19927
20046
|
makeSwapDebtTx(params: Omit<MakeSwapDebtTxParams, "marginfiAccount">): Promise<{
|
|
19928
20047
|
transactions: ExtendedV0Transaction[];
|
|
19929
20048
|
actionTxIndex: number;
|
|
19930
|
-
quoteResponse:
|
|
20049
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
19931
20050
|
}>;
|
|
19932
20051
|
/**
|
|
19933
20052
|
* Creates a deposit transaction.
|
|
@@ -20226,7 +20345,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20226
20345
|
makeLoopTx(params: Omit<MakeLoopTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20227
20346
|
transactions: ExtendedV0Transaction[];
|
|
20228
20347
|
actionTxIndex: number;
|
|
20229
|
-
quoteResponse:
|
|
20348
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20230
20349
|
}>;
|
|
20231
20350
|
/**
|
|
20232
20351
|
* Creates a repay with collateral transaction with auto-injected client data.
|
|
@@ -20237,7 +20356,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20237
20356
|
*/
|
|
20238
20357
|
makeRepayWithCollatTx(params: Omit<MakeRepayWithCollatTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20239
20358
|
transactions: ExtendedV0Transaction[];
|
|
20240
|
-
swapQuote:
|
|
20359
|
+
swapQuote: SwapQuoteResult | undefined;
|
|
20241
20360
|
amountToRepay: number;
|
|
20242
20361
|
}>;
|
|
20243
20362
|
/**
|
|
@@ -20253,7 +20372,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20253
20372
|
makeSwapCollateralTx(params: Omit<MakeSwapCollateralTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20254
20373
|
transactions: ExtendedV0Transaction[];
|
|
20255
20374
|
actionTxIndex: number;
|
|
20256
|
-
quoteResponse:
|
|
20375
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20257
20376
|
}>;
|
|
20258
20377
|
/**
|
|
20259
20378
|
* Creates a swap debt transaction with auto-injected client data.
|
|
@@ -20268,7 +20387,7 @@ declare class MarginfiAccountWrapper {
|
|
|
20268
20387
|
makeSwapDebtTx(params: Omit<MakeSwapDebtTxParams, "program" | "marginfiAccount" | "bankMap" | "oraclePrices" | "bankMetadataMap" | "addressLookupTableAccounts">): Promise<{
|
|
20269
20388
|
transactions: ExtendedV0Transaction[];
|
|
20270
20389
|
actionTxIndex: number;
|
|
20271
|
-
quoteResponse:
|
|
20390
|
+
quoteResponse: SwapQuoteResult | undefined;
|
|
20272
20391
|
}>;
|
|
20273
20392
|
/**
|
|
20274
20393
|
* Creates a deposit transaction with auto-injected client data.
|
|
@@ -20463,35 +20582,6 @@ declare class MarginfiAccountWrapper {
|
|
|
20463
20582
|
* @param excludedBanks - Array of excluded bank public keys (default: [])
|
|
20464
20583
|
*/
|
|
20465
20584
|
getHealthCheckAccounts(mandatoryBanks?: PublicKey[], excludedBanks?: PublicKey[]): BankType[];
|
|
20466
|
-
/**
|
|
20467
|
-
* Creates a transaction to mint LST from a native stake account.
|
|
20468
|
-
*
|
|
20469
|
-
* Converts a native stake account (or a portion of it) into LST tokens
|
|
20470
|
-
* by depositing the stake into the single-validator pool.
|
|
20471
|
-
*
|
|
20472
|
-
* @param amount - SOL amount to convert (in UI units)
|
|
20473
|
-
* @param stakeAccountPk - The stake account to convert
|
|
20474
|
-
* @param validator - The validator vote account
|
|
20475
|
-
*/
|
|
20476
|
-
makeMintStakedLstTx(amount: Amount, stakeAccountPk: PublicKey, validator: PublicKey): Promise<ExtendedV0Transaction>;
|
|
20477
|
-
/**
|
|
20478
|
-
* Creates a transaction to redeem LST tokens back to a native stake account.
|
|
20479
|
-
*
|
|
20480
|
-
* Burns LST tokens and withdraws the underlying stake into a new stake account.
|
|
20481
|
-
*
|
|
20482
|
-
* @param amount - LST amount to redeem (in UI units)
|
|
20483
|
-
* @param validator - The validator vote account
|
|
20484
|
-
*/
|
|
20485
|
-
makeRedeemStakedLstTx(amount: Amount, validator: PublicKey): Promise<ExtendedV0Transaction>;
|
|
20486
|
-
/**
|
|
20487
|
-
* Creates a transaction to merge two stake accounts.
|
|
20488
|
-
*
|
|
20489
|
-
* Both accounts must share the same authorized staker/withdrawer and vote account.
|
|
20490
|
-
*
|
|
20491
|
-
* @param sourceStakeAccount - The stake account to merge from (will be consumed)
|
|
20492
|
-
* @param destinationStakeAccount - The stake account to merge into
|
|
20493
|
-
*/
|
|
20494
|
-
makeMergeStakeAccountsTx(sourceStakeAccount: PublicKey, destinationStakeAccount: PublicKey): Promise<ExtendedV0Transaction>;
|
|
20495
20585
|
/**
|
|
20496
20586
|
* Gets the underlying MarginfiAccount instance.
|
|
20497
20587
|
* Useful for advanced operations that need direct access.
|
|
@@ -20503,4 +20593,4 @@ declare class MarginfiAccountWrapper {
|
|
|
20503
20593
|
getClient(): Project0Client;
|
|
20504
20594
|
}
|
|
20505
20595
|
|
|
20506
|
-
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, type ActionEmodeImpact, type ActiveEmodePair, type ActiveStakePoolMap, type Amount, type AmountType, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigCompactRaw, type BankConfigDto, BankConfigFlag, type BankConfigOpt, type BankConfigOptRaw, type BankConfigRaw, type BankConfigRawDto, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataDto, type BankIntegrationMetadataMap, type BankIntegrationMetadataMapDto, type BankMap, type BankMetadata, type BankMetadataRaw, type BankRaw, type BankRawDto, type BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeHealthComponentsWithoutBiasParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputeUsdValueParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRaw, type EmodeConfigRawDto, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsRaw, type EmodeSettingsRawDto, type EmodeSettingsType, EmodeTag, type Environment, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, type InterestRateConfig, type InterestRateConfigCompactRaw, type InterestRateConfigDto, type InterestRateConfigOpt, type InterestRateConfigOptRaw, type 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, type KaminoStates, LST_MINT, MARGINFI_IDL, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, 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, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, type MarginfiIdlType, type MarginfiProgram, type MintData, type MintDataMap, OperationalState, type OperationalStateRaw, type OracleConfigOpt, type OracleConfigOptRaw, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type 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, type PriceWithConfidence, type PriceWithConfidenceDto, type Program, Project0Client, type Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePoint, type RatePointDto, type RatePointRaw, RiskTier, type 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 SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, type TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type Wallet, type WithdrawWindowCache, type 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, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, computeUtilizationRate, 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, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, 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, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|
|
20596
|
+
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_SWAP, AccountFlags, AccountType, type ActionEmodeImpact, type ActiveEmodePair, type ActiveStakePoolMap, type Amount, type AmountType, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, type BalanceType, type BalanceTypeDto, Bank, type BankAddress, BankConfig, type BankConfigCompactRaw, type BankConfigDto, BankConfigFlag, type BankConfigOpt, type BankConfigOptRaw, type BankConfigRaw, type BankConfigRawDto, type BankConfigType, type BankIntegrationMetadata, type BankIntegrationMetadataDto, type BankIntegrationMetadataMap, type BankIntegrationMetadataMapDto, type BankMap, type BankMetadata, type BankMetadataRaw, type BankRaw, type BankRawDto, type BankType, type BankTypeDto, BankVaultType, type ComputeAssetHealthComponentParams, type ComputeAssetUsdValueParams, type ComputeBalanceUsdValueParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeHealthComponentsWithoutBiasParams, type ComputeLiabilityHealthComponentParams, type ComputeLiabilityUsdValueParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, type ComputeUsdValueParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_ORACLE_MAX_AGE, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRaw, type EmodeConfigRawDto, type EmodeEntry, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, type EmodeImpact, EmodeImpactStatus, type EmodePair, EmodeSettings, type EmodeSettingsDto, type EmodeSettingsRaw, type EmodeSettingsRawDto, type EmodeSettingsType, EmodeTag, type 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 GetAssetWeightParams, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, type HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, type InterestRateConfig, type InterestRateConfigCompactRaw, type InterestRateConfigDto, type InterestRateConfigOpt, type InterestRateConfigOptRaw, type 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, type KaminoStates, LST_MINT, MARGINFI_IDL, 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, MAX_WRITABLE_ACCOUNTS, MPL_METADATA_PROGRAM_ID, 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 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, type MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, type MarginfiIdlType, type MarginfiProgram, type MintData, type MintDataMap, OperationalState, type OperationalStateRaw, type OracleConfigOpt, type OracleConfigOptRaw, type OraclePrice, type OraclePriceDto, type OraclePriceMap, OracleSetup, type 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, type PriceWithConfidence, type PriceWithConfidenceDto, type Program, Project0Client, type Project0Config, Project0ConfigRaw, type PythOracleServiceOpts, type RatePoint, type RatePointDto, type RatePointRaw, RiskTier, type 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 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, type TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type Wallet, type WithdrawWindowCache, type 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, computeAssetUsdValue, computeBalanceUsdValue, computeBaseInterestRate, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeHealthComponentsWithoutBiasFromBalances, computeInterestRates, computeLiabilityHealthComponent, computeLiabilityUsdValue, computeLiquidationPriceForBank, computeLoopingParams, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxLeverage, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeTotalOutstandingEmissions, computeTvl, computeUsdValue, 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, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getAssetWeight, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getLiabilityWeight, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isFlashloan, isV0Tx, isWeightedPrice, isWholePosition, 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, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, 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, resolveAmount, serializeBankConfigOpt, serializeInterestRateConfig, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|