addressToBytes static method
convert address string to bytes without padding special addresses.
Implementation
static List<int> addressToBytes(String address) {
address = StringUtils.strip0x(address);
List<int>? bytes = BytesUtils.tryFromHexString(
address,
paddingZero: address.length < 2,
);
if (bytes?.length != SuiAddrConst.addressBytesLength) {
throw AddressConverterException.addressValidationFailed(
details: {"address": address},
);
}
return bytes!;
}