mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
json: json_to_int helper.
Plugins need this for decoding the error code, for example (we only had unsigned handling). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -37,6 +37,9 @@ bool json_to_u64(const char *buffer, const jsmntok_t *tok,
|
||||
/* Extract double from this (must be a number literal) */
|
||||
bool json_to_double(const char *buffer, const jsmntok_t *tok, double *num);
|
||||
|
||||
/* Extract signed integer from this (may be a string, or a number literal) */
|
||||
bool json_to_int(const char *buffer, const jsmntok_t *tok, int *num);
|
||||
|
||||
/* Extract satoshis from this (may be a string, or a decimal number literal) */
|
||||
bool json_to_bitcoin_amount(const char *buffer, const jsmntok_t *tok,
|
||||
uint64_t *satoshi);
|
||||
|
||||
Reference in New Issue
Block a user