mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-06 07:34:21 +01:00
plugins/offer: handle receiving an invoice in an onion_message.
And if we have a matching `send_invoice` offer, try to pay it! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
11
plugins/offers_inv_hook.h
Normal file
11
plugins/offers_inv_hook.h
Normal file
@@ -0,0 +1,11 @@
|
||||
#ifndef LIGHTNING_PLUGINS_OFFERS_INV_HOOK_H
|
||||
#define LIGHTNING_PLUGINS_OFFERS_INV_HOOK_H
|
||||
#include "config.h"
|
||||
#include <plugins/libplugin.h>
|
||||
|
||||
/* We got an onionmessage with an invoice! replytok could be NULL. */
|
||||
struct command_result *handle_invoice(struct command *cmd,
|
||||
const char *buf,
|
||||
const jsmntok_t *invtok,
|
||||
const jsmntok_t *replytok);
|
||||
#endif /* LIGHTNING_PLUGINS_OFFERS_INV_HOOK_H */
|
||||
Reference in New Issue
Block a user