Skip to main content
Share Your Experience: Take the 2024 Developer Survey
7 votes
Accepted

Why do lightning invoices expire?

The bolt 11 which specifies invoices does not give a rational for this design choice therefor - unless one of the people who build it come along - I can only give an educated guess: So first of all ...
Rene Pickhardt's user avatar
6 votes
Accepted

Are there any risks of publicizing a Lightning network invoice?

Does it affect -most importantly- the safety of the funds? It does not. Funds are not affected by publishing a LN invoice. Does it negatively affect the privacy or something else? If a lightning ...
Ava Chow's user avatar
  • 70.8k
6 votes
Accepted

Is signature/private-key required to accept payment over Lightning Network?

Yes invoices are signed according to bolt 11. One reason we do this is to fight dos attacks. If I would not have to sign my invoice I could create an Invoice for any node. That node would not have the ...
Rene Pickhardt's user avatar
6 votes
Accepted

How do route hints affect pathfinding?

Generally speaking there are two use-cases that can be facilitated by route hints: Tell the sender about channels that they might not know about. Specifically, if the recipient doesn't announce it's ...
cdecker's user avatar
  • 9,508
5 votes
Accepted

What exactly are route hints?

Routehints are nothing complex. If you take a look at the code used to generate them routehints are pretty simple. The code simply grabs the first 20 (arbitrary limit) or so nodes with whom it has ...
arshbot's user avatar
  • 1,788
5 votes
Accepted

What does `-k` stand for in `lightning-cli`?

This is actually the first thing I got confused with after I installed my a lightning node for the very first time back in 2018. c-lightning ships with two (actually more) programs lightningd ...
Rene Pickhardt's user avatar
4 votes
Accepted

Creating a lightning invoice without running a full node

The approach I've ended up taking for this project is to expose my Umbrel's LND gRPC REST API. My home network doesn't accept incoming requests, and I don't want that for my entire Umbrel anyway, so I'...
jstaab's user avatar
  • 231
4 votes

What are the minimum and maximum lengths of a Lightning invoice (address)?

Lightning invoices encode multiple pieces of information, some of which are optional, and some of which are variable-length. It is required that invoices use the shortest representation possible for ...
Mark H's user avatar
  • 3,334
4 votes

Get invoice amount from payment request - LND REST API

I just found the answer : https://api.lightning.community/rest/index.html?javascript#v1-payreq Use the endpoint v1/payreq to decode the payment request. Exemple : var fs = require('fs'); var ...
Lounès KSOURI's user avatar
3 votes

Can I create an invoice for a Lightning address I don't own?

When you mention "Lightning address" here, from the rest of the question I assume you mean a Lightning node's ID or public key. If this is the case, then you absolutely cannot create a ...
dunxen's user avatar
  • 86
3 votes

Invoicing with BTC

Bitcoin Blockchain Many Bitcoin wallets allow you to generate an invoice in the form of a QR code, which is a 2D barcode. This can contain a receiving address, an amount and a message. How the ...
RedGrittyBrick's user avatar
3 votes

Is it possible to cancel a lightning invoice?

Yes. The payments on the Lightning Network are necessarily interactive, therefore the payee can just refuse the incoming payment. Invoices are configured with an expiration date, such as the sender's ...
Antoine Poinsot's user avatar
3 votes
Accepted

Using BTCPay To Accept Undefined Payment Amounts

I separately sought help on this issue from the BTCPay Server support channel, and with their help have devised a 'work-around' for this problem. The initial response from their support is paraphrased ...
Martin's user avatar
  • 329
3 votes

Are there any risks of publicizing a Lightning network invoice?

Before answering your questions in detail let me state that as far as I know third parties cannot know if the invoice was paid after it was expired. Although I like Andrew Chow's answer I think I have ...
Rene Pickhardt's user avatar
2 votes
Accepted

What's the maximum size of the memo in a LN payment request?

The memo field can hold 639 bytes of information. But how many characters? Let's assume utf8 (since lncli encodes the text in utf8) utf8's characters are variable length, meaning some are larger ...
arshbot's user avatar
  • 1,788
2 votes
Accepted

Purpose of the LN transaction description

