📈 GH Trending Explorer 🎲 Surprise me

← all repos

Stellar-Sentinel / sentinel-backend

git clone https://github.com/Stellar-Sentinel/sentinel-backend.git

FastAPI service for Stellar account screening, Soroban event monitoring, and network health.

+0
stars, 24h · #40,251
+~0
stars, 7 days · #45,144
+129
stars, 30 days · #5,788
129
★ total
130
forks · 4 open issues

Star history (as recorded here)

2026-10-20 · 129 ★ 2026-10-23 · 129 ★
LanguagePython
LicenseMIT
Created2026-10-08 (15d ago)
Last push13d ago
Watchers0
OwnerOrganization

GitHub topics

Links

README excerpt
# Stellar Sentinel Backend
The screening endpoint accepts checksum-validated classic (`G...`) and muxed (`M...`) Stellar account IDs and forwards them unchanged to Horizon.
Read-only FastAPI service for screening Stellar accounts and reading Soroban contract events. It fetches account activity from Horizon, exposes network status and events from Stellar RPC, and does not hold signing keys or submit transactions. Screening scores are transparent heuristics, not proof of fraud or financial/compliance advice. The app reuses a bounded HTTP connection pool for the lifetime of the process and closes it during shutdown.
Screening, network-status, and event routes publish Pydantic response schemas and representative examples in `/openapi.json`. Optional upstream event and ledger fields remain nullable.
API responses include baseline browser security headers. Risk-score responses use `Cache-Control: no-store` because they contain account-specific screening results.
Every HTTP response includes `X-Request-ID`. A supplied ID is reused only when it is 1–64 ASCII letters, digits, dots, underscores, or hyphens; otherwise the service generates a UUID and uses the selected value for request correlation.
## Health probes
`GET /health` and `GET /live` are dependency-free liveness checks. `GET /ready` probes the configured Horizon fee-stats endpoint and Soroban RPC health method using `REQUEST_TIMEOUT_SECONDS`. It returns HTTP 200 when both are reachable, or HTTP 503 with a per-dependency `ok`/`unavailable` status when either is degraded. Upstream exception details are not included in the response.
## Architecture
 [code] 
The backend is an event reader, not a transaction writer. The example configuration points to the current Testnet deployment. Set `CONTRACT_ID` to a deployed contract on the selected network; without it, `/events` returns HTTP 503 rather than fabricated data. The service indexes new events into a local SQLite database while running, decodes both `flagged` and digest-bearing `flaggedv2` events, and returns the stored history.
`GET /accounts/{address}/operations?limit=20&cursor=...` returns a page of normalized Horizon operations. The page contains the operation ID/type, creation time, transaction hash, participating accounts, and an `amounts` array. Each amount keeps its own asset type, code, and issuer; path payments may return separate source and destination amounts. `next_cursor` is an opaque token for the following page and is `null` when the current page is short. Page size is limited to 1–100. These values are descriptive activity data and do not alter the risk score.
Request logs are JSON records containing the method, route template, status, latency, and optional request ID. Raw paths, query strings, headers, request bodies, and upstream exception details are not logged; unmatched routes use a fixed label.
### Current Testnet contract
The configured contract is `CCZAAZ3FJ7LKZA7E7A6EKQTU2HCNVI3YUVIHKWHSULGZSWAJFS2D2XVX`, initialized with th