validatePubKey static method
Validate address length.
Implementation
static void validatePubKey(
List<int> pubKeyBytes,
EllipticCurveTypes curveType,
) {
try {
IPublicKey.fromBytes(pubKeyBytes, curveType);
} catch (e) {
throw ArgumentException(
"Invalid $curveType public key (${BytesUtils.toHexString(pubKeyBytes)})");
}
}