/** * SolVox Type Definitions — matches preload.ts exactly */ export interface SolvoxAPI { wallet: { create: () => Promise<{ success: boolean; publicKey?: string; error?: string }>; import: (mnemonic: string) => Promise<{ success: boolean; publicKey?: string; error?: string }>; getPublicKey: () => Promise; getBalance: () => Promise<{ success: boolean; sol?: number; usdt?: number; error?: string }>; sendSOL: (to: string, amount: number) => Promise<{ success: boolean; signature?: string; explorer?: string; error?: string }>; sendUSDT: (to: string, amount: number) => Promise<{ success: boolean; signature?: string; explorer?: string; error?: string }>; getHistory: (limit?: number) => Promise<{ success: boolean; history?: any[]; error?: string }>; isUnlocked: () => Promise; lock: () => Promise<{ success: boolean }>; exists: () => Promise; }; auth: { biometric: (reason?: string) => Promise<{ success: boolean; error?: string }>; unlock: (pin: string) => Promise<{ success: boolean; error?: string; remainingAttempts?: number }>; setPin: (pin: string) => Promise<{ success: boolean; error?: string }>; biometricAvailable: () => Promise; }; security: { getSettings: () => Promise; updateSettings: (settings: any) => Promise<{ success: boolean }>; addWhitelist: (address: string, label: string) => Promise<{ success: boolean; error?: string }>; removeWhitelist: (address: string) => Promise<{ success: boolean }>; getWhitelist: () => Promise; getAnomalies: () => Promise; }; ai: { initialize: () => Promise<{ success: boolean; error?: string }>; chat: (message: string) => Promise<{ success: boolean; response?: string; actions?: any[]; pipelineSteps?: any[]; pendingTransaction?: any; requiresConfirmation?: boolean; toolResults?: any; error?: string }>; processVoice: (audioData: ArrayBuffer) => Promise<{ success: boolean; transcription?: string; agentResult?: any; pipelineSteps?: any[]; responseAudio?: ArrayBuffer; toolResults?: any; error?: string }>; executeConfirmed: (tx: { token: string; amount: number; to: string }) => Promise<{ success: boolean; signature?: string; explorer?: string; risk?: any; error?: string }>; ocrPayment: (imageData: ArrayBuffer) => Promise<{ success: boolean; rawText?: string; extractedData?: any; pipelineSteps?: any[]; error?: string }>; assessRisk: (tx: { amount: number; token: string; to: string }) => Promise<{ success: boolean; risk?: any; error?: string }>; resolveContact: (query: string) => Promise<{ success: boolean; contact?: { address: string; name: string; confidence: number } | null; error?: string }>; addContact: (contact: { name: string; address: string; notes?: string; txCount: number }) => Promise<{ success: boolean; error?: string }>; getContacts: () => Promise>; speak: (text: string) => Promise<{ success: boolean; audio?: ArrayBuffer; error?: string }>; translate: (text: string, from: string, to: string) => Promise<{ success: boolean; translated?: string; error?: string }>; getStatus: () => Promise; }; rag: { search: (query: string, category?: string) => Promise<{ success: boolean; results?: any[]; error?: string }>; index: (text: string, metadata: any) => Promise<{ success: boolean; error?: string }>; }; on: { locked: (callback: () => void) => () => void; balanceUpdate: (callback: (data: any) => void) => () => void; aiStatus: (callback: (data: any) => void) => () => void; transactionAlert: (callback: (data: any) => void) => () => void; }; } declare global { interface Window { solvox: SolvoxAPI; } }