import type { Address } from 'viem'; import type { GauntletClient } from '../client'; import type { SyncWithdrawQuoteBounds } from './withdrawQuote'; import { PreparedTx } from '../attribution'; export type EvmWithdrawParams = { vaultId: string; chainId?: number; assetSymbol?: string; /** Request async (queued) or sync withdraw. Availability is read from live vault configuration. */ depositMode?: string; receiver?: Address; /** Slippage tolerance in basis points (e.g. 100 = 1%). Defaults to 100. */ slippageBps?: number; /** Solver tip passed to async Aera provisioner requests. Defaults to 0. */ solverTip?: bigint; /** Maximum price age passed to async Aera provisioner requests. Defaults to 10 days. */ maxPriceAge?: bigint; /** * Current sync quote bounds to pin instant withdraw transaction construction. * Supplying bounds implies `depositMode: 'sync'`; explicit async requests are rejected. */ syncWithdrawQuote?: SyncWithdrawQuoteBounds; } & ({ shares: bigint; amount?: never; entireAmount?: never; } | { amount: bigint; shares?: never; entireAmount?: never; } | { account?: Address; entireAmount: true; shares?: never; amount?: never; }); /** * Builds the ordered list of EVM transactions required to withdraw from a Gauntlet vault. * * Specify the withdrawal amount as one of: `shares` (vault units), `amount` (underlying * token amount), or `entireAmount: true` (full balance). Returns an ERC-20 approval * (only when needed for async redeem) followed by the withdraw or async redeem request, * each returned as a `PreparedTx` ready to be signed and sent. * * @param client - A configured `GauntletClient` instance with an EVM public client and wallet. * @param params - Withdrawal parameters including the vault identifier and exactly one of * `shares`, `amount`, or `entireAmount`, plus optional chain, asset symbol, deposit mode, * and receiver address. * @returns Ordered array of prepared transactions to execute in sequence. * * @throws {VaultNotFoundError} If the vault ID is not found in the manifest. * @throws {AccountRequiredError} If no wallet account is set on the client. * @throws {UnsupportedDepositModeError} If the requested withdrawal mode is not supported. * @throws {UnsupportedAssetError} If the specified asset symbol is not accepted by the vault. * * @example * ```ts * // Withdraw by token amount * const txs = await getWithdrawTx(client, { * vaultId: 'baseUsdcPrime', * amount: 50_000_000n, // 50 USDC (6 decimals) * }); * * // Withdraw entire balance * const txs = await getWithdrawTx(client, { * vaultId: 'baseUsdcPrime', * entireAmount: true, * account: walletAddress, * }); * ``` */ export declare function getWithdrawTx(client: GauntletClient, params: EvmWithdrawParams): Promise; //# sourceMappingURL=withdraw.d.ts.map