lnd/input
Olaoluwa Osuntokun 630fc36dcf
multi: introduce and use new TapTweak and SignMethod fields
In this commit, we add a new field `TapTweak` to be used for key path
spends. Before this commit, we'd overload the existing `WitnessScript`
field to pass this information to the signing context. This was
confusing as for tapscript spends, this was the leaf script, which
mirrors the other script based spending types.

With this new filed, users need to set this to the script root for
keypath spends where the output key commits to a real merkle root, and
nothing when bip 86 spending is being used.

To make the signing even more explicit, we also add a new field called
sign_method with an enum type that differentiates between the different
segwit v0 and v1 signing methods.

Fixes https://github.com/lightningnetwork/lnd/issues/6446.
2022-05-11 10:07:49 +02:00
..
input.go multi: use prev output fetcher where possible 2022-03-24 18:02:37 +01:00
musig2.go multi: add MuSig2Cleanup method to MuSig2 signer 2022-05-04 19:23:58 +02:00
script_utils_test.go multi: bump btcd to taproot aware version 2022-03-24 15:00:25 +01:00
script_utils.go multi: bump btcd to taproot aware version 2022-03-24 15:00:25 +01:00
signdescriptor_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
signdescriptor.go multi: introduce and use new TapTweak and SignMethod fields 2022-05-11 10:07:49 +02:00
signer.go multi: implement MuSig2 RPCs and remote signing 2022-04-29 11:41:09 +02:00
size_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
size.go multi: add p2tr tapscript key path signing capabilities 2022-03-24 18:02:39 +01:00
taproot.go multi: fix inclusion proof size 2022-04-29 11:41:09 +02:00
test_utils.go multi: add MuSig2Cleanup method to MuSig2 signer 2022-05-04 19:23:58 +02:00
txout_test.go multi: move Input interface and related code 2019-01-31 13:25:33 +01:00
txout.go multi: move Input interface and related code 2019-01-31 13:25:33 +01:00
witnessgen.go multi: add p2tr keyspend wallet support 2022-03-24 18:02:38 +01:00