@getclave/lifi-sdk
Version:
LI.FI Any-to-Any Cross-Chain-Swap SDK
21 lines • 1.3 kB
TypeScript
import type { BaseToken, ChainId } from '@lifi/types';
import type { Address, Client } from 'viem';
import type { TokenAllowance, TokenSpender, TokenSpenderAllowance } from './types';
export declare const getAllowance: (client: Client, tokenAddress: Address, ownerAddress: Address, spenderAddress: Address) => Promise<bigint>;
export declare const getAllowanceMulticall: (client: Client, chainId: ChainId, tokens: TokenSpender[], ownerAddress: Address) => Promise<TokenSpenderAllowance[]>;
/**
* Get the current allowance for a certain token.
* @param token - The token that should be checked
* @param ownerAddress - The owner of the token
* @param spenderAddress - The spender address that has to be approved
* @returns Returns allowance
*/
export declare const getTokenAllowance: (token: BaseToken, ownerAddress: Address, spenderAddress: Address) => Promise<bigint | undefined>;
/**
* Get the current allowance for a list of token/spender address pairs.
* @param ownerAddress - The owner of the tokens
* @param tokens - A list of token and spender address pairs
* @returns Returns array of tokens and their allowance
*/
export declare const getTokenAllowanceMulticall: (ownerAddress: Address, tokens: TokenSpender[]) => Promise<TokenAllowance[]>;
//# sourceMappingURL=getAllowance.d.ts.map