Skip to content
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

Add option for giving amountless invoice but specify amount for the proxy invoice #19

Closed
benthecarman opened this issue Mar 22, 2023 · 5 comments

Comments

@benthecarman
Copy link

It would be nice to be able to pass an amountless invoice and receive an invoice with an amount.

My use case here is having a semi trusted 3rd party storing pre-created invoices for the user and then giving them to lnproxy to create an invoice with the correct parameters.

@lnproxy
Copy link
Owner

lnproxy commented Mar 22, 2023

That should be simple to add. Any preference for a parameter name for the spec https://github.com/lnproxy/spec ?

I'm curious about the use case though, if this semi-trusted party is creating proxy invoices on your behalf they could presumably have them point to any destination right? Similar trust model as a something like https://github.com/nbd-wtf/satdress except it's more difficult to figure out if the semi-trusted party is behaving badly. Or am I missing something?

@benthecarman
Copy link
Author

Any preference for a parameter name for the spec lnproxy/spec ?

Probably just amount_msats

I'm curious about the use case though ...

I am not sure how satdress works but the idea is to be able to load up a bunch of invoices that can later be served out on something like an lnurl, using the wrapped version for privacy and so it can work for lnurl by settings the desc_hash and amount

@lnproxy
Copy link
Owner

lnproxy commented Mar 23, 2023

I love the idea of pregenerating invoices. Completely removes the requirement of having to use tor to communicate with the semi-trusted party. I'll work on this today.

@lnproxy
Copy link
Owner

lnproxy commented Mar 23, 2023

satdress does what you want but has to talk to your node each time it needs an invoice. This might be interesting for you: nbd-wtf/satdress#42

@lnproxy
Copy link
Owner

lnproxy commented May 22, 2023

I've thought about this carefully and have decided not to add it to the main code base.

Trusting thee relay with zero amount invoices misses the point of a tool like lnproxy in the first place. If you're ok with trusting a third party, it would be much better, in terms of both payment success and fee costs, to simply use a custodial wallet and withdraw periodically.

I don't want lnproxy to be a trusted third party. The whole point is that anyone can run a rely and you don't have to trust them.

This line of thinking has even inspired me to remove a "feature" I had been supporting up to now: lnproxy will no longer accept zero-amount invoices. Only invoices with amounts can be relayed trustlessly.

@lnproxy lnproxy closed this as completed May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants