Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rsbondi/multifund
c-lightning plugin to fund multiple channels with a single transaction
https://github.com/rsbondi/multifund
bitcoin c-lightning lightning-network
Last synced: 20 days ago
JSON representation
c-lightning plugin to fund multiple channels with a single transaction
- Host: GitHub
- URL: https://github.com/rsbondi/multifund
- Owner: rsbondi
- Created: 2019-07-25T19:59:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-10-20T23:26:22.000Z (about 5 years ago)
- Last Synced: 2024-10-18T16:29:49.721Z (29 days ago)
- Topics: bitcoin, c-lightning, lightning-network
- Language: Go
- Size: 162 KB
- Stars: 4
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Overview
A multi channel funding, multi target withdraw plugin for c-lightning.
0.7.1 release of clightning allows opening of multiple channels with a single transaction.
This plugin adds RPC commands to take advantage of this. Also, withdrawing funds to multiple
locations is a very similar process, except you know the destinations beforehand and you skip
the channel part, so it seemed logical to add as well.### Usage
Currently there are 2 new RPC commands for channel funding using either bitcoin core wallet or lightning **internal wallet**
`fund_multi` and `connect_fund_multi`
`fund_multi [{"id": "02fc...", "satoshi": 20000, "announce", true}, {...}, ...]`
`connect_fund_multi` adds `"host"` and `"port"` parameters to the above
For use with an **external wallet**
`fund_multi_start` same format as `fund_multi`
This will return the addresses to be used for transaction creation in external wallet.
Once the transaction is created and signed with eternal wallet call`fund_multi_complete tx` where tx is the hex string of the signed transaction.
This will line up the addresses and index in the transaction and complete channel funding (internal call to `fundchannel_complete`)
and broadcast the transactionAlso one command has been added for multi destination **withdraw**
`withdraw_multi [{"destination": ADDRESS, "satoshi": n}...]`
provide an array of objects with `destination` and `satoshi` values
### Options
There is one option that can be passed to the lightningd command line. `multi-wallet`. `--multi-wallet=bitcoin` will use the wallet from the bitcoin core node. Omitting this option will uset the internal c-lightning wallet, or you can be explicit with `--multi-wallet=internal`
The bitcoin core node is used for broadcasting transactions so it must be accessible even if you use clightning internal wallet.
TODO:
* Allow to set `feerate` and `minconf` on `withdraw_multi` to be consistent with `withdraw`
* Support for bitcoin cookie auth?[demo video](https://www.youtube.com/watch?v=exDYLpTncng&feature=youtu.be)