mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
common: json_to_msat and json_to_sat helpers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "config.h"
|
||||
#include <common/json.h>
|
||||
|
||||
struct amount_msat;
|
||||
struct amount_sat;
|
||||
struct pubkey;
|
||||
struct short_channel_id;
|
||||
|
||||
@@ -20,4 +22,12 @@ bool json_to_short_channel_id(const char *buffer, const jsmntok_t *tok,
|
||||
struct short_channel_id *scid,
|
||||
bool may_be_deprecated_form);
|
||||
|
||||
/* Extract a satoshis amount from this */
|
||||
bool json_to_sat(const char *buffer, const jsmntok_t *tok,
|
||||
struct amount_sat *sat);
|
||||
|
||||
/* Extract a millisatoshis amount from this */
|
||||
bool json_to_msat(const char *buffer, const jsmntok_t *tok,
|
||||
struct amount_msat *msat);
|
||||
|
||||
#endif /* LIGHTNING_COMMON_JSON_HELPERS_H */
|
||||
|
||||
Reference in New Issue
Block a user