Secp256k1PublicKeyEcdsa.fromBytes constructor

Secp256k1PublicKeyEcdsa.fromBytes(
  1. List<int> keyBytes
)

Factory method for creating a Secp256k1PublicKeyEcdsa from a byte array.

Implementation

factory Secp256k1PublicKeyEcdsa.fromBytes(List<int> keyBytes) {
  final point = ProjectiveECCPoint.fromBytes(
      curve: Curves.curveSecp256k1, data: keyBytes, order: null);
  final pub = ECDSAPublicKey(Curves.generatorSecp256k1, point);
  return Secp256k1PublicKeyEcdsa._(pub);
}