Skip to main content
Getting onchain data into a database still means writing plumbing: RPC pagination and rate limits, ABI decoding, reorg cleanup, resume logic after a crash. Pipes SDK removes that layer. It is a TypeScript library: you describe the events you care about, and a pipe streams them from SQD Portal into your database, decoded, typed, and kept consistent through reorgs. The 1.0 line is available on npm today, under the beta tag.

What you can do with it

  • Backfill years of history and keep following the chain head, with the same pipe.
  • Write decoded events to ClickHouse, Postgres, BigQuery, or Parquet files.
  • Run the same pipeline shape on EVM chains and Solana, on any network in the Portal roster.
  • Test the whole pipeline in CI, without network access.
This is a complete program. It prints live USDC transfers:
Swapping console.log for a database is one more component. The target keeps the write position and cleans up reorged rows on its own.

Get started

To start from a generated project, run pnpx @subsquid/pipes-cli@beta init, or follow the EVM quickstart or the Solana quickstart.
Upgrading from the 0.1.x betas or an earlier 1.0 alpha? See Upgrading from the betas.

What’s new in 1.0

1.0 rebuilds the internals around correctness: every target now recovers cleanly from crashes and reorgs. BigQuery and Parquet join ClickHouse and Postgres as built-in destinations. New tooling covers testing, local development, and tracing, and the EVM and Solana documentation has been rewritten against the new API.
EVM and Solana are documented. The package also includes Hyperliquid, Tron, and Bitcoin sources, with tested examples in the repository.

Where it fits

A single pipe backfills history and then follows the chain head. The ClickHouse target rolls back reorged rows on its own, and the latency watcher measures data freshness against your RPC providers. There is no rate-limit handling, log pagination, or reorg cleanup left to write.
The BigQuery target writes through Storage Write API committed streams and confines reorg deletes to a bounded block range, with partitioning and clustering DDL generated from your table declarations. The Parquet target produces immutable, finalized-only files named by block range. DuckDB, Spark, Athena, and ClickHouse’s s3() read them directly, and recovery regenerates files deterministically instead of deduplicating.
The Drizzle target writes each batch in a transaction and advances the cursor with it, so an API reading the database never observes a half-applied block. Tables are plain Drizzle schemas, typed from the decoded events. pipes init generates the full setup.
A pipe is a plain async iterator. With the logger and profiler disabled it runs inside any Node.js process, with no side services. The mock portal makes pipe logic testable in CI, and the dev runner keeps a multi-pipe local setup in one terminal.
The pipeline shape is the same on every chain. Replacing evmPortalStream and evmEventDecoder with solanaPortalStream and solanaInstructionDecoder leaves the rest of the pipe unchanged, including the target. Decoders combine into reusable modules, and one Portal account covers the full network roster.

Upgrading from the betas

The renames in 1.0 are hard — the old names are removed, without deprecated aliases — so the compiler points at each call site, and stored state migrates on its own. The migration guide covers both paths: from the 0.1.x betas and from earlier 1.0 alphas.
  • Sources are now evmPortalStream / solanaPortalStream, the EVM decoder is evmEventDecoder, and the factory helper is contractFactory with a childAddressField option and a contractFactorySqliteStore store. The previous names (evmPortalSource, evmDecoder, factory, factorySqliteDatabase) are removed — the migration guide has the full rename tables.
  • Target cursors are keyed by the pipe’s source id instead of the legacy 'stream' key. Existing state rows migrate automatically on first resume; pin the old key by setting the target’s state id (settings.id for ClickHouse, settings.state.id for Drizzle).
  • Releases are published with npm Trusted Publishing. Every artifact carries a verifiable SLSA provenance attestation.

FAQ

Not yet. The 1.0 line is published as a beta: npm i @subsquid/pipes@beta installs it. The API is what 1.0 will ship, and the migration below is the one you need — but pin @beta until the stable release, which will be announced separately.
No. Squid SDK remains the choice for self-contained indexing services in the style of TheGraph, Ponder, or Envio, such as a GraphQL API backed by its own database. Pipes SDK streams Portal data into a stack you already own. See Why Pipes SDK? for the comparison.
EVM chains and Solana are documented. Hyperliquid, Tron, and Bitcoin sources are included with tested examples. Any dataset served by SQD Portal is reachable.
Code needs mechanical renames — 1.0 removes the old names, and the compiler flags every call site. Stored cursors and target state migrate automatically, and the CLI generates code on the new names. The migration guide is the checklist.
The EVM quickstart or the Solana quickstart. Release notes are on GitHub.
We post announcements here and in our Telegram community. Questions? Get in touch.