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
No known key found for this signature in database
GPG key ID: 8E4256593F177720

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,
}
}