Lnd: Support invoices without amount specified.

Created on 6 Jan 2018  路  5Comments  路  Source: lightningnetwork/lnd

According to this:

https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md

amout is optional for payment invoice. Unfortunatelly lncli doesn't give option to create invoice without amout:

lncli addinvoice
[lncli] value argument missing

In lncli there is sendpayment method that gives possibility for sender to specify amount, but I don't see command that creates payment_hash without invoice.

How can I query for payment without amout, and send payment with amout specified by sender?

Also when trying to create invoice by RPC I got error message:

Caused by: io.grpc.StatusRuntimeException: UNKNOWN: zero value invoices are disallowed

feature request payments

Most helpful comment

Summary:

It is possible by the LN specification to pay invoices that has no specified amount, allowing "donation type" payments. lnd currently requires an invoice to specify the amount.

Steps to completion:

  • [ ] Allow the creation of invoices with no amount.
  • [ ] Handle incoming HTLCs paying an invoice without any amount.
  • [ ] Allow payment using invoices with no amount, where the amount is specified at time of payment.

All 5 comments

Zero value invoices are currently not supported by the LN spec. The invoice format makes in optional to allow for this in the future :)

Correction: it is supported by the LN spec, but lnd does not currently support it.

Sorry, I misunderstood your initial description. Per the discussion on the mailing list, I believe this is a feature request? :)

Summary:

It is possible by the LN specification to pay invoices that has no specified amount, allowing "donation type" payments. lnd currently requires an invoice to specify the amount.

Steps to completion:

  • [ ] Allow the creation of invoices with no amount.
  • [ ] Handle incoming HTLCs paying an invoice without any amount.
  • [ ] Allow payment using invoices with no amount, where the amount is specified at time of payment.

Since I'm working on #636, which covers some of the same code, I'll pick this up as well :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

qubenix picture qubenix  路  3Comments

AnthonyRonning picture AnthonyRonning  路  3Comments

ealymbaev picture ealymbaev  路  3Comments

zyp picture zyp  路  4Comments

BitBargain picture BitBargain  路  3Comments