2018-05-03 16:54:39 +02:00
|
|
|
LIGHTNING-FUNDCHANNEL(7)
|
|
|
|
========================
|
|
|
|
:doctype: manpage
|
|
|
|
|
|
|
|
NAME
|
|
|
|
----
|
|
|
|
lightning-fundchannel - Command for establishing a lightning channel.
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
--------
|
|
|
|
*fundchannel* 'id' 'satoshi'
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
-----------
|
|
|
|
The *fundchannel* RPC command opens a payment channel with a peer by commiting
|
|
|
|
a funding transaction to the blockchain as defined in BOLT #2.
|
|
|
|
*fundchannel* by itself does not attempt to open a connection.
|
|
|
|
A connection must first be established using *connect*.
|
|
|
|
Once the transaction is confirmed, normal channel operations may begin.
|
|
|
|
Readiness is indicated by *listpeers* reporting a 'state' of CHANNELD_NORMAL
|
|
|
|
for the channel.
|
|
|
|
|
|
|
|
'id' is the peer id obtained from *connect*.
|
|
|
|
|
|
|
|
'satoshi' is the amount in satoshis taken from the internal wallet to fund the channel.
|
|
|
|
The string 'all' can be used to specify all available funds.
|
2018-06-15 18:45:06 +02:00
|
|
|
This value cannot be less than the dust limit, currently set to 546.
|
2018-05-03 16:54:39 +02:00
|
|
|
And it must be less than 1<<24 (approximately 0.16778 BTC).
|
|
|
|
|
|
|
|
RETURN VALUE
|
|
|
|
------------
|
|
|
|
On success, the 'tx' and 'txid' of the transaction is returned, as well as the
|
|
|
|
'channel_id' of the newly created channel.
|
|
|
|
On failure, an error is reported and the channel is not funded.
|
|
|
|
|
|
|
|
The following error codes may occur:
|
|
|
|
|
2018-06-15 18:45:06 +02:00
|
|
|
* -1. Catchall nonspecific error.
|
|
|
|
* 300. The maximum allowed funding amount is exceeded.
|
|
|
|
* 301. There are not enough funds in the internal wallet (including fees) to
|
|
|
|
create the transaction.
|
|
|
|
* 302. The dust limit is not met.
|
2018-05-03 16:54:39 +02:00
|
|
|
|
|
|
|
Failure may also occur if *lightningd* and the peer cannot agree on channel
|
|
|
|
parameters (funding limits, channel reserves, fees, etc.).
|
|
|
|
|
|
|
|
SEE ALSO
|
|
|
|
--------
|
|
|
|
lightning-connect(7), lightning-listfunds(), lightning-listpeers(7)
|
|
|
|
|
|
|
|
RESOURCES
|
|
|
|
---------
|
|
|
|
Main web site: https://github.com/ElementsProject/lightning
|