From f0311209034f44af35f343c0d8a4efa65357f853 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Sat, 13 Jan 2018 21:45:47 +1030 Subject: [PATCH] doc: update return values of delinvoice, invoice, listinvoice, waitinvoice, waitanyinvoice. Signed-off-by: Rusty Russell --- doc/lightning-delinvoice.7 | 6 +++--- doc/lightning-delinvoice.7.txt | 2 +- doc/lightning-invoice.7 | 6 +++--- doc/lightning-invoice.7.txt | 5 +++-- doc/lightning-listinvoice.7 | 6 +++--- doc/lightning-listinvoice.7.txt | 4 +--- doc/lightning-waitanyinvoice.7 | 6 +++--- doc/lightning-waitanyinvoice.7.txt | 2 +- doc/lightning-waitinvoice.7 | 6 +++--- doc/lightning-waitinvoice.7.txt | 2 +- 10 files changed, 22 insertions(+), 23 deletions(-) diff --git a/doc/lightning-delinvoice.7 b/doc/lightning-delinvoice.7 index 5ca813c8c..1c058f18f 100644 --- a/doc/lightning-delinvoice.7 +++ b/doc/lightning-delinvoice.7 @@ -2,12 +2,12 @@ .\" Title: lightning-delinvoice .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 09/06/2016 +.\" Date: 01/13/2018 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "LIGHTNING\-DELINVOIC" "7" "09/06/2016" "\ \&" "\ \&" +.TH "LIGHTNING\-DELINVOIC" "7" "01/13/2018" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,7 +37,7 @@ lightning-delinvoice \- Protocol for removing an unpaid invoice\&. The \fBdelinvoice\fR RPC command removes an unpaid invoice\&. The caller should be particularly aware of the error case caused by a payment just before this command is invoked! .SH "RETURN VALUE" .sp -On success, the \fIrhash\fR, \fIlabel\fR and \fImsatoshi\fR will be returned\&. +On success, an invoice description will be returned as per lightning\-listinvoice(7)\&. .SH "AUTHOR" .sp Rusty Russell is mainly responsible\&. diff --git a/doc/lightning-delinvoice.7.txt b/doc/lightning-delinvoice.7.txt index 7bcf52e68..3f2dd9f6c 100644 --- a/doc/lightning-delinvoice.7.txt +++ b/doc/lightning-delinvoice.7.txt @@ -18,7 +18,7 @@ just before this command is invoked! RETURN VALUE ------------ -On success, the 'rhash', 'label' and 'msatoshi' will be returned. +On success, an invoice description will be returned as per lightning-listinvoice(7). //FIXME:Enumerate errors diff --git a/doc/lightning-invoice.7 b/doc/lightning-invoice.7 index c8f7a030a..0b4afe8aa 100644 --- a/doc/lightning-invoice.7 +++ b/doc/lightning-invoice.7 @@ -2,12 +2,12 @@ .\" Title: lightning-invoice .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 01/10/2018 +.\" Date: 01/13/2018 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "LIGHTNING\-INVOICE" "7" "01/10/2018" "\ \&" "\ \&" +.TH "LIGHTNING\-INVOICE" "7" "01/13/2018" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,7 +41,7 @@ The \fImsatoshi\fR can be the string "any", which creates an invoice that can be The \fIlabel\fR must be unique; it is never revealed to other nodes on the lightning network, but it can be used to query the status of this invoice\&. .SH "RETURN VALUE" .sp -On success, a hash is returned as \fIrhash\fR to be given to the payer\&. It also returns a BOLT11 invoice as \fIbolt11\fR to be given to the payer\&. On failure, an error is returned and no invoice is created\&. If the lightning process fails before responding, the caller should use getinvoice(7) to query whether this invoice was created or not\&. +On success, a hash is returned as \fIrhash\fR to be given to the payer, and the \fIexpiry_time\fR as a UNIX timestamp\&. It also returns a BOLT11 invoice as \fIbolt11\fR to be given to the payer\&. On failure, an error is returned and no invoice is created\&. If the lightning process fails before responding, the caller should use lightning\-listinvoice(7) to query whether this invoice was created or not\&. .SH "AUTHOR" .sp Rusty Russell is mainly responsible\&. diff --git a/doc/lightning-invoice.7.txt b/doc/lightning-invoice.7.txt index 14815499a..35293cf48 100644 --- a/doc/lightning-invoice.7.txt +++ b/doc/lightning-invoice.7.txt @@ -26,12 +26,13 @@ invoice. RETURN VALUE ------------ -On success, a hash is returned as 'rhash' to be given to the payer. +On success, a hash is returned as 'rhash' to be given to the payer, +and the 'expiry_time' as a UNIX timestamp. It also returns a BOLT11 invoice as 'bolt11' to be given to the payer. On failure, an error is returned and no invoice is created. If the lightning process fails before responding, the caller should use -getinvoice(7) to query whether this invoice was created or not. +lightning-listinvoice(7) to query whether this invoice was created or not. //FIXME:Enumerate errors diff --git a/doc/lightning-listinvoice.7 b/doc/lightning-listinvoice.7 index c8ed65fc7..839287d27 100644 --- a/doc/lightning-listinvoice.7 +++ b/doc/lightning-listinvoice.7 @@ -2,12 +2,12 @@ .\" Title: lightning-listinvoice .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 09/06/2016 +.\" Date: 01/13/2018 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "LIGHTNING\-LISTINVOI" "7" "09/06/2016" "\ \&" "\ \&" +.TH "LIGHTNING\-LISTINVOI" "7" "01/13/2018" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,7 +37,7 @@ lightning-listinvoice \- Protocol for querying invoice status The \fBlistinvoice\fR RPC command gets the status of a specific invoice, if it exists, or the status of all invoices if given no argument\&. .SH "RETURN VALUE" .sp -On success, an array \fIinvoices\fR of objects containing \fIlabel\fR, \fIrhash\fR, \fImsatoshi\fR and \fIcomplete\fR will be returned\&. \fIcomplete\fR is a boolean\&. +On success, an array \fIinvoices\fR of objects containing \fIlabel\fR, \fIrhash\fR, \fImsatoshi\fR (if not "any"), \fIcomplete\fR, \fIpay_index\fR (if paid) and \fIexpiry_time\fR} will be returned\&. \fIcomplete\fR is a boolean, and \fIexpiry_time\fR is the number of seconds since UNIX epoch\&. .SH "AUTHOR" .sp Rusty Russell is mainly responsible\&. diff --git a/doc/lightning-listinvoice.7.txt b/doc/lightning-listinvoice.7.txt index 5a4580f27..9c792ac1c 100644 --- a/doc/lightning-listinvoice.7.txt +++ b/doc/lightning-listinvoice.7.txt @@ -17,9 +17,7 @@ it exists, or the status of all invoices if given no argument. RETURN VALUE ------------ -On success, an array 'invoices' of objects containing 'label', -'rhash', 'msatoshi' and 'complete' will be returned. 'complete' is a -boolean. +On success, an array 'invoices' of objects is returned. Each object contains 'label', 'rhash', 'complete' (a boolean), and 'expiry_time' (a UNIX timestamp). If the 'msatoshi' argument to lightning-invoice(7) was not "any", there will be an 'msatoshi' field. If the invoice has been paid, there will be a 'pay_index' field. //FIXME:Enumerate errors diff --git a/doc/lightning-waitanyinvoice.7 b/doc/lightning-waitanyinvoice.7 index bd0c59d36..4c33c2d5a 100644 --- a/doc/lightning-waitanyinvoice.7 +++ b/doc/lightning-waitanyinvoice.7 @@ -2,12 +2,12 @@ .\" Title: lightning-waitanyinvoice .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 12/26/2017 +.\" Date: 01/13/2018 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "LIGHTNING\-WAITANYIN" "7" "12/26/2017" "\ \&" "\ \&" +.TH "LIGHTNING\-WAITANYIN" "7" "01/13/2018" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -41,7 +41,7 @@ This is usually called iteratively: once with no arguments, then repeatedly with 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\&. .SH "RETURN VALUE" .sp -On success, the \fIrhash\fR, \fIlabel\fR, \fIpay_index\fR, and \fImsatoshi\fR will be returned\&. +On success, an invoice description will be returned as per lightning\-listinvoice(7): \fIcomplete\fR will always be \fItrue\fR\&. .SH "AUTHOR" .sp Rusty Russell is mainly responsible\&. diff --git a/doc/lightning-waitanyinvoice.7.txt b/doc/lightning-waitanyinvoice.7.txt index df80792cf..93f25c6f1 100644 --- a/doc/lightning-waitanyinvoice.7.txt +++ b/doc/lightning-waitanyinvoice.7.txt @@ -28,7 +28,7 @@ Negative 'lastpay_index' is invalid. RETURN VALUE ------------ -On success, the 'rhash', 'label', 'pay_index', and 'msatoshi' will be returned. +On success, an invoice description will be returned as per lightning-listinvoice(7): 'complete' will always be 'true'. //FIXME:Enumerate errors diff --git a/doc/lightning-waitinvoice.7 b/doc/lightning-waitinvoice.7 index c751b1562..51ad99087 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/23/2017 +.\" Date: 01/13/2018 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "LIGHTNING\-WAITINVOI" "7" "01/23/2017" "\ \&" "\ \&" +.TH "LIGHTNING\-WAITINVOI" "7" "01/13/2018" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -37,7 +37,7 @@ 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, the \fIrhash\fR, \fIlabel\fR, and \fImsatoshi\fR will be returned\&. +On success, an invoice description will be returned as per lightning\-listinvoice(7): \fIcomplete\fR will always be \fItrue\fR\&. .SH "AUTHOR" .sp Christian Decker is mainly responsible\&. diff --git a/doc/lightning-waitinvoice.7.txt b/doc/lightning-waitinvoice.7.txt index 01b851926..3c61fdb3b 100644 --- a/doc/lightning-waitinvoice.7.txt +++ b/doc/lightning-waitinvoice.7.txt @@ -17,7 +17,7 @@ returns that single entry as per *listinvoice*. RETURN VALUE ------------ -On success, the 'rhash', 'label', and 'msatoshi' will be returned. +On success, an invoice description will be returned as per lightning-listinvoice(7): 'complete' will always be 'true'. //FIXME:Enumerate errors