param: upgraded json_tok_pubkey

Also add json_to_pubkey as utility function.

Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
Mark Beckwith
2018-08-14 16:19:31 -05:00
committed by Rusty Russell
parent 6254d15efd
commit 9b28ecf8fc
10 changed files with 72 additions and 49 deletions

View File

@@ -63,8 +63,12 @@ bool json_tok_sha256(struct command *cmd, const char *name,
struct sha256 **hash);
/* Extract a pubkey from this */
bool json_tok_pubkey(const char *buffer, const jsmntok_t *tok,
struct pubkey *pubkey);
bool json_to_pubkey(const char *buffer, const jsmntok_t *tok,
struct pubkey *pubkey);
bool json_tok_pubkey(struct command *cmd, const char *name,
const char *buffer, const jsmntok_t *tok,
struct pubkey **pubkey);
/* Extract a short_channel_id from this */
bool json_tok_short_channel_id(const char *buffer, const jsmntok_t *tok,