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