addressFromBytes function

ToplAddress addressFromBytes({
  1. NetworkId networkPrefix = valhallaPrefix,
  2. required Uint8List bytes,
})

Implementation

ToplAddress addressFromBytes(
    {NetworkId networkPrefix = valhallaPrefix, required Uint8List bytes}) {
  _networkPrefixValidation(bytes, networkPrefix: networkPrefix);
  _lengthValidation(bytes);
  _checksumValidation(bytes);
  return ToplAddress(bytes.sublist(0, 34),
      networkId: bytes.first,
      proposition: PropositionType.fromPrefix(bytes[1]));
}