Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: kevinovecka on October 25, 2021, 11:01:13 PM



Title: Lightning network forever address and invoice amount
Post by: kevinovecka on October 25, 2021, 11:01:13 PM
Hi,
I have some questions that are stuck in my head and I am not sure about it...

Are Lightning invoices->addresses permanent?
And is invoice amount important?

For example if in Blue wallet I will generate invoice for 1$ (you must fill some amount of invoice) and it will give me address...
Can I receive satoshis forever and in any amount?
Can I generate somewhere address without amount? (Just clear lightning wallet address and I don't mean refill address BECH32)

How would you for example withdraw Lightning Bitcoin from some payment gateway?
I am afraid that their automate system will not send amount I should get (for ex 2$) but the amount from generated invoice.
How does this automatic system works?
How will they open channel or connect with me?

Sorry for (maybe) dumb questions but I am not Lightning network pro (yet  8) ;D )
I wanted to find some dev here who would help me with project and would help to understand some things but sadly I was unsuccessful...  :-[

Thank you very much


Title: Re: Lightning network forever address and invoice amount
Post by: Rath_ on October 26, 2021, 12:01:58 AM
Are Lightning invoices->addresses permanent?

No, Lightning Network invoices are not reusable. Every payment invoice contains a hashed payment secret which is used to construct an HTLC (https://wiki.ion.radar.tech/tech/bitcoin/hltc).

Can I generate somewhere address without amount? (Just clear lightning wallet address and I don't mean refill address BECH32)

The Lightning Network does not use addresses like the first layer. Implementations like c-lightning and LND support sending/receiving keysend (spontaneous) payments. Such payments do not require payment invoices; you just need the id of someone's node. Most wallets support only payment invoices.

For example if in Blue wallet I will generate invoice for 1$ (you must fill some amount of invoice) and it will give me address...

Keep in mind that refill addresses are unique to BlueWallet. Their Lightning wallets are custodial. You don't have to worry about opening channels and inbound/outbound capacity.

Can I receive satoshis forever and in any amount?

No. Even though you are using a custodial wallet, BlueWallet has a limited number of channels with limited inbound capacity. Once they run out of inbound capacity, you won't be able to receive any satoshis. Any payment might also fail if: there is no route between BlueWallet's node and the sender or if intermediary nodes do not have enough liquidity to forward the payment. Large payments are usually automatically split into smaller chunks which are routed through different channels. It increases their success rate.

How would you for example withdraw Lightning Bitcoin from some payment gateway?

You would very likely have to manually generate an invoice with an amount specified by them. That's how withdrawals work on Nicehash, Bitfinex and other Lightning compatible services. You could also use BTCPay Server (https://btcpayserver.org/) which would use your own Lightning node. However, you would have to learn how to manage your node's liquidity (incoming/outgoing capacity) which is difficult.

How will they open channel or connect with me?

Unless you open a direct channel to them, your withdrawal will have to be routed through your other active channels.

Sorry for (maybe) dumb questions but I am not Lightning network pro

Feel free to ask any questions! You may also find The Lightning Network FAQ (https://bitcointalk.org/index.php?topic=5158920.msg51615708#msg51615708) and Basics of The Lightning Network (https://bitcointalk.org/index.php?topic=4940536.msg44524521#msg44524521) useful.


Title: Re: Lightning network forever address and invoice amount
Post by: kevinovecka on October 26, 2021, 12:14:02 AM
Wow, thank you for such amazing answer!
I have much more questions

Are you developer or just lightning network superfan? ;D
Because I would like to use your knowledge in my use case (preparing project) but I would feel stupid if I won’t reward you with some satoshi for your time and knowledge...

Btw blue wallet is not good?


Title: Re: Lightning network forever address and invoice amount
Post by: Rath_ on October 26, 2021, 12:20:29 AM
Are you developer or just lightning network superfan? ;D

I guess you could call me a fan. I ran a couple of small Lightning nodes in the past. Here is my current node:

https://1ml.com/node/0273da0a525390c36857841e208f1d289275c76ebfa7ecfde697c6cbf4f235b4f5

Btw blue wallet is not good?

It's great for non-technical users and for people who just want to try out the Lightning Network for the first time. I don't think it would be suitable for any kind of project.


Title: Re: Lightning network forever address and invoice amount
Post by: kevinovecka on October 26, 2021, 08:52:23 AM
Are you developer or just lightning network superfan? ;D

I guess you could call me a fan. I ran a couple of small Lightning nodes in the past. Here is my current node:

https://1ml.com/node/0273da0a525390c36857841e208f1d289275c76ebfa7ecfde697c6cbf4f235b4f5

Btw blue wallet is not good?

It's great for non-technical users and for people who just want to try out the Lightning Network for the first time. I don't think it would be suitable for any kind of project.

Nice :)
Thx will try another
Do you have some tip?


Title: Re: Lightning network forever address and invoice amount
Post by: kevinovecka on October 26, 2021, 08:57:36 AM

https://1ml.com/node/0273da0a525390c36857841e208f1d289275c76ebfa7ecfde697c6cbf4f235b4f5


Wanted to tip you but it doesn't work with blue wallet :D
Omg

I think I like Litecoin more than Lighhtning which is too complicated... ;D ;D


Title: Re: Lightning network forever address and invoice amount
Post by: Rath_ on October 26, 2021, 01:17:25 PM
Do you have some tip?

That depends on your use case. If you need to be able to receive payments 24/7 then you should use a custodial payment gateway or set up your own c-lightning/LND node alongside BTCPayServer.

Wanted to tip you but it doesn't work with blue wallet

I would have to provide you an invoice. BlueWallet does not support keysend for some reason but it supports LNURL. This article (https://coincharge.io/en/lnurl-for-lightning-wallets/) explains quite well what it can be used for.

I think I like Litecoin more than Lighhtning which is too complicated...

On the other hand, Lightning is even faster and might be cheaper to use for the users :)


Title: Re: Lightning network forever address and invoice amount
Post by: BlackHatCoiner on October 26, 2021, 03:40:13 PM
I think I like Litecoin more than Lighhtning which is too complicated...
Yeah, lightning is complicated, but did you really expect that the solution to the scaling issue would be a simple one?

The problem lies on the fact that for each transaction a person does, it must travel the whole world, take space on thousands of hard drives, be chosen by miners among other thousands. Nah. It can't work on a global scale, maybe on a few million, but 'til there. If you want from the whole world to adopt it, you have to find an off-chain solution, that's far more practical and hence, cheaper and faster.

Don't look into other projects which promise these three if they do everything on-chain. They just paper over the cracks by increasing the block-size or with another “smart” technique.

Also, don't look into forks, because they're, hehe, forks.