- Covalent adds support for Solana to its API Reference Get token balances for address endpoint, bringing the industry-leading unified API experience to tens of thousands of developers in the Solana ecosystem.
- API Reference Get token balances for address enables developers to fetch token balances including NFTs for any wallet address on Solana with a single API call.
- With this new data, developers can include Solana assets in multi-chain crypto wallets, NFT galleries and more.
- Covalent has submitted a patch, and once approved will have a 90% replica of all historical on-chain data, meaning; mints, transactions, and everything else that has happened since the genesis block.
Table Of Contents
Over the past 4 years, Covalent has been laser-focused on pushing the Web3 space forward. Hundreds of projects on the 26+ blockchains that we support, rely on Covalent for their indexing and querying services. The magic of Covalent is the single parameter
chain_id that can be used to query data from the 26+ blockchains we support.
Our vision for entering the Solana ecosystem is to empower developers to build more compelling end-user applications, many of them as of yet undiscovered. Covalent is the tool that enables one billion possibilities, by providing all blockchain data in one place in a standardized and easy-to-read format.
Solana is the fastest blockchain on the market, focused on scaling applications to support adoption while keeping costs at a minimum. Since the summer of 2021, the new blockchain for indexing our community requested most frequently is Solana. Typically, we can index a blockchain end-to-end in a matter of weeks, so why has it taken so long to add support when the demand has been insatiable?
The Road to Solana
Indexing Solana is no easy task. We’ve been able to index 26+ blockchains so far, but they all had a critical piece of underlying architecture in common… the EVM.
The Ethereum Virtual Machine (EVM) is the execution engine initially invented for the Ethereum blockchain. The EVM is now an industry staple for all popular smart-contract blockchains. The top blockchains we’ve indexed - Polygon, Avalanche and Fantom are all EVM based.
Solana is THE first non-EVM blockchain we’re adding support for. 😘
What makes Solana different?
Solana is what we call a non-EVM chain, meaning the underlying function is not like any of the blockchains we’ve indexed to date. Solana’s unique architecture makes it faster and cheaper than other blockchains, but it also means that we have to make adjustments to export the data in a way that matches our standards.
Imagine walking into a grocery store that you shop at regularly. If you visit a grocery store from the same chain in a different city, it’s still generally set up the same way and you know how to navigate it.
Now, imagine you’re in an entirely different country. The stores here are all unique, and the labels are in a different language. It takes you a little longer to find your usual groceries in this case.
This is the difference between EVM chains and non-EVM chains.
In the case of Solana, we’re now familiar with the new store layout and we’ve learned the language on the labels. Starting with the balances endpoint as we are today is just step one in the journey to provide granular, historical, on-chain data for Solana side-by-side the other 26+ chains we index.
The Covalent API is battle-tested by tens of thousands of developers across hundreds of applications. Currently, developers have access to Solana data through API Reference getTokenAccountsByOwner RPC endpoints, but Covalent goes above and beyond the RPC layer to fetch both current and historical data on token holders, robust transactions, NFT metadata and market data, and more.
The developer experience with Covalent will never require users to write complex and time-consuming indexing code to extract data. Rather, the developer experience should remain unchanged even as we expand to more non-EVM chains. We believe in doing the heavy lifting to enable the lightest and fastest user experience. Make things easy for developers and WAGMI. 💪
Quote from Ganesh Swami, Covalent CEO & Co-founder
How we enhance Solana data
The API Reference getTokenAccountsByOwner RPC endpoint is a fantastic start. For context, there is no equivalent endpoint on Ethereum that can get all of the tokens within a user wallet.
However, the response from the RPC endpoint is not that useful in practice. In fact, it can be quite painful to make this data useful. We’ve taken these challenges off of developers and instead have provided solutions that together lead to a smooth developer experience. Eg:
- NFT Metadata - The RPC response from a Solana node only returns the NFTs, but not their metadata. There are two additional calls a developer will have to make before being able to render the image or show details about the NFT.
- Token pricing - We’ve mapped most of the common tokens back to their Ethereum counterparts. We will be developing a Solana-native pricing engine for assets that live exclusively on this blockchain.
- Matching Slots and Blocks - The RPC response only returns the current slot for a transaction, but not all slots have blocks. We have a special data worker that can additionally do this mapping for developers.
- Token logos - We return token logos for the most popular token on Solana
Admittedly, there’s a lot more work to do. This is just the beginning.
How to get started
Simply use the
endpoint with a
Our engineering team is currently blocked by a patch we’ve developed to extract data from Solana nodes. This patch is necessary to get all historical on-chain data. This means that users will be able to see mints, transactions, and everything else that has happened since the genesis block.
We will soon support Solana in all of our Class A endpoints, matching our high standard of rich, clean, and formatted blockchain data. Once Class A endpoints are supported, developers will be able to solve use-cases that have previously been untouched due to their need for historical data, for example, taxation tools, analytics across various time ranges, and detailed information on token holders and token transfers are some of the ways that we will go deeper than the RPC layer to give developers an advantage with their applications.
In the coming weeks, we will release a code template for building a wallet on Solana. These templates, which can be found on our Replit, are an easy way for anyone to get started and modify an existing project into something unique!
Here are some links for further exploration:
Covalent provides the industry-leading Unified API bringing visibility to billions of Web3 data points. Developers use Covalent to build exciting multi-chain applications like crypto wallets, NFT galleries, and investor dashboard tools utilizing data from 32+ blockchains. Covalent is trusted by a community of 27,000+ developers and powers data for 1000+ applications including 0x, Zerion, Rainbow Wallet, Rotki, Bitski and many others.