publicKeyToAddress method
Implementation
@override
String publicKeyToAddress(Uint8List publicKey) {
if (isTaproot) {
// Taproot P2TR address, bech32m encoded, starts with ltc1p
return P2PKH.getTaprootAddress(publicKey, 'ltc');
} else {
final addressBytes = sha160fromByte(publicKey);
Uint8List versionedHash = Uint8List(21);
versionedHash[0] = setting.networkType!.pubKeyHash;
versionedHash.setRange(1, 21, addressBytes);
return getBase58Address(versionedHash);
}
}