json.h (714B)
1 2 3 #ifndef LNVIS_JSON_H 4 #define LNVIS_JSON_H 5 6 #include <stdio.h> 7 #include "ln.h" 8 9 enum node_parsing_state { 10 PARSING_NODE_TOKEN, 11 PARSING_NODE_ALIAS, 12 PARSING_NODE_COLOR, 13 PARSING_NODE_ID, 14 PARSING_NODE_ADDRESSES, 15 }; 16 17 enum channel_parsing_state { 18 PARSING_CHAN_TOKEN, 19 PARSING_CHAN_SHORTID, 20 PARSING_CHAN_PUBLIC, 21 PARSING_CHAN_SATOSHIS, 22 PARSING_CHAN_FLAGS, 23 PARSING_CHAN_ACTIVE, 24 PARSING_CHAN_LAST_UPDATE, 25 PARSING_CHAN_BASE_FEE, 26 PARSING_CHAN_FEE_PER, 27 PARSING_CHAN_DELAY, 28 PARSING_CHAN_SOURCE, 29 PARSING_CHAN_DESTINATION, 30 }; 31 32 int parse_clightning_nodes(FILE *fd, int *node_count, struct node **nodes); 33 int parse_clightning_channels(FILE *fd, int *nchannels, struct channel **channels); 34 35 #endif /* LNVIS_JSON_H */