import { type Address } from "viem"; import { type Metadata, type Transaction, type VaultV1WithdrawAction } from "../../types/index.js"; /** Parameters for {@link vaultV1Withdraw}. */ export interface VaultV1WithdrawParams { vault: { address: Address; }; args: { amount: bigint; recipient: Address; onBehalf: Address; }; metadata?: Metadata; } /** * Prepares a withdraw transaction for a VaultV1 (MetaMorpho) contract. * * Direct vault call — no bundler needed. Withdraw has no inflation-attack surface. * * @param params.vault.address - The VaultV1 (MetaMorpho) address. * @param params.args.amount - Amount of underlying assets to withdraw. * @param params.args.recipient - Address that receives the withdrawn assets. * @param params.args.onBehalf - Address whose shares are burned. * @param params.metadata - Optional analytics metadata attached to the transaction. * @returns A deep-frozen `Transaction` with `to`, `value`, `data`, and the * typed `action` discriminator the simulation layer consumes. * @throws {NonPositiveInputError} when `amount <= 0n`. * @example * ```ts * import { vaultV1Withdraw } from "@morpho-org/morpho-sdk"; * * const tx = vaultV1Withdraw({ * vault: { address: vaultAddress }, * args: { amount: 500_000n, recipient, onBehalf }, * }); * // tx satisfies Readonly> * ``` */ export declare const vaultV1Withdraw: ({ vault: { address: vaultAddress }, args: { amount, recipient, onBehalf }, metadata, }: VaultV1WithdrawParams) => Readonly>;