UNPKG

@getclave/lifi-sdk

Version:

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

24 lines 1.44 kB
import type { Address, Client, Hash } from 'viem'; import type { ExecutionOptions } from '../types'; import type { ApproveTokenRequest, RevokeApprovalRequest } from './types'; export declare const setAllowance: (client: Client, tokenAddress: Address, contractAddress: Address, amount: bigint, executionOptions?: ExecutionOptions, returnPopulatedTransaction?: boolean) => Promise<Hash>; /** * Set approval for a certain token and amount. * @param request - The approval request * @param request.walletClient - The Viem wallet client used to send the transaction * @param request.token - The token for which to set the allowance * @param request.spenderAddress - The address of the spender * @param request.amount - The amount of tokens to approve * @returns Returns Hash or nothing */ export declare const setTokenAllowance: ({ walletClient, token, spenderAddress, amount, }: ApproveTokenRequest) => Promise<Hash | void>; /** * Revoke approval for a certain token. * @param request - The revoke request * @param request.walletClient - The Viem wallet client used to send the transaction * @param request.token - The token for which to revoke the allowance * @param request.spenderAddress - The address of the spender * @returns Returns Hash or nothing */ export declare const revokeTokenApproval: ({ walletClient, token, spenderAddress, }: RevokeApprovalRequest) => Promise<Hash | void>; //# sourceMappingURL=setAllowance.d.ts.map