core-lightning/doc/lightning-fundchannel.7.txt
Rusty Russell 7f508cca5f wallet: clarify error 302.
"Dust limit unmet" seems undescriptive to me.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2018-06-18 12:33:25 +02:00

54 lines
1.8 KiB
Plaintext

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.
This value cannot be less than the dust limit, currently set to 546.
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:
* -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 output amount is too small, and would be considered dust.
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