import { AddressLookupTableAccount, PublicKey, TransactionInstruction } from "@solana/web3.js"; import { AnchorProvider } from "@coral-xyz/anchor"; import { BankMetadataMap, Program, SolanaTransaction } from "@mrgnlabs/mrgn-common"; import { BalanceType, MarginfiAccountRaw } from "./types"; import MarginfiClient, { BankMap, OraclePriceMap } from "../../clients/client"; import { MarginfiIdlType } from "../../idl"; import { MarginfiAccount, MarginfiAccountWrapper } from "../../models/account"; import { Balance } from "../../models/balance"; import { Bank } from "../../models/bank"; import { MarginfiProgram } from "../../types"; import { BankType } from "../bank"; import { OraclePrice } from "../price"; /** * Custom error class for health cache simulation failures */ export declare class HealthCacheSimulationError extends Error { mrgnErr: number | null; internalErr: number | null; constructor(message: string, mrgnErr: number | null, internalErr: number | null); } export declare function simulateAccountHealthCacheWithFallback(props: { program: Program; bankMap: Map; oraclePrices: Map; marginfiAccount: MarginfiAccount; balances: Balance[]; bankMetadataMap: BankMetadataMap; }): Promise<{ marginfiAccount: MarginfiAccount; error?: HealthCacheSimulationError; }>; export declare function simulateAccountHealthCache(props: { program: Program; bankMap: Map; oraclePrices: Map; marginfiAccountPk: PublicKey; balances: Balance[]; bankMetadataMap: BankMetadataMap; groupPk?: PublicKey; }): Promise; export declare function makePulseHealthIx(program: MarginfiProgram, marginfiAccountPk: PublicKey, banks: Map, balances: BalanceType[], mandatoryBanks: PublicKey[], excludedBanks: PublicKey[], bankMetadataMap: BankMetadataMap): Promise<{ instructions: TransactionInstruction[]; keys: never[]; }>; export declare function createUpdateFeedIx(props: { swbPullOracles: PublicKey[]; provider: AnchorProvider; }): Promise<{ instructions: TransactionInstruction[]; luts: AddressLookupTableAccount[]; }>; /** * This function creates a new Marginfi account transaction and returns a projected dummy account for simulation. * Note: This function is subject to future updates and improvements. */ export declare function createMarginfiAccountTx(props: { marginfiAccount: MarginfiAccountWrapper | null; marginfiClient: MarginfiClient; }): Promise<{ account: MarginfiAccountWrapper; tx: SolanaTransaction; }>; export declare function getActiveStaleBanks(balances: Balance[], banks: BankMap, additionalBanks: Bank[], oraclePrices: OraclePriceMap, maxAgeOffset?: number): { stalePythFeeds: { feedId: string; shardId: number; }[]; staleSwbOracles: { oracleKey: PublicKey; }[]; }; //# sourceMappingURL=account.service.d.ts.map