UNPKG

tryaii-mcp-server

Version:

TryAII MCP Server - 15+ AI models with comparison, cost tracking, and collective intelligence

31 lines 931 B
export declare const API_KEY_PREFIX = "tai_"; export declare const API_KEY_LENGTH = 32; export declare const HASH_ROUNDS = 12; export interface GeneratedApiKey { keyId: string; apiKey: string; keyHash: string; keyPrefix: string; } /** * Generate a secure API key with proper format * Format: tai_1234567890abcdef1234567890abcdef */ export declare function generateApiKey(): GeneratedApiKey; /** * Validate API key format */ export declare function isValidApiKeyFormat(apiKey: string): boolean; /** * Verify API key against stored hash */ export declare function verifyApiKey(apiKey: string, hash: string): boolean; /** * Extract key ID from API key for rate limiting */ export declare function extractKeyPrefix(apiKey: string): string; /** * Sanitize API key for logging (show only prefix) */ export declare function sanitizeApiKeyForLog(apiKey: string): string; //# sourceMappingURL=apiKeyUtils.d.ts.map