joinmarket-clientserver
joinmarket-clientserver copied to clipboard
[API / QT-GUI feature request] option to not broadcast the transaction after signing
To fund an LN channel from JoinMarket there is a need to not broadcast the transaction after signing - it needs to be passed to the LN client instead. This is usually done with a simple copy-paste to the terminal
- for LND
bos open
is used most often - https://github.com/alexbosworth/balanceofsatoshis - c-lightning can take signed transactions from the command line when running:
fundchannel_start id amount
- https://lightning.readthedocs.io/lightning-fundchannel_start.7.html andfundchannel_complete id psbt
- https://lightning.readthedocs.io/lightning-fundchannel_complete.7.html
It is counter-intuitive in the QT as one needs to choose to "not accept" the transaction and scroll up for the HEX output to be copied. (related issue to improve the fee handling of direct sends https://github.com/JoinMarket-Org/joinmarket-clientserver/issues/1009)
To support this usecase better there could be an option to choose to not broadcast transaction on the Coinjoins
tab which could be the equivalent of the --psbt
flag of the sendpayment.py
.
--psbt output as psbt instead of broadcasting the transaction.
Currently only works with direct send (-N 0).
Related - #414.
Another idea I have is more customizable transaction broadcast methods, would be useful with stuff like https://github.com/sgeisler/btcbc-rs. The "not broadcast" then could be configured as just echo
.
To support this usecase better there could be an option to choose to not broadcast transaction on the Coinjoins tab which could be the equivalent of the --psbt flag of the sendpayment.py.
Agreed, at least for command line, and at least for a single join schedule, it should be eminently possible to support this. I'll mark it help wanted for now; I don't plan to do it but I'm happy to help out anyone who wants to give it a shot.
Edit: I just noticed you specified Qt explicitly. It'll be harder there as we saw in #414 so maybe just command line at first? I tend to think we will drift away from Qt to RPC-API mostly.
Sending a transaction in the CLI without coinjoin (direct send) there is already a question if want to broadcast. in the case when want to send to a lightning channel the answer is no as would need to broadcast through the lightning client.
The same is also needed in the API. Currently https://joinmarket-org.github.io/joinmarket-clientserver/api/#operation/directsend does both create and broadcast in a single step. To be able use the JoinMarket wallet through the API (in Jam) as the external funder for a lightning channel the transaction creation and broadcast need to be separated into two calls.