This is a simple Node.js Express server to fetch information on Syscoin.
All runtime settings live under config/:
| File | Purpose |
|---|---|
config/.env.example |
Template — copy to config/env and edit |
config/env |
Your local secrets and overrides (not committed) |
config.js |
Defaults (e.g. SyscoinVaultManager address) |
Setup:
cp config/.env.example config/env
# Edit config/env with your RPC credentials- Local:
node index.jsloadsconfig/envvia dotenv. - Docker:
docker composeinjects the same file (env_file: config/envindocker-compose.yml).
This service expects a Syscoin Core node already running on the host (or elsewhere) and reachable via RPC. UTXO supply uses gettxoutsetinfo; NEVM components come from the public explorer API.
Required (in config/env):
SYSCOIN_CORE_RPC_HOST— e.g.localhost(local) orhost.docker.internal(Docker on Linux)SYSCOIN_CORE_RPC_PORT— e.g.8370SYSCOIN_CORE_RPC_USERNAME— RPC usernameSYSCOIN_CORE_RPC_PASSWORD— RPC password
Optional:
SYSCOIN_VAULT_MANAGER— override the SyscoinVaultManager contract address (default inconfig.js)PORT— HTTP listen port (default3000)POLLING_INTERVAL_SECONDS— how often supply is recalculated (default30)TOTAL_SUPPLY_URL— primary NEVM coinsupply explorer URL (defaultexplorer1.syscoin.org)TOTAL_SUPPLY_URL_BACKUP— fallback coinsupply URL if primary fails (defaultexplorer2.syscoin.org)
Generate RPC credentials for syscoin.conf:
curl -sSL https://raw.githubusercontent.com/syscoin/syscoin/master/share/rpcauth/rpcauth.py | python - <username>See also: https://github.com/syscoin/docker-syscoin-core#usage
The official contract address is defined in config.js and can be overridden via SYSCOIN_VAULT_MANAGER in config/env.
total supply = UTXO supply + NEVM supply − vault contract balance
Host: https://info.syscoin.org/
Returns total supply (UTXO + NEVM - minus vault balance) as plain text.
Returns circulating supply as plain text.
Manually triggers an immediate supply recalculation. On startup and by default every 30 seconds, supply is refreshed automatically via polling (POLLING_INTERVAL_SECONDS in config/env).
Simple liveness check (OK).
Detailed status including last recorded values and any fetch errors.
cp config/.env.example config/env
# Edit config/env (use host.docker.internal for SYSCOIN_CORE_RPC_HOST on Linux)
docker compose up -d --buildThe API is published on host port 3050 (maps to container port 3000).