@0dotxyz/p0-ts-sdk 2.3.1 → 2.3.3
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 +322 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +211 -6
- package/dist/index.d.ts +211 -6
- package/dist/index.js +309 -8
- package/dist/index.js.map +1 -1
- package/dist/instructions.d.cts +1 -1
- package/dist/instructions.d.ts +1 -1
- package/dist/{types-BC4kJXuQ.d.ts → types-Cxl2AUvk.d.ts} +59 -2
- package/dist/{types-6ULf9Ciw.d.cts → types-DtUR-yHt.d.cts} +59 -2
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as superstruct from 'superstruct';
|
|
2
2
|
import { Infer } from 'superstruct';
|
|
3
|
-
import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRaw, p as
|
|
4
|
-
export {
|
|
3
|
+
import { b as BankType, R as RiskTier, A as AssetTag, c as BankConfigFlag, O as OperationalState, d as OracleSetup, E as EmodeTag, e as EmodeEntryFlags, f as EmodeFlags, W as WrappedI80F48, I as InterestRateConfigRaw, g as OperationalStateRaw, h as OracleSetupRaw, i as RiskTierRaw, M as MarginfiProgram, j as BankConfigOpt, k as InterestRateConfig, l as BankConfigType, m as BankConfigRaw, a as BankConfigOptRaw, n as EmodeSettingsType, o as BankRaw, p as BankRateLimiterRaw, q as EmodeSettingsRaw, r as MarginfiIdlType, s as BankRateLimiterType, t as OraclePrice, P as PriceWithConfidence, u as PriceBias, v as OraclePriceDto, H as HealthCacheFlags, w as HealthCacheStatus, x as AccountFlags, y as MarginfiAccountType, z as Amount, C as BankIntegrationMetadataMap, T as TypedAmount, D as BalanceType, F as HealthCacheType, G as EmodePair, J as ActiveEmodePair, K as ActionEmodeImpact, L as MarginRequirementType, N as EmodeImpactStatus, Q as BankVaultType, S as BankIntegrationMetadataMapDto, U as BankIntegrationMetadataDto, V as BankIntegrationMetadata, X as Bank, Y as Environment, Z as Project0Config, _ as MintData } from './types-DtUR-yHt.cjs';
|
|
4
|
+
export { ax as AccountType, aC as AmountType, aw as BankAddress, $ as BankConfig, B as BankConfigCompactRaw, az as BankMap, av as BankMetadata, a2 as BankMetadataRaw, ao as ComputeAssetUsdValueParams, am as ComputeLiabilityUsdValueParams, ak as ComputeUsdValueParams, a7 as EmodeConfigRaw, ab as EmodeEntry, ad as EmodeImpact, a0 as EmodeSettings, af as GetAssetWeightParams, a4 as InterestRateConfigCompactRaw, a9 as InterestRateConfigOpt, a5 as InterestRateConfigOptRaw, ay as KaminoStates, as as MARGINFI_IDL, aB as MintDataMap, ac as OracleConfigOpt, a6 as OracleConfigOptRaw, aA as OraclePriceMap, ar as PriceWithConfidenceDto, at as Program, a1 as RateLimitWindowRaw, aa as RateLimitWindowType, a8 as RatePoint, a3 as RatePointRaw, au as Wallet, ap as computeAssetUsdValue, an as computeLiabilityUsdValue, aj as computeLoopingParams, ai as computeMaxLeverage, aq as computeTvl, al as computeUsdValue, ag as getAssetWeight, ah as getLiabilityWeight, ae as isWeightedPrice, aD as resolveAmount } from './types-DtUR-yHt.cjs';
|
|
5
5
|
import * as _solana_web3_js from '@solana/web3.js';
|
|
6
6
|
import { VersionedTransaction, Transaction, PublicKey, TransactionError, TransactionInstruction, Keypair, Signer, AddressLookupTableAccount, Blockhash, TransactionMessage, Connection, AccountInfo } from '@solana/web3.js';
|
|
7
7
|
import { Idl, Instruction, AnchorProvider, Address } from '@coral-xyz/anchor';
|
|
@@ -226,6 +226,17 @@ interface BankConfigDto {
|
|
|
226
226
|
oracleMaxConfidence: number;
|
|
227
227
|
fixedPrice: string;
|
|
228
228
|
}
|
|
229
|
+
interface RateLimitWindowDto {
|
|
230
|
+
maxOutflow: string;
|
|
231
|
+
windowDuration: number;
|
|
232
|
+
windowStart: number;
|
|
233
|
+
prevWindowOutflow: string;
|
|
234
|
+
curWindowOutflow: string;
|
|
235
|
+
}
|
|
236
|
+
interface BankRateLimiterDto {
|
|
237
|
+
hourly: RateLimitWindowDto;
|
|
238
|
+
daily: RateLimitWindowDto;
|
|
239
|
+
}
|
|
229
240
|
interface EmodeEntryDto {
|
|
230
241
|
collateralBankEmodeTag: EmodeTag;
|
|
231
242
|
flags: EmodeEntryFlags[];
|
|
@@ -266,9 +277,11 @@ interface BankTypeDto {
|
|
|
266
277
|
emissionsRate: number;
|
|
267
278
|
emissionsMint: string;
|
|
268
279
|
emissionsRemaining: string;
|
|
280
|
+
collectedProgramFeesOutstanding?: string;
|
|
269
281
|
oracleKey: string;
|
|
270
282
|
pythShardId?: number;
|
|
271
283
|
emode: EmodeSettingsDto;
|
|
284
|
+
rateLimiter?: BankRateLimiterDto;
|
|
272
285
|
feesDestinationAccount?: string;
|
|
273
286
|
lendingPositionCount?: string;
|
|
274
287
|
borrowingPositionCount?: string;
|
|
@@ -319,11 +332,24 @@ interface BankRawDto {
|
|
|
319
332
|
emissionsRate: string;
|
|
320
333
|
emissionsRemaining: WrappedI80F48;
|
|
321
334
|
emissionsMint: string;
|
|
335
|
+
collectedProgramFeesOutstanding?: WrappedI80F48;
|
|
336
|
+
rateLimiter?: BankRateLimiterRawDto;
|
|
322
337
|
feesDestinationAccount?: string;
|
|
323
338
|
lendingPositionCount?: string;
|
|
324
339
|
borrowingPositionCount?: string;
|
|
325
340
|
emode: EmodeSettingsRawDto;
|
|
326
341
|
}
|
|
342
|
+
interface RateLimitWindowRawDto {
|
|
343
|
+
maxOutflow: string;
|
|
344
|
+
windowDuration: string;
|
|
345
|
+
windowStart: string;
|
|
346
|
+
prevWindowOutflow: string;
|
|
347
|
+
curWindowOutflow: string;
|
|
348
|
+
}
|
|
349
|
+
interface BankRateLimiterRawDto {
|
|
350
|
+
hourly: RateLimitWindowRawDto;
|
|
351
|
+
daily: RateLimitWindowRawDto;
|
|
352
|
+
}
|
|
327
353
|
interface BankConfigRawDto {
|
|
328
354
|
assetWeightInit: WrappedI80F48;
|
|
329
355
|
assetWeightMaint: WrappedI80F48;
|
|
@@ -388,12 +414,14 @@ declare function toEmodeSettingsDto(emodeSettings: EmodeSettingsType): EmodeSett
|
|
|
388
414
|
declare function toBankConfigDto(bankConfig: BankConfigType): BankConfigDto;
|
|
389
415
|
declare function toInterestRateConfigDto(interestRateConfig: InterestRateConfig): InterestRateConfigDto;
|
|
390
416
|
declare function bankRawToDto(bankRaw: BankRaw): BankRawDto;
|
|
417
|
+
declare function bankRateLimiterRawToDto(rateLimiter: BankRateLimiterRaw): BankRateLimiterRawDto;
|
|
391
418
|
declare function emodeSettingsRawToDto(emodeSettingsRaw: EmodeSettingsRaw): EmodeSettingsRawDto;
|
|
392
419
|
declare function bankConfigToBankConfigRaw(config: BankConfigType): BankConfigRaw;
|
|
393
420
|
declare function bankConfigRawToDto(bankConfigRaw: BankConfigRaw): BankConfigRawDto;
|
|
394
421
|
|
|
395
422
|
declare function decodeBankRaw(encoded: Buffer, idl: MarginfiIdlType): BankRaw;
|
|
396
423
|
declare function parseEmodeSettingsRaw(emodeSettingsRaw: EmodeSettingsRaw): EmodeSettingsType;
|
|
424
|
+
declare function parseBankRateLimiterRaw(rateLimiter: BankRateLimiterRaw): BankRateLimiterType;
|
|
397
425
|
interface BankMetadata {
|
|
398
426
|
tokenAddress: string;
|
|
399
427
|
tokenName: string;
|
|
@@ -401,10 +429,12 @@ interface BankMetadata {
|
|
|
401
429
|
}
|
|
402
430
|
declare function parseBankRaw(address: PublicKey, accountParsed: BankRaw, bankMetadata?: BankMetadata): BankType;
|
|
403
431
|
declare function dtoToBank(bankDto: BankTypeDto): BankType;
|
|
432
|
+
declare function dtoToBankRateLimiter(rateLimiter: BankRateLimiterDto): BankRateLimiterType;
|
|
404
433
|
declare function dtoToEmodeSettings(emodeSettingsDto: EmodeSettingsDto): EmodeSettingsType;
|
|
405
434
|
declare function dtoToBankConfig(bankConfigDto: BankConfigDto): BankConfigType;
|
|
406
435
|
declare function dtoToInterestRateConfig(interestRateConfigDto: InterestRateConfigDto): InterestRateConfig;
|
|
407
436
|
declare function dtoToBankRaw(bankDto: BankRawDto): BankRaw;
|
|
437
|
+
declare function dtoToBankRateLimiterRaw(rateLimiter: BankRateLimiterRawDto): BankRateLimiterRaw;
|
|
408
438
|
declare function dtoToEmodeSettingsRaw(emodeSettingsDto: EmodeSettingsRawDto): EmodeSettingsRaw;
|
|
409
439
|
declare function dtoToBankConfigRaw(bankConfigDto: BankConfigRawDto): BankConfigRaw;
|
|
410
440
|
declare function parseBankConfigRaw(bankConfigRaw: BankConfigRaw): BankConfigType;
|
|
@@ -2546,6 +2576,48 @@ declare function computeProjectedActiveBalancesNoCpi(balances: BalanceType[], in
|
|
|
2546
2576
|
};
|
|
2547
2577
|
|
|
2548
2578
|
declare const fetchMarginfiAccountAddresses: (program: MarginfiProgram, authority: PublicKey, group: PublicKey) => Promise<PublicKey[]>;
|
|
2579
|
+
/**
|
|
2580
|
+
* Fetches the addresses of every marginfi account in a group that holds a position in a
|
|
2581
|
+
* specific bank. Returns only addresses (uses `dataSlice` length 0 so no account data is
|
|
2582
|
+
* transferred or decoded) — important at the ~500k account scale of the group.
|
|
2583
|
+
*
|
|
2584
|
+
* @param program - The marginfi Anchor program (connection is taken from its provider)
|
|
2585
|
+
* @param group - The marginfi group public key
|
|
2586
|
+
* @param bank - The bank public key to search for in account balances
|
|
2587
|
+
* @param options - Optional settings:
|
|
2588
|
+
* - `concurrency`: max number of the 16 slot scans to run at once. Omit (or pass a value
|
|
2589
|
+
* >= 16) to fire all 16 in parallel via `Promise.all`; pass a smaller value (e.g. 4) to
|
|
2590
|
+
* batch them and avoid RPC rate limits.
|
|
2591
|
+
* @returns Deduplicated array of account addresses holding the bank
|
|
2592
|
+
*/
|
|
2593
|
+
declare const fetchMarginfiAccountAddressesHoldingBank: (program: MarginfiProgram, group: PublicKey, bank: PublicKey, options?: {
|
|
2594
|
+
concurrency?: number;
|
|
2595
|
+
}) => Promise<PublicKey[]>;
|
|
2596
|
+
/** One account's active balance position in a specific bank. */
|
|
2597
|
+
type AccountActiveBalanceForBank = {
|
|
2598
|
+
accountAddress: PublicKey;
|
|
2599
|
+
authority: PublicKey;
|
|
2600
|
+
balance: BalanceType;
|
|
2601
|
+
};
|
|
2602
|
+
/**
|
|
2603
|
+
* Fetches every marginfi account in a group that holds `bank`, along with its authority and the
|
|
2604
|
+
* active balance (shares) it holds in that bank.
|
|
2605
|
+
*
|
|
2606
|
+
* Unlike {@link fetchMarginfiAccountAddressesHoldingBank}, this fetches full account data so it
|
|
2607
|
+
* can decode the authority and balance shares — heavier, but a single round trip (no separate
|
|
2608
|
+
* hydration). The returned `balance` holds raw asset/liability shares; convert to token amounts
|
|
2609
|
+
* with the bank's share multiplier (e.g. `Balance.computeQuantityUi(bank, multiplier)`).
|
|
2610
|
+
*
|
|
2611
|
+
* @param program - The marginfi Anchor program (connection is taken from its provider)
|
|
2612
|
+
* @param group - The marginfi group public key
|
|
2613
|
+
* @param bank - The bank public key to search for in account balances
|
|
2614
|
+
* @param options - Optional settings:
|
|
2615
|
+
* - `concurrency`: max number of the 16 slot scans to run at once (see above).
|
|
2616
|
+
* @returns One entry per account holding the bank, with authority and the matching balance
|
|
2617
|
+
*/
|
|
2618
|
+
declare const fetchMarginfiAccountActiveBalancesForBank: (program: MarginfiProgram, group: PublicKey, bank: PublicKey, options?: {
|
|
2619
|
+
concurrency?: number;
|
|
2620
|
+
}) => Promise<AccountActiveBalanceForBank[]>;
|
|
2549
2621
|
declare const fetchMarginfiAccountData: (program: MarginfiProgram, marginfiAccountPk: PublicKey, banksMap: Map<string, BankType>, bankIntegrationMap?: BankIntegrationMetadataMap) => Promise<{
|
|
2550
2622
|
marginfiAccount: MarginfiAccountType;
|
|
2551
2623
|
error?: HealthCacheSimulationError;
|
|
@@ -2907,6 +2979,48 @@ declare function isDepositIx(ix: TransactionInstruction): boolean;
|
|
|
2907
2979
|
*/
|
|
2908
2980
|
declare function patchDepositAmount(ix: TransactionInstruction, amountNative: BN): void;
|
|
2909
2981
|
|
|
2982
|
+
/**
|
|
2983
|
+
* Which side of a bridged (double-hop) swap touches the bridge token:
|
|
2984
|
+
* - `deposit` — the bridge is *deposited* (e.g. collateral-swap: source → bridge → dest).
|
|
2985
|
+
* - `borrow` — the bridge is *borrowed* (e.g. debt-swap / loop: borrow bridge, then repay it).
|
|
2986
|
+
*/
|
|
2987
|
+
type BridgeSide = "deposit" | "borrow";
|
|
2988
|
+
/**
|
|
2989
|
+
* Whether routing through `bankPk` as the bridge would conflict with an existing position on the
|
|
2990
|
+
* account. marginfi forbids holding an asset and a liability on the same bank, so the conflict is
|
|
2991
|
+
* always *opposite-side*: a deposit-side bridge conflicts with an existing liability there, a
|
|
2992
|
+
* borrow-side bridge with an existing asset. Same-side positions are fine (partial-withdraw /
|
|
2993
|
+
* exact-repay handle them).
|
|
2994
|
+
*/
|
|
2995
|
+
declare function accountConflictsWithBridge(account: MarginfiAccountType, bankPk: PublicKey, side: BridgeSide): boolean;
|
|
2996
|
+
interface ResolveBridgeBanksParams {
|
|
2997
|
+
/** Candidate bridge mints in priority order (caller-owned product policy). */
|
|
2998
|
+
orderedBridgeMints: PublicKey[];
|
|
2999
|
+
/** Banks to resolve mints against (e.g. all of the group's banks). */
|
|
3000
|
+
banks: BankType[];
|
|
3001
|
+
/** The account the bridge legs run against (for the conflict check). */
|
|
3002
|
+
marginfiAccount: MarginfiAccountType;
|
|
3003
|
+
/** Which side the bridge is used on — picks the standard-bank filter and the conflict rule. */
|
|
3004
|
+
side: BridgeSide;
|
|
3005
|
+
}
|
|
3006
|
+
/**
|
|
3007
|
+
* Resolve an ordered list of candidate bridge *mints* into usable bridge *banks*, partitioned into
|
|
3008
|
+
* those safe to route through and those that conflict with an existing position.
|
|
3009
|
+
*
|
|
3010
|
+
* For each mint (deduped, in priority order) it picks the standard bank that fits the side
|
|
3011
|
+
* ({@link isStandardBorrowable} for `borrow`, {@link isStandardDepositable} for `deposit`) — this
|
|
3012
|
+
* skips integration wrappers (`6200`) and `ReduceOnly` banks (`6017`) — then splits by
|
|
3013
|
+
* {@link accountConflictsWithBridge}. The caller supplies the ordered mint list (product policy);
|
|
3014
|
+
* this owns only the mechanical filtering.
|
|
3015
|
+
*
|
|
3016
|
+
* @returns `bridges` (usable, in priority order) and `conflicts` (resolvable but blocked by an
|
|
3017
|
+
* opposite-side position — useful for surfacing a "close that position" message).
|
|
3018
|
+
*/
|
|
3019
|
+
declare function resolveBridgeBanks(params: ResolveBridgeBanksParams): {
|
|
3020
|
+
bridges: BankType[];
|
|
3021
|
+
conflicts: BankType[];
|
|
3022
|
+
};
|
|
3023
|
+
|
|
2910
3024
|
/**
|
|
2911
3025
|
* Creates an instruction to close a Marginfi account.
|
|
2912
3026
|
*
|
|
@@ -3441,11 +3555,22 @@ interface ComposeBridgedSwapResult {
|
|
|
3441
3555
|
secondLegQuote: SwapQuoteResult;
|
|
3442
3556
|
}
|
|
3443
3557
|
/**
|
|
3444
|
-
* Merge two leg quotes
|
|
3445
|
-
* (collateral-swap, loop-deposit): A in → C out, with compounded slippage and price-impact.
|
|
3446
|
-
* with different semantics (debt-swap: old-debt in → new-debt out) build their own.
|
|
3558
|
+
* Merge two leg quotes for the "in = first-leg input, out = second-leg output" shape
|
|
3559
|
+
* (collateral-swap, loop-deposit): A in → C out, with compounded slippage and price-impact.
|
|
3447
3560
|
*/
|
|
3448
3561
|
declare function mergeBridgeQuotes(firstLeg: SwapQuoteResult, secondLeg: SwapQuoteResult): SwapQuoteResult;
|
|
3562
|
+
/**
|
|
3563
|
+
* Merge two leg quotes for a bridged DEBT swap (repay A → borrow bridge, then repay bridge → borrow
|
|
3564
|
+
* C). The user-facing quote maps old-debt-repaid (first leg's *output*) → new-debt-borrowed (second
|
|
3565
|
+
* leg's *input*).
|
|
3566
|
+
*/
|
|
3567
|
+
declare function mergeBridgeQuotesDebt(firstLeg: SwapQuoteResult, secondLeg: SwapQuoteResult): SwapQuoteResult;
|
|
3568
|
+
/**
|
|
3569
|
+
* Merge two leg quotes for a bridged LOOP (loop-deposit borrowing the bridge, then debt-swap bridge
|
|
3570
|
+
* → X). The user-facing quote maps new-debt-borrowed (second leg's *input*) → collateral-deposited
|
|
3571
|
+
* (first leg's *output*).
|
|
3572
|
+
*/
|
|
3573
|
+
declare function mergeBridgeQuotesLoop(firstLeg: SwapQuoteResult, secondLeg: SwapQuoteResult): SwapQuoteResult;
|
|
3449
3574
|
/**
|
|
3450
3575
|
* Compose an already-built first leg and a caller-built second leg into one atomic bridged-swap
|
|
3451
3576
|
* bundle. Owns the flow-agnostic mechanics — first-leg-effect projection, separate-crank composition, and
|
|
@@ -3731,6 +3856,21 @@ declare function computeRemainingCapacity(bank: BankType): {
|
|
|
3731
3856
|
borrowCapacity: BigNumber$1;
|
|
3732
3857
|
};
|
|
3733
3858
|
|
|
3859
|
+
/**
|
|
3860
|
+
* Whether a bank can be borrowed with the standard `lending_account_borrow` instruction.
|
|
3861
|
+
*
|
|
3862
|
+
* Only `DEFAULT`/`SOL` asset-tag banks are borrowable on-chain; the integration wrappers
|
|
3863
|
+
* (KAMINO/DRIFT/SOLEND/JUPLEND) reuse the same mint with `borrowLimit=0` and reject a standard
|
|
3864
|
+
* borrow with `6200 WrongAssetTagForStandardInstructions`. Use this when picking a bank to *borrow*
|
|
3865
|
+
* (e.g. the bridge bank for a debt-swap or loop double-hop).
|
|
3866
|
+
*/
|
|
3867
|
+
declare function isStandardBorrowable(bank: BankType): boolean;
|
|
3868
|
+
/**
|
|
3869
|
+
* Whether a bank accepts standard deposits. `ReduceOnly`/`Paused` banks reject new deposits with
|
|
3870
|
+
* `6017 BankReduceOnly`; integration wrappers aren't standard-depositable either. Use this when
|
|
3871
|
+
* picking a bank to *deposit* into (e.g. the bridge bank for a collateral-swap double-hop).
|
|
3872
|
+
*/
|
|
3873
|
+
declare function isStandardDepositable(bank: BankType): boolean;
|
|
3734
3874
|
/**
|
|
3735
3875
|
* Computed metrics describing a bank's state at a given moment.
|
|
3736
3876
|
*
|
|
@@ -4532,6 +4672,17 @@ declare class TransactionBuildingError<T extends TransactionBuildingErrorCode =
|
|
|
4532
4672
|
*/
|
|
4533
4673
|
static custom<T extends TransactionBuildingErrorCode>(code: T, message: string, details: TransactionBuildingErrorDetails[T]): TransactionBuildingError<T>;
|
|
4534
4674
|
}
|
|
4675
|
+
/**
|
|
4676
|
+
* Whether a build failure is a *decomposable* swap failure — i.e. the single-route swap couldn't be
|
|
4677
|
+
* built (no route/quote, or the route doesn't fit the per-tx size/account limits), but the swap
|
|
4678
|
+
* could still succeed when split into two legs through a bridge token (a double-hop).
|
|
4679
|
+
*
|
|
4680
|
+
* This is the predicate a caller's catch→retry uses to decide whether to attempt a bridged swap
|
|
4681
|
+
* (see {@link composeBridgedSwap}). Size overflows surface as `SWAP_SIZE_EXCEEDED_*` and no-route /
|
|
4682
|
+
* unquotable failures as `SWAP_QUOTE_FAILED`; the swap engine also classifies an oversized route
|
|
4683
|
+
* (which would otherwise throw a raw serialization `RangeError`) as `SWAP_SIZE_EXCEEDED_LOOP`.
|
|
4684
|
+
*/
|
|
4685
|
+
declare function isDecomposableSwapError(e: unknown): e is TransactionBuildingError;
|
|
4535
4686
|
|
|
4536
4687
|
declare const PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED: Buffer<ArrayBuffer>;
|
|
4537
4688
|
declare const PDA_BANK_INSURANCE_VAULT_AUTH_SEED: Buffer<ArrayBuffer>;
|
|
@@ -5409,6 +5560,19 @@ declare class MarginfiAccount implements MarginfiAccountType {
|
|
|
5409
5560
|
makeFlashLoanTx(params: Omit<MakeFlashLoanTxParams, "marginfiAccount">): Promise<_solana_web3_js.VersionedTransaction & ExtendedTransactionProperties>;
|
|
5410
5561
|
}
|
|
5411
5562
|
|
|
5563
|
+
/**
|
|
5564
|
+
* An authority's active balance in a specific bank for a queried mint. One row per
|
|
5565
|
+
* (account, bank): a single account can appear multiple times if it holds the mint across
|
|
5566
|
+
* several banks (e.g. a DEFAULT and a Kamino bank for the same mint). Amounts are in UI units
|
|
5567
|
+
* (token decimals + share multiplier applied).
|
|
5568
|
+
*/
|
|
5569
|
+
type MintAuthorityBalance = {
|
|
5570
|
+
authority: PublicKey;
|
|
5571
|
+
accountAddress: PublicKey;
|
|
5572
|
+
bank: PublicKey;
|
|
5573
|
+
assets: BigNumber$1;
|
|
5574
|
+
liabilities: BigNumber$1;
|
|
5575
|
+
};
|
|
5412
5576
|
declare class Project0Client {
|
|
5413
5577
|
readonly program: MarginfiProgram;
|
|
5414
5578
|
readonly group: MarginfiGroup;
|
|
@@ -5495,6 +5659,47 @@ declare class Project0Client {
|
|
|
5495
5659
|
* @returns Array of account addresses owned by the authority
|
|
5496
5660
|
*/
|
|
5497
5661
|
getAccountAddresses(authority: PublicKey): Promise<PublicKey[]>;
|
|
5662
|
+
/**
|
|
5663
|
+
* Fetches the addresses of all marginfi accounts in the group that hold a position in a
|
|
5664
|
+
* specific bank.
|
|
5665
|
+
*
|
|
5666
|
+
* Because a marginfi account holds up to 16 balance slots (sorted descending by bank, so the
|
|
5667
|
+
* target can be at any slot), this scans all 16 slots in parallel via filtered
|
|
5668
|
+
* `getProgramAccounts` calls. It returns only addresses (no account data is transferred),
|
|
5669
|
+
* which keeps it viable across the group's ~500k accounts. Hydrate any address you care about
|
|
5670
|
+
* with `fetchAccount`.
|
|
5671
|
+
*
|
|
5672
|
+
* @param bank - The bank public key to search for in account balances
|
|
5673
|
+
* @param options - Optional settings:
|
|
5674
|
+
* - `concurrency`: max number of the 16 slot scans to run at once. Omit to fire all 16 in
|
|
5675
|
+
* parallel; pass a smaller value (e.g. 4) to batch them and avoid RPC rate limits.
|
|
5676
|
+
* @returns Deduplicated array of account addresses holding the bank
|
|
5677
|
+
*/
|
|
5678
|
+
getAccountAddressesHoldingBank(bank: PublicKey, options?: {
|
|
5679
|
+
concurrency?: number;
|
|
5680
|
+
}): Promise<PublicKey[]>;
|
|
5681
|
+
/**
|
|
5682
|
+
* Fetches every account's active balance for a given mint, with its authority, account
|
|
5683
|
+
* address, and the deposited/borrowed amounts in UI units.
|
|
5684
|
+
*
|
|
5685
|
+
* A mint can map to multiple banks (e.g. DEFAULT + Kamino), so this resolves all matching
|
|
5686
|
+
* banks via {@link getBanksByMint}, scans each for accounts holding it, and emits one row per
|
|
5687
|
+
* (account, bank). An account that holds the mint in several banks yields several rows.
|
|
5688
|
+
*
|
|
5689
|
+
* Amounts are computed with each bank's share multiplier (`assetShareValueMultiplierByBank`)
|
|
5690
|
+
* and the bank's mint decimals, matching `Balance.computeQuantityUi`.
|
|
5691
|
+
*
|
|
5692
|
+
* @param mint - The mint to search account balances for
|
|
5693
|
+
* @param options - Optional settings:
|
|
5694
|
+
* - `assetTag`: restrict to banks with this asset tag (e.g. only Kamino banks for the mint)
|
|
5695
|
+
* - `concurrency`: max number of the 16 slot scans to run at once per bank (see
|
|
5696
|
+
* {@link getAccountAddressesHoldingBank})
|
|
5697
|
+
* @returns One row per (account, bank) holding the mint
|
|
5698
|
+
*/
|
|
5699
|
+
getAuthorityBalancesForMint(mint: PublicKey, options?: {
|
|
5700
|
+
assetTag?: AssetTag;
|
|
5701
|
+
concurrency?: number;
|
|
5702
|
+
}): Promise<MintAuthorityBalance[]>;
|
|
5498
5703
|
/**
|
|
5499
5704
|
* Fetches and wraps a marginfi account in one call.
|
|
5500
5705
|
*
|
|
@@ -5898,4 +6103,4 @@ declare class MarginfiAccountWrapper {
|
|
|
5898
6103
|
getClient(): Project0Client;
|
|
5899
6104
|
}
|
|
5900
6105
|
|
|
5901
|
-
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, 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 BridgedSwapLeg, type ComposeBridgedSwapParams, type ComposeBridgedSwapResult, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, 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, type RollPtOpts, 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, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountAddresses, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isDepositIx, isFlashloan, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, 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 };
|
|
6106
|
+
export { ADDRESS_LOOKUP_TABLE_FOR_GROUP, ADDRESS_LOOKUP_TABLE_FOR_GROUP_NATIVE_STAKE, ADDRESS_LOOKUP_TABLE_FOR_SWAP, type AccountActiveBalanceForBank, AccountFlags, ActionEmodeImpact, ActiveEmodePair, type ActiveStakePoolMap, Amount, AssetTag, BUNDLE_TX_SIZE, Balance, type BalanceRaw, BalanceType, type BalanceTypeDto, Bank, type BankConfigDto, BankConfigFlag, BankConfigOpt, BankConfigOptRaw, BankConfigRaw, type BankConfigRawDto, BankConfigType, BankIntegrationMetadata, BankIntegrationMetadataDto, BankIntegrationMetadataMap, BankIntegrationMetadataMapDto, type BankMetrics, type BankRateLimiterDto, BankRateLimiterRaw, type BankRateLimiterRawDto, BankRateLimiterType, BankRaw, type BankRawDto, BankType, type BankTypeDto, BankVaultType, type BridgeSide, type BridgedSwapLeg, type ComposeBridgedSwapParams, type ComposeBridgedSwapResult, type ComputeAssetHealthComponentParams, type ComputeBalanceUsdValueParams, type ComputeBankMetricsParams, type ComputeFreeCollateralFromBalancesParams, type ComputeHealthCacheStatusParams, type ComputeHealthComponentsFromBalancesParams, type ComputeLiabilityHealthComponentParams, type ComputeLiquidationPriceForBankParams, type ComputeMaxBorrowForBankParams, type ComputeMaxWithdrawForBankParams, type ComputeNetApyParams, ConfigRaw, type CrankCombination, type CrankabilityResult, DEFAULT_CROSSBAR_URL, DEFAULT_FALLBACK_CROSSBAR_URL, DEFAULT_ORACLE_MAX_AGE, DEFAULT_REPAY_ALL_EXTRA_BUFFER_BPS, DISABLED_FLAG, type DriftBankInput, type DriftMetadata, type DriftStateByBank, type DriftStateJsonByBank, EMPTY_HEALTH_CACHE, type EmodeConfigRawDto, type EmodeEntryDto, EmodeEntryFlags, EmodeFlags, EmodeImpactStatus, EmodePair, type EmodeSettingsDto, EmodeSettingsRaw, type EmodeSettingsRawDto, EmodeSettingsType, EmodeTag, Environment, type ExactOutEstimateResult, type ExtendedTransaction, type ExtendedTransactionProperties, type ExtendedV0Transaction, FLASHLOAN_ENABLED_FLAG, type FeeStateCache, type FetchBankIntegrationMetadataOptions, type FetchDriftMetadataOptions, type FetchJupLendMetadataOptions, type FetchKaminoMetadataOptions, type FlashloanActionResult, type FlashloanBudgetIx, type FlashloanPrecheckResult, type FlashloanSwapConstraints, type GetBalanceUsdValueWithPriceBiasParams, type GetExactOutEstimateParams, type GetSwapIxsForFlashloanParams, type GetTitanExactOutEstimateParams, type GetTitanSwapIxsParams, HOURS_PER_YEAR, HealthCache, HealthCacheFlags, type HealthCacheRaw, HealthCacheSimulationError, HealthCacheStatus, HealthCacheType, type HealthCacheTypeDto, type InstructionsWrapper, type IntegrationType, InterestRateConfig, type InterestRateConfigDto, InterestRateConfigRaw, JUPITER_V6_PROGRAM, JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX, type JupLendBankInput, type JupLendMetadata, type JupLendStateByBank, type JupLendStateJsonByBank, type KaminoBankInput, type KaminoMetadata, type KaminoStateByBank, type KaminoStateJsonByBank, LST_MINT, type LoopFlashloanDescriptor, MARGINFI_PROGRAM, MARGINFI_PROGRAM_STAGING, MARGINFI_PROGRAM_STAGING_ALT, MARGINFI_SPONSORED_SHARD_ID, MAX_ACCOUNT_LOCKS, MAX_CONFIDENCE_INTERVAL_RATIO, MAX_TX_SIZE, MAX_U64, MPL_METADATA_PROGRAM_ID, type MakeAccountTransferToNewAccountTxParams, type MakeBorrowIxOpts, type MakeBorrowIxParams, type MakeBorrowTxParams, type MakeCloseAccountIxParams, type MakeCloseAccountTxParams, type MakeDepositIxOpts, type MakeDepositIxParams, type MakeDepositTxParams, type MakeDriftDepositIxParams, type MakeDriftDepositTxParams, type MakeDriftWithdrawIxParams, type MakeDriftWithdrawTxParams, type MakeFlashLoanTxParams, type MakeJuplendDepositIxParams, type MakeJuplendDepositTxParams, type MakeJuplendWithdrawIxParams, type MakeJuplendWithdrawTxParams, type MakeKaminoDepositIxParams, type MakeKaminoDepositTxParams, type MakeKaminoWithdrawIxParams, type MakeKaminoWithdrawTxParams, type MakeLoopTxParams, type MakeMergeStakeAccountsTxParams, type MakeMintStakedLstIxParams, type MakeMintStakedLstTxParams, type MakeRedeemStakedLstIxParams, type MakeRedeemStakedLstTxParams, type MakeRepayIxOpts, type MakeRepayIxParams, type MakeRepayTxParams, type MakeRepayWithCollatTxParams, type MakeRollPtTxParams, type MakeSetupIxParams, type MakeSwapCollateralTxParams, type MakeSwapDebtTxParams, type MakeWithdrawIxOpts, type MakeWithdrawIxParams, type MakeWithdrawTxParams, MarginRequirementType, type MarginRequirementTypeRaw, MarginfiAccount, type MarginfiAccountRaw, MarginfiAccountType, type MarginfiAccountTypeDto, MarginfiAccountWrapper, MarginfiGroup, type MarginfiGroupRaw, type MarginfiGroupType, type MarginfiGroupTypeDto, MarginfiIdlType, MarginfiProgram, type MintAuthorityBalance, MintData, OperationalState, OperationalStateRaw, OraclePrice, OraclePriceDto, OracleSetup, OracleSetupRaw, type OracleSourceKey, PDA_BANK_EMISSIONS_AUTH_SEED, PDA_BANK_EMISSIONS_VAULT_SEED, PDA_BANK_FEE_STATE_SEED, PDA_BANK_FEE_VAULT_AUTH_SEED, PDA_BANK_FEE_VAULT_SEED, PDA_BANK_INSURANCE_VAULT_AUTH_SEED, PDA_BANK_INSURANCE_VAULT_SEED, PDA_BANK_LIQUIDITY_VAULT_AUTH_SEED, PDA_BANK_LIQUIDITY_VAULT_SEED, PDA_MARGINFI_ACCOUNT_SEED, PRIORITY_TX_SIZE, PYTH_PRICE_CONF_INTERVALS, PYTH_PUSH_ORACLE_ID, PYTH_SPONSORED_SHARD_ID, type PanicStateCache, PriceBias, PriceWithConfidence, Project0Client, Project0Config, Project0ConfigRaw, type ProviderSwapRoute, type PythOracleServiceOpts, type RateLimitWindowDto, type RateLimitWindowRawDto, type RatePointDto, type ResolveBridgeBanksParams, RiskTier, RiskTierRaw, type RollPtOpts, SINGLE_POOL_PROGRAM_ID, STAKE_CONFIG_ID, STAKE_PROGRAM_ID, SWAP_ADAPTERS, SWB_PRICE_CONF_INTERVALS, SYSTEM_PROGRAM_ID, SYSVAR_CLOCK_ID, SYSVAR_RENT_ID, SYSVAR_STAKE_HISTORY_ID, type SerializedInstruction, type SerializedLut, type SerializedSwapEngineRequest, type SerializedSwapEngineResult, type SerializedTxFootprint, type SimulateAccountHealthCacheWithFallbackParams, type SimulationResultRaw, type SmartCrankParams, type SmartCrankResult, type SolanaTransaction, type StakeAccount, type StakePoolMevMap, type StakedBankMetadata, type SwapAdapter, type SwapApiConfig, type SwapCandidate, type SwapEngineRequest, type SwapEngineResult, type SwapEngineRunner, type SwapIxsResult, type SwapOpts, SwapProvider, type SwapProviderConfig, type SwapProviderEntry, type SwapQuoteResult, type SwbOracleAiDataByKey, type SwbOracleServiceOpts, TRANSFER_ACCOUNT_AUTHORITY_FLAG, type TitanQuoteParams, TransactionArenaKeyMap, type TransactionBuilderResult, TransactionBuildingError, TransactionBuildingErrorCode, type TransactionBuildingErrorDetails, TransactionConfigMap, TransactionType, type TxFootprint, TypedAmount, USDC_DECIMALS, USDC_MINT, type ValidatorRateData, type ValidatorStakeGroup, type ValidatorStakeGroupDto, WSOL_MINT, type WithdrawWindowCache, WrappedI80F48, ZERO_ORACLE_KEY, accountConflictsWithBridge, accountFlagToBN, addOracleToBanksIx, addTransactionMetadata, adjustPriceComponent, aprToApy, apyToApr, balanceToDto, bankConfigRawToDto, bankConfigToBankConfigRaw, bankMetadataMapToDto, bankMetadataToDto, bankRateLimiterRawToDto, bankRawToDto, bigNumberToWrappedI80F48, bpsToPercentile, calculateApyFromInterest, calculateInterestFromApy, capConfidenceInterval, categorizePythBanks, checkBatchOracleCrankability, checkJupiterFeeAccount, checkMultipleOraclesCrankability, checkTitanFeeAccount, chunkedGetRawMultipleAccountInfoOrdered, chunkedGetRawMultipleAccountInfoOrderedWithNulls, chunkedGetRawMultipleAccountInfos, compileFlashloanPrecheck, composeBridgedSwap, composeRemainingAccounts, computeAccountValue, computeActiveEmodePairs, computeAssetHealthComponent, computeBalanceUsdValue, computeBankBorrowApy, computeBankBorrowCapRemaining, computeBankDepositCapRemaining, computeBankMetrics, computeBankPoolSize, computeBankSupplyApy, computeBankTotalBorrows, computeBankTotalBorrowsUsd, computeBankTotalDeposits, computeBankTotalDepositsUsd, computeBaseInterestRate, computeBorrowEstimateForRepay, computeClaimedEmissions, computeClosePositionTokenAmount, computeEmodeImpacts, computeFlashLoanNonSwapBudget, computeFlashloanSwapConstraints, computeFreeCollateralFromBalances, computeFreeCollateralFromCache, computeHealthAccountMetas, computeHealthCacheStatus, computeHealthCheckAccounts, computeHealthComponentsFromBalances, computeHealthComponentsFromCache, computeInterestRates, computeLiabilityHealthComponent, computeLiquidationPriceForBank, computeLowestEmodeWeights, computeMaxBorrowForBank, computeMaxWithdrawForBank, computeNetApy, computeProjectedActiveBalancesNoCpi, computeProjectedActiveBanksNoCpi, computeQuantity, computeQuantityUi, computeRemainingCapacity, computeSmartCrank, computeStakedBankMultipliers, computeTotalOutstandingEmissions, computeUtilizationRate, computeV0TxSize, convertVoteAccCoeffsToBankCoeffs, createActiveEmodePairFromPairs, createEmptyBalance, decodeAccountRaw, decodeBankRaw, decodeInstruction, decompileV0Transaction, deriveBankEmissionsAuth, deriveBankEmissionsVault, deriveBankFeeVault, deriveBankFeeVaultAuthority, deriveBankInsuranceVault, deriveBankInsuranceVaultAuthority, deriveBankLiquidityVault, deriveBankLiquidityVaultAuthority, deriveFeeState, deriveMarginfiAccount, deserializeInstruction, deserializeLut, deserializeSwapEngineRequest, deserializeSwapEngineResult, dtoToBalance, dtoToBank, dtoToBankConfig, dtoToBankConfigRaw, dtoToBankMetadata, dtoToBankMetadataMap, dtoToBankRateLimiter, dtoToBankRateLimiterRaw, dtoToBankRaw, dtoToEmodeSettings, dtoToEmodeSettingsRaw, dtoToGroup, dtoToHealthCache, dtoToInterestRateConfig, dtoToMarginfiAccount, dtoToOraclePrice, dtoToValidatorStakeGroup, emodeSettingsRawToDto, extractPythOracleKeys, fetchBank, fetchBankIntegrationMetadata, fetchMarginfiAccountActiveBalancesForBank, fetchMarginfiAccountAddresses, fetchMarginfiAccountAddressesHoldingBank, fetchMarginfiAccountData, fetchMultipleBanks, fetchNativeStakeAccounts, fetchOracleData, fetchProgramForMints, fetchPythOracleData, fetchPythOraclePricesFromAPI, fetchPythOraclePricesFromChain, fetchStakeAccount, fetchStakePoolActiveStates, fetchStakePoolMev, fetchSwbOracleAccountsFromAPI, fetchSwbOracleAccountsFromChain, fetchSwbOracleData, fetchSwbOraclePricesFromAPI, fetchSwbOraclePricesFromCrossbar, findRandomAvailableAccountIndex, freezeBankConfigIx, generateDummyAccount, getAccountKeys, getActiveAccountFlags, getActiveBalances, getActiveEmodeEntryFlags, getActiveEmodeFlags, getActiveHealthCacheFlags, getAssetQuantity, getAssetShares, getBalance, getBalanceUsdValueWithPriceBias, getBankVaultAuthority, getBankVaultSeeds, getBirdeyeFallbackPricesByFeedId, getBirdeyePricesForMints, getConfig, getDriftCTokenMultiplier, getDriftMetadata, getDriftStatesDto, getEmodePairs, getExactOutEstimate, getHealthCacheStatusDescription, getHealthSimulationTransactions, getJupLendFTokenMultiplier, getJupLendMetadata, getJupLendStatesDto, getJupiterReferralFeeAccount, getJupiterSwapIxsForFlashloan, getKaminoCTokenMultiplier, getKaminoMetadata, getKaminoStatesDto, getLiabilityQuantity, getLiabilityShares, getOracleSourceFromBank, getOracleSourceFromOracleSetup, getOracleSourceNameFromKey, getPrice, getPriceWithConfidence, getStakedBankMetadataMap, getSwapAdapter, getSwapIxsForFlashloan, getTitanExactOutEstimate, getTitanSwapIxsForFlashloan, getTotalAccountKeys, getTotalAssetQuantity, getTotalLiabilityQuantity, getTxSize, getValidatorVoteAccountByBank, getWritableAccountKeys, groupToDto, hasAccountFlag, hasEmodeEntryFlag, hasEmodeFlag, hasHealthCacheFlag, healthCacheToDto, isDecomposableSwapError, isDepositIx, isFlashloan, isStandardBorrowable, isStandardDepositable, isV0Tx, isWholePosition, makeAccountTransferToNewAccountTx, makeAddPermissionlessStakedBankIx, makeBeginFlashLoanIx, makeBorrowIx, makeBorrowTx, makeBundleTipIx, makeClearEmissionsIx, makeCloseMarginfiAccountIx, makeCloseMarginfiAccountTx, makeCrankSwbFeedIx, makeCreateAccountIxWithProjection, makeCreateAccountTxWithProjection, makeCreateMarginfiAccountIx, makeCreateMarginfiAccountTx, makeDepositIx, makeDepositTx, makeDriftDepositIx, makeDriftDepositTx, makeDriftWithdrawIx, makeDriftWithdrawTx, makeEndFlashLoanIx, makeFlashLoanTx, makeJuplendDepositIx, makeJuplendDepositTx, makeJuplendWithdrawIx, makeJuplendWithdrawTx, makeKaminoDepositIx, makeKaminoDepositTx, makeKaminoWithdrawIx, makeKaminoWithdrawTx, makeLoopTx, makeMergeStakeAccountsTx, makeMintStakedLstIx, makeMintStakedLstTx, makePoolAddBankIx, makePoolConfigureBankIx, makePriorityFeeIx, makePriorityFeeMicroIx, makePulseHealthIx, makeRedeemStakedLstIx, makeRedeemStakedLstTx, makeRefreshKaminoBanksIxs, makeRepayIx, makeRepayTx, makeRepayWithCollatTx, makeRollPtTx, makeSetupIx, makeSmartCrankSwbFeedIx, makeSwapCollateralTx, makeSwapDebtTx, makeTxPriorityIx, makeUnwrapSolIx, makeUpdateDriftMarketIxs, makeUpdateJupLendRateIxs, makeUpdateSwbFeedIx, makeVersionedTransaction, makeWithdrawIx, makeWithdrawTx, makeWrapSolIxs, mapBrokenFeedsToOraclePrices, mapJupiterQuoteToSwapQuoteResult, mapPythBanksToOraclePrices, mapSwbBanksToOraclePrices, marginfiAccountToDto, mergeBridgeQuotes, mergeBridgeQuotesDebt, mergeBridgeQuotesLoop, nativeToUi, oraclePriceToDto, parseBalanceRaw, parseBankConfigRaw, parseBankRateLimiterRaw, parseBankRaw, parseEmodeSettingsRaw, parseEmodeTag, parseHealthCacheRaw, parseMarginfiAccountRaw, parseOperationalState, parseOracleSetup, parseOraclePriceData as parsePriceInfo, parseRiskTier, parseRpcPythPriceData, parseSwbOraclePriceData, partitionBanksByCrankability, patchDepositAmount, resolveBridgeBanks, runSwapEngine, selectLutsForAccountAction, selectLutsForBanks, serializeBankConfigOpt, serializeInstruction, serializeInterestRateConfig, serializeLut, serializeOperationalState, serializeOracleSetup, serializeOracleSetupToIndex, serializeRiskTier, serializeSwapEngineRequest, serializeSwapEngineResult, shortenAddress, simulateAccountHealthCache, simulateAccountHealthCacheWithFallback, simulateBundle, splitInstructionsToFitTransactions, swapEngineProvidersFromOpts, swapEngineQuoteFieldsFromOpts, toBankConfigDto, toBankDto, toBigNumber, toEmodeSettingsDto, toInterestRateConfigDto, toJupiterConfig, toNumber, uiToNative, uiToNativeBigNumber, validatorStakeGroupToDto, wrappedI80F48toBigNumber };
|