I believe it is to explain the "purpose of the payment" as described in BOLT11: Short description of purpose of payment (UTF-8), e.g. '1 cup of coffee' or 'ナンセンス 1杯' This would be the payee ...
JBaczuk's user avatar
  • 7,418
2 votes
Accepted

Pay invoice to offline lightning node

It seems you are mixing two concepts in your question. 1.) the necessity of having an invoice 2.) the necessity of being online Re1: invoices are not necessary with the not standardized keysend ...
Rene Pickhardt's user avatar
2 votes

What is "signature recovery"?

It is as you suspect: You can recover the public key knowing only the signature and the message. The recovery id byte in the signature is not strictly necessary as there's a brute force option, but it ...
Mark H's user avatar
  • 3,334
2 votes

Creating a lightning invoice without running a full node

I will try to explain my comment in an answer. There is no clear way to host a lite ln client only to revive payment and show it, without hosting an ln node on the server, with the bitcoin core ...
vincenzopalazzo's user avatar
2 votes

How to send lightning payment request to lnurl from Android app with extra comment data?

The fine folks at Alby helped solve this -> First, add query intent to manifest: <queries> <intent> <action android:name="android.intent.action.VIEW" /> ...
bitanon's user avatar
  • 31
2 votes
Accepted

Is there an absolute limit the payment request expiry?

I think it is not explicitly specified. But c-lightning uses for example an unsigned int 64. Overall the expiry is obviously created to allow nodes to not store payment preimages for requested ...
Rene Pickhardt's user avatar
2 votes

How to generate an invoice with flexible amounts for Lightning Network

Lightning Invoices (BOLT11) allows for invoices to have a zero amount. If you generate a zero amount invoice, the sender can use it to pay any amount. When you use zero amount invoices, you have no ...
Sachin Meier's user avatar
2 votes

Is there anyway to find a lighting payment request preimage after it is paid if you aren’t the sending or receiving node?

From what I understand, the preimage is publicly revealed when the lightning payment request is paid as a part of the transaction. The preimage is revealed across the route from the destination back ...
Michael Folkson's user avatar
2 votes
Accepted

bech32 serialized lightning invoice from lnd rest endpoint /v1/invoices

Yes, the payment_request is a BOLT11 invoice, which uses Bech32 encoding.
Pieter Wuille's user avatar
1 vote
Accepted

Create lightning invoice as payer

There is the keysend blib that allows to pay an arbitrary node without the necessity to create in invoice first https://github.com/lightning/blips/blob/master/blip-0003.md i think all major ...
Rene Pickhardt's user avatar
1 vote
Accepted

What is the maximum byte size or limit of characters in label in lightning-cli invoice? Are UTF-8 characters accepted?

If you look at the source code you can find the data base schema of the SQLite3 database that is being used to store invoices at: https://github.com/ElementsProject/lightning/blob/...
Rene Pickhardt's user avatar
1 vote
Accepted

How can i get the payee public key from the payment request

Here is the solution I ended up using: // var invoice *lnrpc.Invoice inva, err := zpay32.Decode(invoice.PaymentRequest, &chaincfg.MainNetParams) if err != nil { return err } fmt.Sprintf(&...
Ole Henrik Skogstrøm's user avatar
1 vote

Lightning protocol modification for app

I don't see why it needs to be at protocol level. Your node can simply not solve the second HTLC that arrives, you can keep track of items and possible conflicts when solving it. If you fail the HTLC, ...
Davidson Souza's user avatar
1 vote
Accepted

Lnurl: Why are there min and max fields instead of an amount field?

LNURL-PAY enables other use cases like static QR codes that can be printed and re-used many times, provides a standard for receiving sats over Lightning without having the user paste an invoice. A ...
Bitcoin_1o1's user avatar
1 vote
Accepted

Is it possible to generate a pool of lightning transaction invoices in advance?

No; unlike a Bitcoin address, Lightning invoices have a built-in timestamp and an expiration time. They also have information, such as the amount of Bitcoin (and sometimes routing information), that ...
ieatpizza's user avatar
  • 2,068

Only top scored, non community-wiki answers of a minimum length are eligible