mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
decode: new generic API to decode bolt11 and bolt12.
This is experimental for now, but can eventually deprecated 'decodepay' and even decode other kinds of messages. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -9,10 +9,12 @@
|
||||
|
||||
struct amount_msat;
|
||||
struct amount_sat;
|
||||
struct bip340sig;
|
||||
struct channel_id;
|
||||
struct node_id;
|
||||
struct preimage;
|
||||
struct pubkey;
|
||||
struct pubkey32;
|
||||
struct secret;
|
||||
struct short_channel_id;
|
||||
struct wireaddr;
|
||||
@@ -83,6 +85,16 @@ void json_add_pubkey(struct json_stream *response,
|
||||
const char *fieldname,
|
||||
const struct pubkey *key);
|
||||
|
||||
/* '"fieldname" : "89abcdef..."' or "89abcdef..." if fieldname is NULL */
|
||||
void json_add_pubkey32(struct json_stream *response,
|
||||
const char *fieldname,
|
||||
const struct pubkey32 *key);
|
||||
|
||||
/* '"fieldname" : "89abcdef..."' or "89abcdef..." if fieldname is NULL */
|
||||
void json_add_bip340sig(struct json_stream *response,
|
||||
const char *fieldname,
|
||||
const struct bip340sig *sig);
|
||||
|
||||
/* '"fieldname" : "89abcdef..."' or "89abcdef..." if fieldname is NULL */
|
||||
void json_add_secret(struct json_stream *response,
|
||||
const char *fieldname,
|
||||
|
||||
Reference in New Issue
Block a user