Skip to content

Getting Started

Installation

Install the helius-sdk package using your favorite package manager.

npm install helius-sdk

Getting Started

Import the Helius class from the helius-sdk package and instantiate it with your API key and the desired cluster. The Helius SDK is available for the ‘devnet’ and ‘mainnet-beta’ clusters.

// import the Helius SDK
import { Helius } from 'helius-sdk'
// Get your API key from https://dev.helius.xyz/
const apiKey = process.env['HELIUS_API_KEY'] ?? '<your-api-key>'
// Instantiate the Helius SDK
const client = new Helius(apiKey, 'devnet') // or 'mainnet-beta'