BitcoinVerifier.fromKeyBytes constructor

BitcoinVerifier.fromKeyBytes(
  1. List<int> publicKey
)

Factory constructor for creating a BitcoinVerifier from public key bytes.

Implementation

factory BitcoinVerifier.fromKeyBytes(List<int> publicKey) {
  final point = ProjectiveECCPoint.fromBytes(
      curve: Curves.curve256, data: publicKey, order: null);
  final pub = ECDSAPublicKey(Curves.generatorSecp256k1, point);
  return BitcoinVerifier._(ECDSAVerifyKey(pub));
}