| Crates.io | aleph-sdk |
| lib.rs | aleph-sdk |
| version | 0.4.0 |
| created_at | 2025-12-22 14:44:50.985945+00 |
| updated_at | 2026-01-23 16:28:28.796745+00 |
| description | Aleph Cloud SDK for client applications. |
| homepage | https://github.com/aleph-im/aleph-rs |
| repository | https://github.com/aleph-im/aleph-rs |
| max_upload_size | |
| id | 1999800 |
| size | 70,166 |
A Rust SDK to interact with Aleph Cloud.
The Aleph Cloud SDK provides a Rust async API to interact with Aleph Cloud. This SDK is currently in development and only supports a minimal set of features:
Add the following to your Cargo.toml:
[dependencies]
aleph-sdk = { git = "https://github.com/aleph-im/aleph-rs" }
aleph-types = { git = "https://github.com/aleph-im/aleph-rs" }
use aleph_sdk::AlephClient;
use aleph_types::message::Post;
use aleph_types::item_hash;
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let client = AlephClient::new("https://api2.aleph.im")?;
// In this example, we fetch a message from the network.
let item_hash = item_hash!("f3862cf9d3ad73a9e82b1c56fed12627ec51c6d2a1e3189ab3ef289642711b3e");
let message = client.get_message(item_hash).await?;
Ok(())
}
#[tokio::main]
use aleph_sdk::client::{AlephClient, MessageFilter};
use aleph_types::item_hash;
async fn main() -> anyhow::Result<()> {
let client = AlephClient::new("https://api2.aleph.im")?;
let address = address!("0x1234567890123456789012345678901234567890");;
let message_filter = MessageFilter {address: Some(address), ..Default::default()};
// Fetch all messages sent by the given address.
let messages = client.get_messages(message_filter).await?;
Ok(())
}