script: expose script_push_bytes().

We'll need it for creating redeemscripts for PSBTs.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-08-07 10:51:33 +09:30
parent 5e0b03fba9
commit 09f065fc45
2 changed files with 26 additions and 23 deletions

View File

@@ -140,6 +140,9 @@ bool is_known_scripttype(const u8 *script);
/* Are these two scripts equal? */
bool scripteq(const u8 *s1, const u8 *s2);
/* Raw "push these bytes" accessor. */
void script_push_bytes(u8 **scriptp, const void *mem, size_t len);
/* OP_DUP + OP_HASH160 + PUSH(20-byte-hash) + OP_EQUALVERIFY + OP_CHECKSIG */
#define BITCOIN_SCRIPTPUBKEY_P2PKH_LEN (1 + 1 + 1 + 20 + 1 + 1)