import { type MarketParams } from "@morpho-org/blue-sdk"; import { type Address } from "viem"; import type { MarketV1RepayAction, Metadata, RequirementSignature, Transaction } from "../../types"; /** Parameters for {@link marketV1Repay}. */ export interface MarketV1RepayParams { market: { readonly chainId: number; readonly marketParams: MarketParams; }; args: { /** Repay assets amount (0n when repaying by shares). */ assets: bigint; /** Repay shares amount (0n when repaying by assets). */ shares: bigint; /** ERC20 amount to transfer to GeneralAdapter1. Must be greater than or equal to the repay amount to take into account the slippage. */ transferAmount: bigint; /** Address whose debt is being repaid. */ onBehalf: Address; /** Receives residual loan tokens in shares mode. */ receiver: Address; /** Maximum repay share price (in ray). Protects against share price manipulation. */ maxSharePrice: bigint; requirementSignature?: RequirementSignature; }; metadata?: Metadata; } /** * Prepares a repay transaction for a Morpho Blue market. * * Routed through bundler3 via GeneralAdapter1. Supports two modes: * - **By assets** (`assets > 0, shares = 0`): repays an exact asset amount. * - **By shares** (`assets = 0, shares > 0`): repays exact shares (full repay). * * Exactly one of `assets`/`shares` must be non-zero. The `transferAmount` controls * how many ERC20 tokens are pulled from the user (may differ from `assets` in * shares mode where the entity computes an upper-bound estimate). * * Uses `maxSharePrice` to protect against share price manipulation between * transaction construction and execution. * * @param params - Repay parameters. * @returns Deep-frozen transaction. */ export declare const marketV1Repay: ({ market: { chainId, marketParams }, args: { assets, shares, transferAmount, onBehalf, receiver, maxSharePrice, requirementSignature, }, metadata, }: MarketV1RepayParams) => Readonly>;