Added json_tok_sha256 (#1779)

Added json_tok_sha256

Converted json_tok_tok over a few places.

[ Folded: fixed spacing ]
Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
Mark Beckwith
2018-07-30 23:11:01 -05:00
committed by Rusty Russell
parent d3edfc8028
commit 1fca7ab562
5 changed files with 17 additions and 36 deletions

View File

@@ -45,6 +45,10 @@ bool json_tok_percent(const char *buffer, const jsmntok_t *tok, double *num);
/* Extract boolean this (must be a true or false) */
bool json_tok_bool(const char *buffer, const jsmntok_t *tok, bool *b);
/* Extract sha256 hash */
bool json_tok_sha256(const char *buffer, const jsmntok_t * tok,
struct sha256 *hash);
/*
* Set the address of @out to @tok. Used as a param_table callback by handlers that
* want to unmarshal @tok themselves.