Skip to main content
The Helius TypeScript SDK (helius-sdk) makes developing on Solana easier in TypeScript — in Node.js, the browser, or any other runtime. This page covers installing and using the SDK, handling common errors, and where to find the latest documentation. Note the SDK has been rewritten as of version 2.0.0. This was done to use @solana/kit and remove the dependency on @solana/web3.js versions higher than 1.73.2. For those migrating to the latest version, please refer to our migration guide.

GitHub Repository

Official Helius TypeScript SDK for Solana development

Installation

The Helius TypeScript SDK can be installed with any of the following package managers:

Quick Start

Below is a straightforward example of how to use the TypeScript SDK to fetch a list of assets owned by a given address:

Documentation

The examples directory is filled with in-depth code examples covering each method and basic usage, organized by namespace. For API reference documentation, refer to our documentation and the official Solana documentation for general Solana JSON RPC API help. For general help with Kit, please refer to Kit’s documentation.

Error Handling

An error message will be thrown when the API returns a non-success (i.e., 4xx or 5xx status code). For example, below is a 401 thrown for an incorrect getAsset call:

Common Error Codes

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:
This occurs when a request has invalid parameters.
This occurs when an invalid API key is provided or access is restricted due to RPC rules.
This indicates that the user has exceeded the request limit in a given timeframe or is out of credits.
This is a generic error message for server-side issues. Please contact Helius support for assistance.
If you encounter any of these errors:
1

Check error documentation

Refer to Kit’s errors for a list of the errors you may encounter
2

Review the documentation

Refer to the Helius documentation for further guidance
3

Contact support

Reach out to the Helius support team for more detailed assistance

Contributing

We welcome all contributions to our SDKs! Read the contributions guide before opening up a pull request.