mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
lightningd: add json_add_tx helper.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#define JSMN_STRICT 1
|
||||
# include <external/jsmn/jsmn.h>
|
||||
|
||||
struct bitcoin_tx;
|
||||
struct bitcoin_txid;
|
||||
struct chainparams;
|
||||
struct channel_id;
|
||||
@@ -153,6 +154,10 @@ void json_add_hex(struct json_stream *result, const char *fieldname,
|
||||
void json_add_hex_talarr(struct json_stream *result,
|
||||
const char *fieldname,
|
||||
const tal_t *data);
|
||||
/* '"fieldname" : "010000000001..."' or "010000000001..." if fieldname is NULL */
|
||||
void json_add_tx(struct json_stream *result,
|
||||
const char *fieldname,
|
||||
const struct bitcoin_tx *tx);
|
||||
|
||||
/* Adds both a 'raw' number field and an 'amount_msat' field */
|
||||
void json_add_amount_msat_compat(struct json_stream *result,
|
||||
|
||||
Reference in New Issue
Block a user