encodeBytes static method

ADAAddress encodeBytes(
  1. List<int> addrBytes
)

Encode a byte list to an ADA address.

addrBytes: The byte list to encode.

Returns an ADAAddress object.

Implementation

static ADAAddress encodeBytes(List<int> addrBytes) {
  try {
    final byron = ADAByronAddr.deserialize(addrBytes).encode();
    return ADAAddress.fromAddress(byron);
  } catch (e) {
    return ADAAddress.fromAddress(AdaShelleyAddrUtils.encodeBytes(addrBytes));
  }
}