UNPKG

web3agent-aof

Version:

AI Framework for Onchain Operations and DeFi Interactions

40 lines (39 loc) 962 B
export type BridgeProtocol = 'LayerZero' | 'Hop' | 'Across'; export interface BridgeParams { sourceChain: string; targetChain: string; token: string; amount: string; bridgeProtocol: BridgeProtocol; recipient?: string; slippage?: number; } export interface BridgeQuote { estimatedGas: bigint; bridgeFee: string; estimatedTime: number; minAmountOut: string; protocol: BridgeProtocol; } export interface BridgeRoute { protocol: BridgeProtocol; steps: BridgeStep[]; totalFee: string; estimatedTime: number; } export interface BridgeStep { type: 'approve' | 'bridge' | 'claim'; protocol: BridgeProtocol; data: any; estimatedGas: bigint; } export interface BridgeTransaction { hash: string; status: 'pending' | 'completed' | 'failed'; sourceChain: string; targetChain: string; sourceHash?: string; targetHash?: string; amount: string; timestamp: number; }