validateAddressHash static method

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

Implementation

static List<int> validateAddressHash(List<int> bytes) {
  if (bytes.length != _TonAddressConst.addressHashLength) {
    throw AddressConverterException("Invalid address hash length.", details: {
      "excepted": _TonAddressConst.addressHashLength,
      "length": bytes.length
    });
  }
  return BytesUtils.toBytes(bytes, unmodifiable: true);
}