import { type Address } from "viem"; import { type Deallocation, type Metadata, type Transaction, type VaultV2ForceWithdrawAction } from "../../types"; export interface VaultV2ForceWithdrawParams { vault: { address: Address; }; args: { deallocations: readonly Deallocation[]; withdraw: { amount: bigint; recipient: Address; }; onBehalf: Address; }; metadata?: Metadata; } /** * Prepares a force withdraw transaction for the VaultV2 contract, using VaultV2's native `multicall`. * * This function encodes one or more `forceDeallocate` calls followed by a single `withdraw`, * executed atomically via VaultV2's `multicall`. This allows a user to free liquidity from * adapters other than the liquidity adapter and withdraw the resulting assets in one transaction. * * A penalty is taken from `onBehalf` for each deallocation to discourage allocation manipulations. * The penalty is applied as a share burn where assets are returned to the vault, so the share price * remains stable (except for rounding). * * @param {Object} params - The vault related parameters. * @param {Object} params.vault - The vault related parameters. * @param {Address} params.vault.address - The vault contract address. * @param {Object} params.args - The force withdraw related parameters. * @param {readonly Deallocation[]} params.args.deallocations - The list of deallocations to perform. * @param {Object} params.args.withdraw - The withdraw parameters applied after deallocations. * @param {bigint} params.args.withdraw.amount - The amount of assets to withdraw. * @param {Address} params.args.withdraw.recipient - The recipient of the withdrawn assets. * @param {Address} params.args.onBehalf - The address from which the penalty is taken (share owner). * @param {Metadata} [params.metadata] - Optional analytics metadata to append. * @returns {Readonly>} The prepared multicall transaction. */ export declare const vaultV2ForceWithdraw: ({ vault: { address: vaultAddress }, args: { deallocations, withdraw, onBehalf }, metadata, }: VaultV2ForceWithdrawParams) => Readonly>;