| 646 | } |
| 647 | |
| 648 | struct wally_tx *psbt_final_tx(const tal_t *ctx, const struct wally_psbt *psbt) |
| 649 | { |
| 650 | struct wally_tx *wtx; |
| 651 | |
| 652 | if (!psbt_is_finalized(psbt)) |
| 653 | return NULL; |
| 654 | |
| 655 | tal_wally_start(); |
| 656 | if (wally_psbt_extract(psbt, &wtx) == WALLY_OK) |
| 657 | tal_add_destructor(wtx, wally_tx_destroy); |
| 658 | else |
| 659 | wtx = NULL; |
| 660 | |
| 661 | tal_wally_end_onto(ctx, wtx, struct wally_tx); |
| 662 | return wtx; |
| 663 | } |
| 664 | |
| 665 | struct wally_psbt *psbt_from_b64(const tal_t *ctx, |
| 666 | const char *b64, |
no test coverage detected