Skip to content

Commit 99c3653

Browse files
committed
renepay: add rpc that replaces sendpay
Add an rpc to renepay that is similar to sendpay that handles BOLT11 and BOLT12 payments. This is not the most elegant solution but it is a workaround until we implement it into lightningd which has more development friction. Changelog-None. Signed-off-by: Lagrang3 <[email protected]>
1 parent f75a73d commit 99c3653

File tree

4 files changed

+451
-1
lines changed

4 files changed

+451
-1
lines changed

plugins/renepay/Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ PLUGIN_RENEPAY_SRC := \
1010
plugins/renepay/routebuilder.c \
1111
plugins/renepay/routetracker.c \
1212
plugins/renepay/routefail.c \
13+
plugins/renepay/sendpay.c \
1314
plugins/renepay/uncertainty.c \
1415
plugins/renepay/mods.c \
1516
plugins/renepay/errorcodes.c \
@@ -29,6 +30,7 @@ PLUGIN_RENEPAY_HDRS := \
2930
plugins/renepay/routebuilder.h \
3031
plugins/renepay/routetracker.h \
3132
plugins/renepay/routefail.h \
33+
plugins/renepay/sendpay.h \
3234
plugins/renepay/uncertainty.h \
3335
plugins/renepay/mods.h \
3436
plugins/renepay/errorcodes.h \
@@ -43,6 +45,6 @@ PLUGIN_ALL_HEADER += $(PLUGIN_RENEPAY_HDRS)
4345
# Make all plugins depend on all plugin headers, for simplicity.
4446
$(PLUGIN_RENEPAY_OBJS): $(PLUGIN_RENEPAY_HDRS)
4547

46-
plugins/cln-renepay: $(PLUGIN_RENEPAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) bitcoin/chainparams.o common/gossmap.o common/gossmods_listpeerchannels.o common/fp16.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o common/sciddir_or_pubkey.o wire/bolt12_wiregen.o wire/onion_wiregen.o
48+
plugins/cln-renepay: $(PLUGIN_RENEPAY_OBJS) $(PLUGIN_LIB_OBJS) $(PLUGIN_COMMON_OBJS) $(JSMN_OBJS) $(CCAN_OBJS) bitcoin/chainparams.o common/gossmap.o common/gossmods_listpeerchannels.o common/fp16.o common/dijkstra.o common/bolt12.o common/bolt12_merkle.o common/sciddir_or_pubkey.o wire/bolt12_wiregen.o wire/onion_wiregen.o common/sphinx.o common/onion_encode.o common/hmac.o common/onionreply.o
4749

4850
include plugins/renepay/test/Makefile

plugins/renepay/main.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include <plugins/renepay/mods.h>
1818
#include <plugins/renepay/payplugin.h>
1919
#include <plugins/renepay/routetracker.h>
20+
#include <plugins/renepay/sendpay.h>
2021
#include <stdio.h>
2122

2223
// TODO(eduardo): notice that pending attempts performed with another
@@ -458,6 +459,10 @@ static const struct plugin_command commands[] = {
458459
"renepay",
459460
json_pay
460461
},
462+
{
463+
"renesendpay",
464+
json_renesendpay
465+
},
461466
};
462467

463468
static const struct plugin_notification notifications[] = {

0 commit comments

Comments
 (0)