-
Notifications
You must be signed in to change notification settings - Fork 905
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pay enhancements: remove legacy, add maxfee and description params #5122
Changes from all commits
9fd6f9e
8cb5ddd
335b007
90bce15
f225b07
2a4a412
b2d5ef2
9d71db2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,8 +5,8 @@ SYNOPSIS | |
-------- | ||
|
||
**pay** *bolt11* [*msatoshi*] [*label*] [*riskfactor*] | ||
[*maxfeepercent*] [*retry\_for*] [*maxdelay*] [*exemptfee*] | ||
[*exclude*] | ||
[*maxfeepercent*] [*retry_for*] [*maxdelay*] [*exemptfee*] | ||
[*localofferid*] [*exclude*] [*maxfee*] [*description*] | ||
|
||
DESCRIPTION | ||
----------- | ||
|
@@ -32,6 +32,22 @@ leveraged by forwarding nodes. Setting `exemptfee` allows the | |
`maxfeepercent` check to be skipped on fees that are smaller than | ||
`exemptfee` (default: 5000 millisatoshi). | ||
|
||
`localofferid` is used by offers to link a payment attempt to a local | ||
`send_invoice` offer created by lightningd-offerout(7). This ensures | ||
that we only make a single payment for an offer, and that the offer is | ||
marked `used` once paid. | ||
|
||
*maxfee* overrides both *maxfeepercent* and *exemptfee* defaults (and | ||
if you specify *maxfee* you cannot specify either of those), and | ||
creates an absolute limit on what fee we will pay. This allows you to | ||
implement your own heuristics rather than the primitive ones used | ||
here. | ||
|
||
*description* is only required for bolt11 invoices which do not | ||
contain a description themselves, but contain a description hash. | ||
*description* is then checked against the hash inside the invoice | ||
before it will be paid. | ||
Comment on lines
+46
to
+49
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This requirement is incredibly restrictive: it limits us to invoices with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, the limits of json! But we can add descriptionhex later for this case? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I looked at this, we need a non-trivial amount of re-engineering to add this. We cannot handle bolt11 descriptions which are not basically valid strings right now, and changing that would be an API change everywhere we print description. So I'm leaving that for next release. |
||
|
||
The response will occur when the payment fails or succeeds. Once a | ||
payment has succeeded, calls to **pay** with the same *bolt11* will | ||
succeed immediately. | ||
|
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,7 +5,8 @@ SYNOPSIS | |||||||||
-------- | ||||||||||
|
||||||||||
**sendpay** *route* *payment\_hash* [*label*] [*msatoshi*] | ||||||||||
[*bolt11*] [*payment_secret*] [*partid*] [*localofferid*] [*groupid*] [*payment_metadata*] | ||||||||||
[*bolt11*] [*payment_secret*] [*partid*] [*localofferid*] [*groupid*] | ||||||||||
[*payment_metadata*] [*description*] | ||||||||||
Comment on lines
+8
to
+9
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
this is not a new change, at this point, I'm not really sure that |
||||||||||
|
||||||||||
DESCRIPTION | ||||||||||
----------- | ||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,12 @@ | |
} | ||
] | ||
} | ||
}, | ||
"maxfee": { | ||
"type": "msat" | ||
}, | ||
"description": { | ||
"type": "string" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we've been eliminating those _
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh ok is the opposite!