//#region extensions/crypto/src/services/price-oracle.d.ts /** * Multi-Source Price Oracle — cross-validated price feeds. * * Queries multiple price sources in parallel: * - DexScreener (current primary) * - CoinGecko * - CoinMarketCap * - DeFiLlama * * Cross-validates: flags if sources disagree by >2% (possible stale data * or manipulation). Returns the median price for robustness. */ interface PriceResult { token: string; chain: string; priceUsd: number; sources: PriceSource[]; confidence: 'high' | 'medium' | 'low'; divergencePercent: number; warning?: string; } interface PriceSource { name: string; priceUsd: number; timestamp: number; error?: string; } interface PriceOracleConfig { /** Sources to use. Default: all available. */ sources?: string[]; /** Divergence threshold in %. Flag if sources differ by more. Default: 2. */ divergenceThreshold?: number; /** Per-source timeout in ms. Default: 3000. */ timeoutMs?: number; /** CoinGecko API key (optional, increases rate limit). */ coingeckoApiKey?: string; /** CoinMarketCap API key (required for CMC). */ cmcApiKey?: string; /** Birdeye API key (required for Birdeye). */ birdeyeApiKey?: string; } declare class PriceOracle { private config; constructor(userConfig?: PriceOracleConfig); /** * Get a cross-validated price for a token. * Queries all enabled sources in parallel, computes median, checks divergence. */ getPrice(token: string, chain?: string, tokenAddress?: string): Promise; /** * Get ETH price from multiple sources. */ getEthPrice(): Promise; /** * Batch price lookup for multiple tokens. */ getPrices(tokens: Array<{ symbol: string; chain?: string; address?: string; }>): Promise; } declare function getPriceOracle(config?: PriceOracleConfig): PriceOracle; declare function resetPriceOracle(): void; //#endregion export { PriceOracle, PriceOracleConfig, PriceResult, PriceSource, getPriceOracle, resetPriceOracle }; //# sourceMappingURL=price-oracle.d.mts.map