import { type Address } from "viem"; import { type Metadata, type Transaction, type VaultV1RedeemAction } from "../../types/index.js"; /** Parameters for {@link vaultV1Redeem}. */ export interface VaultV1RedeemParams { vault: { address: Address; }; args: { shares: bigint; recipient: Address; onBehalf: Address; }; metadata?: Metadata; } /** * Prepares a redeem transaction for a VaultV1 (MetaMorpho) contract. * * Direct vault call — no bundler needed. Redeem has no inflation-attack surface. * * @param params.vault.address - The VaultV1 (MetaMorpho) address. * @param params.args.shares - Amount of vault shares to redeem. * @param params.args.recipient - Address that receives the redeemed 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 `shares <= 0n`. * @example * ```ts * import { vaultV1Redeem } from "@morpho-org/morpho-sdk"; * * const tx = vaultV1Redeem({ * vault: { address: vaultAddress }, * args: { shares: 1_000_000n, recipient, onBehalf }, * }); * // tx satisfies Readonly> * ``` */ export declare const vaultV1Redeem: ({ vault: { address: vaultAddress }, args: { shares, recipient, onBehalf }, metadata, }: VaultV1RedeemParams) => Readonly>;