2019-08-10 02:12:44 +02:00
.TH "LIGHTNING-FUNDCHANNEL_START" "7" "" "" "lightning-fundchannel_start"
.SH NAME
2019-08-31 14:30:56 +02:00
lightning-fundchannel_start - Command for initiating channel establishment for a lightning channel
2019-08-10 02:12:44 +02:00
.SH SYNOPSIS
2019-12-21 06:53:12 +01:00
\fB fundchannel_start\fR \fI id\fR \fI amount\fR [\fI feerate\fR \fI announce\fR \fI close_to\fR \fI push_msat\fR ]
2019-08-10 02:12:44 +02:00
.SH DESCRIPTION
\fB fundchannel_start\fR is a lower level RPC command\. It allows a user to
initiate channel establishment with a connected peer\.
\fI id\fR is the node id of the remote peer\.
2019-09-19 09:51:07 +02:00
\fI amount\fR is the satoshi value that the channel will be funded at\. This
2019-08-10 02:12:44 +02:00
value MUST be accurate, otherwise the negotiated commitment transactions
will not encompass the correct channel value\.
\fI feerate\fR is an optional field\. Sets the feerate for subsequent
2019-12-04 02:33:19 +01:00
commitment transactions: see \fB fundchannel\fR \.
2019-08-10 02:12:44 +02:00
2019-08-21 10:55:49 +02:00
\fI announce\fR whether or not to announce this channel\.
2019-08-31 14:30:56 +02:00
2019-10-15 03:08:33 +02:00
\fI close_to\fR is a Bitcoin address to which the channel funds should be sent to
on close\. Only valid if both peers have negotiated \fB option_upfront_shutdown_script\fR \.
Returns \fB close_to\fR set to closing script iff is negotiated\.
2019-12-21 06:53:12 +01:00
\fI push_msat\fR is the amount of millisatoshis to push to the channel peer at
open\. Note that this is a gift to the peer -- these satoshis are
added to the initial balance of the peer at channel start and are largely
unrecoverable once pushed\.
2019-10-15 03:08:33 +02:00
2019-08-21 10:55:49 +02:00
Note that the funding transaction MUST NOT be broadcast until after
channel establishment has been successfully completed by running
\fB fundchannel_complete\fR , as the commitment transactions for this channel
2019-08-31 14:30:56 +02:00
are not secured until the complete command succeeds\. Broadcasting
2019-08-21 10:55:49 +02:00
transaction before that can lead to unrecoverable loss of funds\.
2019-08-10 02:12:44 +02:00
.SH RETURN VALUE
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
On success, an object is returned, containing:
2019-08-10 02:12:44 +02:00
doc/schemas: disableoffer, disconnect, feerates, fetchinvoice, fundchannel, fundchannel_cancel, fundchannel_complete, fundchannel_start, fundpsbt, getinfo, getlog, getroute.
We also add a test for getlog, since it was never called by the
testsuite.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2021-05-26 09:35:01 +02:00
.RS
.IP \[ bu]
\fB funding_address\fR (string): The address to send funding to for the channel
.IP \[ bu]
\fB scriptpubkey\fR (hex): The raw scriptPubkey for the address
.IP \[ bu]
\fB close_to\fR (hex, optional): The raw scriptPubkey which mutual close will go to; only present if \fI close_to\fR parameter was specified and peer supports \fB option_upfront_shutdown_script\fR
.RE
2019-08-10 02:12:44 +02:00
2020-01-05 16:40:17 +01:00
On error the returned object will contain \fB code\fR and \fB message\fR properties,
with \fB code\fR being one of the following:
.RS
.IP \[ bu]
-32602: If the given parameters are wrong\.
.IP \[ bu]
-1: Catchall nonspecific error\.
.IP \[ bu]
300: The amount exceeded the maximum configured funding amount\.
.IP \[ bu]
301: The provided \fB push_msat\fR is greater than the provided \fB amount\fR \.
.IP \[ bu]
304: Still syncing with bitcoin network
.IP \[ bu]
305: Peer is not connected\.
.IP \[ bu]
306: Unknown peer id\.
.RE
2019-08-10 02:12:44 +02:00
.SH AUTHOR
2019-08-31 14:30:56 +02:00
Lisa Neigut \fI <niftynei@gmail.com\fR > is mainly responsible\.
2019-08-10 02:12:44 +02:00
.SH SEE ALSO
2021-03-09 22:14:08 +01:00
\fB lightning-connect\fR (7), \fB lightning-fundchannel\fR (7), \fB lightning-multifundchannel\fR (7),
2019-08-10 02:12:44 +02:00
lightning-fundchannel_\fB complete\fR (7), lightning-fundchannel_\fB cancel\fR (7)
2021-03-11 05:33:47 +01:00
lightning-openchannel_\fB init\fR (7), lightning-openchannel_\fB update\fR (7),
2021-03-09 22:14:08 +01:00
lightning-openchannel_\fB signed\fR (7), lightning-openchannel_\fB bump\fR (7),
lightning-openchannel_\fB abort\fR (7)
2019-08-10 02:12:44 +02:00
.SH RESOURCES
2019-08-31 14:30:56 +02:00
Main web site: \fI https://github.com/ElementsProject/lightning\fR
2019-08-10 02:12:44 +02:00
2021-06-16 03:08:17 +02:00
\" SHA256STAMP:2eeea3afea8c76e2cc9d5f449d43f1dbfe8e68edcc4e1ee33cb88d024e5f03de