- shared: Ethereum Sepolia chain + addresses load from deployments/sepolia.json (default) - web/agent/api: default network -> Sepolia, RPC config; .env.example updated - typecheck green across shared/web/agent/api Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
48 lines
2.1 KiB
Plaintext
48 lines
2.1 KiB
Plaintext
# =============================================================================
|
|
# @proofchain/api — environment
|
|
# Copy to `.env` and fill in. NEVER commit a real `.env`. No secret is hardcoded
|
|
# in source; all values are read + validated at startup (the service fails fast
|
|
# if a required value is missing or malformed).
|
|
# =============================================================================
|
|
|
|
# --- HTTP --------------------------------------------------------------------
|
|
# Port the API listens on. Default: 8081.
|
|
API_PORT=8081
|
|
HOST=0.0.0.0
|
|
NODE_ENV=development
|
|
LOG_LEVEL=info
|
|
# CORS allowlist: `*` (default, reflect any origin) or a comma-separated list,
|
|
# e.g. https://app.example.com,https://admin.example.com
|
|
CORS_ORIGIN=*
|
|
# Rate limiting: max requests per window per IP.
|
|
RATE_LIMIT_MAX=120
|
|
RATE_LIMIT_WINDOW_MS=60000
|
|
|
|
# --- Chain (required) --------------------------------------------------------
|
|
# JSON-RPC endpoint for the target chain (must be a valid URL). ProofChain runs
|
|
# LIVE on Ethereum Sepolia; default public endpoint:
|
|
# https://ethereum-sepolia-rpc.publicnode.com
|
|
BASE_SEPOLIA_RPC_URL=https://ethereum-sepolia-rpc.publicnode.com
|
|
# Target chain id. Default: 11155111 (Ethereum Sepolia).
|
|
CHAIN_ID=11155111
|
|
|
|
# --- Supabase (optional — persistence layer no-ops when unset) ---------------
|
|
# When both are set, the API reads/writes the read-model tables (see infra
|
|
# schema.sql). When unset, reads return empty and the indexer keeps cursors in
|
|
# memory, so the service still boots and serves chain-derived health.
|
|
SUPABASE_URL=
|
|
SUPABASE_SERVICE_ROLE_KEY=
|
|
|
|
# --- Indexer -----------------------------------------------------------------
|
|
# Enable the event indexer loop. Default: false (API serves reads only).
|
|
INDEXER_ENABLED=false
|
|
# Poll interval in milliseconds. Default: 15000.
|
|
INDEXER_INTERVAL_MS=15000
|
|
# Max blocks scanned per contract per tick. Default: 2000.
|
|
INDEXER_BLOCK_RANGE=2000
|
|
# Confirmations subtracted from the chain head before indexing (reorg safety).
|
|
INDEXER_CONFIRMATIONS=2
|
|
# Cold-start block for a fresh cursor. Set to the contracts' deploy block in
|
|
# production to avoid a slow backfill from genesis. Default: 0.
|
|
INDEXER_START_BLOCK=0
|