Skip to content

Commit 2ee12d5

Browse files
authored
Merge pull request #132 from helius-labs/dev
[Merge] Dev -> Main
2 parents e709812 + b8d487c commit 2ee12d5

20 files changed

Lines changed: 856 additions & 803 deletions

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "helius"
3-
version = "0.2.6"
3+
version = "0.3.0"
44
edition = "2021"
55
description = "An asynchronous Helius Rust SDK for building the future of Solana"
66
keywords = ["helius", "solana", "asynchronous-sdk", "das", "cryptocurrency"]
@@ -17,10 +17,9 @@ bincode = "1.3.3"
1717
chrono = { version = "0.4.11", features = ["serde"] }
1818
futures = "0.3.30"
1919
futures-util = "0.3.30"
20-
mpl-token-metadata = { version = "5.0.0-beta.0" }
2120
phf = { version = "0.11.2", features = ["macros"] }
2221
rand = "0.8.5"
23-
reqwest = { version = "0.11.22", default-features = false }
22+
reqwest = { version = "0.11.22", features = ["json"], default-features = false }
2423
semver = "1.0.23"
2524
serde = "1.0.198"
2625
serde-enum-str = "0.4.0"
@@ -37,6 +36,7 @@ tokio-stream = "0.1.15"
3736
tokio-tungstenite = "0.24.0"
3837
url = "2.5.0"
3938
spl-token = { version = "6.0", features = ["no-entrypoint"] }
39+
once_cell = "1.21.3"
4040

4141
[dev-dependencies]
4242
mockito = "1.4.0"

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Helius Blockchain Technologies, Inc.
3+
Copyright (c) 2025 Helius Blockchain Technologies, Inc.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,6 @@ Our SDK is designed to provide a seamless developer experience when building on
115115
- [`get_token_accounts`](https://docs.helius.dev/compression-and-das-api/digital-asset-standard-das-api/get-token-accounts) - Gets information about all token accounts for a specific mint or owner
116116
- [`get_nft_edition`](https://docs.helius.dev/compression-and-das-api/digital-asset-standard-das-api/get-nft-editions) - Gets all the NFT editions associated with a specific master NFT
117117

118-
### Mint API (Deprecated)
119-
- [`delegate_collection_authority`](https://github.com/helius-labs/helius-rust-sdk/blob/6d3630c5fbafaaf450302789251ffaeed3cf7fcc/src/mint_api.rs#L24-L59) - Delegates collection authority to a new authority for a given collection mint
120-
- [`mint_compressed_nft`](https://docs.helius.dev/compression-and-das-api/deprecated-mint-api) - The easiest way to mint a compressed NFT (cNFT)
121-
- [`revoke_collection_authority`](https://github.com/helius-labs/helius-rust-sdk/blob/6d3630c5fbafaaf450302789251ffaeed3cf7fcc/src/mint_api.rs#L61-L93) - Revokes a delegated collection authority for a given collection mint
122-
123118
### Enhanced Transactions API
124119
- [`parse_transactions`](https://docs.helius.dev/solana-apis/enhanced-transactions-api/parse-transaction-s) - Parses transactions given an array of transaction IDs
125120
- [`parsed_transaction_history`](https://docs.helius.dev/solana-apis/enhanced-transactions-api/parsed-transaction-history) - Retrieves a parsed transaction history for a specific address

examples/delegate_and_revoke_collection_authority.rs

Lines changed: 0 additions & 140 deletions
This file was deleted.

examples/mint_cnft.rs

Lines changed: 0 additions & 47 deletions
This file was deleted.

examples/send_smart_transaction_with_tip.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ async fn main() {
4848
};
4949

5050
// Send the optimized transaction with a 10k lamport tip using the New York region's API URL
51+
#[allow(deprecated)]
5152
match helius
5253
.send_smart_transaction_with_tip(config, Some(10000), Some("NY"))
5354
.await

src/client.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use crate::config::Config;
44
use crate::error::{HeliusError, Result};
55
use crate::rpc_client::RpcClient;
66
use crate::types::Cluster;
7-
use crate::websocket::{EnhancedWebsocket, ENHANCED_WEBSOCKET_URL};
7+
use crate::websocket::EnhancedWebsocket;
88

99
use reqwest::Client;
1010
use solana_client::nonblocking::rpc_client::RpcClient as AsyncSolanaRpcClient;
@@ -106,10 +106,11 @@ impl Helius {
106106
ping_interval_secs: Option<u64>,
107107
pong_timeout_secs: Option<u64>,
108108
) -> Result<Self> {
109-
let config: Arc<Config> = Arc::new(Config::new(api_key, cluster)?);
109+
let config: Arc<Config> = Arc::new(Config::new(api_key, cluster.clone())?);
110110
let client: Client = Client::builder().build().map_err(HeliusError::ReqwestError)?;
111111
let rpc_client: Arc<RpcClient> = Arc::new(RpcClient::new(Arc::new(client.clone()), config.clone())?);
112-
let wss: String = format!("{}{}", ENHANCED_WEBSOCKET_URL, api_key);
112+
113+
let wss: String = EnhancedWebsocket::get_url(&cluster, api_key)?;
113114
let ws_client: Arc<EnhancedWebsocket> =
114115
Arc::new(EnhancedWebsocket::new(&wss, ping_interval_secs, pong_timeout_secs).await?);
115116

src/config.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use crate::error::{HeliusError, Result};
22
use crate::rpc_client::RpcClient;
33
use crate::types::{Cluster, HeliusEndpoints, MintApiAuthority};
4-
use crate::websocket::{EnhancedWebsocket, ENHANCED_WEBSOCKET_URL};
4+
use crate::websocket::EnhancedWebsocket;
55
use crate::Helius;
66
use reqwest::Client;
77
use solana_client::nonblocking::rpc_client::RpcClient as AsyncSolanaRpcClient;
@@ -108,7 +108,7 @@ impl Config {
108108
let client: Client = Client::builder().build().map_err(HeliusError::ReqwestError)?;
109109
let rpc_client: Arc<RpcClient> = Arc::new(self.rpc_client_with_reqwest_client(client.clone())?);
110110

111-
let wss: String = format!("{}{}", ENHANCED_WEBSOCKET_URL, self.api_key);
111+
let wss: String = EnhancedWebsocket::get_url(&self.cluster, &self.api_key)?;
112112
let ws_client: Arc<EnhancedWebsocket> =
113113
Arc::new(EnhancedWebsocket::new(&wss, ping_interval_secs, pong_timeout_secs).await?);
114114

@@ -144,7 +144,7 @@ impl Config {
144144
let async_solana_client = Arc::new(AsyncSolanaRpcClient::new(rpc_url.to_string()));
145145

146146
// Setup websocket
147-
let wss: String = format!("{}{}", ENHANCED_WEBSOCKET_URL, self.api_key);
147+
let wss: String = EnhancedWebsocket::get_url(&self.cluster, &self.api_key)?;
148148
let ws_client: Arc<EnhancedWebsocket> =
149149
Arc::new(EnhancedWebsocket::new(&wss, ping_interval_secs, pong_timeout_secs).await?);
150150

0 commit comments

Comments
 (0)