bitcoin_flutter 0.0.3
bitcoin_flutter: ^0.0.3 copied to clipboard
A dart Bitcoin library for Flutter. BIP32, BIP39, P2PKH integration.
bitcoin_flutter #
A dart Bitcoin library for Flutter.
Released under the terms of the MIT LICENSE.
Inspired by bitcoinjs
Otherwise, pull requests are appreciated.
Installing #
Examples #
import 'package:bitcoin_flutter/bitcoin_flutter.dart';
main() {
var hdWallet = new HDWallet(passphrase: "praise you muffin lion enable neck grocery crumble super myself license ghost");
print(hdWallet.address);
// => 12eUJoaWBENQ3tNZE52ZQaHqr3v4tTX4os
print(hdWallet.pubKey);
// => 0360729fb3c4733e43bf91e5208b0d240f8d8de239cff3f2ebd616b94faa0007f4
print(hdWallet.privKey);
// => 01304181d699cd89db7de6337d597adf5f78dc1f0784c400e41a3bd829a5a226
print(hdWallet.wif);
// => KwG2BU1ERd3ndbFUrdpR7ymLZbsd7xZpPKxsgJzUf76A4q9CkBpY
}
The below examples are implemented as integration tests:
- Import a BIP32 testnet xpriv and export to WIF
- Export a BIP32 xpriv, then import it
- Export a BIP32 xpub
- Create a BIP32, bitcoin, account 0, external address
- Create a BIP44, bitcoin, account 0, external address
- Use BIP39 to generate BIP32 addresses
Running the test suite #
flutter test
Complementing Libraries #
- BIP39 - Mnemonic generation for deterministic keys
- BIP32 - BIP32
- Base58 Check - Base58 check encoding/decoding