import { JsonRpcProvider } from 'ethers'; export type FlapChain = 'BSC' | 'BASE' | 'XLAYER' | 'MORPH'; /** JSON 可序列化值(递归) */ export type JsonValue = string | number | boolean | null | JsonValue[] | { [key: string]: JsonValue; }; /** IPFS 元数据 JSON(字段因项目而异) */ export type FlapTokenMetaJson = { [key: string]: JsonValue; }; export type FlapMetaByAddressResult = { cid: string; data?: FlapTokenMetaJson; }; export type FlapMetaByTokenResult = { token: string; cid?: string; data?: FlapTokenMetaJson; imageUrl?: string; error?: string; }; export type FetchMetaOptions = { ipfsGateway?: string; multicall3?: string; }; /** * 根据代币地址直接读取合约 metaURI()/meta()(IPFS CID),并拉取元数据 JSON。 */ export declare function getFlapMetaByAddress(chain: FlapChain, rpcUrl: string, tokenAddress: string, opts?: FetchMetaOptions): Promise; export declare function getFlapMetasByAddresses(chain: FlapChain, rpcUrl: string, tokenAddresses: string[], opts?: FetchMetaOptions): Promise; /** * 使用 Multicall3 批量读取 metaURI()/meta(),metaURI 优先、meta 兜底。 */ export declare function getFlapMetaUrisWithMulticall(provider: JsonRpcProvider, chain: FlapChain, tokenAddresses: string[], multicall3?: string, ipfsGateway?: string): Promise;