mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +01:00
plugins/spender/: New plugin that will eventually absorb all onchain-spending commands.
This commit is contained in:
committed by
Rusty Russell
parent
210734f1b6
commit
e04febfe0c
33
plugins/spender/main.c
Normal file
33
plugins/spender/main.c
Normal file
@@ -0,0 +1,33 @@
|
||||
#include <common/utils.h>
|
||||
#include <plugins/libplugin.h>
|
||||
|
||||
/*~ The spender plugin contains various commands that handle
|
||||
* spending from the onchain wallet. */
|
||||
|
||||
static
|
||||
void spender_init(struct plugin *p, const char *b, const jsmntok_t *t)
|
||||
{
|
||||
/* whatever_init(p, b, t); */
|
||||
}
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
char *owner = tal(NULL, char);
|
||||
struct plugin_command *commands;
|
||||
|
||||
setup_locale();
|
||||
|
||||
commands = tal_arr(owner, struct plugin_command, 0);
|
||||
|
||||
/* tal_expand(&commands, whatever_commands, num_whatever_commands); */
|
||||
|
||||
plugin_main(argv, &spender_init, PLUGIN_STATIC, true,
|
||||
NULL,
|
||||
commands, tal_count(commands),
|
||||
NULL, 0,
|
||||
NULL, 0,
|
||||
NULL);
|
||||
|
||||
tal_free(owner);
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user