input: add tapscript full key only helper function

This commit is contained in:
Oliver Gugger
2022-07-29 18:20:08 +02:00
parent 9f47d31681
commit db73e640d9

View File

@@ -126,3 +126,12 @@ func TapscriptRootHashOnly(internalKey *btcec.PublicKey,
RootHash: rootHash,
}
}
// TapscriptFullKeyOnly creates a waddrmgr.Tapscript for the given full Taproot
// key.
func TapscriptFullKeyOnly(taprootKey *btcec.PublicKey) *waddrmgr.Tapscript {
return &waddrmgr.Tapscript{
Type: waddrmgr.TaprootFullKeyOnly,
FullOutputKey: taprootKey,
}
}