validateAndRemovePrefixBytes static method
Validate and remove prefix from an address.
Implementation
static List<int> validateAndRemovePrefixBytes(
List<int> addr,
List<int> prefix,
) {
final prefixGot = addr.sublist(0, prefix.length);
if (!BytesUtils.bytesEqual(prefix, prefixGot)) {
throw AddressConverterException(
'Invalid prefix (expected $prefix, got $prefixGot)',
);
}
return addr.sublist(prefix.length);
}