toChecksumAddress static method
Implementation
static String toChecksumAddress(String addr) {
final String wihtoutPrefix = StringUtils.strip0x(addr);
if (!StringUtils.isHexBytes(wihtoutPrefix)) {
throw AddressConverterException("Invalid Ethereum address.",
details: {"address": addr});
}
AddrDecUtils.validateLength(wihtoutPrefix, EthAddrConst.addrLen);
return CoinsConf.ethereum.params.addrPrefix! +
_checksumEncode(wihtoutPrefix);
}