praseAddressBytes static method

List<int> praseAddressBytes(
  1. List<int> bytes
)

check address bytes and convert special address to 32bytes.

Implementation

static List<int> praseAddressBytes(List<int> bytes) {
  if (bytes.length != SuiAddrConst.addressBytesLength) {
    throw AddressConverterException("Invalid sui address bytes length.",
        details: {
          "expected": SuiAddrConst.addressBytesLength,
          "length": bytes.length
        });
  }
  return bytes;
}