From 24fa4c2613e93892310eff255f5324acbf9472de Mon Sep 17 00:00:00 2001 From: Evan <0xIchigo@protonmail.com> Date: Wed, 8 May 2024 11:04:30 -0400 Subject: [PATCH] Change Crate Name to Helius --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 12 ++++++------ examples/get_asset_batch.rs | 10 +++++----- examples/get_asset_proof_batch.rs | 10 +++++----- examples/get_latest_blockhash.rs | 10 +++++----- examples/get_parse_transactions.rs | 10 +++++----- examples/get_parsed_transaction_history.rs | 10 +++++----- examples/get_priority_fee_estimate.rs | 10 +++++----- examples/mint_cnft.rs | 10 +++++----- tests/rpc/test_get_asset.rs | 10 +++++----- tests/rpc/test_get_asset_batch.rs | 10 +++++----- tests/rpc/test_get_asset_proof.rs | 10 +++++----- tests/rpc/test_get_asset_proof_batch.rs | 10 +++++----- tests/rpc/test_get_assets_by_authority.rs | 10 +++++----- tests/rpc/test_get_assets_by_creator.rs | 10 +++++----- tests/rpc/test_get_assets_by_group.rs | 10 +++++----- tests/rpc/test_get_assets_by_owner.rs | 10 +++++----- tests/rpc/test_get_nft_editions.rs | 10 +++++----- tests/rpc/test_get_priority_fee_estimate.rs | 10 +++++----- tests/rpc/test_get_rwa_asset.rs | 10 +++++----- tests/rpc/test_get_signatures_for_asset.rs | 10 +++++----- tests/rpc/test_get_token_accounts.rs | 10 +++++----- tests/rpc/test_search_assets.rs | 10 +++++----- tests/test_client.rs | 6 +++--- tests/test_config.rs | 6 +++--- tests/test_factory.rs | 4 ++-- tests/test_mint_api.rs | 10 +++++----- tests/test_request_handler.rs | 4 ++-- tests/utils/test_deserialize_str_to_number.rs | 2 +- tests/utils/test_is_valid_solana_address.rs | 2 +- tests/utils/test_make_keypairs.rs | 2 +- 32 files changed, 131 insertions(+), 131 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3af55a8..a8a4452 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2025,7 +2025,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "helius_sdk" +name = "helius" version = "0.1.0" dependencies = [ "chrono", diff --git a/Cargo.toml b/Cargo.toml index a4ce608..fd38461 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "helius_sdk" +name = "helius" version = "0.1.0" edition = "2021" description ="An asynchronous Helius Rust SDK for building the future of Solana" diff --git a/README.md b/README.md index f3731a0..d694030 100644 --- a/README.md +++ b/README.md @@ -18,11 +18,11 @@ Remember to run `cargo update` regularly to fetch the latest version of the SDK. ## Usage The SDK needs to be configured with your account's API key, which can be found on the [Helius Developer Dashboard](https://dev.helius.xyz/dashboard/app). The following code is an example of how to use the SDK to fetch info on [Mad Lad #8420](https://xray.helius.xyz/token/F9Lw3ki3hJ7PF9HQXsBzoY8GyE6sPoEZZdXJBsTTD2rk?network=mainnet): ```rust -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::types::{GetAssetResponseForAsset, DisplayOptions}; -use helius_sdk::types::{Cluster, GetAssetRequest}; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::types::{GetAssetResponseForAsset, DisplayOptions}; +use helius::types::{Cluster, GetAssetRequest}; use reqwest::Client; use std::sync::Arc; @@ -84,7 +84,7 @@ If you encounter any of these errors: - Refer to the [Helius documentation](https://docs.helius.dev/) for further guidance - Reach out to the Helius support team for more detailed assistance -## Using the Helius SDK +## Methods Our SDK is designed to provide a seamless developer experience when building on Solana. We've separated the core functionality into various segments: ### DAS API diff --git a/examples/get_asset_batch.rs b/examples/get_asset_batch.rs index 56f2013..97be45b 100644 --- a/examples/get_asset_batch.rs +++ b/examples/get_asset_batch.rs @@ -1,8 +1,8 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::{Asset, Cluster, GetAssetBatch, GetAssetOptions}; -use helius_sdk::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::{Asset, Cluster, GetAssetBatch, GetAssetOptions}; +use helius::Helius; use reqwest::Client; use std::sync::Arc; diff --git a/examples/get_asset_proof_batch.rs b/examples/get_asset_proof_batch.rs index e0cd1b1..0eb3450 100644 --- a/examples/get_asset_proof_batch.rs +++ b/examples/get_asset_proof_batch.rs @@ -1,8 +1,8 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::{AssetProof, Cluster, GetAssetProofBatch}; -use helius_sdk::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::{AssetProof, Cluster, GetAssetProofBatch}; +use helius::Helius; use reqwest::Client; use std::collections::HashMap; diff --git a/examples/get_latest_blockhash.rs b/examples/get_latest_blockhash.rs index 1205ebb..0b672bd 100644 --- a/examples/get_latest_blockhash.rs +++ b/examples/get_latest_blockhash.rs @@ -1,8 +1,8 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; -use helius_sdk::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; +use helius::Helius; use reqwest::Client; use solana_client::client_error::ClientError; diff --git a/examples/get_parse_transactions.rs b/examples/get_parse_transactions.rs index 0027fd0..1c79da5 100644 --- a/examples/get_parse_transactions.rs +++ b/examples/get_parse_transactions.rs @@ -1,8 +1,8 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; -use helius_sdk::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; +use helius::Helius; use reqwest::Client; use std::sync::Arc; diff --git a/examples/get_parsed_transaction_history.rs b/examples/get_parsed_transaction_history.rs index e93ef12..ba7a74e 100644 --- a/examples/get_parsed_transaction_history.rs +++ b/examples/get_parsed_transaction_history.rs @@ -1,8 +1,8 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; -use helius_sdk::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; +use helius::Helius; use std::sync::Arc; #[tokio::main] diff --git a/examples/get_priority_fee_estimate.rs b/examples/get_priority_fee_estimate.rs index 3dd7d0b..52eb901 100644 --- a/examples/get_priority_fee_estimate.rs +++ b/examples/get_priority_fee_estimate.rs @@ -1,8 +1,8 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; -use helius_sdk::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; +use helius::Helius; use std::sync::Arc; #[tokio::main] diff --git a/examples/mint_cnft.rs b/examples/mint_cnft.rs index 74ecf54..ee6474b 100644 --- a/examples/mint_cnft.rs +++ b/examples/mint_cnft.rs @@ -1,8 +1,8 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; -use helius_sdk::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; +use helius::Helius; use serde_json::Value; use std::sync::Arc; diff --git a/tests/rpc/test_get_asset.rs b/tests/rpc/test_get_asset.rs index 26cac77..a5655f6 100644 --- a/tests/rpc/test_get_asset.rs +++ b/tests/rpc/test_get_asset.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_asset_batch.rs b/tests/rpc/test_get_asset_batch.rs index a430d99..902f50b 100644 --- a/tests/rpc/test_get_asset_batch.rs +++ b/tests/rpc/test_get_asset_batch.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::{ +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::{ ApiResponse, Asset, Attribute, Authorities, Cluster, CollectionMetadata, Compression, Content, Creator, File, GetAssetBatch, GetAssetOptions, Group, HeliusEndpoints, Interface, Links, Metadata, Ownership, OwnershipModel, Royalty, RoyaltyModel, Scope, Supply, diff --git a/tests/rpc/test_get_asset_proof.rs b/tests/rpc/test_get_asset_proof.rs index baea5b2..14e11c3 100644 --- a/tests/rpc/test_get_asset_proof.rs +++ b/tests/rpc/test_get_asset_proof.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_asset_proof_batch.rs b/tests/rpc/test_get_asset_proof_batch.rs index ed7a1c2..8e0e1c4 100644 --- a/tests/rpc/test_get_asset_proof_batch.rs +++ b/tests/rpc/test_get_asset_proof_batch.rs @@ -1,11 +1,11 @@ use std::collections::HashMap; use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_assets_by_authority.rs b/tests/rpc/test_get_assets_by_authority.rs index 22387bc..b699795 100644 --- a/tests/rpc/test_get_assets_by_authority.rs +++ b/tests/rpc/test_get_assets_by_authority.rs @@ -1,12 +1,12 @@ -use helius_sdk::config::Config; -use helius_sdk::error::Result; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::{ +use helius::config::Config; +use helius::error::Result; +use helius::rpc_client::RpcClient; +use helius::types::{ ApiResponse, Asset, AssetList, Attribute, Authorities, Cluster, Compression, Content, Creator, File, GetAssetsByAuthority, Group, HeliusEndpoints, Interface, Links, Metadata, Ownership, OwnershipModel, Royalty, RoyaltyModel, Scope, Supply, }; -use helius_sdk::Helius; +use helius::Helius; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_assets_by_creator.rs b/tests/rpc/test_get_assets_by_creator.rs index 50f8863..4fed6f7 100644 --- a/tests/rpc/test_get_assets_by_creator.rs +++ b/tests/rpc/test_get_assets_by_creator.rs @@ -1,12 +1,12 @@ -use helius_sdk::config::Config; -use helius_sdk::error::Result; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::{ +use helius::config::Config; +use helius::error::Result; +use helius::rpc_client::RpcClient; +use helius::types::{ ApiResponse, Asset, AssetList, Attribute, Authorities, Cluster, Compression, Content, Creator, File, GetAssetsByCreator, Group, HeliusEndpoints, Interface, Links, Metadata, Ownership, OwnershipModel, Royalty, RoyaltyModel, Scope, Supply, }; -use helius_sdk::Helius; +use helius::Helius; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_assets_by_group.rs b/tests/rpc/test_get_assets_by_group.rs index d804698..d00522e 100644 --- a/tests/rpc/test_get_assets_by_group.rs +++ b/tests/rpc/test_get_assets_by_group.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_assets_by_owner.rs b/tests/rpc/test_get_assets_by_owner.rs index fe129d5..94d0fc6 100644 --- a/tests/rpc/test_get_assets_by_owner.rs +++ b/tests/rpc/test_get_assets_by_owner.rs @@ -1,12 +1,12 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::{ +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::{ ApiResponse, Asset, AssetList, Attribute, Authorities, Cluster, Compression, Content, Creator, File, GetAssetsByOwner, Group, HeliusEndpoints, Interface, Links, Metadata, Ownership, OwnershipModel, Royalty, RoyaltyModel, Scope, Supply, }; -use helius_sdk::Helius; +use helius::Helius; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_nft_editions.rs b/tests/rpc/test_get_nft_editions.rs index cb2f636..b31fa17 100644 --- a/tests/rpc/test_get_nft_editions.rs +++ b/tests/rpc/test_get_nft_editions.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_priority_fee_estimate.rs b/tests/rpc/test_get_priority_fee_estimate.rs index bd61ea6..118cb2e 100644 --- a/tests/rpc/test_get_priority_fee_estimate.rs +++ b/tests/rpc/test_get_priority_fee_estimate.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_rwa_asset.rs b/tests/rpc/test_get_rwa_asset.rs index 8a80406..ef4994e 100644 --- a/tests/rpc/test_get_rwa_asset.rs +++ b/tests/rpc/test_get_rwa_asset.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_signatures_for_asset.rs b/tests/rpc/test_get_signatures_for_asset.rs index d6a8b13..ce48927 100644 --- a/tests/rpc/test_get_signatures_for_asset.rs +++ b/tests/rpc/test_get_signatures_for_asset.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_get_token_accounts.rs b/tests/rpc/test_get_token_accounts.rs index 6be4a17..a5f446c 100644 --- a/tests/rpc/test_get_token_accounts.rs +++ b/tests/rpc/test_get_token_accounts.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/rpc/test_search_assets.rs b/tests/rpc/test_search_assets.rs index cae0cd7..2863dfc 100644 --- a/tests/rpc/test_search_assets.rs +++ b/tests/rpc/test_search_assets.rs @@ -1,12 +1,12 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::{ +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::{ ApiResponse, Asset, AssetList, Attribute, Authorities, Cluster, Compression, Content, Creator, File, Group, HeliusEndpoints, Interface, Links, Metadata, Ownership, OwnershipModel, Royalty, RoyaltyModel, Scope, SearchAssets, Supply, }; -use helius_sdk::Helius; +use helius::Helius; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/test_client.rs b/tests/test_client.rs index cea36be..ade901c 100644 --- a/tests/test_client.rs +++ b/tests/test_client.rs @@ -1,6 +1,6 @@ -use helius_sdk::client::Helius; -use helius_sdk::error::Result; -use helius_sdk::types::Cluster; +use helius::client::Helius; +use helius::error::Result; +use helius::types::Cluster; #[test] fn test_creating_new_client_success() { diff --git a/tests/test_config.rs b/tests/test_config.rs index c131cba..7429c57 100644 --- a/tests/test_config.rs +++ b/tests/test_config.rs @@ -1,6 +1,6 @@ -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::types::Cluster; +use helius::config::Config; +use helius::error::HeliusError; +use helius::types::Cluster; #[test] fn test_config_new_with_empty_api_key() { diff --git a/tests/test_factory.rs b/tests/test_factory.rs index 6889cdd..13bf2a5 100644 --- a/tests/test_factory.rs +++ b/tests/test_factory.rs @@ -1,5 +1,5 @@ -use helius_sdk::types::Cluster; -use helius_sdk::{Helius, HeliusFactory}; +use helius::types::Cluster; +use helius::{Helius, HeliusFactory}; #[test] fn test_factory_create_devnet_instance() { diff --git a/tests/test_mint_api.rs b/tests/test_mint_api.rs index 0316834..5d49499 100644 --- a/tests/test_mint_api.rs +++ b/tests/test_mint_api.rs @@ -1,10 +1,10 @@ use std::sync::Arc; -use helius_sdk::client::Helius; -use helius_sdk::config::Config; -use helius_sdk::error::HeliusError; -use helius_sdk::rpc_client::RpcClient; -use helius_sdk::types::*; +use helius::client::Helius; +use helius::config::Config; +use helius::error::HeliusError; +use helius::rpc_client::RpcClient; +use helius::types::*; use mockito::{self, Server}; use reqwest::Client; diff --git a/tests/test_request_handler.rs b/tests/test_request_handler.rs index 4f08c0b..d80ebbc 100644 --- a/tests/test_request_handler.rs +++ b/tests/test_request_handler.rs @@ -1,5 +1,5 @@ -use helius_sdk::error::{HeliusError, Result}; -use helius_sdk::request_handler::RequestHandler; +use helius::error::{HeliusError, Result}; +use helius::request_handler::RequestHandler; use mockito::{self, Server}; use reqwest::{Client, Method}; diff --git a/tests/utils/test_deserialize_str_to_number.rs b/tests/utils/test_deserialize_str_to_number.rs index 6df4ad5..5875e7b 100644 --- a/tests/utils/test_deserialize_str_to_number.rs +++ b/tests/utils/test_deserialize_str_to_number.rs @@ -1,6 +1,6 @@ use std::fmt; -use helius_sdk::utils::deserialize_str_to_number; +use helius::utils::deserialize_str_to_number; use serde::{Deserialize, Serialize}; use serde_json::Number; diff --git a/tests/utils/test_is_valid_solana_address.rs b/tests/utils/test_is_valid_solana_address.rs index 6846f85..4be62be 100644 --- a/tests/utils/test_is_valid_solana_address.rs +++ b/tests/utils/test_is_valid_solana_address.rs @@ -1,4 +1,4 @@ -use helius_sdk::utils::is_valid_solana_address; +use helius::utils::is_valid_solana_address; #[test] fn test_valid_addresses() { diff --git a/tests/utils/test_make_keypairs.rs b/tests/utils/test_make_keypairs.rs index 3be7921..28c20ab 100644 --- a/tests/utils/test_make_keypairs.rs +++ b/tests/utils/test_make_keypairs.rs @@ -1,4 +1,4 @@ -use helius_sdk::utils::make_keypairs; +use helius::utils::make_keypairs; use solana_sdk::{signature::Keypair, signer::Signer}; use std::collections::HashSet;