How piyushjha0409/lavinth works
Lavinth is a Solana security platform: users and integrating applications inspect wallet activity, receive risk alerts, and take protective actions. Its backend exposes authenticated API workflows for approval revocation, compromise monitoring, alerts, freeze requests, forensics, funds tracing, and transaction simulation; the frontend provides dashboard and wallet-check experiences, while the SDKs expose API capabilities to application developers. The README also describes dusting and address-poisoning detection, transaction filtering, and ecosystem security intelligence. Backend service relationships are shown where the sampled endpoint or service evidence supports them; frontend-to-backend wiring is not established by the excerpts.
Main entry points: fetchEndpoint.ts API routes · revocation-engine.ts Approval revocation · lavinth.ts Lavinth SDK · config.ts PostgreSQL pool
Components 18
API and persistence
- API routes
backend/fetchEndpoint.ts - API key validation
backend/middlewares/validateApiKey.ts - PostgreSQL pool
backend/db/config.ts
Security workflows
- Approval revocation
backend/services/revocation-engine.ts - Approval scanning
backend/services/approval-scanner.ts - Compromise detection
backend/services/compromise-detector.ts - Alert delivery
backend/services/alert-manager.ts - Exchange coordination
backend/services/exchange-coordinator.ts - Forensic analysis
backend/services/forensic-analyzer.ts - Fund tracing
backend/services/fund-tracker.ts - Threat intelligence
backend/services/threat-intelligence.ts - Transaction simulation
backend/services/transaction-simulator.ts
User application
- Dashboard and wallet UI
frontend/app/dashboard/page.tsx - Frontend API routes
frontend/app/api
Developer SDKs
- HTTP API client
sdk/lavinth-sdk/src/client.ts - Lavinth SDK
sdk/lavinth-sdk/src/lavinth.ts - React provider and hooks
sdk/lavinth-react/src/context.tsx
Other components
- Users and integrators
Connections 21
- Users and integrators → API routes: requests security actions
README.md - API routes → API key validation: validates API key
backend/fetchEndpoint.ts - API key validation → PostgreSQL pool: checks key and usage
backend/middlewares/validateApiKey.ts - API routes → Approval revocation: builds revocation plan
backend/fetchEndpoint.ts - API routes → Compromise detection: registers monitoring
backend/fetchEndpoint.ts - API routes → Alert delivery: creates subscriptions
backend/fetchEndpoint.ts - API routes → Exchange coordination: lists freeze requests
backend/fetchEndpoint.ts - API routes → Forensic analysis: gets report timeline
backend/fetchEndpoint.ts - Approval revocation → PostgreSQL pool: updates recovery status
backend/services/revocation-engine.ts - Alert delivery → PostgreSQL pool: stores notifications
backend/services/alert-manager.ts - Compromise detection → Threat intelligence: uses threat intelligence
backend/services/compromise-detector.ts - Approval revocation → Approval scanning: uses approval scanner
backend/services/revocation-engine.ts - Users and integrators → Dashboard and wallet UI: uses dashboard
README.md - Dashboard and wallet UI → Frontend API routes: uses API routes
- Users and integrators → Lavinth SDK: integrates security API
README.md - Lavinth SDK → HTTP API client: sends HTTP requests
sdk/lavinth-sdk/src/lavinth.ts - React provider and hooks → Lavinth SDK: creates SDK instance
sdk/lavinth-react/src/context.tsx - API routes → Approval scanning: serves approval workflows
backend/fetchEndpoint.ts - API routes → Fund tracing: serves fund tracing
backend/fetchEndpoint.ts - API routes → Transaction simulation: serves simulation
backend/fetchEndpoint.ts - API routes → Threat intelligence: supports transaction filtering
backend/fetchEndpoint.ts