hashTapTweak static method

List<int> hashTapTweak(
  1. ProjectiveECCPoint pubPoint
)

Compute the TapTweak hash for a P2TR address.

This method computes the TapTweak hash by using the taggedHash method.

Parameters:

  • pubKey: The public key for which to compute the TapTweak.

Returns: A List

Implementation

static List<int> hashTapTweak(ProjectiveECCPoint pubPoint) {
  return P2TRUtils.taggedHash(
    P2TRConst.tapTweakSHA256,
    BigintUtils.toBytes(pubPoint.x, length: Curves.curveSecp256k1.baselen),
  );
}