fromRawAddress static method

DecodeAddressResult fromRawAddress(
  1. String address
)

Implementation

static DecodeAddressResult fromRawAddress(String address) {
  try {
    final parts = address.split(':');
    final int workChain = int.parse(parts[0]);
    final hash = BytesUtils.fromHexString(parts[1]);
    return DecodeAddressResult(hash: hash, workchain: workChain, flags: []);
  } catch (e) {
    throw AddressConverterException.addressValidationFailed(
      details: {"address": address},
    );
  }
}