import { AgentCredits, Purchase, UsageRecord } from './types.js'; type StorageBackend = 'memory' | 'convex'; /** * Get or create agent credits account */ export declare function getAgentCredits(agentId: string): AgentCredits; /** * Add credits to an agent's account */ export declare function addCredits(agentId: string, amountUsd: number): AgentCredits; /** * Purchase API access * Returns real credentials for 46elks and Twilio */ export declare function purchaseAPIAccess(agentId: string, providerId: string, amountUsd: number): { success: boolean; purchase?: Purchase; error?: string; }; /** * Get all purchases for an agent */ export declare function getAgentPurchases(agentId: string): Purchase[]; /** * Get usage for a purchase */ export declare function getUsage(purchaseId: string): UsageRecord | null; /** * Record usage (call this when API is used) */ export declare function recordUsage(purchaseId: string, unitsUsed: number, costUsd: number): UsageRecord | null; /** * Get full balance summary for an agent */ export declare function getBalanceSummary(agentId: string): { credits: AgentCredits; active_purchases: Purchase[]; total_spent_usd: number; real_credentials_available: string[]; }; /** * Check which providers have real credentials */ export declare function getProvidersWithRealCredentials(): string[]; export declare function getAgentCreditsAsync(agentId: string): Promise; export declare function addCreditsAsync(agentId: string, amountUsd: number): Promise; export declare function purchaseAPIAccessAsync(agentId: string, providerId: string, amountUsd: number): Promise<{ success: boolean; purchase?: Purchase; error?: string; }>; export declare function getBackendInfo(): { type: StorageBackend; convexUrl: string | null; }; export {}; //# sourceMappingURL=credits.d.ts.map