Commit Graph

8 Commits

Author SHA1 Message Date
Rusty Russell
c5099b1647 libplugin: clean up API.
When we used to allow cmd to be NULL, we had to hand the plugin
everywhere.  We no longer do.

1. Various jsonrpc_ functions no longer need the plugin arg.
2. send_outreq no longer needs a plugin arg.
3. The init function takes a command, not a plugin.
4. Remove command_deprecated_in_nocmd_ok.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2024-11-07 17:04:35 +10:30
Alex Myers
88504ea6d2 reckless-rpc: catch failed reckless subprocess
... before processing the output. It's probably a python backtrace, not
json anyway.
2024-08-12 18:10:45 -07:00
Alex Myers
1cb478d2c7 reckless-rpc: catch failed json parsing of reckless output 2024-08-12 18:10:45 -07:00
Alex Myers
2567a116b1 reckless-rpc: catch old installed version
If the rpc plugin is run while an older version of reckless is found on
PATH, it produces an error:

2024-08-01T18:32:00.849Z DEBUG   plugin-recklessrpc: reckless-stderr:usage: reckless [-h] [-d RECKLESS_DIR] [-l LIGHTNING] [-c CONF] [-r] [--network NETWORK] [-v]
{install,uninstall,search,enable,disable,source,help} ...
reckless: error: unrecognized arguments: --json

Catch this and don't try to parse the output as json.
2024-08-12 18:10:45 -07:00
Alex Myers
f93ec36f8a reckless-rpc: accept and pass generic subcommands
This allows generic subcommands to be passed to reckless-rpc along with
the target to search/install/etc..  These commands are unvalidated so
far and may crash the reckless process.

Changelog-Added: reckless-rpc plugin: issue commands to reckless over rpc.
2024-08-12 18:10:45 -07:00
Alex Myers
9eb5359eb0 reckless-rpc: auto-accept reckless config creation dialog
This would interupt most commands during the config reading
step until the user accepts the prompt to create a new empty
config.
2024-08-12 18:10:45 -07:00
Alex Myers
1d9ff8b022 reckless-rpc: read lightningdir and network from listconfigs 2024-08-12 18:10:45 -07:00
Alex Myers
f69c4d6385 reckless-rpc: initial boilerplate
Trying a single command first - reckless-search to test
launching a reckless process and processing the result.
2024-08-12 18:10:45 -07:00