Openchannels: new command for batched/coin-controlled channel opening #91
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a new command
openchannels
with the intent of batching channel opens and implementing coin control, meaning one can select the UTXOs to spend from. Batching is implemented using LNDs support for PSBTs, so there is no external wallet required. The command expects a comma-separated list of public node ids as a minimal input. UTXOs and amounts can be specified as a comma-separated outpoint string.The command will perform connection checks automatically in the setup phase. Once the setup phase is passed, channel opening is initiated. When everything goes well, before final signing and broadcasting, the user is asked to confirm the channel opening. Anchor reserve outputs are created/respected automatically.
The command has several modes of operation for specifying amounts and utxos:
100
: relative amounts are rescaled to fit all UTXOs - no change created100
: if sum of amounts is smaller than the UTXO budget, change is created, if sum of amounts is larger than UTXO budget, the amount is rescaled such that no change is createdThe user can decide if the opening should be private (unannounced) or public (announced).
TODO: