bitcoin_bip44_ng 0.1.6 copy "bitcoin_bip44_ng: ^0.1.6" to clipboard
bitcoin_bip44_ng: ^0.1.6 copied to clipboard

Library implementing Bitcoins BIP44 (HD wallet organization) specification in a Flutter friendly fashion.

example/main.dart

import 'package:bitcoin_bip44_ng/bitcoin_bip44_ng.dart';

// ignore_for_file: avoid_print

void main() {
  var bip44 = Bip44(toHexString('some seed'));
  var bitcoin = bip44.coins[0];
  var account = Account(bitcoin, 0, changeExternal);
  account.nextUnusedAddress(0).then(print);

  // Add a scanner of your own:
  scanners = [MyOwnScanner()];
}

class MyOwnScanner extends Scanner {
  @override
  Future<bool> present(String address) {
    // Total nonsense!
    if (address.endsWith('b')) {
      return Future.value(false);
    }
    return Future.value(true);
  }
}

String toHexString(String original) {
  return original.codeUnits
      .map((c) => c.toRadixString(16).padLeft(2, '0'))
      .toList()
      .join('');
}
2
likes
140
pub points
1%
popularity

Publisher

unverified uploader

Library implementing Bitcoins BIP44 (HD wallet organization) specification in a Flutter friendly fashion.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

base58check, bech32, bitcoin_bip32_ng, http, pointycastle

More

Packages that depend on bitcoin_bip44_ng