interface VaultStats {
    totalKeys: number;
    totalUsage: number;
    deviceFingerprint: string;
    allowedDomains: number;
}

interface StorageConfig {
    type: 'memory' | 'database';
    options?: {
        type?: 'postgresql' | 'mysql' | 'mongodb' | 'sqlite';
        connection?: any;
        encryptionKey?: string;
    };
}
interface KeyVaultConfig {
    enabled: boolean;
    masterPassword: string;
    allowedDomains?: string[];
}
interface ProviderConfig {
    key: string;
    dailyLimit: number;
    model?: string;
}
interface BudgetConfig {
    daily: number;
    perRequest: number;
}
interface CryptoConfig {
    privateKey?: string;
    publicKey?: string;
}
interface SmartAPIConfig {
    storage?: StorageConfig;
    keyVault?: KeyVaultConfig;
    providers: {
        [key: string]: ProviderConfig;
    };
    budget: BudgetConfig;
    crypto: CryptoConfig;
}
interface APIxAuthConfig extends SmartAPIConfig {
}
interface ChatOptions {
    provider?: string;
    model?: string;
    temperature?: number;
    maxTokens?: number;
    enableSearch?: boolean;
    enableThinking?: boolean;
}
interface ChatResponse {
    text: string;
    tokens: {
        input: number;
        output: number;
        total: number;
    };
    cost: number;
    provider: string;
    model: string;
    searchUsed?: boolean;
    thinkingUsed?: boolean;
    thinkingContent?: string;
}
interface QuotaInfo {
    date: string;
    used: number;
    limit: number;
    safeLimit: number;
    learnedLimit: number | null;
    confidence: number;
    lastReset: string;
}
interface UsageStats {
    quotas: {
        [provider: string]: QuotaInfo;
    };
    cost: number;
    budget: BudgetConfig;
}
interface AuditEntry {
    timestamp: string;
    provider: string;
    message: string;
    response: string;
    cost: number;
    tokens: {
        input: number;
        output: number;
        total: number;
    };
    quota: QuotaInfo;
    signature: string;
}
interface LearnedLimit {
    actualLimit: number;
    discoveredAt: string;
    confidence: number;
}

declare class APIxAuth {
    private storage;
    private rateLimiter;
    private costTracker;
    private cryptoSigner;
    private scheduler;
    private providers;
    private keyVault?;
    private config;
    constructor(options?: Partial<APIxAuthConfig>);
    private initStorage;
    private initializeKeyVault;
    private loadConfig;
    chat(message: string | any[], options?: ChatOptions): Promise<ChatResponse>;
    chatWithSearch(message: string | any[], options?: ChatOptions): Promise<ChatResponse>;
    chatWithThinking(message: string | any[], options?: ChatOptions): Promise<ChatResponse>;
    private selectBestProvider;
    private findCheaperProvider;
    private isRateLimitError;
    getUsage(): Promise<UsageStats>;
    getCost(): Promise<number>;
    verifyAuditLog(): Promise<boolean>;
    getConfig(): SmartAPIConfig;
    getRealTimeStats(): any;
    getKeyVaultStats(): VaultStats | null;
    rotateKey(provider: string): string | null;
    revokeKey(provider: string): void;
    close(): Promise<void>;
}

export { APIxAuth, type APIxAuthConfig, type AuditEntry, type BudgetConfig, type ChatOptions, type ChatResponse, type CryptoConfig, type KeyVaultConfig, type LearnedLimit, type ProviderConfig, type QuotaInfo, APIxAuth as SmartAPI, type SmartAPIConfig, type StorageConfig, type UsageStats, APIxAuth as default };
