Closed developer2346 closed 6 months ago
Taproot works a bit different to the previous address types. I assume you'll want to have a single-sig only (BIP-0086) address? Then you'd need to use this code:
taprootKey := txscript.ComputeTaprootKeyNoScript(internalKey)
tapScriptAddr, err := btcutil.NewAddressTaproot(
schnorr.SerializePubKey(taprootKey), harnessNetParams,
)
Feel free to take a look at our integration tests in lnd
for more advanced Taproot related example code in Go.
Hi I am trying to generate Taproot address:
But I am unable to generate as I get:
panic: witness program must be 32 bytes for p2tr