UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

20 lines (19 loc) 786 B
import { EvmWalletProvider } from "../../wallet-providers"; /** * Interface for token details */ export interface TokenDetails { name: string; decimals: number; balance: bigint; formattedBalance: string; } /** * Gets the details of an ERC20 token including name, decimals, and balance. * * @param walletProvider - The wallet provider to use for the multicall. * @param contractAddress - The contract address of the ERC20 token. * @param address - The address to check the balance for. If not provided, uses the wallet's address. * @returns A promise that resolves to TokenDetails or null if there's an error. */ export declare function getTokenDetails(walletProvider: EvmWalletProvider, contractAddress: string, address?: string): Promise<TokenDetails | null>;