2020-08-21 11:58:20 +02:00
|
|
|
#include <plugins/spender/fundchannel.h>
|
2020-08-21 11:31:33 +02:00
|
|
|
#include <plugins/spender/multifundchannel.h>
|
2020-10-22 02:57:07 +02:00
|
|
|
#include <plugins/spender/multiwithdraw.h>
|
2020-10-21 03:18:19 +02:00
|
|
|
#include <plugins/spender/openchannel.h>
|
2020-09-09 12:25:20 +02:00
|
|
|
|
|
|
|
/*~ The spender plugin contains various commands that handle
|
|
|
|
* spending from the onchain wallet. */
|
|
|
|
|
|
|
|
static
|
2021-01-13 04:00:24 +01:00
|
|
|
const char *spender_init(struct plugin *p, const char *b, const jsmntok_t *t)
|
2020-09-09 12:25:20 +02:00
|
|
|
{
|
2020-10-21 03:18:19 +02:00
|
|
|
openchannel_init(p, b, t);
|
2020-09-09 12:25:20 +02:00
|
|
|
/* whatever_init(p, b, t); */
|
2021-01-13 04:00:24 +01:00
|
|
|
return NULL;
|
2020-09-09 12:25:20 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
|
|
|
struct plugin_command *commands;
|
2020-10-21 03:18:19 +02:00
|
|
|
struct plugin_notification *notifs;
|
2020-09-09 12:25:20 +02:00
|
|
|
|
|
|
|
setup_locale();
|
|
|
|
|
2021-09-07 06:06:06 +02:00
|
|
|
commands = tal_arr(NULL, struct plugin_command, 0);
|
2020-09-09 12:25:20 +02:00
|
|
|
|
2020-09-09 12:26:14 +02:00
|
|
|
tal_expand(&commands, multiwithdraw_commands, num_multiwithdraw_commands);
|
2020-08-21 11:58:20 +02:00
|
|
|
tal_expand(&commands, fundchannel_commands, num_fundchannel_commands);
|
2020-08-21 11:31:33 +02:00
|
|
|
tal_expand(&commands, multifundchannel_commands, num_multifundchannel_commands);
|
2020-09-09 12:25:20 +02:00
|
|
|
/* tal_expand(&commands, whatever_commands, num_whatever_commands); */
|
|
|
|
|
2021-09-07 06:06:06 +02:00
|
|
|
notifs = tal_arr(NULL, struct plugin_notification, 0);
|
2020-10-21 03:18:19 +02:00
|
|
|
tal_expand(¬ifs, openchannel_notifs, num_openchannel_notifs);
|
|
|
|
|
2020-09-09 12:25:20 +02:00
|
|
|
plugin_main(argv, &spender_init, PLUGIN_STATIC, true,
|
|
|
|
NULL,
|
2021-09-07 06:06:06 +02:00
|
|
|
take(commands), tal_count(commands),
|
|
|
|
take(notifs), tal_count(notifs),
|
2020-09-09 12:25:20 +02:00
|
|
|
NULL, 0,
|
2021-04-28 17:28:27 +02:00
|
|
|
NULL, 0, /* Notification topics */
|
2020-09-09 12:25:20 +02:00
|
|
|
NULL);
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|