mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
json: reverse parse a coin_mvt tag back into an enum
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#define LIGHTNING_COMMON_JSON_HELPERS_H
|
||||
#include "config.h"
|
||||
#include <bitcoin/tx.h>
|
||||
#include <common/coin_mvt.h>
|
||||
#include <common/json.h>
|
||||
#include <wire/wire.h>
|
||||
|
||||
@@ -73,6 +74,10 @@ bool json_to_outpoint(const char *buffer, const jsmntok_t *tok,
|
||||
bool json_to_channel_id(const char *buffer, const jsmntok_t *tok,
|
||||
struct channel_id *cid);
|
||||
|
||||
/* Extract a coin movement 'tag' from this */
|
||||
bool json_to_coin_mvt_tag(const char *buffer, const jsmntok_t *tok,
|
||||
enum mvt_tag *tag);
|
||||
|
||||
/* Split a json token into 2 tokens given a splitting character */
|
||||
bool split_tok(const char *buffer, const jsmntok_t *tok,
|
||||
char split,
|
||||
|
||||
Reference in New Issue
Block a user