2016-09-06 09:17:41 +02:00
'\" t
2017-01-23 00:58:32 +01:00
. \" Title: lightning-waitanyinvoice
2016-09-06 09:17:41 +02:00
. \" Author: [see the "AUTHOR" section]
. \" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
2018-01-13 12:15:47 +01:00
. \" Date: 01/13/2018
2016-09-06 09:17:41 +02:00
. \" Manual: \ \&
. \" Source: \ \&
. \" Language: English
. \"
2018-01-13 12:15:47 +01:00
.TH "LIGHTNING\-WAITANYIN" "7" "01/13/2018" "\ \&" "\ \&"
2016-09-06 09:17:41 +02:00
. \" -----------------------------------------------------------------
. \" * Define some portability stuff
. \" -----------------------------------------------------------------
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
. \" http://bugs.debian.org/507673
. \" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
. \" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n (.g .ds Aq \(aq
.el .ds Aq '
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
.SH "NAME"
2017-01-23 00:58:32 +01:00
lightning-waitanyinvoice \- Protocol for waiting for payments\& .
2016-09-06 09:17:41 +02:00
.SH "SYNOPSIS"
.sp
2017-12-26 23:58:42 +01:00
\fB waitanyinvoice\fR [\fI lastpay_index\fR ]
2016-09-06 09:17:41 +02:00
.SH "DESCRIPTION"
.sp
2017-12-26 23:58:42 +01:00
The \fB waitanyinvoice\fR RPC command waits until an invoice is paid, then returns a single entry as per \fB listinvoice\fR \& . It will not return for any invoices paid prior to or including the \fI lastpay_index\fR \& .
2016-09-06 09:17:41 +02:00
.sp
2017-12-26 23:58:42 +01:00
This is usually called iteratively: once with no arguments, then repeatedly with the returned \fI pay_index\fR entry\& . This ensures that no paid invoice is missed\& .
.sp
The \fI pay_index\fR is a monotonically\- increasing number assigned to an invoice when it gets paid\& . The first valid \fI pay_index\fR is 1; specifying \fI lastpay_index\fR of 0 equivalent to not specifying a \fI lastpay_index\fR \& . Negative \fI lastpay_index\fR is invalid\& .
2016-09-06 09:17:41 +02:00
.SH "RETURN VALUE"
.sp
2018-01-13 12:15:47 +01:00
On success, an invoice description will be returned as per lightning\- listinvoice(7): \fI complete\fR will always be \fI true\fR \& .
2016-09-06 09:17:41 +02:00
.SH "AUTHOR"
.sp
Rusty Russell <rusty@rustcorp\& .com\& .au> is mainly responsible\& .
.SH "SEE ALSO"
.sp
2018-01-22 10:49:48 +01:00
lightning\- waitinvoice(7), lightning\- listinvoice(7), lightning\- delinvoice(7), lightning\- invoice(7)\& .
2016-09-06 09:17:41 +02:00
.SH "RESOURCES"
.sp
Main web site: https://github\& .com/ElementsProject/lightning