diff --git a/doc/lightning-waitinvoice.7 b/doc/lightning-waitinvoice.7 index 51ad99087..7fd4b3541 100644 --- a/doc/lightning-waitinvoice.7 +++ b/doc/lightning-waitinvoice.7 @@ -2,12 +2,12 @@ .\" Title: lightning-waitinvoice .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 01/13/2018 +.\" Date: 02/03/2018 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "LIGHTNING\-WAITINVOI" "7" "01/13/2018" "\ \&" "\ \&" +.TH "LIGHTNING\-WAITINVOI" "7" "02/03/2018" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,7 +37,11 @@ lightning-waitinvoice \- Protocol for waiting for specific payment\&. The \fBwaitinvoice\fR RPC command waits until a specific invoice is paid, then returns that single entry as per \fBlistinvoice\fR\&. .SH "RETURN VALUE" .sp -On success, an invoice description will be returned as per lightning\-listinvoice(7): \fIcomplete\fR will always be \fItrue\fR\&. +On success, an invoice description will be returned as per lightning\-listinvoice(7)\&. The \fIstatus\fR field will be \fIpaid\fR\&. +.sp +If the invoice is deleted while unpaid, or the invoice does not exist, this command will return with an error with code \-1\&. +.sp +If the invoice expires before being pad, or is already expired, this command will return with an error with code \-2, with the data being the invoice data as per \fBlistinvoice\fR\&. .SH "AUTHOR" .sp Christian Decker is mainly responsible\&. diff --git a/doc/lightning-waitinvoice.7.txt b/doc/lightning-waitinvoice.7.txt index 3c61fdb3b..eba1baa33 100644 --- a/doc/lightning-waitinvoice.7.txt +++ b/doc/lightning-waitinvoice.7.txt @@ -12,14 +12,20 @@ SYNOPSIS DESCRIPTION ----------- -The *waitinvoice* RPC command waits until a specific invoice is paid, then -returns that single entry as per *listinvoice*. +The *waitinvoice* RPC command waits until a specific invoice is paid, +then returns that single entry as per *listinvoice*. RETURN VALUE ------------ -On success, an invoice description will be returned as per lightning-listinvoice(7): 'complete' will always be 'true'. +On success, an invoice description will be returned as per lightning-listinvoice(7). +The 'status' field will be 'paid'. -//FIXME:Enumerate errors +If the invoice is deleted while unpaid, or the invoice does not exist, +this command will return with an error with code -1. + +If the invoice expires before being pad, or is already expired, this +command will return with an error with code -2, with the data being +the invoice data as per *listinvoice*. AUTHOR ------