mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
67590fc6be
Fixes: #3192 Changelog-Added: `waitanyinvoice` now supports a `timeout` parameter, which when set will cause the command to fail when the timeout is reached; can set this to 0 to fail immediately if no new invoice has been paid yet.
61 lines
1.8 KiB
Groff
Generated
61 lines
1.8 KiB
Groff
Generated
.TH "LIGHTNING-WAITANYINVOICE" "7" "" "" "lightning-waitanyinvoice"
|
|
.SH NAME
|
|
lightning-waitanyinvoice - Command for waiting for payments
|
|
.SH SYNOPSIS
|
|
|
|
\fBwaitanyinvoice\fR [\fIlastpay_index\fR] [\fItimeout\fR]
|
|
|
|
.SH DESCRIPTION
|
|
|
|
The \fBwaitanyinvoice\fR RPC command waits until an invoice is paid, then
|
|
returns a single entry as per \fBlistinvoice\fR\. It will not return for
|
|
any invoices paid prior to or including the \fIlastpay_index\fR\.
|
|
|
|
|
|
This is usually called iteratively: once with no arguments, then
|
|
repeatedly with the returned \fIpay_index\fR entry\. This ensures that no
|
|
paid invoice is missed\.
|
|
|
|
|
|
The \fIpay_index\fR is a monotonically-increasing number assigned to an
|
|
invoice when it gets paid\. The first valid \fIpay_index\fR is 1; specifying
|
|
\fIlastpay_index\fR of 0 equivalent to not specifying a \fIlastpay_index\fR\.
|
|
Negative \fIlastpay_index\fR is invalid\.
|
|
|
|
|
|
If \fItimeout\fR is specified, wait at most that number of seconds, which
|
|
must be an integer\.
|
|
If the specified \fItimeout\fR is reached, this command will return with an
|
|
error\.
|
|
You can specify this to 0 so that \fBwaitanyinvoice\fR will return
|
|
immediately with an error if no pending invoice is available yet\.
|
|
If unspecified, this command will wait indefinitely\.
|
|
|
|
.SH RETURN VALUE
|
|
|
|
On success, an invoice description will be returned as per
|
|
\fBlightning-listinvoice\fR(7): \fIcomplete\fR will always be \fItrue\fR\.
|
|
|
|
|
|
Possible errors are:
|
|
|
|
.RS
|
|
.IP \[bu]
|
|
904\.
|
|
The \fItimeout\fR was reached without an invoice being paid\.
|
|
|
|
.RE
|
|
.SH AUTHOR
|
|
|
|
Rusty Russell \fI<rusty@rustcorp.com.au\fR> is mainly responsible\.
|
|
|
|
.SH SEE ALSO
|
|
|
|
\fBlightning-waitinvoice\fR(7), \fBlightning-listinvoice\fR(7),
|
|
\fBlightning-delinvoice\fR(7), \fBlightning-invoice\fR(7)\.
|
|
|
|
.SH RESOURCES
|
|
|
|
Main web site: \fIhttps://github.com/ElementsProject/lightning\fR
|
|
|