Skip to content

Commit 98bf433

Browse files
authored
Merge pull request #177 from helius-labs/chore/1.0.0-cleanup
chore(release): Prep For 1.0.0
2 parents f4d316e + 31e74f6 commit 98bf433

3 files changed

Lines changed: 252 additions & 29 deletions

File tree

CHANGELOG.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,29 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66

77
## [Unreleased]
88

9+
## [1.0.0] - 2026-03-11
10+
911
### Added
1012
- `HeliusBuilder` for flexible client configuration (custom timeouts, TLS, connection settings)
13+
- ZK Compression support: 20+ new RPC methods for compressed accounts, token accounts, balances, proofs, and signatures
14+
- Wallet API support: identity, balances, transfers, transaction history, and funding source endpoints
1115
- `llms.txt` for improved AI discoverability
1216
- `AGENTS.md` and `CLAUDE.md` contributing guides for AI agents
1317
- GitHub issue templates for bug reports and feature requests
1418
- Extensive doc comments and code documentation across the codebase
15-
- Wallet API support: identity, balances, transfers, transaction history, and funding source endpoints
19+
- Migration guide (`MIGRATION.md`) for upgrading from 0.x to 1.0
1620

1721
### Changed
1822
- **Breaking**: Client creation is now handled via `HeliusBuilder::new()` for advanced configuration; `Helius::new()`, `Helius::new_async()`, and `Helius::new_with_url()` remain available as convenience constructors
23+
- **Breaking**: `Config.api_key` changed from `String` to `Option<ApiKey>` with type-safe validation
1924
- Improved SOL to lamports conversion with overflow and precision validation
2025

2126
### Removed
22-
- Deprecated Jito methods that were previously marked with `#[deprecated]`
27+
- **Breaking**: Deprecated Jito methods removed (`add_tip_instruction`, `create_smart_transaction_with_tip`, `send_jito_bundle`, `get_bundle_statuses`, `send_smart_transaction_with_tip`, `send_smart_transaction_with_seeds_and_tip`); use Helius Sender instead
28+
- **Breaking**: Removed 5 legacy constructors (`new_with_commitment`, `new_with_async_solana`, `new_with_async_solana_and_commitment`, `new_with_ws`, `new_with_ws_with_timeouts`); use `HeliusBuilder` instead
29+
30+
### Fixed
31+
- `UiTransactionEncoding` variants now serialize correctly as lowercase (`"json"`, `"jsonParsed"`) instead of PascalCase (`"Json"`, `"JsonParsed"`)
2332

2433
## [0.5.1] - 2026-01-19
2534

@@ -170,7 +179,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
170179
- Integration test suite using `mockito`
171180
- GitHub Actions CI workflow
172181

173-
[Unreleased]: https://github.com/helius-labs/helius-rust-sdk/compare/v0.5.1...HEAD
182+
[Unreleased]: https://github.com/helius-labs/helius-rust-sdk/compare/v1.0.0...HEAD
183+
[1.0.0]: https://github.com/helius-labs/helius-rust-sdk/compare/v0.5.1...v1.0.0
174184
[0.5.1]: https://github.com/helius-labs/helius-rust-sdk/compare/v0.5.0...v0.5.1
175185
[0.5.0]: https://github.com/helius-labs/helius-rust-sdk/compare/v0.4.1...v0.5.0
176186
[0.4.1]: https://github.com/helius-labs/helius-rust-sdk/compare/v0.3.2...v0.4.1

MIGRATION.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This guide covers the breaking changes in the Helius Rust SDK 1.0 release and ho
1010
- **`Config.api_key` is now `Option<ApiKey>`**: Type-safe API key with validation
1111
- **`new()` is still synchronous**: No `.await` needed for basic clients
1212
- **`new_async()` is async**: Only the WebSocket constructor requires `.await`
13+
- **Jito methods removed**: Use Helius Sender instead
14+
- **`UiTransactionEncoding` serialization fixed**: Variants now serialize as lowercase (`"json"`, `"jsonParsed"`)
1315

