hashTapTweak static method
Compute the TapTweak hash for a P2TR address.
Parameters:
pubPoint: The public point for which to compute the TapTweak.
Implementation
static List<int> hashTapTweak(ProjectiveECCPoint pubPoint) {
final tapTweakSHA256 = BytesUtils.fromHexString(
"e80fe1639c9ca050e3af1b39c143c63e429cbceb15d940fbb5c5a1f4af57c5e9",
);
return P2TRUtils.taggedHash(
tapTweakSHA256,
BigintUtils.toBytes(pubPoint.x, length: Curves.curveSecp256k1.baselen),
);
}