@antseed/network-stats
v0.1.9
Published
Standalone service that polls the AntSeed network and exposes peer/model stats via HTTP
Downloads
362
Readme
@antseed/network-stats
Standalone service that polls the AntSeed network as an anonymous buyer and exposes live peer/model stats over HTTP.
What it does
- Connects to the network via DHT discovery every 15 minutes
- Extracts: active peer count + list of available services
- Caches result to
cache/network.json - Exposes a simple Express API for XHR consumption by the website
API
GET /stats → { peers: number, services: string[], updatedAt: string }
GET /health → { ok: true }Usage
pnpm install
pnpm build
pnpm startEnvironment variables:
| Variable | Default | Description |
|--------------|---------|------------------------------------|
| PORT | 4000 | HTTP port to listen on |
| CACHE_PATH | cache/network.json | Path to write JSON cache |
Development
pnpm build
pnpm test