Skip to main content

Overview

This document provides an overview of the Sablier APIs, which consist of two main components: the GraphQL indexers and the Merkle API. These components are essential for accessing and managing data within the Sablier ecosystem.

GraphQL Indexers

The Sablier smart contracts do not inherently provide a structured way to access data. With multiple contract versions deployed on the blockchain, accessing data in a unified manner can be challenging. To address this, we integrated two data indexing services: The Graph and Envio. These services act as middleware, enabling data unification, caching, and querying through a GraphQL-based API.

Source Code

The source code for both The Graph and Envio is open-source and available in this GitHub repository:

Sablier IndexersData indexers for the Sablier Protocol

The Graph

The Graph offers infrastructure for indexing EVM events through GraphQL API endpoints known as 'subgraphs'. It has been the vendor of choice in the EVM space since Sablier Legacy's launch in 2019. Our latest products use new implementations of these subgraphs, which are documented in subsequent sections. Note that each chain has its own subgraphs.

Envio

Envio is a modern, fast, and flexible tool for accessing onchain data.

Its HyperIndex service provides a GraphQL-based API for accessing cached data, which is then served to our client interfaces. Envio indexers mirror the GraphQL API of The Graph subgraphs, offering a fallback in case of issues with The Graph. Unlike The Graph, Envio's indexers are chain-agnostic, with a single GraphQL indexer for each Sablier protocol.

Merkle API

For the Airdrops product, we created a backend service to streamline Merkle tree generation, essential for creating blockchain airdrops. This API handles the validation, creation, and management of Merkle trees, defining eligibility and claiming rules for airdrop campaigns.

The service is open-source and can be used by integrators as a plug-and-play solution for deploying their own campaigns. Learn more about the Merkle API service in its dedicated section.

Sablier: Merkle APIMerkle API for the Sablier Protocol