| Crates.io | rustywallet |
| lib.rs | rustywallet |
| version | 0.1.2 |
| created_at | 2025-12-31 15:52:19.590887+00 |
| updated_at | 2026-01-01 09:37:06.445915+00 |
| description | Cryptocurrency wallet utilities for Rust - keys, addresses, mnemonics, HD wallets, and signing |
| homepage | |
| repository | https://github.com/nirvagold/rustywallet |
| max_upload_size | |
| id | 2014909 |
| size | 27,672 |
A comprehensive Rust library ecosystem for cryptocurrency wallet utilities. This umbrella crate provides a unified API for all wallet-related operations including key management, address generation, mnemonic handling, hierarchical deterministic wallets, message signing, and blockchain utilities.
The rustywallet ecosystem consists of modular crates that work together to provide complete cryptocurrency wallet functionality:
| Crate | Version | Description |
|---|---|---|
| rustywallet-keys | Private and public key management (secp256k1) | |
| rustywallet-address | Bitcoin and Ethereum address generation | |
| rustywallet-mnemonic | BIP39 mnemonic phrase support | |
| rustywallet-hd | BIP32/BIP44 hierarchical deterministic wallets | |
| rustywallet-signer | ECDSA message signing and verification | |
| rustywallet-checker | Address validation and format checking | |
| rustywallet-bloom | Bloom filter implementation for efficient lookups |
Add this to your Cargo.toml:
[dependencies]
rustywallet = "0.1.0"
The unified API provides easy access to all wallet functionality:
use rustywallet::prelude::*;
// Generate a random private key
let key = PrivateKey::random();
let pubkey = key.public_key();
// Generate Bitcoin address
let address = Address::from_public_key(&pubkey, AddressType::P2PKH, Network::Bitcoin);
println!("Private key: {}", key.to_hex());
println!("Address: {}", address);
use rustywallet::prelude::*;
// 1. Generate mnemonic phrase
let mnemonic = Mnemonic::generate(WordCount::Words12);
println!("Mnemonic: {}", mnemonic.phrase());
// 2. Create HD wallet from mnemonic
let seed = mnemonic.to_seed("");
let master = ExtendedPrivateKey::from_seed(&seed, Network::Bitcoin)?;
// 3. Derive account key (BIP44: m/44'/0'/0'/0/0)
let path = DerivationPath::parse("m/44'/0'/0'/0/0")?;
let account_key = master.derive_path(&path)?;
// 4. Generate address
let private_key = account_key.private_key();
let public_key = private_key.public_key();
let address = Address::from_public_key(&public_key, AddressType::P2PKH, Network::Bitcoin);
// 5. Sign a message
let message = "Hello, Bitcoin!";
let signature = Signer::sign_message(&private_key, message)?;
println!("Address: {}", address);
println!("Signature: {}", signature.to_hex());
All features are enabled by default. You can selectively enable only the functionality you need:
[dependencies]
rustywallet = { version = "0.1.0", default-features = false, features = ["keys", "address"] }
| Feature | Description | Dependencies |
|---|---|---|
keys |
Private/public key management | - |
address |
Address generation and validation | keys |
mnemonic |
BIP39 mnemonic phrase support | - |
hd |
HD wallet derivation (BIP32/BIP44) | keys, mnemonic |
signer |
Message signing and verification | keys |
checker |
Address validation utilities | address |
bloom |
Bloom filter implementation | - |
full |
All features (default) | all above |
You can also use individual crates directly:
[dependencies]
rustywallet-keys = "0.1.0"
rustywallet-address = "0.1.0"
use rustywallet::keys::*;
let private_key = PrivateKey::random();
let public_key = private_key.public_key();
let compressed = public_key.serialize_compressed();
use rustywallet::mnemonic::*;
let mnemonic = Mnemonic::generate(WordCount::Words24);
let seed = mnemonic.to_seed("optional_passphrase");
use rustywallet::checker::*;
let is_valid = AddressChecker::validate("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa");
let format = AddressChecker::detect_format("bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4");
Licensed under the MIT License. See LICENSE for details.