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

Function scriptpubkey_p2wpkh_derkey

bitcoin/script.c:292–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292u8 *scriptpubkey_p2wpkh_derkey(const tal_t *ctx, const u8 der[33])
293{
294 u8 *script = tal_arr(ctx, u8, 0);
295 struct ripemd160 h;
296
297 add_op(&script, OP_0);
298 hash160(&h, der, PUBKEY_CMPR_LEN);
299 script_push_bytes(&script, &h, sizeof(h));
300 return script;
301}
302
303u8 *scriptpubkey_witness_raw(const tal_t *ctx, u8 version,
304 const u8 *wprog, size_t wprog_size)

Callers 1

Calls 3

add_opFunction · 0.85
hash160Function · 0.85
script_push_bytesFunction · 0.85

Tested by

no test coverage detected