forked from ElementsProject/lightning
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
listpays: new command to summarize pay commands.
This is to future-proof against multi-part-payments: the low-level commands will start returning multiple results once we have that, so prepare transition plan now. Closes: ElementsProject#2372 Signed-off-by: Rusty Russell <[email protected]>
- Loading branch information
1 parent
e060546
commit 56dfbec
Showing
7 changed files
with
255 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
'\" t | ||
.\" Title: lightning-listpays | ||
.\" Author: [see the "AUTHOR" section] | ||
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/> | ||
.\" Date: 02/23/2019 | ||
.\" Manual: \ \& | ||
.\" Source: \ \& | ||
.\" Language: English | ||
.\" | ||
.TH "LIGHTNING\-LISTPAYS" "7" "02/23/2019" "\ \&" "\ \&" | ||
.\" ----------------------------------------------------------------- | ||
.\" * 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" | ||
lightning-listpays \- Command for querying payment status | ||
.SH "SYNOPSIS" | ||
.sp | ||
\fBlistpays\fR [bolt11] | ||
.SH "DESCRIPTION" | ||
.sp | ||
The \fBlistpay\fR RPC command gets the status of all \fIpay\fR commands, or a single one if \fIbolt11\fR is specified\&. | ||
.SH "RETURN VALUE" | ||
.sp | ||
On success, an array of objects is returned\&. Each object contains: | ||
.PP | ||
\fIbolt11\fR | ||
.RS 4 | ||
the | ||
\fIbolt11\fR | ||
argument given to | ||
\fIpay\fR | ||
(see below for exceptions)\&. | ||
.RE | ||
.PP | ||
\fIstatus\fR | ||
.RS 4 | ||
one of | ||
\fIcomplete\fR, | ||
\fIfailed\fR | ||
or | ||
\fIpending\fR\&. | ||
.RE | ||
.PP | ||
\fIpayment_preimage\fR | ||
.RS 4 | ||
(if | ||
\fIstatus\fR | ||
is | ||
\fIcomplete\fR) proves payment was received\&. | ||
.RE | ||
.PP | ||
\fIlabel\fR | ||
.RS 4 | ||
optional | ||
\fIlabel\fR, if provided to | ||
\fIpay\fR\&. | ||
.RE | ||
.PP | ||
\fIamount_sent_msat\fR | ||
.RS 4 | ||
total amount sent, in "NNNmsat" format\&. | ||
.RE | ||
.sp | ||
For old payments (pre\-0\&.7) we didn\(cqt save the \fIbolt11\fR string, so in its place are three other fields: | ||
.PP | ||
\fIpayment_hash\fR | ||
.RS 4 | ||
the hash of the | ||
\fIpayment_preimage\fR | ||
which will prove payment\&. | ||
.RE | ||
.PP | ||
\fIdestination\fR | ||
.RS 4 | ||
the final destination of the payment\&. | ||
.RE | ||
.PP | ||
\fIamount_msat\fR | ||
.RS 4 | ||
the amount the destination received, in "NNNmsat" format\&. | ||
.RE | ||
.sp | ||
These three can all be extracted from \fIbolt11\fR, hence are obsolete\&. | ||
.SH "AUTHOR" | ||
.sp | ||
Rusty Russell <rusty@rustcorp\&.com\&.au> is mainly responsible\&. | ||
.SH "SEE ALSO" | ||
.sp | ||
lightning\-pay(7), lightning\-paystatus(7), lightning\-listpayments(7)\&. | ||
.SH "RESOURCES" | ||
.sp | ||
Main web site: https://github\&.com/ElementsProject/lightning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
LIGHTNING-LISTPAYS(7) | ||
===================== | ||
:doctype: manpage | ||
|
||
NAME | ||
---- | ||
lightning-listpays - Command for querying payment status | ||
|
||
SYNOPSIS | ||
-------- | ||
*listpays* [bolt11] | ||
|
||
DESCRIPTION | ||
----------- | ||
|
||
The *listpay* RPC command gets the status of all 'pay' commands, or a single | ||
one if 'bolt11' is specified. | ||
|
||
RETURN VALUE | ||
------------ | ||
On success, an array of objects is returned. Each object contains: | ||
|
||
'bolt11':: the 'bolt11' argument given to 'pay' (see below for exceptions). | ||
'status':: one of 'complete', 'failed' or 'pending'. | ||
'payment_preimage':: (if 'status' is 'complete') proves payment was received. | ||
'label':: optional 'label', if provided to 'pay'. | ||
'amount_sent_msat':: total amount sent, in "NNNmsat" format. | ||
|
||
For old payments (pre-0.7) we didn't save the 'bolt11' string, so in | ||
its place are three other fields: | ||
|
||
'payment_hash':: the hash of the 'payment_preimage' which will prove payment. | ||
'destination':: the final destination of the payment. | ||
'amount_msat':: the amount the destination received, in "NNNmsat" format. | ||
|
||
These three can all be extracted from 'bolt11', hence are obsolete. | ||
//FIXME:Enumerate errors | ||
|
||
AUTHOR | ||
------ | ||
Rusty Russell <[email protected]> is mainly responsible. | ||
|
||
SEE ALSO | ||
-------- | ||
lightning-pay(7), lightning-paystatus(7), lightning-listpayments(7). | ||
|
||
RESOURCES | ||
--------- | ||
Main web site: https://github.com/ElementsProject/lightning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,7 +40,7 @@ succeed immediately. | |
The command will keep finding routes and retrying the payment until | ||
it succeeds, or the given 'retry_for' seconds passes. | ||
Note that the command may stop retrying while a pending payment is | ||
ongoing, which you need to monitor with *listpayments* or *waitsendpay*. | ||
ongoing, which you need to monitor with *listpays*. | ||
'retry_for' defaults to 60 seconds and can only be an integer. | ||
|
||
When using 'lightning-cli', you may skip optional parameters by using | ||
|
@@ -91,8 +91,7 @@ The following error codes may occur: | |
|
||
* -1. Catchall nonspecific error. | ||
* 200. Payment timed out while a payment is in progress. Monitor | ||
the status of that payment with 'listpayments' command, or | ||
wait for that payment to complete with 'pay' command. | ||
the status of that payment with 'listpays' command. | ||
* 201. Already paid with this 'hash' using different amount or | ||
destination. | ||
* 203. Permanent failure at destination. The 'data' field of | ||
|
@@ -145,7 +144,7 @@ Rusty Russell <[email protected]> is mainly responsible. | |
|
||
SEE ALSO | ||
-------- | ||
lightning-listpayments(7), lightning-decodepay(7), | ||
lightning-listpays(7), lightning-decodepay(7), | ||
lightning-listinvoice(7), lightning-delinvoice(7), | ||
lightning-getroute(7), lightning-invoice(7). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters