Create an output script for a 20-byte witness. */
| 279 | |
| 280 | /* Create an output script for a 20-byte witness. */ |
| 281 | u8 *scriptpubkey_p2wpkh(const tal_t *ctx, const struct pubkey *key) |
| 282 | { |
| 283 | struct ripemd160 h; |
| 284 | u8 *script = tal_arr(ctx, u8, 0); |
| 285 | |
| 286 | add_op(&script, OP_0); |
| 287 | pubkey_to_hash160(key, &h); |
| 288 | script_push_bytes(&script, &h, sizeof(h)); |
| 289 | return script; |
| 290 | } |
| 291 | |
| 292 | u8 *scriptpubkey_p2wpkh_derkey(const tal_t *ctx, const u8 der[33]) |
| 293 | { |
no test coverage detected