ECPair.fromPublicKey constructor

ECPair.fromPublicKey(Uint8List publicKey, { Network network, bool compressed })

Creates a keypair from [publicKey. The returned keypair will contain null private key

Implementation

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