From 203c222f572a347729eab3f8abe28eea1767b835 Mon Sep 17 00:00:00 2001 From: ZmnSCPxj Date: Thu, 8 Feb 2018 01:18:14 +0000 Subject: [PATCH] doc: Update to add fee limit to pay. --- doc/lightning-pay.7 | 25 +++++++++++++++++++++---- doc/lightning-pay.7.txt | 9 ++++++++- 2 files changed, 29 insertions(+), 5 deletions(-) diff --git a/doc/lightning-pay.7 b/doc/lightning-pay.7 index de22531a1..048149fd3 100644 --- a/doc/lightning-pay.7 +++ b/doc/lightning-pay.7 @@ -2,12 +2,12 @@ .\" Title: lightning-pay .\" Author: [see the "AUTHOR" section] .\" Generator: DocBook XSL Stylesheets v1.79.1 -.\" Date: 02/06/2018 +.\" Date: 02/08/2018 .\" Manual: \ \& .\" Source: \ \& .\" Language: English .\" -.TH "LIGHTNING\-PAY" "7" "02/06/2018" "\ \&" "\ \&" +.TH "LIGHTNING\-PAY" "7" "02/08/2018" "\ \&" "\ \&" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -31,10 +31,10 @@ lightning-pay \- Protocol for sending a payment to a BOLT11 invoice .SH "SYNOPSIS" .sp -\fBpay\fR \fIbolt11\fR [\fImsatoshi\fR] [\fIdescription\fR] [\fIriskfactor\fR] +\fBpay\fR \fIbolt11\fR [\fImsatoshi\fR] [\fIdescription\fR] [\fIriskfactor\fR] [\fImaxfeepercent\fR] .SH "DESCRIPTION" .sp -The \fBpay\fR RPC command attempts to find a route to the given destination, and send the funds it asks for\&. If the \fIbolt11\fR does not contain an amount, \fImsatoshi\fR is required, otherwise if it is specified it must be \fInull\fR\&. If \fIbolt11\fR contains a description hash (\fIh\fR field) \fIdescription\fR is required, otherwise it is unused\&. The \fIriskfactor\fR is described in detail in lightning\-getroute(7), and defaults to 1\&.0\&. +The \fBpay\fR RPC command attempts to find a route to the given destination, and send the funds it asks for\&. If the \fIbolt11\fR does not contain an amount, \fImsatoshi\fR is required, otherwise if it is specified it must be \fInull\fR\&. If \fIbolt11\fR contains a description hash (\fIh\fR field) \fIdescription\fR is required, otherwise it is unused\&. The \fIriskfactor\fR is described in detail in lightning\-getroute(7), and defaults to 1\&.0\&. The \fImaxfeepercent\fR limits the money paid in fees, and defaults to 0\&.5\&. The \(oqmaxfeepercent\(cq is a percentage of the amount that is to be paid\&. .sp The response will occur when the payment fails or succeeds\&. Once a payment has succeeded, calls to \fBpay\fR with the same \fIbolt11\fR will succeed immediately\&. .SH "RETURN VALUE" @@ -136,6 +136,23 @@ field of the error will be routing failure object\&. 205\&. Unable to find a route\&. .RE .sp +.RS 4 +.ie n \{\ +\h'-04'\(bu\h'+03'\c +.\} +.el \{\ +.sp -1 +.IP \(bu 2.3 +.\} +206\&. Route too expensive\&. The +\fIdata\fR +field of the error will indicate the actual +\fIfee\fR +as well as the +\fIfeepercent\fR +percentage that the fee has of the destination payment amount\&. +.RE +.sp A routing failure object has the fields below: .sp .RS 4 diff --git a/doc/lightning-pay.7.txt b/doc/lightning-pay.7.txt index 19a5396a2..9c79b675b 100644 --- a/doc/lightning-pay.7.txt +++ b/doc/lightning-pay.7.txt @@ -8,7 +8,7 @@ lightning-pay - Protocol for sending a payment to a BOLT11 invoice SYNOPSIS -------- -*pay* 'bolt11' ['msatoshi'] ['description'] ['riskfactor'] +*pay* 'bolt11' ['msatoshi'] ['description'] ['riskfactor'] ['maxfeepercent'] DESCRIPTION ----------- @@ -19,6 +19,9 @@ and send the funds it asks for. If the 'bolt11' does not contain an amount, 'bolt11' contains a description hash ('h' field) 'description' is required, otherwise it is unused. The 'riskfactor' is described in detail in lightning-getroute(7), and defaults to 1.0. +The 'maxfeepercent' limits the money paid in fees, and defaults to 0.5. +The `maxfeepercent' is a percentage of the amount that is to be +paid. The response will occur when the payment fails or succeeds. Once a payment has succeeded, calls to *pay* with the same 'bolt11' will @@ -49,6 +52,10 @@ The following error codes may occur: * 204. Failure along route; retry a different route. The 'data' field of the error will be routing failure object. * 205. Unable to find a route. +* 206. Route too expensive. The 'data' field of the error will + indicate the actual 'fee' as well as the 'feepercent' + percentage that the fee has of the destination payment + amount. A routing failure object has the fields below: