#algorand #sdk


A Rusty sdk for the Algorand blockchain

2 unstable releases

0.2.0 Apr 23, 2021
0.1.0 Mar 26, 2021

#109 in Crypto scams

MIT license

6.5K SLoC

Rust algonaut

Crate Docs GitHub license Continuous integration

Rust algonaut aims at becoming a rusty SDK for Algorand. Please, be aware that this crate is a work in progress.

use algonaut::core::MicroAlgos;
use algonaut::transaction::{Pay, Txn};
use algonaut::{Algod, Kmd};
use dotenv::dotenv;
use std::env;
use std::error::Error;

fn main() -> Result<(), Box<dyn Error>> {
    // load variables in .env

    // kmd manages wallets and accounts
    let kmd = Kmd::new()

    // first we obtain a handle to our wallet
    let list_response = kmd.list_wallets()?;
    let wallet_id = match list_response
        .find(|wallet| wallet.name == "unencrypted-default-wallet")
        Some(wallet) => wallet.id,
        None => return Err("Wallet not found".into()),
    let init_response = kmd.init_wallet_handle(&wallet_id, "")?;
    let wallet_handle_token = init_response.wallet_handle_token;
    println!("Wallet Handle: {}", wallet_handle_token);

    // an account with some funds in our sandbox
    let from_address = env::var("ACCOUNT")?.parse()?;
    println!("Sender: {:#?}", from_address);

    println!("Receiver: {:#?}", to_address);

    // algod has a convenient method that retrieves basic information for a transaction
    let algod = Algod::new()

    let params = algod.transaction_params()?;

    // we are ready to build the transaction
    let t = Txn::new()
        .last_valid(params.last_round + 10)

    // we need to sign the transaction to prove that we own the sender address
    let sign_response = kmd.sign_transaction(&wallet_handle_token, "", &t)?;

    // broadcast the transaction to the network
    let send_response = algod.raw_transaction(&sign_response.signed_transaction)?;

    println!("Transaction ID: {}", send_response.tx_id);



  • Example-driven API development
  • Async requests
  • Builder pattern and sensible defaults
  • Modularity
  • Clear error messages
  • Thorough test suite
  • Comprehensive documentation


algonaut has a modular structure and is composed of multiple crates.

  • algonaut_client contains clients for algod, kmd, and indexer RPC APIs.
  • algonaut_core defines core structures for Algorand like: Address, Round, MicroAlgos, etc.
  • algonaut_crypto contains crypto utilities such as: ed25519 and mnemonics.
  • algonaut_encoding implements encoding utility functions such as serde visitors.
  • algonaut_transaction support developers in building all kinds of Algorand transactions.


  • algonaut_teal will add validators, templates, and dryrun helpers.


Read the changelog for more details.


Do you want to help with the development? Please find out how by reading our contributions guidelines.


This crate is based on the work of @mraof.


Licensed under MIT license. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, shall be licensed as above, without any additional terms or conditions.


~359K SLoC