ECPair.fromPrivateKey constructor
ECPair.fromPrivateKey(
- Uint8List privateKey, {
- NetworkType? network,
- bool? compressed,
Implementation
factory ECPair.fromPrivateKey(Uint8List privateKey, {NetworkType? network, bool? compressed}) {
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 ECPair(privateKey, null, network: network, compressed: compressed);
}