import { type MarketParams } from "@morpho-org/blue-sdk"; import type { Address } from "viem"; import { type DepositAmountArgs, type MarketV1SupplyCollateralBorrowAction, type Metadata, type RequirementSignature, type Transaction, type VaultReallocation } from "../../types"; /** Parameters for {@link marketV1SupplyCollateralBorrow}. */ export interface MarketV1SupplyCollateralBorrowParams { market: { readonly chainId: number; readonly marketParams: MarketParams; }; args: DepositAmountArgs & { borrowAmount: bigint; onBehalf: Address; receiver: Address; /** Minimum borrow share price (in ray). Protects against share price manipulation. */ minSharePrice: bigint; requirementSignature?: RequirementSignature; /** Vault reallocations to execute before borrowing (computed by entity). */ reallocations?: readonly VaultReallocation[]; }; metadata?: Metadata; } /** * Prepares an atomic supply-collateral-and-borrow transaction for a Morpho Blue market. * * Routed through the bundler: collateral transfer + `morphoSupplyCollateral` + `morphoBorrow`. * When `nativeAmount` is provided, native ETH is wrapped via GeneralAdapter1. * * **Prerequisite:** GeneralAdapter1 must be authorized on Morpho to borrow on behalf of the user. * Use `getRequirements()` on the entity to check and obtain the authorization transaction. * * Zero loss: all collateral reaches Morpho, all borrowed tokens reach the receiver. * No dust left in bundler or adapter. * * @param params - Combined supply collateral and borrow parameters. * @returns Deep-frozen transaction. */ export declare const marketV1SupplyCollateralBorrow: ({ market: { chainId, marketParams }, args: { amount, borrowAmount, onBehalf, receiver, minSharePrice, requirementSignature, nativeAmount, reallocations, }, metadata, }: MarketV1SupplyCollateralBorrowParams) => Readonly>;