indexer
Installation
SKILL.md
Contains Shell Commands
This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.
Midnight Indexer Skill
The Midnight Indexer exposes a GraphQL API that indexes everything the chain produces: blocks, transactions, contract actions, and UTXO events. It is the only way to read public on-chain state from a DApp frontend.
Primary references:
docs.midnight.network/api-reference/midnight-indexer— official v4 API referencegithub.com/midnightntwrk/midnight-indexer/blob/v4.0.1/indexer-api/graphql/schema-v4.graphql— authoritative schemamidnight.tsinwebisoftSoftware/1AM-starter-template— real-world patched implementation
1) Endpoints
| Network | HTTP (queries/mutations) | WebSocket (subscriptions) |
|---|---|---|
undeployed (local) |
http://localhost:8088/api/v3/graphql |
ws://localhost:8088/api/v3/graphql/ws |
preview |
https://indexer.preview.midnight.network/api/v4/graphql |
wss://indexer.preview.midnight.network/api/v4/graphql/ws |
preprod |
https://indexer.preprod.midnight.network/api/v4/graphql |
wss://indexer.preprod.midnight.network/api/v4/graphql/ws |
mainnet |
https://indexer.mainnet.midnight.network/api/v4/graphql |
wss://indexer.mainnet.midnight.network/api/v4/graphql/ws |