Skip to main content
The Helius TypeScript SDK provides type-safe methods for all Helius APIs, making it the fastest way for agents to interact with Solana.
  • Package: helius-sdk (npm / pnpm / yarn)
  • Version: 2.x (uses @solana/kit, not @solana/web3.js)
  • Runtime: Any JavaScript runtime — browsers, Deno, Bun, edge runtimes (Cloudflare Workers, Vercel Edge), Node.js 20+
  • TypeScript: 5.8+ (full type definitions included)
  • License: ISC

Installation

npm install helius-sdk

Quick Start

import { createHelius } from "helius-sdk";

const helius = createHelius({
  apiKey: "YOUR_API_KEY",
  network: "mainnet", // or "devnet"
});

// Get all NFTs and tokens owned by a wallet
const assets = await helius.getAssetsByOwner({
  ownerAddress: "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
  page: 1,
  limit: 50,
});

// Get transaction history (with token account activity)
const txs = await helius.getTransactionsForAddress([
  "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY",
  { limit: 100, transactionDetails: "full", filters: { tokenAccounts: "balanceChanged" } },
]);

// Send a transaction via Helius Sender (ultra-low latency)
const sig = await helius.tx.sendTransactionWithSender({
  instructions: [transferInstruction],
  signers: [walletSigner],
  region: "US_EAST",
});

Client Options

const helius = createHelius({
  apiKey: "YOUR_API_KEY",       // Required for webhooks, enhanced txs, wallet API
  network: "mainnet",           // "mainnet" (default) or "devnet"
  baseUrl: "https://custom..",  // Override RPC URL (optional)
  rebateAddress: "wallet",      // Wallet for RPC rebates (optional)
  userAgent: "my-agent/1.0",   // Sent as X-Helius-Client header (optional)
});

Namespaces

All methods are accessed through the helius client. DAS API methods and standard Solana RPC methods are available directly on helius.*. Other functionality is organized into namespaces:
NamespaceAccessPurpose
DAS APIhelius.getAsset(), helius.getAssetsByOwner(), etc.Query NFTs, tokens, compressed assets
RPC V2helius.getTransactionsForAddress(), helius.getProgramAccountsV2()Enhanced RPC with pagination and filters
Transactionshelius.tx.*Smart transactions and Helius Sender
Enhancedhelius.enhanced.*Parse transactions into human-readable format
Webhookshelius.webhooks.*Create and manage webhook subscriptions
WebSocketshelius.ws.*Real-time blockchain data streams
Stakinghelius.stake.*Stake SOL to Helius validator
ZK Compressionhelius.zk.*Compressed accounts and proofs
Wallet APIhelius.wallet.*Balances, history, identity lookups
Standard RPChelius.getBalance(), helius.getSlot(), etc.All standard Solana RPC methods via proxy
Raw RPChelius.rawDirect access to the underlying @solana/kit Rpc client
Authimport { makeAuthClient } from "helius-sdk/auth/client"Agent signup and API key management (standalone import)

Programmatic Signup (Auth Module)

The auth module is a standalone import — it is not on the main HeliusClient. Use it for programmatic agent signup flows.
import { makeAuthClient } from "helius-sdk/auth/client";

const auth = makeAuthClient();

// All-in-one shortcut:
const result = await auth.agenticSignup({ secretKey: keypair.secretKey });
// result: { jwt, walletAddress, projectId, apiKey, endpoints, credits }

// Or step-by-step:
const keypair = await auth.generateKeypair();
const address = await auth.getAddress(keypair);
const { message, signature } = await auth.signAuthMessage(keypair.secretKey);
const { token } = await auth.walletSignup(message, signature, address);
const project = await auth.createProject(token);
const apiKey = await auth.createApiKey(token, project.id, address);

Deep Dives

Resources