arctools for Arc

arc-server

The chain, the tools, and the docs behind one command.

A local dev console: live Arc data, a paste-and-lint box, and full-text search over 636 mirrored documentation pages that works with no network at all. Zero dependencies, no build step.

Running it

npm run serve                                  # http://127.0.0.1:8787
npm run serve -- --port 9000 --rpc https://…   # override
TabWhat it shows
ChainChain id, head block, gas price against the 20 Gwei floor
USDC indexDual-emitter scan with the phantom-row and volume-inflation numbers, plus per-address reconciliation
AgentsRegistry size, agent listing, owner and attestation detail
LintPaste Solidity or a deploy script, get findings with doc links
DocsRanked full-text search across every mirrored page, with the body inline

A JSON API, not just a UI

Every tab is a thin client over routes that are just as usable from curl, an editor extension, or CI.

curl -s localhost:8787/api/index/scan?blocks=150 | jq .stats
curl -s localhost:8787/api/docs/search?q=usdc+decimals | jq '.hits[0]'
curl -s -X POST localhost:8787/api/lint \
  -H 'content-type: application/json' \
  -d '{"lang":"solidity","source":"…"}'
Route
GET /api/chainChain id, head, gas price
GET /api/index/scan?blocks=NCanonical movements and dedup stats
GET /api/index/reconcile?address=&blocks=Indexed delta vs eth_getBalance
GET /api/agents/countRegistry size via binary search
GET /api/agents/list?from=&limit=Owner and metadata URI per token id
GET /api/agents/show?id=One agent with its attestation summary
GET /api/lint/rulesAll 14 rules with severities and doc links
POST /api/lint{source, lang, filename} → findings
GET /api/docs/search?q=&limit=Ranked hits with marked excerpts
GET /api/docs/page?site=&path=One page, full markdown

The documentation mirror

npm run mirror-docs                       # Arc            → ./docs
npm run mirror-docs -- --site circle      # Circle platform → ./docs-circle
108
Arc pages
528
Circle Developer Platform pages
9.1 MB
searchable offline

The crawler starts from each site's llms.txt and follows internal links breadth-first. Mintlify serves the markdown source of every page at <path>.md, so the mirror is real prose rather than scraped HTML — which is also why pages missing from llms.txt still land.

Search ranks title matches above summary matches above body frequency, and requires every term to appear. The boilerplate index banner Mintlify prepends to every page is stripped, or it would match everything.

Caching, because the RPC bites back

Arc's public RPC sits behind Cloudflare and answers bursts with 429. Every RPC-backed route goes through a TTL cache that also collapses concurrent misses, so a page load with four widgets makes one RPC pass rather than four. The agent count — 41 eth_calls — is cached for five minutes, since the registry only grows.

Local by default, and it should stay that way

The server binds to 127.0.0.1 and has no authentication. It is a developer tool, not a public service — do not expose it.

Tests

14 tests with no network: the documentation loader and ranking, the cache's TTL, coalescing, and failure behaviour, bigint serialisation, and request validation on every route.