mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-04 14:54:26 +01:00
bitcoin/script: helper to create ScriptCode for signing P2WPKH.
sign_tx_input() now takes a witness_script arg: P2WPKH doesn't really have a witness_script, but for signing it behaves as if it does. This helper constructs that "fake" witness_script. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -41,6 +41,9 @@ u8 *scriptsig_pay_to_pubkeyhash(const tal_t *ctx,
|
||||
const struct pubkey *key,
|
||||
const struct bitcoin_signature *sig);
|
||||
|
||||
/* Create scriptcode (fake witness, basically) for P2WPKH */
|
||||
u8 *p2wpkh_scriptcode(const tal_t *ctx, const struct pubkey *key);
|
||||
|
||||
u8 *scriptpubkey_htlc_send(const tal_t *ctx,
|
||||
const struct pubkey *ourkey,
|
||||
const struct pubkey *theirkey,
|
||||
|
||||
Reference in New Issue
Block a user