@venly/wallet-mcp
Version:
Production-ready MCP server enabling AI agents to perform Web3 wallet operations through Venly's blockchain infrastructure. Supports 14+ networks including Ethereum, Polygon, Arbitrum, and stablecoin operations.
122 lines • 3.12 kB
TypeScript
/**
* Health Check Endpoints for NPM Integration
*
* Provides health monitoring endpoints for Nginx Proxy Manager
* and other monitoring systems
*/
import { VenlyClient } from '../venly/VenlyClient.js';
import winston from 'winston';
export interface HealthRequest {
method: string;
url: string;
headers: Record<string, string>;
}
export interface HealthResponse {
statusCode: number;
headers: Record<string, string>;
body: string;
}
export interface HealthStatus {
status: 'healthy' | 'degraded' | 'unhealthy';
timestamp: string;
uptime: number;
version: string;
environment: string;
instance?: string;
toolsAvailable?: number;
authenticationModel?: string;
}
export interface DetailedHealthStatus extends HealthStatus {
services: {
venlyApi: {
status: 'connected' | 'disconnected' | 'error';
responseTime?: number;
lastCheck: string;
error?: string;
};
database?: {
status: 'connected' | 'disconnected';
responseTime?: number;
};
memory: {
used: number;
total: number;
percentage: number;
};
cpu: {
usage: number;
};
};
metrics: {
totalRequests: number;
successfulRequests: number;
errorRate: number;
averageResponseTime: number;
};
}
/**
* Health Check Service
*/
export declare class HealthCheckService {
private logger;
private startTime;
private requestCount;
private successCount;
private totalResponseTime;
constructor(_venlyClient: VenlyClient, logger: winston.Logger);
/**
* Basic health check - for NPM monitoring
*/
getBasicHealth(): Promise<HealthStatus>;
/**
* Detailed health check - for comprehensive monitoring
*/
getDetailedHealth(): Promise<DetailedHealthStatus>;
/**
* Readiness probe - checks if service is ready to accept requests
*/
getReadinessStatus(): Promise<{
ready: boolean;
reason?: string;
}>;
/**
* Update request metrics
*/
recordRequest(responseTime: number, success: boolean): void;
}
/**
* Health endpoint handlers for HTTP server integration
*/
export declare class HealthRoutes {
private healthService;
constructor(healthService: HealthCheckService);
/**
* GET /health - Basic health check for NPM
*/
handleBasicHealth(): Promise<{
statusCode: number;
body: any;
}>;
/**
* GET /health/detailed - Comprehensive health information
*/
handleDetailedHealth(): Promise<{
statusCode: number;
body: any;
}>;
/**
* GET /health/ready - Readiness probe for Kubernetes/Docker
*/
handleReadinessProbe(): Promise<{
statusCode: number;
body: any;
}>;
/**
* GET /health/live - Liveness probe for Kubernetes/Docker
*/
handleLivenessProbe(): Promise<{
statusCode: number;
body: any;
}>;
}
//# sourceMappingURL=health.d.ts.map