isPointOnEd25519Curve function
Implementation
bool isPointOnEd25519Curve(Iterable<int> data) {
if (data.length != 32) {
throw const FormatException(
'invalid length, decoded address is not 32 bytes long',
);
}
try {
final compressed = CompressedEdwardsY(data.map(BigInt.from).toList());
final point = compressed.decompress();
return !point.isSmallOrder();
} on FormatException {
return false;
}
}