| 392 | */ |
| 393 | |
| 394 | u8 *bitcoin_wscript_to_remote_anchored(const tal_t *ctx, |
| 395 | const struct pubkey *remote_key, |
| 396 | u32 csv_lock) |
| 397 | { |
| 398 | u8 *script = tal_arr(ctx, u8, 0); |
| 399 | add_push_key(&script, remote_key); |
| 400 | add_op(&script, OP_CHECKSIGVERIFY); |
| 401 | add_number(&script, csv_lock); |
| 402 | add_op(&script, OP_CHECKSEQUENCEVERIFY); |
| 403 | |
| 404 | assert(is_to_remote_anchored_witness_script(script, tal_bytelen(script))); |
| 405 | return script; |
| 406 | } |
| 407 | |
| 408 | bool is_to_remote_anchored_witness_script(const u8 *script, size_t script_len) |
| 409 | { |
no test coverage detected