validatePubKey static method
Validate that bytes form a valid public key for the given curve.
Implementation
static void validatePubKey(List<int> pubKeyBytes, CryptoKeyType curveType) {
try {
IPublicKey.fromBytes(pubKeyBytes, curveType);
} catch (_) {
throw CoreErrors.addressKeyValidationFailed(
reason: "Invalid ${curveType.name} public key.",
);
}
}