| 545 | } |
| 546 | |
| 547 | void json_add_psbt(struct json_stream *stream, |
| 548 | const char *fieldname, |
| 549 | const struct wally_psbt *psbt TAKES) |
| 550 | { |
| 551 | const char *psbt_b64; |
| 552 | psbt_b64 = psbt_to_b64(NULL, psbt); |
| 553 | json_add_string(stream, fieldname, take(psbt_b64)); |
| 554 | if (taken(psbt)) |
| 555 | tal_free(psbt); |
| 556 | } |
| 557 | |
| 558 | void json_add_amount_msat_compat(struct json_stream *result, |
| 559 | struct amount_msat msat, |
no test coverage detected