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