Getting Started
Installation
Install the helius-sdk package using your favorite package manager.
npm install helius-sdk pnpm add helius-sdk yarn add 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 SDKimport { 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 SDKconst client = new Helius(apiKey, 'devnet') // or 'mainnet-beta'// import the Helius SDKimport { Helius } from 'helius-sdk'
// Get your API key from https://dev.helius.xyz/const apiKey = '<your-api-key>'
// Instantiate the Helius SDKconst client = new Helius(apiKey, 'devnet') // or 'mainnet-beta'