Secp256PublicKey.fromBytes constructor
Implementation
factory Secp256PublicKey.fromBytes(Uint8List publicKey, int flag) {
final buffer = Uint8List.fromList(publicKey);
if (buffer.length != SECP256_PUBLIC_KEY_SIZE) {
throw ArgumentError(
"Invalid public key input. Expected $SECP256_PUBLIC_KEY_SIZE bytes, got ${buffer.length}"
);
}
return Secp256PublicKey._(decodeBigIntToUnsigned(buffer), flag);
}