The Node Gateway API provides endpoints for zero-knowledge proof operations, system monitoring, and public key distribution. All endpoints are prefixed with /v1.
http://localhost:3000/v1
Most endpoints require an API key for authentication and to bypass rate limiting. Include the API key in the X-API-Key header:
X-API-Key: your_api_key_here
curl
curl -X GET http://localhost:3000/v1/health
curl -X GET "http://localhost:3000/v1/metrics?count=5" -H "X-API-Key: dummy"
curl -X GET http://localhost:3000/v1/public-key
curl -X GET "http://localhost:3000/v1/proof/result?requestId=dummy"
curl -X POST http://localhost:3000/v1/proof/create -d "encryptedData=your_encrypted_value_here"http
http :3000/v1/health
http http://localhost:3000/v1/metrics count==5 X-API-Key:dummy
http :3000/v1/public-key
http http://localhost:3000/v1/proof/result requestId==dummy
http POST :3000/v1/proof/create encryptedData=your_encrypted_value_hereGET /health
Check the health status of the API and its dependencies.
Response:
{
"status": "OK",
"timestamp": "2025-10-15T12:00:00.000Z",
"application": {
"version": "0.0.0"
}
}Example:
curl http://localhost:3000/v1/healthGET /metrics
Retrieve system performance metrics and rate limiting statistics.
Query Parameters:
count(optional): Number of metrics to return (1-100, default: 30)
Response:
{
"metrics": [
{
"requestId": "abc123",
"duration": 150,
"timestamp": 1697365200000
}
],
"limit": {
"activeCount": 2,
"pendingCount": 0,
"size": 3
}
}Example:
curl "http://localhost:3000/v1/metrics?count=10"GET /public-key
Retrieve the AWS KMS public key used for signature verification.
Response:
{
"publicKey": "-----BEGIN PUBLIC KEY-----\n...\n-----END PUBLIC KEY-----"
}Example:
curl http://localhost:3000/v1/public-keyPOST /proof/create
Submit encrypted data for zero-knowledge proof generation.
Request Body:
{
"encryptedData": "base64_encoded_encrypted_data"
}Response:
{
"requestId": "abc123def456"
}Example:
curl -X POST http://localhost:3000/v1/proof/create \
-H "Content-Type: application/json" \
-d '{"encryptedData": "your_encrypted_data_here"}'GET /proof/result
Retrieve the result of a previously submitted proof request.
Query Parameters:
requestId(required): The request ID returned from the create proof endpoint
Response (Processing):
{
"status": "processing"
}Response (Completed):
{
"status": "completed",
"result": "proof_data_here"
}Response (Error):
{
"status": "error",
"message": "result not found"
}Example:
curl "http://localhost:3000/v1/proof/result?requestId=abc123def456"200 OK: Request successful400 Bad Request: Invalid request parameters401 Unauthorized: Invalid or missing API key404 Not Found: Resource not found429 Too Many Requests: Rate limit exceeded500 Internal Server Error: Server error
The API implements rate limiting to prevent abuse. Requests are limited to 1000 requests per 10-minute window by default. Authenticated requests with a valid API key have higher limits.
{
"error": {
"message": "Error description",
"code": "ERROR_CODE"
}
}