π οΈSDKs
SDKs for building the future of Solana
Last updated
SDKs for building the future of Solana
Last updated
At Helius, we've developed a Node.js and a Rust SDK to make developing on Solana easier. The following page includes information on installing and using these SDKs. It also covers common error handling, where to find the latest documentation, and how to contribute to these SDKs. We also outline a list of unofficial community SDKs made by our wonderful community. Note that those SDKs are not officially maintained by our team β only the Node.js and Rust SDKs are
The Helius Node.js SDK can be installed with any of the following package managers:
Package Manager | Command |
---|---|
Here's a straightforward example of how to use the Node.js SDK to fetch a list of assets owned by a given address:
The README file is filled with in-depth code examples covering each method and basic usage. For API reference documentation, refer to our documentation and the official Solana documentation for general Solana JSON RPC API help.
To start using the Helius Rust SDK in your project, add it as a dependency via cargo
. Open your project's Cargo.toml
and add the following line under [dependencies]
:
where x.y.z
is your desired version. Alternatively, use cargo add helius
to add the dependency directly via the command line. This will automatically find the latest version compatible with your project and add it to your Cargo.toml
.
Remember to run cargo update
regularly to fetch the latest version of the SDK.
Here is a straightforward example of using the Enhanced Transactions API to parse a given transaction:
The latest documentation can be found here on docs.rs. For API reference documentation, refer to our documentation and the official Solana documentation for general Solana JSON RPC API help.
More examples of how to use the SDK can be found in the examples
directory.
An error message will be thrown when the API returns a non-success (i.e., 4xx or 5xx status code). For example:
When working with the Helius SDK, you may encounter several error codes. Below is a table detailing some of the common error codes along with additional information to help you troubleshoot:
If you encounter any of these errors:
Refer to errors.rs
for a list of all possible errors returned by the Helius
client, if using the Rust SDK
Refer to the Helius documentation for further guidance
Reach out to the Helius support team for more detailed assistance
We welcome all contributions to our SDKs! If you're interested, here are our GitHub Repositories:
Interested in contributing to the Helius Rust SDK specifically? Read the following contributions guide before opening up a pull request!
Our amazing community members have also created their own SDKs to interact with our REST APIs. Please note these are not officially maintained by our team. Unofficial community SDKs in other languages include:
Error Code | Error Message | More Information |
---|---|---|
npm install helius-sdk
pnpm install helius-sdk
yarn add helius-sdk
401
Unauthorized
This occurs when an invalid API key is provided or access is restricted due to RPC rules.
429
Too Many Requests
This indicates that the user has exceeded the request limit in a given timeframe or is out of credits.
5XX
Internal Server Error
This is a generic error message for server-side issues. Please contact Helius support for assistance.