mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-01 17:47:30 +01:00
JSONRPC: Make listinvoice an deprecated alias for listinvoices.
This matches the other names, and also the return value is about to change. This will be removed before release! Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
6e703ad977
commit
1a641c823c
4 changed files with 23 additions and 14 deletions
|
@ -9,7 +9,7 @@ MANPAGES := doc/lightning-cli.1 \
|
|||
doc/lightning-delinvoice.7 \
|
||||
doc/lightning-getroute.7 \
|
||||
doc/lightning-invoice.7 \
|
||||
doc/lightning-listinvoice.7 \
|
||||
doc/lightning-listinvoices.7 \
|
||||
doc/lightning-listpayments.7 \
|
||||
doc/lightning-pay.7 \
|
||||
doc/lightning-sendpay.7 \
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
'\" t
|
||||
.\" Title: lightning-listinvoice
|
||||
.\" Title: lightning-listinvoices
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
|
||||
.\" Date: 01/13/2018
|
||||
.\" Date: 01/16/2018
|
||||
.\" Manual: \ \&
|
||||
.\" Source: \ \&
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "LIGHTNING\-LISTINVOI" "7" "01/13/2018" "\ \&" "\ \&"
|
||||
.TH "LIGHTNING\-LISTINVOI" "7" "01/16/2018" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Define some portability stuff
|
||||
.\" -----------------------------------------------------------------
|
||||
|
@ -28,13 +28,13 @@
|
|||
.\" * MAIN CONTENT STARTS HERE *
|
||||
.\" -----------------------------------------------------------------
|
||||
.SH "NAME"
|
||||
lightning-listinvoice \- Protocol for querying invoice status
|
||||
lightning-listinvoices \- Protocol for querying invoice status
|
||||
.SH "SYNOPSIS"
|
||||
.sp
|
||||
\fBlistinvoice\fR [\fIlabel\fR]
|
||||
\fBlistinvoices\fR [\fIlabel\fR]
|
||||
.SH "DESCRIPTION"
|
||||
.sp
|
||||
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\&.
|
||||
The \fBlistinvoices\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 is returned\&. Each object contains \fIlabel\fR, \fIpayment_hash, \*(Aqcomplete\fR (a boolean), and \fIexpiry_time\fR (a UNIX timestamp)\&. If the \fImsatoshi\fR argument to lightning\-invoice(7) was not "any", there will be an \fImsatoshi\fR field\&. If the invoice has been paid, there will be a \fIpay_index\fR field and an \fImsatoshi_received\fR field (which may be slightly greater than \fImsatoshi\fR as some overpaying is permitted to allow clients to obscure payment paths)\&.
|
|
@ -1,18 +1,18 @@
|
|||
LIGHTNING-LISTINVOICE(7)
|
||||
========================
|
||||
LIGHTNING-LISTINVOICES(7)
|
||||
=========================
|
||||
:doctype: manpage
|
||||
|
||||
NAME
|
||||
----
|
||||
lightning-listinvoice - Protocol for querying invoice status
|
||||
lightning-listinvoices - Protocol for querying invoice status
|
||||
|
||||
SYNOPSIS
|
||||
--------
|
||||
*listinvoice* ['label']
|
||||
*listinvoices* ['label']
|
||||
|
||||
DESCRIPTION
|
||||
-----------
|
||||
The *listinvoice* RPC command gets the status of a specific invoice, if
|
||||
The *listinvoices* RPC command gets the status of a specific invoice, if
|
||||
it exists, or the status of all invoices if given no argument.
|
||||
|
||||
RETURN VALUE
|
|
@ -222,11 +222,20 @@ static void json_listinvoice(struct command *cmd,
|
|||
static const struct json_command listinvoice_command = {
|
||||
"listinvoice",
|
||||
json_listinvoice,
|
||||
"Show invoice {label} (or all, if no {label}))",
|
||||
"Returns an array of {label}, {payment_hash}, {msatoshi} (if set), {complete}, {pay_index} (if paid) and {expiry_time} on success. "
|
||||
"(DEPRECATED) Show invoice {label} (or all, if no {label}))",
|
||||
"Returns an array of {label}, {payment_hash}, {msatoshi} (if set), {complete}, {pay_index} (if paid) and {expiry_time} on success. ",
|
||||
.deprecated = true
|
||||
};
|
||||
AUTODATA(json_command, &listinvoice_command);
|
||||
|
||||
static const struct json_command listinvoice_command = {
|
||||
"listinvoices",
|
||||
json_listinvoices,
|
||||
"Show invoice {label} (or all, if no {label}))",
|
||||
"Returns an array of {label}, {payment_hash}, {msatoshi} (if set), {complete}, {pay_index} (if paid) and {expiry_time} on success. ",
|
||||
};
|
||||
AUTODATA(json_command, &listinvoices_command);
|
||||
|
||||
static void json_delinvoice(struct command *cmd,
|
||||
const char *buffer, const jsmntok_t *params)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue