Closed iashishanand closed 3 months ago
Obviously, for taproot type addresses, we need to tweak the private key and sign it, and the same is true for verification.
// for sign
import * as btc from '@scure/btc-signer';
const tweakedPrivateKey = btc.taprootTweakPrivKey(fromInternalKey.privateKey);
// for validate
import {tweakKey } from 'bitcoinjs-lib/src/payments/bip341.js';
const isValid = schnorr.verify(tapKeySig, message, tweakKey(internalPubkey));
I am trying to implement MuSig transaction using @cmdcode/musig2 and bitcoinjs-lib library. But I am getting this error constantly.
I have also looked into this thread #2066 for help, but even trying the same thing is giving me error. Any help would be appreciated.