Boost Your Blockchain Data Streaming with the Substreams-Sink Library

Substreams Sep 18, 2023 No Comments

Easily create sinks for your Substreams.

Join Charles, a back-end developer at Pinax, as he shows you how to boost your sink development using our Substreams-Sink Library.

What is a sink for Substreams?

A sink is where you can send blockchain data coming from Substreams.

How does a sink work?

Developers can use sinks to send data extracted from a blockchain to a specific application. A sink can route data anywhere. The possibilities are endless.

Send data to:

  • SQL databases, NoSQL databases like MongoDB, KB storage sinks for Redis, ElasticSearch, and any other type of database.
  • A chat platform, like Discord, Telegram, or Slack, by creating a bot that sends messages containing blockchain data on a specific channel.
  • A messaging queue solution like RabbitMQ or Kafka. 
  • Prometheus or VictoriaMetrics.
  • And more!

Why use the Substreams-Sink Library?

The library makes it easy for you to create your own sinks in Typescript. Many of the sinks share similar boilerplate code, and this is why we created the library, but there are many benefits to using it.

Key features:

  • Eliminates redundant code
  • Offers built-in command line options
  • Manages cursors seamlessly
  • Provides Prometheus metrics

Watch the video to see Charles effortlessly create a sink in TypeScript, printing blockchain data straight into a text file in less than 50 lines of code.

What’s next for the Substream-Sink Library?

  1. Updates like native ESM support, and Bun and Deno compatibility.
  2. Continual updates as the technology evolves.
  3. More sinks, of course.

Create your own sink

Now that you know how simple it is, we invite you to use the library to create your own sinks!

Find all you need here: 

👉 Substreams-sink GitHub repo

👉 NPM package

No Comments

Leave a comment

Your email address will not be published. Required fields are marked *