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

Function scriptpubkey_p2sh

bitcoin/script.c:179–185  ·  view source on GitHub ↗

Create p2sh for this redeem script. */

Source from the content-addressed store, hash-verified

177
178/* Create p2sh for this redeem script. */
179u8 *scriptpubkey_p2sh(const tal_t *ctx, const u8 *redeemscript)
180{
181 struct ripemd160 redeemhash;
182
183 hash160(&redeemhash, redeemscript, tal_count(redeemscript));
184 return scriptpubkey_p2sh_hash(ctx, &redeemhash);
185}
186
187/* Create an output script using p2pkh */
188u8 *scriptpubkey_p2pkh(const tal_t *ctx, const struct bitcoin_address *addr)

Callers 4

psbt_using_utxosFunction · 0.85

Calls 2

hash160Function · 0.85
scriptpubkey_p2sh_hashFunction · 0.85

Tested by

no test coverage detected