Browse Source

doc: Update manpages for change in return value.

ppa-0.6.1
ZmnSCPxj 7 years ago
committed by Rusty Russell
parent
commit
39d8f64226
  1. 21
      doc/lightning-sendpay.7
  2. 10
      doc/lightning-sendpay.7.txt
  3. 209
      doc/lightning-waitsendpay.7
  4. 13
      doc/lightning-waitsendpay.7.txt

21
doc/lightning-sendpay.7

@ -2,12 +2,12 @@
.\" Title: lightning-sendpay
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 03/08/2018
.\" Date: 03/14/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "LIGHTNING\-SENDPAY" "7" "03/08/2018" "\ \&" "\ \&"
.TH "LIGHTNING\-SENDPAY" "7" "03/14/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@ -43,7 +43,7 @@ The response will occur when the payment is on its way to the destination\&. The
Once a payment has succeeded, calls to \fBsendpay\fR with the same \fIhash\fR but a different amount or destination will fail; this prevents accidental multiple payments\&. Calls to \fBsendpay\fR with the same \fIhash\fR, amount, and destination as a previous successful payment (even if a different route) will return immediately with success\&.
.SH "RETURN VALUE"
.sp
On success, an object with field \fIcompleted\fR is returned\&. Typically this field is \fIfalse\fR, but if the payment has already succeeded before to the same destination and amount, the field shall be set to \fItrue\fR and the \fIpreimage\fR will be returned also\&.
On success, an object similar to the output of \fBlistpayments\fR will be returned\&. This object will have a \fIstatus\fR field that is typically the string \fI"pending"\fR, but may be \fI"complete"\fR if the payment was already performed successfully\&.
.sp
On error, if the error occurred from a node other than the final destination, the route table will be updated so that getroute(7) should return an alternate route (if any)\&. An error from the final destination implies the payment should not be retried\&.
.sp
@ -68,21 +68,6 @@ The following error codes may occur:
.sp -1
.IP \(bu 2.3
.\}
200\&. A previous
\fBsendpay\fR
or
\fBpay\fR
is in progress\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
201\&. Already paid with this
\fIhash\fR
using different amount or destination\&.

10
doc/lightning-sendpay.7.txt

@ -37,10 +37,11 @@ immediately with success.
RETURN VALUE
------------
On success, an object with field 'completed' is returned.
Typically this field is 'false', but if the payment has already
succeeded before to the same destination and amount, the field
shall be set to 'true' and the 'preimage' will be returned also.
On success, an object similar to the output of *listpayments* will
be returned.
This object will have a 'status' field that is typically the
string '"pending"', but may be '"complete"' if the payment was
already performed successfully.
On error, if the error occurred from a node other than the final
destination, the route table will be updated so that getroute(7)
@ -50,7 +51,6 @@ destination implies the payment should not be retried.
The following error codes may occur:
* -1. Catchall nonspecific error.
* 200. A previous *sendpay* or *pay* is in progress.
* 201. Already paid with this 'hash' using different amount or
destination.
* 202. Unparseable onion reply. The 'data' field of the error

209
doc/lightning-waitsendpay.7

