validateAddressBytes static method

void validateAddressBytes(
  1. List<int> addrBytes
)

Implementation

static void validateAddressBytes(List<int> addrBytes) {
  if (addrBytes.length != QuickCrypto.hash160DigestSize &&
      addrBytes.length != QuickCrypto.sha256DigestSize) {
    throw AddressConverterException("Invalid address bytes length.",
        details: {
          "length": addrBytes.length,
          "Excepted":
              "${QuickCrypto.hash160DigestSize} or ${QuickCrypto.sha256DigestSize}"
        });
  }
}