tweakPublicKey static method

Secp256k1Point tweakPublicKey(
  1. Secp256k1Point pubPoint, {
  2. List? script,
})

Implementation

static Secp256k1Point tweakPublicKey(
  Secp256k1Point pubPoint, {
  List<dynamic>? script,
}) {
  final h = calculateTweek(pubPoint, script: script);
  final t = Secp256k1Fr.fromBytesUnchecked(h);
  final n = Secp256k1Point.generator_ * t;
  final outPoint = liftX(pubPoint.toXOnly()) + n;

  return outPoint;
}