import type { MarketParams } from "@morpho-org/blue-sdk"; import type { Address } from "viem"; import { type MarketV1BorrowAction, type Metadata, type Transaction, type VaultReallocation } from "../../types"; /** Parameters for {@link marketV1Borrow}. */ export interface MarketV1BorrowParams { market: { readonly chainId: number; readonly marketParams: MarketParams; }; args: { amount: bigint; receiver: Address; /** Minimum borrow share price (in ray). Protects against share price manipulation. */ minSharePrice: bigint; /** Vault reallocations to execute before borrowing (computed by entity). */ reallocations?: readonly VaultReallocation[]; }; metadata?: Metadata; } /** * Prepares a borrow transaction for a Morpho Blue market. * * Routed through bundler3 via `morphoBorrow`. The bundler uses the transaction * initiator as `onBehalf`. Uses `minSharePrice` to protect against share price * manipulation between transaction construction and execution. * * When `reallocations` are provided, `reallocateTo` actions are prepended to * the bundle, moving liquidity from other markets via the PublicAllocator * before borrowing. The reallocation fees are set as the transaction value. * * @param params - Borrow parameters. * @returns Deep-frozen transaction. */ export declare const marketV1Borrow: ({ market: { chainId, marketParams }, args: { amount, receiver, minSharePrice, reallocations }, metadata, }: MarketV1BorrowParams) => Readonly>;