import { ILogger } from "../onchain/types/logger.js"; import { CreditAccountData } from "../onchain/base/types.js"; import { OnchainSDK } from "../onchain/OnchainSDK.js"; import "../onchain/index.js"; import { AnvilClient } from "./createAnvilClient.js"; import { Address } from "viem"; //#region src/dev/lowerHealthFactor.d.ts export interface LowerHealthFactorOptions { /** * Target health factor in bps, defaults to 9990 */ hf?: bigint; logger?: ILogger; } /** * Result of {@link lowerHealthFactor} */ export interface LoweredHealthFactor { /** * Credit account re-read after LTs were lowered */ account: CreditAccountData; /** * LTs before the change, same keys as `newLTs` */ oldLTs: Record
; newLTs: Record; } /** * Lowers liquidation thresholds of credit account's credit manager on anvil, so that account's health factor drops to `hf`. * Does not update LTs held in sdk's cached credit manager state. */ export declare function lowerHealthFactor(anvil: AnvilClient, sdk: OnchainSDK, ca: CreditAccountData, options?: LowerHealthFactorOptions): Promise