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

Function scriptpubkey_p2sh

bitcoin/script.c:168–174  ·  view source on GitHub ↗

Create p2sh for this redeem script. */

Source from the content-addressed store, hash-verified

166
167/* Create p2sh for this redeem script. */
168u8 *scriptpubkey_p2sh(const tal_t *ctx, const u8 *redeemscript)
169{
170 struct ripemd160 redeemhash;
171
172 hash160(&redeemhash, redeemscript, tal_count(redeemscript));
173 return scriptpubkey_p2sh_hash(ctx, &redeemhash);
174}
175
176/* Create an output script using p2pkh */
177u8 *scriptpubkey_p2pkh(const tal_t *ctx, const struct bitcoin_address *addr)

Callers 6

json_newaddrFunction · 0.85
wallet_can_spendFunction · 0.85
txfilter_add_derkeyFunction · 0.85
psbt_using_utxosFunction · 0.85

Calls 2

hash160Function · 0.85
scriptpubkey_p2sh_hashFunction · 0.85

Tested by

no test coverage detected