2020-09-09 12:25:20 +02:00
|
|
|
#include <common/utils.h>
|
|
|
|
#include <plugins/libplugin.h>
|
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)
|
|
|
|
{
|
|
|
|
char *owner = tal(NULL, char);
|
|
|
|
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();
|
|
|
|
|
|
|
|
commands = tal_arr(owner, struct plugin_command, 0);
|
|
|
|
|
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); */
|
|
|
|
|
2020-10-21 03:18:19 +02:00
|
|
|
notifs = tal_arr(owner, struct plugin_notification, 0);
|
|
|
|
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,
|
|
|
|
commands, tal_count(commands),
|
2020-10-21 03:18:19 +02:00
|
|
|
notifs, tal_count(notifs),
|
2020-09-09 12:25:20 +02:00
|
|
|
NULL, 0,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
tal_free(owner);
|
|
|
|
return 0;
|
|
|
|
}
|