| 925 | } |
| 926 | |
| 927 | struct wally_psbt *psbt_from_bytes(const tal_t *ctx, const u8 *bytes, |
| 928 | size_t byte_len) |
| 929 | { |
| 930 | struct wally_psbt *psbt; |
| 931 | |
| 932 | tal_wally_start(); |
| 933 | if (wally_psbt_from_bytes(bytes, byte_len, /* flags */ 0, &psbt) == WALLY_OK) |
| 934 | tal_add_destructor(psbt, psbt_destroy); |
| 935 | else |
| 936 | psbt = NULL; |
| 937 | tal_wally_end_onto(ctx, psbt, struct wally_psbt); |
| 938 | |
| 939 | return psbt; |
| 940 | } |
| 941 | |
| 942 | void towire_wally_psbt(u8 **pptr, const struct wally_psbt *psbt) |
| 943 | { |