MCPcopy Create free account
hub / github.com/ElementsProject/lightning / bitcoin_redeem_p2pkh

Function bitcoin_redeem_p2pkh

bitcoin/script.c:202–211  ·  view source on GitHub ↗

Create an input script which spends p2pkh */

Source from the content-addressed store, hash-verified

200
201/* Create an input script which spends p2pkh */
202u8 *bitcoin_redeem_p2pkh(const tal_t *ctx, const struct pubkey *pubkey,
203 const struct bitcoin_signature *sig)
204{
205 u8 *script = tal_arr(ctx, u8, 0);
206
207 add_push_sig(&script, sig);
208 add_push_key(&script, pubkey);
209
210 return script;
211}
212
213/* Create the redeemscript for a P2SH + P2WPKH (for signing tx) */
214u8 *bitcoin_redeem_p2sh_p2wpkh(const tal_t *ctx, const struct pubkey *key)

Callers

nothing calls this directly

Calls 2

add_push_sigFunction · 0.85
add_push_keyFunction · 0.85

Tested by

no test coverage detected