1416
## Constructor Changes
1517

@@ -111,6 +113,45 @@ let helius = HeliusBuilder::new()
111113
.await?;
112114
```
113115

116+
## Jito Methods Removed
117+
118+
All Jito methods (deprecated in 0.3.0) have been removed. Use Helius Sender instead:
119+
120+
| Removed Method | Replacement |
121+
|---|---|
122+
| `add_tip_instruction(...)` | Not needed — Helius Sender handles fees automatically |
123+
| `send_jito_bundle(...)` | `send_smart_transaction_with_sender(config, options).await?` |
124+
| `get_bundle_statuses(...)` | Check transaction status via `connection().get_signature_statuses(...)` |
125+
| `create_smart_transaction_with_tip(...)` | `create_smart_transaction(config).await?` |
126+
| `send_smart_transaction_with_tip(...)` | `send_smart_transaction_with_sender(config, options).await?` |
127+
| `send_smart_transaction_with_seeds_and_tip(...)` | `send_smart_transaction_with_seeds_and_sender(config, options).await?` |
128+
129+
```rust
130+
// Before (0.x) — Jito
131+
let sig = helius.send_smart_transaction_with_tip(config, None, Some(50_000)).await?;
132+
133+
// After (1.0) — Helius Sender
134+
use helius::types::SendOptions;
135+
let sig = helius.send_smart_transaction_with_sender(config, Some(SendOptions {
136+
skip_preflight: true,
137+
..Default::default()
138+
})).await?;
139+
```
140+
141+
## UiTransactionEncoding Serialization Fix
142+
143+
`UiTransactionEncoding` variants now serialize as lowercase camelCase to match the Solana RPC spec. If you were passing raw encoding strings to work around this bug, you can now use the enum directly:
144+
145+
```rust
146+
// Before (0.x) — enum serialized incorrectly ("Json", "JsonParsed")
147+
// You may have used raw strings as a workaround
148+
149+
// After (1.0) — enum serializes correctly ("json", "jsonParsed")
150+
use helius::types::UiTransactionEncoding;
151+
let encoding = UiTransactionEncoding::Json; // serializes as "json"
152+
let encoding = UiTransactionEncoding::JsonParsed; // serializes as "jsonParsed"
153+
```
154+
114155
## Quick Find-and-Replace
115156

116157
For most codebases, these replacements will cover the migration:

llms.txt

Lines changed: 198 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
url: https://github.com/helius-labs/helius-rust-sdk
3-
last_updated: 2026-02-19
3+
last_updated: 2026-03-11
44
---
55

66
# Helius Rust SDK
@@ -31,6 +31,9 @@ Use the Helius Rust SDK when you need to:
3131
- Send transactions with ultra-low latency via Helius Sender
3232
- Set up webhooks for on-chain events (sales, transfers, swaps)
3333
- Stream real-time blockchain data via Enhanced WebSockets
34+
- Look up wallet identity, balances, transfers, and funding sources
35+
- Work with ZK compressed accounts and tokens
36+
- Stake SOL, unstake, and withdraw via the Helius validator
3437
- Make RPC calls on Solana's most performant infrastructure
3538
- Build high-performance Rust backends for Solana applications
3639

@@ -39,7 +42,7 @@ Use the Helius Rust SDK when you need to:
3942
Add to your `Cargo.toml`:
4043
```toml
4144
[dependencies]
42-
helius = "0.5"
45+
helius = "1.0"
4346
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
4447
```
4548

@@ -67,34 +70,99 @@ async fn main() -> Result<()> {
6770

6871
## Examples Directory
6972

70-
The `examples/` directory contains working code samples for SDK features:
73+
The `examples/` directory contains working code samples organized by feature:
7174

7275
```
7376
examples/
74-
├── get_asset_batch.rs # DAS API: batch asset fetching
75-
├── get_asset_proof_batch.rs # DAS API: Merkle proofs for cNFTs
76-
├── get_transactions_for_address.rs # RPC: transaction history
77-
├── get_transactions_for_address_with_filters.rs # RPC: filtered tx history
78-
├── get_priority_fee_estimate.rs # RPC: priority fee estimation
79-
├── get_program_accounts_v2.rs # RPC V2: paginated program accounts
80-
├── get_token_accounts_by_owner_v2.rs # RPC V2: paginated token accounts
81-
├── get_all_program_accounts.rs # Auto-paginating program accounts
82-
├── get_all_token_accounts_by_owner.rs # Auto-paginating token accounts
83-
├── send_smart_transaction_with_seeds.rs # Helius Sender: thread-safe transactions
84-
├── create_webhook.rs # Webhook creation
85-
├── edit_webhook.rs # Webhook modification
86-
├── delete_webhook.rs # Webhook deletion
87-
├── get_all_webhooks.rs # List webhooks
88-
├── enhanced_websocket_transactions.rs # WebSocket: transaction streaming
89-
├── enhanced_websocket_accounts.rs # WebSocket: account streaming
90-
├── get_parse_transactions.rs # Enhanced: parse transactions
91-
└── get_parsed_transaction_history.rs # Enhanced: parsed tx history
77+
├── das/ # DAS API (Digital Asset Standard)
78+
│ ├── get_asset_batch.rs # Batch asset fetching
79+
│ ├── get_asset_proof_batch.rs # Merkle proofs for cNFTs
80+
│ ├── get_all_program_accounts.rs # Auto-paginating program accounts
81+
│ └── get_all_token_accounts_by_owner.rs # Auto-paginating token accounts
82+
├── enhanced/ # Enhanced transaction parsing
83+
│ ├── get_parse_transactions.rs # Parse transactions by signature
84+
│ ├── get_parsed_transaction_history.rs # Parsed tx history for address
85+
│ ├── get_transactions_for_address.rs # Transaction history
86+
│ └── get_transactions_for_address_with_filters.rs # Filtered tx history
87+
├── helius/ # Helius-specific RPC methods
88+
│ ├── async_config_based_creation.rs # HeliusBuilder usage
89+
│ ├── get_priority_fee_estimate.rs # Priority fee estimation
90+
│ ├── get_program_accounts_v2.rs # RPC V2: paginated program accounts
91+
│ └── get_token_accounts_by_owner_v2.rs # RPC V2: paginated token accounts
92+
├── solana/ # Standard Solana RPC
93+
│ ├── get_latest_blockhash.rs # Sync blockhash fetch
94+
│ └── get_latest_blockhash_async.rs # Async blockhash fetch
95+
├── transactions/ # Smart transactions & Helius Sender
96+
│ └── send_smart_transaction_with_seeds.rs # Thread-safe transaction sending
97+
├── wallet/ # Wallet API
98+
│ ├── get_wallet_identity.rs # Wallet identity lookup
99+
│ ├── get_batch_wallet_identity.rs # Batch identity lookup
100+
│ ├── get_wallet_balances.rs # Token & NFT balances
101+
│ ├── get_wallet_history.rs # Transaction history with deltas
102+
│ ├── get_wallet_transfers.rs # Token transfer activity
103+
│ └── get_wallet_funding_source.rs # Original funding source
104+
├── webhooks/ # Webhook CRUD
105+
│ ├── create_webhook.rs # Create webhook
106+
│ ├── edit_webhook.rs # Modify webhook
107+
│ ├── delete_webhook.rs # Delete webhook
108+
│ ├── get_all_webhooks.rs # List webhooks
109+
│ ├── get_webhook_by_id.rs # Get webhook by ID
110+
│ ├── append_address_to_webhook.rs # Add address to webhook
111+
│ └── remove_address_from_webhook.rs # Remove address from webhook
112+
├── websockets/ # Enhanced WebSocket streaming
113+
│ ├── enhanced_websocket_transactions.rs # Transaction streaming
114+
│ └── enhanced_websocket_accounts.rs # Account streaming
115+
└── zk_compression/ # ZK Compression
116+
├── get_compressed_account.rs # Fetch compressed account
117+
├── get_compressed_token_balances.rs # Compressed token balances
118+
└── get_validity_proof.rs # Validity proof for transactions
92119
```
93120

94121
Run examples: `cargo run --example get_asset_batch`
95122

96123
Browse examples: https://github.com/helius-labs/helius-rust-sdk/tree/dev/examples
97124

125+
## Client Construction
126+
127+
### Basic Constructors
128+
129+
```rust
130+
// Sync client (no WebSocket, no async Solana)
131+
let helius = Helius::new("api-key", Cluster::MainnetBeta)?;
132+
133+
// Async client with WebSocket + async Solana + confirmed commitment
134+
let helius = Helius::new_async("api-key", Cluster::MainnetBeta).await?;
135+
136+
// Custom RPC URL, no API key required
137+
let helius = Helius::new_with_url("http://localhost:8899")?;
138+
```
139+
140+
### HeliusBuilder
141+
142+
Fine-grained control over client configuration:
143+
144+
```rust
145+
use helius::HeliusBuilder;
146+
use helius::types::Cluster;
147+
use solana_commitment_config::CommitmentConfig;
148+
149+
let helius = HeliusBuilder::new()
150+
.with_api_key("your-key")?
151+
.with_cluster(Cluster::MainnetBeta)
152+
.with_async_solana()
153+
.with_commitment(CommitmentConfig::confirmed())
154+
.with_websocket(Some(5), Some(15)) // custom ping/pong timeouts
155+
.build()
156+
.await?;
157+
158+
// Custom RPC endpoint
159+
let helius = HeliusBuilder::new()
160+
.with_custom_url("https://my-rpc-provider.com/")?
161+
.with_api_key("optional-key")?
162+
.build()
163+
.await?;
164+
```
165+
98166
## Core Capabilities
99167

100168
### DAS API (Digital Asset Standard)
@@ -347,7 +415,7 @@ Stream real-time blockchain data via Helius Enhanced WebSockets.
347415

348416
```rust
349417
// Create client with WebSocket support
350-
let helius = Helius::new_with_ws("api_key", Cluster::MainnetBeta).await?;
418+
let helius = Helius::new_async("api_key", Cluster::MainnetBeta).await?;
351419

