import { marketParamsAbi } from "@morpho-org/morpho-ts/abis/marketParams"; import { type Hex } from "viem"; import type { Address, BigIntish, MarketId } from "../types.js"; /** Plain input shape for Morpho Blue market params. */ export interface IMarketParams { loanToken: Address; collateralToken: Address; oracle: Address; irm: Address; lltv: BigIntish; } /** Minimal market params shape accepted by SDK constructors and helpers. */ export type InputMarketParams = Pick; /** ABI tuple definition for Morpho Blue market params. */ export { marketParamsAbi }; /** * Represents a market's configuration (also called market params). */ export declare class MarketParams implements IMarketParams { private static readonly _CACHE; /** * Returns the previously cached market config for the given id, if any. * @throws {UnknownMarketParamsError} If no market config is cached. */ static get(id: MarketId): MarketParams; /** * Returns the canonical idle market configuration for the given loan token. */ static idle(token: Address): MarketParams; static fromHex(data: Hex): MarketParams; /** * The market's collateral token address. */ readonly collateralToken: Address; /** * The market's loan token address. */ readonly loanToken: Address; /** * The market's oracle address. */ readonly oracle: Address; /** * The market's interest rate model address. */ readonly irm: Address; /** * The market's liquidation Loan-To-Value (scaled by WAD). */ readonly lltv: bigint; /** * The market's hex-encoded id, defined as the hash of the market params. */ readonly id: MarketId; /** * The market's liquidation incentive factor. */ readonly liquidationIncentiveFactor: bigint; constructor(params: IMarketParams); }