Easily create sinks for your Substreams.
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.
- 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?
- Updates like native ESM support, and Bun and Deno compatibility.
- Continual updates as the technology evolves.
- 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: