UNPKG

@getclave/lifi-sdk

Version:

LI.FI Any-to-Any Cross-Chain-Swap SDK

27 lines 1.09 kB
import type { ExtendedChain } from '@lifi/types'; import type { Address } from 'viem'; export type PermitSupport = { /** Whether the token supports EIP-2612 native permits */ nativePermitSupported: boolean; /** Whether Permit2 is available and has sufficient allowance */ permit2AllowanceSufficient: boolean; }; /** * Checks what permit types are supported for a token on a specific chain. * Checks in order: * 1. Native permit (EIP-2612) support * 2. Permit2 availability and allowance * * @param chain - The chain to check permit support on * @param tokenAddress - The token address to check * @param ownerAddress - The address that would sign the permit * @param amount - The amount to check allowance against for Permit2 * @returns Object indicating which permit types are supported */ export declare const checkPermitSupport: ({ chain, tokenAddress, ownerAddress, amount, }: { chain: ExtendedChain; tokenAddress: Address; ownerAddress: Address; amount: bigint; }) => Promise<PermitSupport>; //# sourceMappingURL=checkPermitSupport.d.ts.map