import { type Address } from "@morpho-org/blue-sdk"; import type { Client } from "viem"; import { type ERC20ApprovalAction, type Requirement, type Transaction } from "../../types"; type GetRequirementsBaseParams = { address: Address; chainId: number; supportDeployless?: boolean; args: { amount: bigint; from: Address; }; }; type GetRequirementsParams = (GetRequirementsBaseParams & { /** Signature-based approvals are not supported. Classic approval (transaction) will be used. */ supportSignature: false; }) | (GetRequirementsBaseParams & { /** Signature-based approvals are supported. Will try permit (EIP-2612), else fallback to permit2. */ supportSignature: true; /** Allow simple permit if EIP-2612 is supported. Only applicable when `supportSignature` is `true`. */ useSimplePermit?: boolean; }); /** * Get token "requirement" for approval/permit before interacting with protocol. * * Three flows: * 1. If signature not supported, use classic approval (transaction). * 2. If signature supported, try simple permit (EIP-2612), else fallback to permit2. * * @param viemClient - The connected viem Client instance, with the correct chain and account. * @param params - Destructured object with: * @param params.address - ERC20 token address. * @param params.chainId - Chain/network id. * @param params.args - Object with: * @param params.args.amount - Required token amount. * @param params.args.from - The account that will grant approval. * @param params.supportSignature - Whether signature-based approvals are supported. If true, will try to use permit or permit2. * @param params.supportDeployless - Whether to use deployless mode. * @param params.useSimplePermit - use simple permit if EIP-2612 is supported. Only available when `supportSignature` is `true`. * @returns Promise of array of approval transaction or requirement objects. */ export declare const getRequirements: (viemClient: Client, params: GetRequirementsParams) => Promise<(Readonly> | Requirement)[]>; export {};