UNPKG

web3agent-aof

Version:

AI Framework for Onchain Operations and DeFi Interactions

23 lines (22 loc) 912 B
import { ethers } from 'ethers'; import { EventEmitter } from 'events'; import { PriceChangeData, HealthFactorData } from './types'; type PriceChangeCallback = (data: PriceChangeData) => void; type HealthFactorCallback = (data: HealthFactorData) => void; export declare class EVMAgent extends EventEmitter { private provider; private wallet; private priceMonitors; private healthFactorMonitors; constructor(provider: ethers.Provider, wallet: ethers.Wallet); monitorPriceChange(token: string, callback: PriceChangeCallback): void; monitorHealthFactor(protocol: string, callback: HealthFactorCallback): void; stopPriceMonitoring(token: string): void; stopHealthFactorMonitoring(protocol: string): void; stopAllMonitoring(): void; private startPriceMonitoring; private startHealthFactorMonitoring; private getTokenPrice; private getHealthFactor; } export {};