Frontend pages support two machine-oriented formats alongside the default HTML:
md— human+agent readable summariesraw— structured payloads for tooling/automation- Both carry
buildVersionin structured metadata (.mdfrontmatter,.rawmeta)
Explorer page URLs are network-scoped: /{network}/... (for example /mainnet/blocks). Route
patterns in capabilities/discovery documents may be written relative to that network prefix.
Priority order (strict):
query.format- URL suffix (
.md/.raw) Acceptheader
- URL suffix
.md(e.g./mainnet/blocks/123.md) - Query parameter
?format=md - Header
Accept: text/markdown
- URL suffix
.raw(e.g./mainnet/blocks/123.raw) - Query parameter
?format=raw - Header
Accept: application/vnd.ckbadger.raw+json
profilequery selects a raw variant (defaultwhen absent)profile=debuggeris supported on/tx/{hash}and includesdata.txDebugger.mockTransaction- Unknown/unsupported profiles fail fast with
invalid_profile/profile_not_supported
frontend/public/llms.txt— short discovery docfrontend/public/llms-full.txt— full discovery dochttp://localhost:8100/capabilities— machine-readable format/profile/route matrix
/capabilities.site advertises pageBasePattern, the shared apiBasePattern/wsUrlPattern
({network} placeholder), and the concrete networks list plus defaultNetwork that make the
placeholder actionable. It no longer lists direct single-network paths — they are not routes on
the origin that serves the document. Its page route matrices are relative to pageBasePattern.
NETWORK=mainnet
# Markdown
curl "http://localhost:8100/${NETWORK}/blocks.md"
curl "http://localhost:8100/${NETWORK}/blocks?format=md&limit=20"
curl -H "Accept: text/markdown" "http://localhost:8100/${NETWORK}/charts/hash-rate"
# Raw (default profile)
curl "http://localhost:8100/${NETWORK}/blocks/123.raw"
curl "http://localhost:8100/${NETWORK}/cell/0x...txhash...-0?format=raw"
curl -H "Accept: application/vnd.ckbadger.raw+json" \
"http://localhost:8100/${NETWORK}/tx/0x...hash..."
# Raw debugger profile (tx only)
curl "http://localhost:8100/${NETWORK}/tx/0x...hash....raw?profile=debugger" \
| jq '.data.txDebugger.mockTransaction'
# Structured API through the shared network-aware proxy
curl "http://localhost:8100/api/${NETWORK}/v1/statistics/network"
# Capabilities
curl http://localhost:8100/capabilitiesTX_HASH=0x...replace_with_real_tx_hash...
NETWORK=mainnet
curl "http://localhost:8100/${NETWORK}/tx/${TX_HASH}.raw?profile=debugger" \
| jq '.data.txDebugger.mockTransaction' > /tmp/mock_tx.json
ckb-debugger \
--tx-file /tmp/mock_tx.json \
--cell-index 0 \
--cell-type input \
--script-group-type lockinvalid_profile/profile_not_supported: check route support via/capabilitiesrpc_http_error/rpc_error: verify CKB RPC URL (defaulthttp://127.0.0.1:8114)tx_not_found: confirm tx hash and network alignment
# Full matrix: script-group-type (lock/type) x cell-type (input/output) x all indices
scripts/run_tx_debugger_matrix.sh 0x...tx_hash... http://localhost:8100/mainnet
# Focused iteration
SCRIPT_GROUP_TYPES="lock" CELL_TYPES="input" \
scripts/run_tx_debugger_matrix.sh 0x...tx_hash... http://localhost:8100/mainnet
# Keep running after a failing combination
CONTINUE_ON_ERROR=1 \
scripts/run_tx_debugger_matrix.sh 0x...tx_hash... http://localhost:8100/mainnet- Markdown/raw output is handled in frontend only (Vite SPA middleware)
- Direct API JSON under
/api/v1and shared-proxy JSON under/api/{network}/v1are not rewritten to markdown/raw - Static files are not rewritten
- Raw responses include
x-ckbadger-format,x-ckbadger-profile, andx-ckbadger-schema
- Update markdown route parsing in
frontend/lib/ai/markdown-route.tsif markdown coverage changes - Update raw route parsing in
frontend/lib/ai/raw-route.tsif raw coverage changes - Update renderer(s):
frontend/lib/ai/markdown-renderer.tsand/orfrontend/lib/ai/raw-renderer.ts - Update rewrite negotiation in
frontend/lib/ai/markdown-request.tsif format rules change - Update capability/discovery files:
frontend/lib/ai/capabilities.ts,frontend/public/llms.txt, andfrontend/public/llms-full.txt - Add/adjust tests in
frontend/__tests__/lib/markdown-*.test.ts,frontend/__tests__/lib/raw-*.test.ts, andfrontend/__tests__/lib/capabilities.test.ts