ECPair.fromPrivateKey constructor
ECPair.fromPrivateKey(
- Uint8List privateKey, {
- NetworkType network = mainnet,
- bool compressed = true,
Implementation
factory ECPair.fromPrivateKey(Uint8List privateKey,
{NetworkType network = mainnet, bool compressed = true}) {
if (privateKey.length != 32)
throw new ArgumentError(
'Expected property privateKey of type Buffer(Length: 32)');
if (!ecc.isPrivate(privateKey))
throw new ArgumentError('Private key not in range [1, n)');
return new ECPair(privateKey, null,
network: network, compressed: compressed);
}