UNPKG

flashloan-profit-calculator

Version:

A library for analyzing flashloan transactions and calculating profits

21 lines (20 loc) 730 B
import type { ProfitResult } from "./types"; export declare const detectedProfitTakers: Set<string>; /** * Reset detected profit takers (call this when starting new analysis) */ export declare function resetProfitTakers(): void; /** * Calculates the total profit for each token */ export declare function calculateProfitByToken(): Promise<ProfitResult[]>; /** * Format profits for display with decimal conversion */ export declare function formatProfitsWithDecimals(profits: ProfitResult[]): Promise<{ token: string; symbol: string; decimals: number; profit: number; }[]>; export declare function getTokenUsdPriceAtTimestamp(coingeckoId: string, contract: string, timestamp: number): Promise<number | null>;