352420
// Subscribe to transactions
353421
let ws = helius.ws()?;
@@ -375,11 +443,115 @@ let balance = helius.connection().get_balance(&pubkey)?;
375443
let blockhash = helius.connection().get_latest_blockhash()?;
376444
let slot = helius.connection().get_slot()?;
377445

378-
// Asynchronous client (use new_with_async_solana)
379-
let helius = Helius::new_with_async_solana("api_key", Cluster::MainnetBeta)?;
446+
// Asynchronous client (use HeliusBuilder or new_async)
447+
let helius = Helius::new_async("api_key", Cluster::MainnetBeta).await?;
380448
let balance = helius.async_connection()?.get_balance(&pubkey).await?;
381449
```
382450

451+
### Wallet API
452+
453+
Look up wallet identity, balances, transfer activity, and funding sources.
454+
455+
```rust
456+
// Get wallet identity (exchanges, protocols, etc.)
457+
let identity = helius.get_wallet_identity("wallet_address").await?;
458+
println!("{}: {}", identity.name, identity.category);
459+
460+
// Batch identity lookup (up to 100 addresses)
461+
let identities = helius.get_batch_wallet_identity(&addresses).await?;
462+
463+
// Get token & NFT balances sorted by USD value
464+
let balances = helius.get_wallet_balances(
465+
"wallet_address",
466+
Some(1), // page
467+
Some(100), // limit
468+
Some(false), // show_zero_balance
469+
Some(true), // show_native (SOL)
470+
Some(true), // show_nfts
471+
).await?;
472+
println!("Portfolio: ${}", balances.total_usd_value);
473+
474+
// Transaction history with balance changes
475+
let history = helius.get_wallet_history(
476+
"wallet_address",
477+
Some(50), // limit
478+
None, // before (pagination cursor)
479+
None, // after
480+
Some("SWAP".to_string()), // transaction_type filter
481+
Some("balanceChanged".to_string()),// token_accounts filter
482+
).await?;
483+
484+
// Token transfer activity
485+
let transfers = helius.get_wallet_transfers("wallet_address", Some(50), None).await?;
486+
487+
// Original funding source analysis
488+
let funding = helius.get_wallet_funding_source("wallet_address").await?;
489+
println!("Funded by: {} with {} SOL", funding.funder, funding.amount);
490+
```
491+
492+
### ZK Compression
493+
494+
Work with ZK compressed accounts and tokens for up to 1000x cost savings on-chain storage.
495+
496+
```rust
497+
use helius::types::{GetCompressedAccountRequest, GetCompressedTokenBalancesByOwnerRequest};
498+
499+
// Get a compressed account by hash
500+
let account = helius.get_compressed_account(GetCompressedAccountRequest {
501+
hash: Some("account_hash".to_string()),
502+
..Default::default()
503+
}).await?;
504+
505+
// Get compressed token balances for a wallet
506+
let balances = helius.get_compressed_token_balances_by_owner(
507+
GetCompressedTokenBalancesByOwnerRequest {
508+
owner: "wallet_address".to_string(),
509+
..Default::default()
510+
},
511+
).await?;
512+
513+
// Get a validity proof for building transactions
514+
let proof = helius.get_validity_proof(GetValidityProofRequest {
515+
hashes: Some(vec!["hash1".to_string()]),
516+
..Default::default()
517+
}).await?;
518+
519+
// Get compressed token accounts by owner or delegate
520+
let token_accounts = helius.get_compressed_token_accounts_by_owner(request).await?;
521+
let delegated = helius.get_compressed_token_accounts_by_delegate(request).await?;
522+
523+
// Get Merkle proof for a compressed account
524+
let proof = helius.get_compressed_account_proof(request).await?;
525+
526+
// Check indexer health
527+
let healthy = helius.get_indexer_health().await?;
528+
```
529+
530+
### Staking
531+
532+
Create, delegate, unstake, and withdraw stake accounts via the Helius validator.
533+
534+
```rust
535+
use solana_sdk::pubkey::Pubkey;
536+
537+
// Create and delegate a stake account (returns unsigned tx + stake account pubkey)
538+
let (unsigned_tx, stake_pubkey) = helius.create_stake_transaction(owner_pubkey, 1.0).await?;
539+
540+
// Deactivate a stake account (returns unsigned tx; ~2 epoch cooldown)
541+
let unsigned_tx = helius.create_unstake_transaction(owner_pubkey, stake_pubkey).await?;
542+
543+
// Withdraw from a fully cooled-down stake account (returns unsigned tx)
544+
let unsigned_tx = helius.create_withdraw_stake_transaction(
545+
owner_pubkey,
546+
stake_pubkey,
547+
destination_pubkey,
548+
lamports,
549+
).await?;
550+
551+
// Get all stake accounts for a wallet
552+
let stake_accounts = helius.get_stake_accounts(owner_pubkey).await?;
553+
```
554+
383555
## Key Types
384556

385557
```rust
@@ -479,11 +651,11 @@ tokio::spawn(async move {
479651
```toml
480652
# Default: native TLS (OpenSSL)
481653
[dependencies]
482-
helius = "0.5"
654+
helius = "1.0"
483655

484656
# Alternative: rustls (pure Rust, no OpenSSL dependency)
485657
[dependencies]
486-
helius = { version = "0.5", default-features = false, features = ["rustls"] }
658+
helius = { version = "1.0", default-features = false, features = ["rustls"] }
487659
```
488660

489661
## Plans and Rate Limits

0 commit comments

Comments
 (0)