| 866 | } |
| 867 | |
| 868 | struct wally_psbt *psbt_from_b64(const tal_t *ctx, |
| 869 | const char *b64, |
| 870 | size_t b64len) |
| 871 | { |
| 872 | struct wally_psbt *psbt; |
| 873 | |
| 874 | tal_wally_start(); |
| 875 | if (wally_psbt_from_base64_n(b64, b64len, /* flags */ 0, &psbt) == WALLY_OK) |
| 876 | tal_add_destructor(psbt, psbt_destroy); |
| 877 | else |
| 878 | psbt = NULL; |
| 879 | tal_wally_end_onto(ctx, psbt, struct wally_psbt); |
| 880 | |
| 881 | return psbt; |
| 882 | } |
| 883 | |
| 884 | char *fmt_wally_psbt(const tal_t *ctx, const struct wally_psbt *psbt) |
| 885 | { |