json: helper to parse pubkeys.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-10-11 20:33:50 +10:30
committed by Christian Decker
parent 8430e33f3b
commit 79ebb9dfd0
5 changed files with 15 additions and 9 deletions

View File

@@ -59,6 +59,10 @@ void json_add_pubkey(struct json_result *response,
const char *fieldname,
const struct pubkey *key);
/* Extract a pubkey from this */
bool json_tok_pubkey(const char *buffer, const jsmntok_t *tok,
struct pubkey *pubkey);
/* '"fieldname" : "1234:5:6"' */
void json_add_short_channel_id(struct json_result *response,
const char *fieldname,