plugins/fetchinvoice: plugin to send an invoice_request for a given offer

Doesn't catch the reply yet, but prepares the invoice request based on
the offer and sends it.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2020-12-16 13:48:00 +10:30
committed by Christian Decker
parent 43b71de897
commit 3eada358e9
3 changed files with 488 additions and 1 deletions

View File

@@ -29,6 +29,10 @@ PLUGIN_OFFERS_SRC := plugins/offers.c plugins/offers_offer.c plugins/offers_invr
PLUGIN_OFFERS_OBJS := $(PLUGIN_OFFERS_SRC:.c=.o)
PLUGIN_OFFERS_HEADER := plugins/offers_offer.h plugins/offers_invreq_hook.h
PLUGIN_FETCHINVOICE_SRC := plugins/fetchinvoice.c
PLUGIN_FETCHINVOICE_OBJS := $(PLUGIN_FETCHINVOICE_SRC:.c=.o)
PLUGIN_FETCHINVOICE_HEADER :=
PLUGIN_SPENDER_SRC := \
plugins/spender/fundchannel.c \
plugins/spender/main.c \
@@ -55,6 +59,7 @@ PLUGIN_ALL_SRC := \
ifeq ($(EXPERIMENTAL_FEATURES),1)
PLUGIN_ALL_SRC += $(PLUGIN_OFFERS_SRC)
PLUGIN_ALL_SRC += $(PLUGIN_FETCHINVOICE_SRC)
endif
PLUGIN_ALL_HEADER := \
@@ -73,7 +78,7 @@ PLUGINS := \
plugins/spenderp
ifeq ($(EXPERIMENTAL_FEATURES),1)
PLUGINS += plugins/offers
PLUGINS += plugins/offers plugins/fetchinvoice
endif
# Make sure these depend on everything.
@@ -138,6 +143,8 @@ plugins/spenderp: bitcoin/chainparams.o bitcoin/psbt.o common/psbt_open.o $(PLUG
plugins/offers: bitcoin/chainparams.o $(PLUGIN_OFFERS_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) common/bolt12.o common/bolt12_merkle.o common/iso4217.o wire/bolt12_exp_wiregen.o $(WIRE_OBJS) bitcoin/block.o common/channel_id.o bitcoin/preimage.o $(JSMN_OBJS) $(CCAN_OBJS)
plugins/fetchinvoice: bitcoin/chainparams.o $(PLUGIN_FETCHINVOICE_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) common/bolt12.o common/bolt12_merkle.o common/iso4217.o wire/bolt12_exp_wiregen.o $(WIRE_OBJS) bitcoin/block.o common/channel_id.o bitcoin/preimage.o $(JSMN_OBJS) $(CCAN_OBJS) common/gossmap.o common/dijkstra.o common/route.o common/blindedpath.o common/hmac.o common/blinding.o
$(PLUGIN_ALL_OBJS): $(PLUGIN_LIB_HEADER)
# Generated from PLUGINS definition in plugins/Makefile