npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@abernatskiy/hybrid-pipes-streams

v0.0.1

Published

Core package of the SQD Pipes ecosystem that provides specialized streams for blockchain data consumption.

Downloads

12

Readme

@sqd-pipes/streams

Core package of the SQD Pipes ecosystem that provides specialized streams for blockchain data consumption.

Overview

This package offers a collection of stream implementations for different blockchain platforms:

  • Stream Abstractions: Provides a common interface for consuming blockchain data via the Subsquid Portal
  • Chain-Specific Implementations: Includes specialized streams for Solana and EVM blockchains
  • State Management: Utilities for tracking stream progress and handling checkpoints

Unlike a general-purpose stream processing library, this package is specifically designed for consuming and processing blockchain-specific data types like swaps, liquidity events, and token metadata.

Key Components

Core Functionality

  • PortalAbstractStream: Base abstract class for all blockchain data streams
  • State management interfaces for tracking progress
  • Error handling and retry mechanisms

Solana Streams

  • SolanaSwapsStream: For collecting DEX swap events (Orca, Raydium, Meteora)
  • SolanaLiquidityStream: For tracking liquidity events
  • MetaplexTokenStream and PumpfunTokenStream: For token metadata

EVM Streams

  • EVMSwapsStream: For collecting Ethereum and EVM DEX swap events

Installation

yarn add @sqd-pipes/streams

Usage

Solana Swaps Example

import { SolanaSwapsStream, ClickhouseState } from "@sqd-pipes/streams";

// Create a state manager for checkpointing
const clickhouseState = new ClickhouseState(client, {
  table: "sync_status",
  id: "my_indexer",
});

// Initialize the swaps stream for specific DEXes
const stream = new SolanaSwapsStream({
  portal: "https://v2.archive.subsquid.io/datasets/solana-mainnet",
  blockRange: {
    from: 12345678,
  },
  args: {
    type: ["orca_whirlpool", "raydium_amm"],
  },
  state: clickhouseState,
  logger,
});

// Process the stream data
for await (const swaps of await stream.stream()) {
  // Each swap contains details like tokens, amounts, block info
  console.log(`Processing ${swaps.length} swaps`);
  
  // After processing, update the checkpoint
  await stream.ack();
}

State Management

The package provides state management interfaces:

  • ClickhouseState: Stores checkpoint data in ClickHouse
  • In-memory state tracking for development and testing

State management handles critical functionality like:

  • Resuming from the last processed block
  • Handling blockchain reorganizations (forks)
  • Tracking indexer progress

Error Handling

The streams include built-in error handling for common blockchain data issues:

  • Network connectivity problems
  • Chain reorganizations
  • Rate limiting

License

MIT