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) {
  final length = bytes.length;
  if (length != AptosAddrConst.addressBytesLength) {
    throw AddressConverterException.addressBytesValidationFailed(
      network: "Aptos",
      details: {
        "expected": AptosAddrConst.addressBytesLength,
        "length": bytes.length,
      },
    );
  }

  return bytes;
}