@ -0,0 +1,209 @@
'\" t
.\" Title: lightning-waitsendpay
.\" Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.79.1 <http://docbook.sf.net/>
.\" Date: 03/14/2018
.\" Manual: \ \&
.\" Source: \ \&
.\" Language: English
.\"
.TH "LIGHTNING\-WAITSENDP" "7" "03/14/2018" "\ \&" "\ \&"
.\" -----------------------------------------------------------------
.\" * 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-waitsendpay \- Protocol for sending a payment via a route\&.
.SH "SYNOPSIS"
.sp
\fBwaitsendpay\fR \fIpayment_hash\fR [\fItimeout\fR]
.SH "DESCRIPTION"
.sp
The \fBwaitsendpay\fR RPC command polls or waits for the status of an outgoing payment that was initiated by a previous \fBsendpay\fR invocation\&.
.sp
Optionally the client may provide a \fItimeout\fR, an integer in seconds, for this RPC command to return\&. If the \fItimeout\fR is provided and the given amount of time passes without the payment definitely succeeding or definitely failing, this command returns with a 200 error code (payment still in progress)\&. If \fItimeout\fR is not provided this call will wait indefinitely\&.
.sp
Indicating a \fItimeout\fR of 0 effectively makes this call a pollable query of the status of the payment\&.
.sp
If the payment completed with success, this command returns with success\&. Otherwise, if the payment completed with failure, this command returns an error\&.
.SH "RETURN VALUE"
.sp
On success, an object similar to the output of \fBlistpayments\fR will be returned\&. This object will have a \fIstatus\fR field that is the string \fI"complete"\fR\&.
.sp
On error, if the error occurred from a node other than the final destination, the route table will be updated so that getroute(7) should return an alternate route (if any)\&. An error from the final destination implies the payment should not be retried\&.
.sp
The following error codes may occur:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\-1\&. Catchall nonspecific error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
200\&. Timed out before the payment could complete\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
202\&. Unparseable onion reply\&. The
\fIdata\fR
field of the error will have an
\fIonionreply\fR
field, a hex string representation of the raw onion reply\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
203\&. Permanent failure at destination\&. The
\fIdata\fR
field of the error will be routing failure object\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
204\&. Failure along route; retry a different route\&. The
\fIdata\fR
field of the error will be routing failure object\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
208\&. A payment for
\fIpayment_hash\fR
was never made and there is nothing to wait for\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
209\&. The payment already failed, but the reason for failure was not stored\&. This should only occur when querying failed payments on very old databases\&.
.RE
.sp
A routing failure object has the fields below:
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIerring_index\fR\&. The index of the node along the route that reported the error\&. 0 for the local node, 1 for the first hop, and so on\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIerring_node\fR\&. The hex string of the pubkey id of the node that reported the error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIerring_channel\fR\&. The short channel ID of the channel that has the error, or
\fI0:0:0\fR
if the destination node raised the error\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIfailcode\fR\&. The failure code, as per BOLT #4\&.
.RE
.sp
.RS 4
.ie n \{\
\h'-04'\(bu\h'+03'\c
.\}
.el \{\
.sp -1
.IP \(bu 2.3
.\}
\fIchannel_update\fR\&. The hex string of the
\fIchannel_update\fR
message received from the remote node\&. Only present if error is from the remote node and the
\fIfailcode\fR
has the UPDATE bit set, as per BOLT #4\&.
.RE
.SH "AUTHOR"
.sp
ZmnSCPxj <ZmnSCPxj@protonmail\&.com> is mainly responsible\&.
.SH "SEE ALSO"
.sp
lightning\-sendpay(7), lightning\-pay(7)\&.
.SH "RESOURCES"
.sp
Main web site: https://github\&.com/ElementsProject/lightning

13
doc/lightning-waitsendpay.7.txt

@ -8,7 +8,7 @@ lightning-waitsendpay - Protocol for sending a payment via a route.
SYNOPSIS
--------
*waitsendpay* 'hash' ['timeout']
*waitsendpay* 'payment_hash' ['timeout']
DESCRIPTION
-----------
@ -36,9 +36,10 @@ returns an error.
RETURN VALUE
------------
On success, an object with field 'completed' is returned.
This field will be 'true' and another field 'preimage' of the
object will be set to the preimage.
On success, an object similar to the output of *listpayments* will
be returned.
This object will have a 'status' field that is the
string '"complete"'.
On error, if the error occurred from a node other than the final
destination, the route table will be updated so that getroute(7)
@ -56,8 +57,8 @@ The following error codes may occur:
the error will be routing failure object.
* 204. Failure along route; retry a different route. The 'data'
field of the error will be routing failure object.
* 208. A payment for 'hash' was never made and there is nothing
to wait for.
* 208. A payment for 'payment_hash' was never made and there is
nothing to wait for.
* 209. The payment already failed, but the reason for failure
was not stored. This should only occur when querying failed
payments on very old databases.

Loading…
Cancel
Save