mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-23 14:40:44 +01:00
txscript: add new IsPayToTaproot utility func
This commit is contained in:
parent
81a546bded
commit
30d93272a8
1 changed files with 6 additions and 0 deletions
|
@ -90,6 +90,12 @@ func IsPayToWitnessPubKeyHash(script []byte) bool {
|
|||
return isWitnessPubKeyHashScript(script)
|
||||
}
|
||||
|
||||
// IsPayToTaproot returns true if if the passed script is a standard
|
||||
// pay-to-taproot (PTTR) scripts, and false otherwise.
|
||||
func IsPayToTaproot(script []byte) bool {
|
||||
return isWitnessTaprootScript(script)
|
||||
}
|
||||
|
||||
// IsWitnessProgram returns true if the passed script is a valid witness
|
||||
// program which is encoded according to the passed witness program version. A
|
||||
// witness program must be a small integer (from 0-16), followed by 2-40 bytes
|
||||
|
|
Loading…
Add table
Reference in a new issue