Crates.io | selene-helius-sdk |
lib.rs | selene-helius-sdk |
version | 0.3.2 |
source | src |
created_at | 2024-02-18 19:46:03.338245 |
updated_at | 2024-04-23 14:45:56.069834 |
description | Rust implementation of the Helius API & RPC |
homepage | https://github.com/dougEfresh/selene-helius-sdk |
repository | https://github.com/dougEfresh/selene-helius-sdk |
max_upload_size | |
id | 1144345 |
size | 231,892 |
Async library for helius API & RPC
use color_eyre::Result;
use selene_helius_sdk::api::das::GetAssetsByOwnerParams;
use selene_helius_sdk::HeliusBuilder;
#[tokio::main]
async fn main() -> Result<()> {
let api_key = std::env::var("HELIUS_API_KEY").expect("env HELIUS_API_KEY is not defined!");
let helius = HeliusBuilder::new(&api_key).build()?;
let result = helius
.get_assets_by_owner(&GetAssetsByOwnerParams {
owner_address: "86xCnPeV69n6t3DnyGvkKobf9FdN2H9oiVDdaMpo2MMY".to_string(),
..Default::default()
})
.await?;
println!("total: {}", result.total);
for asset in result.items {
println!("{}", asset.id);
}
Ok(())
}
The package needs to be configured with your account's API key, which is available in the Helius Dashboard.
API reference documentation is available at docs.helius.dev.
Endpoint | Status |
---|---|
getAsset | ✓ |
getAssetBatch | ✓ |
getAssetProof | ✓ |
getAssetProofBatch | ✓ |
getAssetsByOwner | ✓ |
getAssetsByAuthority | ✓ |
getAssetsByCreator | ✓ |
getAssetsByGroup | ✗ |
searchAssets | ✓ |
getSignaturesForAsset | ✗ |
getTokenAccounts | ✓ |
getPriorityFeeEstimate | ✓ |
Endpoint | Status |
---|---|
transactions | ✓ |
history | ✗ |
Endpoint | Status |
---|---|
create-webhook | ✓ |
get-all-webhooks | ✓ |
get-webhook | ✓ |
edit-webhook | ✓ |
delete-webhook | ✓ |
appendAddressesToWebhook | ✓ |
Endpoint | Status |
---|---|
mintCompressedNft | ✗ |
delegateCollectionAuthority | ✗ |
revokeCollectionAuthority() | ✗ |
getMintlist | ✗ |
See examples directory for various ways to use the library
HELIUS_API_KEY=<mykey> cargo run --example get_assets
To run tests you need to export or create a .env
file with the HELIUS_API_KEY
HELIUS_API_KEY=mykey cargo test
There's an example telegram bot which can create webooks and send solana activity to your telegram channel
Inspired by sync library for helius, https://github.com/bgreni/helius-rust-sdk