ETHAddress.fromPublicKey constructor
Creates an ETHAddress instance from a public key represented as a bytes.
Implementation
factory ETHAddress.fromPublicKey(List<int> keyBytes) {
try {
final toAddress = EthAddrEncoder().encodeKey(keyBytes);
return ETHAddress._(toAddress);
} catch (e) {
throw MessageException("invalid ethreum public key",
details: {"input": BytesUtils.toHexString(keyBytes)});
}
}