A modern, reliable Flutter implementation for generating Bitcoin and Dogecoin wallets. This project addresses the challenges of obsolete cryptocurrency libraries in the Flutter ecosystem by providing an up-to-date solution for creating hierarchical deterministic (HD) wallets using BIP32, BIP39, and BIP44 standards.
- Secure Mnemonic Generation: Create BIP39 compliant seed phrases
- HD Wallet Support: Implements BIP32/44 standards for deterministic key derivation
- Multi-Coin Support: Currently generates Bitcoin and Dogecoin wallets
- Offline Capability: Generate wallets without an internet connection
- Open Source: Transparent security for cryptocurrency wallet generation
- Current Libraries: Uses updated dependencies to avoid obsolete Flutter crypto libraries
- Maintainable Implementation: Clean architecture that's easy to extend and maintain
Here is a screenshot of the wallet generation result:
- Flutter 3.0 or higher
- Dart 3.0 or higher
- Clone the repository:
git clone https://github.com/yourusername/flutter_bitcoin_doge_walletgen.git
- Navigate to the project directory:
cd flutter_bitcoin_doge_walletgen
- Install dependencies:
flutter pub get
- Run the application:
flutter run
// Create a new wallet service instance
final WalletService service = WalletServiceImpl();
// Generate a new mnemonic phrase
final String mnemonic = await service.generateMnemonic();
// Create a Bitcoin wallet
final bitcoinWallet = await service.createWalletFromMnemonic('bitcoin', mnemonic);
// Create a Dogecoin wallet
final dogeWallet = await service.createWalletFromMnemonic('doge', mnemonic);
// Access wallet information
print('Bitcoin Address: ${bitcoinWallet["address"]}');
print('Bitcoin Private Key: ${bitcoinWallet["privateKey"]}');
The wallet generator implements the following cryptographic standards:
- BIP32: Hierarchical Deterministic Wallets
- BIP39: Mnemonic code for generating deterministic keys
- BIP44: Multi-Account Hierarchy for Deterministic Wallets
- Bitcoin:
m/44'/0'/0'/0/0
- Dogecoin:
m/44'/3'/0'/0/0
bip32
: For HD wallet generationbip39
: For mnemonic phrase generationbs58check
: For Base58Check encodingcrypto
: For cryptographic functionspointycastle
: For RIPEMD160 digest
To add support for additional cryptocurrencies:
- Implement a new method in the
WalletServiceImpl
class - Add the appropriate derivation path for the cryptocurrency
- Configure the correct address prefixes for the desired network
Example for adding Litecoin support:
Future<Map<String, dynamic>> _generateLitecoinToken(Uint8List seed) async {
final hdWallet = bip32.BIP32.fromSeed(seed);
final derivationPath = "m/44'/2'/0'/0/0"; // Litecoin path
// Implementation details...
}
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
Made with ❤️ for the flutter community