| Crates.io | mockallet |
| lib.rs | mockallet |
| version | 0.1.1 |
| created_at | 2025-02-28 16:21:34.755807+00 |
| updated_at | 2025-02-28 16:21:34.755807+00 |
| description | A command-line wallet interface for interacting with a mockchain network through gRPC. |
| homepage | |
| repository | https://github.com/0xsouravm/mockchain-wallet-rs |
| max_upload_size | |
| id | 1572962 |
| size | 72,284 |
A command-line interface for interacting with a mockchain network using a modular Rust architecture.
http://[::1]:50051# Clone repository
git clone https://github.com/0xsouravm/mockchain-wallet-rs.git
cd mockchain-wallet-rs
# Build release version
cargo build --release
# Run the executable
./target/release/mockallet
# Install Directly
cargo install mockallet
# Create a new wallet
./mockallet new alice
# Request funds from faucet
./mockallet faucet alice
# Check balance
./mockallet balance alice
# Create another wallet
./mockallet new bob
# Send transaction
./mockallet send alice bob 100
mockallet new <wallet_name>
Creates a new wallet with a randomly generated key pair.
mockallet list
Displays all wallets in your local storage.
mockallet balance <wallet_name>
Retrieves the current balance for a wallet.
mockallet send <from_wallet> <to_wallet> <amount>
Sends funds from one wallet to another. The recipient can be specified either by wallet name or by public key address.
mockallet faucet <wallet_name>
Requests funds from the mockchain's faucet service.
This application follows a modular architecture for improved maintainability:
src/
├── main.rs # Entry point with error handling
├── commands.rs # Command definitions using StructOpt
├── models.rs # Data structures
├── wallet.rs # Mockchain interactions
├── storage.rs # Wallet storage management
├── errors.rs # Error handling system
└── proto.rs # gRPC protocol initialisation
Key architectural decisions:
Generate and view the API documentation:
cargo doc --open
# Development build
cargo build
# Release build
cargo build --release
To add a new command:
Command enum in commands.rsrun() function in main.rs.wallets/wallets.json⚠️ Warning: Secure access to the .wallets directory on your machine
Contributions are welcome! Here are some areas where help would be appreciated:
Please feel free to submit a Pull Request.
Please follow the Rust code style guidelines and include appropriate tests.
This project is licensed under the MIT License - see the LICENSE file for details.