Rust implementation of a Hierarchical Deterministic (HD) Wallet generator for 200+ cryptocurrencies.
Beta notice: This project is in active beta testing. APIs, CLI flags, and behavior may change between releases. If you find bugs or compatibility issues, please open an issue or help us fix them — see CONTRIBUTING.md.
This library is a Rust port inspired by the excellent python-hdwallet project. It offers a flexible and scalable solution for developers integrating multi-currency wallet functionality: secure seed generation, robust key management, and streamlined account control across many blockchains.
| Features | Protocols |
|---|---|
| Cryptocurrencies | 200+ (see hdwallet list cryptocurrencies) |
| Entropies | Algorand, BIP39, Electrum-V1, Electrum-V2, Monero |
| Mnemonics | Algorand, BIP39, Electrum-V1, Electrum-V2, Monero |
| Seeds | Algorand, BIP39, Cardano, Electrum-V1, Electrum-V2, Monero |
| Elliptic Curve Cryptography | Kholaw-Ed25519, SLIP10-Ed25519, SLIP10-Ed25519-Blake2b, SLIP10-Ed25519-Monero, SLIP10-Nist256p1, SLIP10-Secp256k1 |
| Hierarchical Deterministic | Algorand, BIP32, BIP44, BIP49, BIP84, BIP86, BIP141, Cardano, Electrum-V1, Electrum-V2, Monero |
| Derivations | BIP44, BIP49, BIP84, BIP86, CIP1852, Custom, Electrum, Monero, HDW |
| Addresses | Algorand, Aptos, Avalanche, Cardano, Cosmos, EOS, Ergo, Ethereum, Filecoin, Harmony, Icon, Injective, Monero, MultiversX, Nano, Near, Neo, OKT-Chain, P2PKH, P2SH, P2TR, P2WPKH, P2WPKH-In-P2SH, P2WSH, P2WSH-In-P2SH, Ripple, Solana, Stellar, Sui, Tezos, Tron, XinFin, Zilliqa |
| Others | BIP38, Wallet Import Format, Serialization |
Published on crates.io. Requires Rust 1.85 or later.
Add to your Cargo.toml:
[dependencies]
rust-hdwallet = "0.1.0-beta"Install the hdwallet command from crates.io:
cargo install rust-hdwallet --version 0.1.0-beta
hdwallet --versionThen run from anywhere:
hdwallet list cryptocurrencies
hdwallet --help[dependencies]
rust-hdwallet = { git = "https://github.com/itsm3abena/rust-hdwallet", tag = "v0.1.0-beta" }Or clone and build locally:
git clone https://github.com/itsm3abena/rust-hdwallet.git
cd rust-hdwallet
cargo build --release
cargo install --path .
cargo run --bin hdwallet -- --helpA simple Bitcoin HD wallet generator:
use std::collections::HashSet;
use rust_hdwallet::hdwallet::consts::PublicKeyTypes;
use rust_hdwallet::hdwallet::derivations::CustomDerivation;
use rust_hdwallet::hdwallet::hdwallet::{HDWallet, HDWalletConfig};
fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut wallet = HDWallet::new(HDWalletConfig {
symbol: "BTC".into(),
hd: "BIP32".into(),
network: "mainnet".into(),
language: "english".into(),
passphrase: Some("talonlab".into()),
public_key_type: PublicKeyTypes::COMPRESSED.into(),
cardano_type: "shelley-icarus".into(),
address_type: None,
mode: "standard".into(),
mnemonic_type: "standard".into(),
checksum: false,
payment_id: None,
staking_public_key: None,
semantic: None,
strict: true,
encoded: true,
})?;
wallet.from_entropy("00000000000000000000000000000000", "BIP39")?;
wallet.from_derivation(
"Custom",
Box::new(CustomDerivation::new(Some("m/0'/0/0-1"), None)?),
)?;
let dump = wallet.dumps(&HashSet::new())?;
println!("{}", serde_json::to_string_pretty(&dump)?);
Ok(())
}The hdwallet CLI lets you generate wallets, derive addresses, and export keys from the terminal in JSON or CSV format.
Full CLI guide with copy-paste test examples: docs/CLI.md
List supported cryptocurrencies:
hdwallet list cryptocurrenciesGenerate a BIP39 mnemonic:
hdwallet generate mnemonic --client BIP39 --words 12Dump wallet keys from a mnemonic (Bitcoin, BIP44):
hdwallet dump \
--symbol BTC \
--hd BIP44 \
--mnemonic "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about"Export multiple derived addresses as JSON:
hdwallet dumps \
--symbol ETH \
--hd BIP44 \
--mnemonic "abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about" \
--format json \
--path "m/44'/60'/0'/0/0-5"Run hdwallet --help or hdwallet dump --help for the full option list.
Fork the repository, clone it locally, and build:
git clone https://github.com/itsm3abena/rust-hdwallet.git
cd rust-hdwallet
cargo buildRun the full test suite:
cargo testRun a specific test module:
cargo test --test hdwallet_hdwallet_bip44We welcome bug reports, feature requests, documentation improvements, and pull requests — especially during this beta phase.
- Open an issue to report bugs or discuss changes before large PRs.
- See CONTRIBUTING.md for setup steps, coding guidelines, and the pull request workflow.
- Help with testing against real wallets, adding cryptocurrency coverage, and improving docs is highly appreciated.
- python-hdwallet — Original Python implementation
- hdwallet.js — TypeScript/JavaScript port
Distributed under the MIT license.