tx-psbt: pass in the witness script (if known) when adding an input

Update the `bitcoin_tx_add_input` interface to accept a witness script
and or scriptPubkey.

We save the amount + witness script + witness program (if known) to
the PSBT object for a transaction when creating an input.
This commit is contained in:
niftynei
2020-05-21 14:46:19 -05:00
committed by Christian Decker
parent a04f0fe250
commit dc868630a8
22 changed files with 116 additions and 53 deletions

View File

@@ -48,6 +48,7 @@ struct bitcoin_tx *commit_tx(const tal_t *ctx,
const struct bitcoin_txid *funding_txid,
unsigned int funding_txout,
struct amount_sat funding,
const u8 *funding_wscript,
enum side opener,
u16 to_self_delay,
const struct keyset *keyset,