Two TypeScript SDKs for blockchain data. One batteries-included framework, one composable library — both powered by Portal.
Powered by Portal →Two paths from the same data source. One optimized for correctness, the other for throughput.
See where each SDK excels — and where the other is the better choice.
Squid SDK generates a full GraphQL API from your schema — zero extra setup.
Define your schema, get a production GraphQL API automatically.
// 1. Define your schema — Squid generates the API
// schema.graphql:
// type Transfer @entity {
// id: ID!
// from: String!
// to: String!
// value: BigInt!
// block: Int!
// }
import { EvmBatchProcessor } from '@subsquid/evm-processor'
import { TypeormDatabase } from '@subsquid/typeorm-store'
import { Transfer } from './model' // auto-generated from schema
import * as erc20 from './abi/erc20'
const processor = new EvmBatchProcessor()
.setPortal('https://portal.sqd.dev/datasets/ethereum-mainnet')
.addLog({
address: ['0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48'],
topic0: [erc20.events.Transfer.topic],
})
processor.run(new TypeormDatabase(), async (ctx) => {
for (const block of ctx.blocks) {
for (const log of block.logs) {
const { from, to, value } = erc20.events.Transfer.decode(log)
await ctx.store.insert(new Transfer({
id: log.id, from, to, value,
block: block.header.height,
}))
}
}
})
// GraphQL API is live at localhost:4350/graphql
// Query: { transfers(where: { from_eq: "0x..." }) { to, value } }Pipes writes raw data — you build the API layer yourself.
import { evmPortalSource, evmDecoder, defineAbi } from '@subsquid/pipes'
import erc20Abi from './abi/erc20.json'
const abi = defineAbi(erc20Abi)
const source = evmPortalSource({
portal: 'https://portal.sqd.dev/datasets/ethereum-mainnet',
outputs: evmDecoder({
events: { transfers: abi.events.Transfer },
}),
})
source.pipeTo(pgTarget({ table: 'transfers' }))
// No built-in API — you'd add Express, Fastify, or
// any framework on top of the database yourself.
// This is fine if you already have an API layer,
// but more work if you're starting from scratch.Both are production-grade TypeScript tools. The right choice depends on your architecture and deployment needs.
Answer a few questions to get a recommendation.
Production-grade indexing with auto-generated GraphQL, built-in PostgreSQL, and managed cloud deployment.
Stream data from 200+ chains via SQD Portal with automatic real-time + historical coverage.
High-performance batch processing engine. Backfill historical data at tens of thousands of blocks per second.
Define your schema, get a production-ready GraphQL API served automatically. No extra setup.
Built-in PostgreSQL persistence with TypeORM entities and automatic schema migrations.
Index data from EVM, Solana, Substrate, and Fuel virtual machines with dedicated processors.
One-command deployment with sqd deploy. Managed infrastructure, scaling, and monitoring.
Configure, scaffold, deploy, and manage indexers from the SQD CLI.
Fully open-source framework. Modify and extend as needed.
Lightweight, flexible data pipelines with any database target and zero codegen overhead.
Same blazing-fast Portal data source. Consistent, validated data across 200+ networks.
Chain transforms with .pipe() and write to any target with .pipeTo(). Functional, readable, testable.
PostgreSQL, ClickHouse, MongoDB, SQLite, Parquet, or build your own custom target.
Use defineAbi() to get typed events directly from JSON ABIs. Zero build steps, instant type safety.
Track dynamically created contracts (DEX pools, tokens) with built-in factory support.
Production-grade observability. Export metrics to Grafana, Datadog, or any monitoring stack.
Local development dashboard for monitoring pipeline progress, metrics, and debugging.
npx pipes init — scaffold a project with templates, custom contracts, and ready-to-run code.
Both SDKs consume data from SQD Portal — the fastest way to access validated blockchain data across 200+ networks. No archive nodes, no rate limits.
Pick an SDK and have a working indexer running locally.
Private Portal. Dedicated. Validated. Managed. Tell us what you're building — we'll show you what it looks like on SQD.