Skip to content

Latest commit

 

History

History
143 lines (112 loc) · 1.93 KB

File metadata and controls

143 lines (112 loc) · 1.93 KB

Veridion API

Base URL: http://localhost:4000/api/v1

Authentication

Register

POST /api/v1/auth/register
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "SecurePass123",
  "displayName": "John Doe"
}

Login

POST /api/v1/auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "SecurePass123"
}

Response includes accessToken (15min) and refreshToken (7d).

Authenticated requests require: Authorization: Bearer <accessToken>

Projects

Create Project

POST /api/v1/projects
Authorization: Bearer <token>

{
  "name": "My DeFi Protocol",
  "chain": "ethereum",
  "language": "solidity",
  "description": "A decentralized exchange",
  "repoUrl": "https://github.com/user/repo"
}

List Projects

GET /api/v1/projects?page=1&limit=20&search=defi

Get Project

GET /api/v1/projects/:id

Audits

Create Audit

POST /api/v1/audits
{
  "projectId": "uuid",
  "commitHash": "abc123"
}

List Audits

GET /api/v1/audits?projectId=uuid&status=COMPLETED

Get Audit with Findings

GET /api/v1/audits/:id

Reports

Generate Report

POST /api/v1/reports/generate
{
  "auditId": "uuid",
  "format": "MARKDOWN",
  "includeAiSummary": true
}

Blockchain

Verify on Stellar

POST /api/v1/blockchain/verify
{
  "auditId": "uuid",
  "walletAddress": "G...XYZ"
}

Check Verification Status

GET /api/v1/blockchain/audit/:auditId

AI Chat

POST /api/v1/ai/chat
{
  "auditId": "uuid",
  "message": "Explain the reentrancy finding"
}

Users

Get Profile

GET /api/v1/users/me

Update Profile

PUT /api/v1/users/me
{
  "displayName": "New Name",
  "walletAddress": "G...XYZ"
}

Health

GET /api/v1/health

Full Swagger documentation available at http://localhost:4000/api/docs.