BIP32.fromPrivateKey constructor

BIP32.fromPrivateKey(
  1. Uint8List privateKey,
  2. Uint8List chainCode, [
  3. NetworkType? nw
])

From Private Key

Implementation

factory BIP32.fromPrivateKey(Uint8List privateKey, Uint8List chainCode,
    [NetworkType? nw]) {
  NetworkType network = nw ?? _bitcoin;
  if (privateKey.length != 32) {
    throw ArgumentError(
        "Expected property privateKey of type Buffer(Length: 32)");
  }
  if (!ecc.isPrivate(privateKey)) {
    throw ArgumentError("Private key not in range [1, n]");
  }
  return BIP32(privateKey, null, chainCode, network);
}