multi: add new tapscript root option to GenTaprootFundingScript

This'll allow us to create a funding output that uses musig2, but uses a tapscript tweak rather than a normal BIP 86 tweak.
This commit is contained in:
Olaoluwa Osuntokun
2024-03-13 10:46:33 -04:00
committed by Oliver Gugger
parent edf959d39f
commit 2c56b3120a
8 changed files with 36 additions and 16 deletions

View File

@@ -24,6 +24,7 @@ import (
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channeldb/models"
"github.com/lightningnetwork/lnd/discovery"
"github.com/lightningnetwork/lnd/fn"
"github.com/lightningnetwork/lnd/graph"
"github.com/lightningnetwork/lnd/input"
"github.com/lightningnetwork/lnd/keychain"
@@ -2899,6 +2900,7 @@ func makeFundingScript(channel *channeldb.OpenChannel) ([]byte, error) {
if channel.ChanType.IsTaproot() {
pkScript, _, err := input.GenTaprootFundingScript(
localKey, remoteKey, int64(channel.Capacity),
fn.None[chainhash.Hash](),
)
if err != nil {
return nil, err