@krakaw/wallet-decoder-web
v1.0.5
Published
Tari Address Generator WASM module for web browsers
Maintainers
Readme
Tari Address Generator
A powerful tool for generating and managing Tari wallet addresses with support for multiple networks and formats. This project provides both a command-line interface and a web interface for generating, decoding, and managing Tari addresses.
Demo
https://krakaw.github.io/wallet-decoder
https://krakaw.github.io/wallet-decoder?tab=generate
Features
- Generate new Tari wallets
- Restore wallets from seed phrases
- Support for multiple networks:
- MainNet
- NextNet
- Esmeralda
- Multiple address formats:
- Base58
- Emoji
- Payment ID integration
- RFC-0155 TariAddress specification compliance
- Web interface for easy address management
- Command-line interface for automation
Web Interface
The web interface provides an intuitive way to:
- Decode Tari addresses
- Generate new wallets
- Restore wallets from seed phrases
- Add payment IDs to addresses
- View wallet details including:
- Base58 and Emoji addresses
- Seed phrases
- Private and public keys
- Network information
Command Line Interface
The CLI provides the following commands:
# Generate a new wallet
wallet-decoder generate [--network NETWORK] [--password PASSWORD] [--payment-id PAYMENT_ID]
# Decode a Tari address
wallet-decoder decode <ADDRESS>
# Load a wallet from seed phrase
wallet-decoder load <SEED_PHRASE> [--network NETWORK] [--password PASSWORD] [--payment-id PAYMENT_ID]Options
--network: Network to use (mainnet, nextnet, esmeralda) [default: mainnet]--password: Optional password for the wallet--payment-id: Optional payment ID to include in the address
Installation
From Source
# Clone the repository
git clone https://github.com/Krakaw/wallet-decoder.git
cd wallet-decoder
# Build the project
cargo build --release
# Install the binary
cargo install --path .Web Interface
To run the web interface locally:
- Build the WASM module:
wasm-pack build --target web- Serve the web interface:
cd examples/web
python3 -m http.server 8080Then open http://localhost:8080 in your browser.
Usage Examples
Generate a New Wallet
use tari_address_generator::{TariAddressGenerator, Network};
let generator = TariAddressGenerator::new();
let wallet = generator.generate_new_wallet(Network::MainNet)?;
println!("Address: {}", wallet.address_base58());
println!("Emoji: {}", wallet.address_emoji());
println!("Seed: {}", wallet.seed_phrase());Restore from Seed Phrase
let wallet = generator.restore_from_seed_phrase("your seed phrase here", Network::MainNet)?;Parse an Address
let address = generator.parse_address("your address here")?;
println!("Network: {}", address.network());
println!("Base58: {}", address.to_base58());
println!("Emoji: {}", address.to_emoji());License
This project is licensed under the MIT License - see the LICENSE file for details.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Security
This project is for educational and development purposes. Always use official Tari tools for production use.
