ECPair.fromPublicKey constructor

ECPair.fromPublicKey(
  1. Uint8List publicKey, {
  2. NetworkType? network,
  3. bool? compressed,
})

Implementation

factory ECPair.fromPublicKey(Uint8List publicKey, {NetworkType? network, bool? compressed}) {
  if (!ecc.isPoint(publicKey)) {
    throw new ArgumentError('Point is not on the curve');
  }
  return new ECPair(null, publicKey, network: network, compressed: compressed);
}