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

Function scriptpubkey_p2wpkh_derkey

bitcoin/script.c:293–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

wallet_can_spendFunction · 0.85
txfilter_add_derkeyFunction · 0.85

Calls 3

add_opFunction · 0.85
hash160Function · 0.85
script_push_bytesFunction · 0.70

Tested by

no test coverage detected