script: add helper for checking if a 'known type'

To be used for verifying remote inputs' validity
This commit is contained in:
lisa neigut
2019-09-18 19:02:20 -05:00
committed by Rusty Russell
parent 6f85088b2b
commit cb2cad8c94
2 changed files with 9 additions and 0 deletions

View File

@@ -135,6 +135,9 @@ bool is_p2wsh(const u8 *script, struct sha256 *addr);
/* Is this (version 0) pay to witness pubkey hash? (extract addr if not NULL) */
bool is_p2wpkh(const u8 *script, struct bitcoin_address *addr);
/* Is this one of the four above script types? */
bool is_known_scripttype(const u8 *script);
/* Are these two scripts equal? */
bool scripteq(const u8 *s1, const u8 *s2);