/** * @file ERC Standards Utilities * @version 1.0.0 * @lastModified 2024-06-07 * * Utility functions for ERC token standards */ import { ethers } from 'ethers'; import { NFTMetadata } from './types.js'; /** * Interface check result with contract type */ interface ContractTypeResult { isERC20: boolean; isERC721: boolean; isERC1155: boolean; } /** * Check if an address is a valid contract and determine its type * * @param address Contract address to check * @param provider Ethers provider * @returns ContractTypeResult with flags for contract types */ export declare function checkContractType(address: string, provider: ethers.Provider): Promise; /** * Fetches and parses metadata from a token URI * * @param uri The URI to fetch metadata from * @param tokenAddress The token contract address * @param tokenId The token ID * @returns Parsed NFT metadata */ export declare function fetchMetadata(uri: string, tokenAddress: string, tokenId: string | number): Promise; /** * Creates a cache key for token data * * @param keyPrefix Cache key prefix * @param tokenAddress Token contract address * @param additionalParts Additional parts to include in the key * @returns Cache key string */ export declare function createTokenCacheKey(keyPrefix: string, tokenAddress: string, ...additionalParts: (string | number | undefined)[]): string; export {};