core-lightning/doc/lightning-openchannel_bump.7
niftynei fc9e72b62b df-doc: add docs for openchannel_bump, more checks for valid psbt
Add docs for openchannel_bump, plus some checks that were missed for
verifying the amount is valid.
2021-03-12 14:00:19 +10:30

87 lines
2.7 KiB
Groff
Generated

.TH "LIGHTNING-OPENCHANNEL_BUMP" "7" "" "" "lightning-openchannel_bump"
.SH NAME
lightning-openchannel_bump - Command to initiate a channel RBF
.SH SYNOPSIS
\fBopenchannel_bump\fR \fIchannel_id\fR \fIamount\fR \fIinitalpsbt\fR
.SH DESCRIPTION
\fBopenchannel_bump\fR is a RPC command which initiates a channel
RBF (Replace-By-Fee) for the specified channel\. It uses the openchannel protocol
which allows for interactive transaction construction\.
\fIid\fR is the id of the channel to RBF\.
\fIamount\fR is the satoshi value that we will contribute to the channel\.
This value will be \fIadded\fR to the provided PSBT in the output which is
encumbered by the 2-of-2 script for this channel\.
\fIinitialpsbt\fR is the funded, incomplete PSBT that specifies the UTXOs and
change output for our channel contribution\. It can be updated,
see \fBopenchannel_update\fR; \fIinitialpsbt\fR must have at least one input\.
Must have the Non-Witness UTXO (PSBT_IN_NON_WITNESS_UTXO) set for
every input\. An error (code 309) will be returned if this requirement
is not met\.
.SH RETURN VALUE
On success, returns the \fIchannel_id\fR for this channel; an updated
incomplete \fIinitialpsbt\fR for this funding transaction; and the flag
\fIcommitments_secured\fR, which indiciates the completeness of the
passed back \fIpsbt\fR\. (Will always be false)\. Also returns the
\fIfunding_serial\fR, indicating the serial_id of the funding output
in the \fIpsbt\fR\.
If the peer does not support \fBoption_dual_fund\fR, this command
will return an error\.
If the channel is not in a state that is eligible for RBF, this command
will return an error\.
On error the returned object will contain \fBcode\fR and \fBmessage\fR properties,
with \fBcode\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 PSBT cannot afford the funding amount\.
.IP \[bu]
305: Peer is not connected\.
.IP \[bu]
309: PSBT missing required fields
.IP \[bu]
311: Unknown channel id\.
.IP \[bu]
312: Channel in an invalid state
.RE
.SH SEE ALSO
lightning-openchannel_\fBinit\fR(7), lightning-openchannel_\fBupdate\fR(7),
lightning-openchannel_\fBsigned\fR(7), lightning-openchannel_\fBabort\fR(7),
lightning-fundchannel_\fBstart\fR(7), lightning-fundchannel_\fBcomplete\fR(7),
\fBlightning-fundchannel\fR(7), \fBlightning-fundpsbt\fR(7), \fBlightning-utxopsbt\fR(7),
\fBlightning-multifundchannel\fR(7)
.SH AUTHOR
@niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:3a1f4ea363bae832e6c100bfb4a015223c2225d1eb8c0497e71e844df1bb9a99