core-lightning/plugins
lisa neigut d9843c1957 fundchannel: handle 'all' for satoshi amount
Previously, we'd fail on 'all'. `fundchannel_start` needs an amount
in order to start a funding transaction.

The way that we approach this is to first call `txprepare` with a
placeholder address and the 'all' amount; this will return the maximum
amount available. We then clamp this to the max_funding (currently
hardcoded, in the future we'd want to consult our/the peer's features) and
then use the amount on the output in the prepared transaction as the
funding amount. We then pass this amount to fundchannel_start,
after we've started it successfully we cancel the held placeholder
transaction and prepare a second transaction for the exact amount,
using the funding address that fundchannel_start passed back.
2019-09-11 23:56:27 +00:00
..
.gitignore plugins/.gitignore: Also ignore autoclean. 2019-05-23 04:51:06 +00:00
autoclean.c libplugin: pass configuration to plugin's 'init' callback 2019-08-03 13:15:40 +02:00
fundchannel.c fundchannel: handle 'all' for satoshi amount 2019-09-11 23:56:27 +00:00
libplugin.c libplugin: new helper method for passing a raw error 2019-09-11 23:56:27 +00:00
libplugin.h libplugin: new helper method for passing a raw error 2019-09-11 23:56:27 +00:00
Makefile plugins: add fundchannel plugin, as 'fc' 2019-09-11 23:56:27 +00:00
pay.c libplugin: add required import 2019-09-11 23:56:27 +00:00
README.md plugins: add and install built-in plugin dir, add clear and disable options. 2018-12-05 01:22:55 +01:00

Plugin Directory

Anything file in this directory which is executable and doesn't start and doesn't contain ASCII symbols other than '.', '-' or '_' will be automatically loaded when lightningd starts (unless suppressed with commandline options).