script: break out redeemscript->scriptsig function

We're going to finalze some redeemscripts here shortly, so break out the
ability to render an arbitrary redeemscript -> scriptsig
This commit is contained in:
niftynei
2020-10-20 20:05:16 -05:00
committed by Rusty Russell
parent 6697ebcebb
commit 0ca6c3cc84
2 changed files with 20 additions and 4 deletions

View File

@@ -43,6 +43,10 @@ u8 *bitcoin_redeem_p2pkh(const tal_t *ctx, const struct pubkey *pubkey,
/* Create the redeemscript for a P2SH + P2WPKH. */
u8 *bitcoin_redeem_p2sh_p2wpkh(const tal_t *ctx, const struct pubkey *key);
/* Create the scriptsig for a redeemscript */
u8 *bitcoin_scriptsig_redeem(const tal_t *ctx,
const u8 *redeemscript TAKES);
/* Create scriptsig for p2sh-p2wpkh */
u8 *bitcoin_scriptsig_p2sh_p2wpkh(const tal_t *ctx, const struct pubkey *key);