txprepare: return psbt serialized version of tx as well

Changelog-Added: JSON-API: `txprepare` returns a psbt version of the created transaction
This commit is contained in:
lisa neigut
2020-05-21 13:27:56 +09:30
committed by Rusty Russell
parent bf4cac7fb8
commit 1fb9a078b6
6 changed files with 34 additions and 0 deletions

View File

@@ -137,4 +137,10 @@ void json_add_preimage(struct json_stream *result, const char *fieldname,
void json_add_tx(struct json_stream *result,
const char *fieldname,
const struct bitcoin_tx *tx);
/* '"fieldname" : "cHNidP8BAJoCAAAAAljo..." or "cHNidP8BAJoCAAAAAljo..." if fieldname is NULL */
void json_add_psbt(struct json_stream *stream,
const char *fieldname,
struct bitcoin_tx *tx);
#endif /* LIGHTNING_COMMON_JSON_HELPERS_H */