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