solana_kit_helius 0.4.1 copy "solana_kit_helius: ^0.4.1" to clipboard
solana_kit_helius: ^0.4.1 copied to clipboard

Helius client package for Solana Kit Dart.

solana_kit_helius #

pub package docs website CI coverage

Helius client package for Solana Kit Dart. A Dart port of the Helius TypeScript SDK, providing DAS API, enhanced transactions, webhooks, smart transactions, ZK compression, staking, wallet API, WebSocket subscriptions, and auth.

Features #

  • DAS API - Digital Asset Standard methods for querying assets, proofs, and metadata
  • Enhanced Transactions - Parsed transaction history with human-readable types
  • Webhooks - Create, manage, and delete webhook subscriptions
  • Smart Transactions - Optimized transaction building with compute unit estimation and priority fees
  • ZK Compression - Compressed account and token operations via Light Protocol
  • Staking - Create stake, unstake, and withdraw transactions via Helius validators
  • Wallet API - Identity resolution, balances, history, and transfers
  • WebSockets - Real-time subscription support
  • Auth - Project and API key management
  • Priority Fees - Estimate priority fees for transactions
  • RPC V2 - Enhanced RPC methods with pagination

Upstream compatibility #

This package was audited against helius-labs/helius-sdk v3.0.0 at commit 4c0c55b86eab0e3abde7896c0aa23c4b6515e9b0 (chore(release): Update CHANGELOG (#330), 2026-05-30). Helius has not published a Git tag for that release, so this commit is the comparison baseline.

The package covers the broad v3 surface: DAS, priority fees, RPC v2 including getTransfersByAddress, enhanced transactions, webhook CRUD/toggle, ZK compression, staking, wallet operations, Sender/smart transactions, auth/project basics, Admin project usage, and WebSocket subscriptions. The mainnet REST default follows v3's https://api-mainnet.helius-rpc.com/v0 host, while devnet enhanced REST continues to use https://api-devnet.helius.xyz/v0.

Known v3 gaps to port next are the newer auth/checkout/payment primitives including oauthTokenExchange, smart-transaction tip helpers, and enhanced WebSocket account/transaction subscriptions.

Installation #

Install the package directly:

dart pub add solana_kit_helius

If your app uses several Solana Kit packages together, you can also depend on the umbrella package instead:

dart pub add solana_kit

Inside this monorepo, Dart workspace resolution uses the local package automatically.

Documentation #

For architecture notes, getting-started guides, and cross-package examples, start with the workspace docs site and then drill down into the package README and API reference.

Usage #

import 'package:solana_kit_helius/solana_kit_helius.dart';

final helius = createHelius(
  HeliusConfig(apiKey: 'your-api-key'),
);

// DAS API
final asset = await helius.das.getAsset(
  GetAssetRequest(id: 'asset-id'),
);

// Priority fees
final fees = await helius.priorityFee.getPriorityFeeEstimate(
  GetPriorityFeeEstimateRequest(
    accountKeys: ['account-key'],
  ),
);

// Enhanced transactions
final txns = await helius.enhanced.getTransactions(
  GetTransactionsRequest(transactions: ['tx-sig']),
);

Configuration #

// Mainnet (default)
final helius = createHelius(
  HeliusConfig(apiKey: 'your-api-key'),
);

// Devnet
final helius = createHelius(
  HeliusConfig(
    apiKey: 'your-api-key',
    cluster: HeliusCluster.devnet,
  ),
);

// Custom HTTP client (useful for testing)
import 'package:http/http.dart' as http;

final helius = createHelius(
  HeliusConfig(apiKey: 'your-api-key'),
  client: http.Client(),
);

WebSocket security defaults #

HeliusWebSocket enforces wss:// URLs by default. Use allowInsecureWs: true only for local development and controlled tests.

Testing strategy #

The Helius package keeps DTO smoke coverage, but long-term confidence should come from higher-level contracts:

  • shared REST and JSON-RPC client contract tests cover request shaping, headers, query merging, and error mapping
  • endpoint tests focus on user-facing request/response behavior
  • websocket session tests cover subscribe, notification routing, unsubscribe, and close boundaries across concurrent subscriptions

When adding a new Helius surface, prefer extending one of these boundaries before adding large amounts of DTO-only roundtrip coverage.

Example #

Use example/main.dart as a runnable starting point for solana_kit_helius.

  • Import path: package:solana_kit_helius/solana_kit_helius.dart
  • This section is centrally maintained with mdt to keep package guidance aligned.
  • After updating shared docs templates, run docs:update from the repo root.

Maintenance #

  • Validate docs in CI and locally with docs:check.
  • Keep examples focused on one workflow and reference package README sections for deeper API details.
0
likes
150
points
42
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Helius client package for Solana Kit Dart.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

http, solana_kit_codecs_strings, solana_kit_errors, solana_kit_keys, web_socket_channel

More

Packages that depend on solana_kit_helius