vulpemventures / go-elements

Go support for Liquid/Elements transactions
MIT License
27 stars 12 forks source link

add a musig2 test case using taproot internal key #214

Closed louisinger closed 8 months ago

louisinger commented 1 year ago

This PR is not ready to be merged, it modifies a lot of imports related to btcsuite/btcec packages. I'm using a fork with several changes letting to overwrite taproot tweak tag (differs from Bitcoin in Elements): https://github.com/louisinger/btcd/tree/musig2elements

This PR adds a test case where alice and bob are using btcec/musig2 pkg to sign and spend an utxo. They aggregate public keys and use the final one as taproot internal key. Thus, they can aggregate their signature and validate the input as a common key-path taproot input.

The only change with bitcoin is the taproot tweak tag used by musig2 -> options added by the fork let to use taproot.TapTweakTagElements instead of bitcoin one.

@sekulicd @altafan please review