Aleo Rust SDK
A comprehensive Rust SDK for interacting with the Aleo blockchain. Provides tools for account management, program loading, local execution, proof generation, network querying, and transaction broadcasting.
Note: The official ProvableHQ/aleo-rust has been deprecated (archived). This SDK fills the gap with an up-to-date implementation using snarkVM's latest APIs and the current v2/testnet JSON-RPC endpoints.
Architecture
| Module | Purpose |
|---|---|
account |
Key chain: PrivateKey → ViewKey → ComputeKey → Address |
program |
Load, parse, and inspect Aleo programs |
execution |
Authorize, execute, prove, and package transactions |
network |
HTTP client for Aleo v2 JSON-RPC and REST endpoints |
client |
High-level AleoClient orchestrating the full lifecycle |
Quick Start
use ;
use TestRng;
async
Examples
| Example | Description |
|---|---|
testnet_query |
Query testnet: block height, state root, program info (no key needed) |
testnet_transfer |
Full pipeline: authorize → execute → prove → broadcast credits transfer |
simple_execute |
Minimal workflow: load program, execute locally (dry-run) |
Run an example:
# Query testnet state (no private key required)
# Full transfer (requires PRIVATE_KEY env var)
# Local dry-run execution
License
Licensed under either of MIT or Apache-2.0 at your option.