
By Basement
Basement gives developers performant and easy access to onchain data in as little as a few lines of code, using SQL and GraphQL.
Basement aims to help kickstart a developer community for Stellar Soroban, using our fast and easy-to-use SQL and GraphQL APIs. Available within Basement’s free tier, for a testnet and its mainnet once ready. Indexing can be an expensive and time-consuming task. We assume crypto startups spend on average at least one FTE in engineering costs for their data pipelines. This data is essential to build business logic and interfaces for protocols. Basement reduces this to as little as a few lines of code, saving engineering teams tons of time. This time can now be dedicated to work on product features instead.
An indexer extracts and transforms historical and real-time data from a blockchain and converts that to a format or a set of APIs more suitable for developing applications. Indexers are crucial because execution layer nodes are optimized for write performance, resulting in slow response times when reading large sets of data. Basement connects this data to warehouses such as Postgres and Parquet, which are more suited for reading data on a large scale.
There are three different indexers we're building here: - Tip of the chain: To keep data real-time, we'll leverage the getLedgerEntries and getEvents RPC methods to extract new data and store that in our data warehouses used by the SQL/GraphQL API. - Archival: To verify state and backfill historical data, we'll build a service that parses history_archive files from Tier 1 validators. This data will then be transformed to our custom schemas and loaded into our data warehouses. Developers can then query these through SQL and GraphQL APIs in a performant way, without having to sift through these files themselves. - Custom primitives: Some events, such as TokenTransfers, are stored in a different table, with indices on common fields. Because these events are commonly queried, we want to make sure developers can query them without having to parse these themselves.
With SQL, developers can query transactions, events, and decoded data. With the click of a button, these queries can be turned into production-grade RESTful endpoints. SQL is well-suited for advanced analytics of on-chain interactions. Our customers on other chains use this to measure usage of their protocol, build graphs, and classify potential users based on activity. The entities that will be available through SQL are Transactions, Events, TokenTransfers, and TokenContracts. These entities can be queried through a PostgreSQL-flavored query language, using our SQL IDE available on basement.dev.
All entities in SQL will be available in GraphQL as well. GraphQL is better suited for quick data access directly in a builder's app or interface and is easy to use through our JavaScript SDK. GraphQL also offers other quality-of-life improvements, such as batch querying contract state such as Balances and Name Services, automatically decoding XDRs when available, and paginated data for easy integration into any interface.
$12.1K

