addressFromPublicKeyBytes static method
Returns the Bitcoin mainnet P2PKH address for a compressed public key.
Implementation
static String addressFromPublicKeyBytes(List<int> publicKeyBytes) {
final hash160 = sha160fromByte(Uint8List.fromList(publicKeyBytes));
final versionedHash = Uint8List(21)
..[0] = 0x00
..setRange(1, 21, hash160);
return getBase58Address(versionedHash);
}