BIP32.fromPrivateKey constructor
BIP32.fromPrivateKey(
- Uint8List privateKey,
- Uint8List chainCode, [
- 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);
}