rgb-cln/doc/lightning-reserveinputs.7

82 lines
2.3 KiB
Groff

.TH "LIGHTNING-RESERVEINPUTS" "7" "" "" "lightning-reserveinputs"
.SH NAME
lightning-reserveinputs - Construct a transaction and reserve the UTXOs it spends
.SH SYNOPSIS
\fBreserveinputs\fR \fIpsbt\fR [\fIexclusive\fR] [\fIreserve\fR]
.SH DESCRIPTION
The \fBreserveinputs\fR RPC command places (or increases) reservations on any
inputs specified in \fIpsbt\fR which are known to lightningd\. It will fail
with an error if any of the inputs are known to be spent, and ignore inputs
which are unknown\.
Normally the command will fail (with no reservations made) if an input
is already reserved\. If \fIexclusive\fR is set to \fIFalse\fR, then existing
reservations are simply extended, rather than causing failure\.
By default, reservations are for the next 72 blocks (approximately 6
hours), but this can be changed by setting \fIreserve\fR\.
.SH RETURN VALUE
On success, an object containing \fBreservations\fR is returned\. It is an array of objects, where each object contains:
.RS
.IP \[bu]
\fBtxid\fR (txid): the transaction id
.IP \[bu]
\fBvout\fR (u32): the output number which was reserved
.IP \[bu]
\fBwas_reserved\fR (boolean): whether the input was already reserved
.IP \[bu]
\fBreserved\fR (boolean): whether the input is now reserved (always \fItrue\fR)
.IP \[bu]
\fBreserved_to_block\fR (u32): what blockheight the reservation will expire
.RE
On success, a \fIreservations\fR array is returned, with an entry for each input
which was reserved:
.RS
.IP \[bu]
\fItxid\fR is the input transaction id\.
.IP \[bu]
\fIvout\fR is the input index\.
.IP \[bu]
\fIwas_reserved\fR indicates whether the input was already reserved\.
.IP \[bu]
\fIreserved\fR indicates that the input is now reserved (i\.e\. true)\.
.IP \[bu]
\fIreserved_to_block\fR indicates what blockheight the reservation will expire\.
.RE
On failure, an error is reported and no UTXOs are reserved\.
The following error codes may occur:
.RS
.IP \[bu]
-32602: Invalid parameter, such as specifying a spent/reserved input in \fIpsbt\fR\.
.RE
.SH AUTHOR
niftynei \fI<niftynei@gmail.com\fR> is mainly responsible\.
.SH SEE ALSO
\fBlightning-unreserveinputs\fR(7), \fBlightning-signpsbt\fR(7), \fBlightning-sendpsbt\fR(7)
.SH RESOURCES
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
\" SHA256STAMP:2bfe105517873caed097f1ec009dfda2ecfb561d57b2f31208a7e12a4645ee5e