The processes
- The processor — the main Node.js process. It pulls blockchain data, runs your transformation code, and writes results through a store. All indexing logic lives here.
- A database — usually PostgreSQL (via the TypeORM store); file datasets and BigQuery are alternatives.
- A GraphQL server (optional) — a separate process that serves the indexed data from PostgreSQL.
The data flow
The processor is configured with a data source — where blocks come from and which data items and fields to fetch (see the Tron processor). Filtering happens upstream: the SQD Network sends only the requested items with only the requested fields, in chunks covering thousands of blocks. Each chunk arrives at your batch handler as a context object:ctx.blocks— the block slice with the requested data items;ctx.store— the persistence interface, bound to the current database transaction;- a head flag telling you whether the squid has caught up with the chain.