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

Invoice creation: cannot add memo when using v2 endpoint? #489

Open
raucao opened this issue Apr 18, 2024 · 1 comment
Open

Invoice creation: cannot add memo when using v2 endpoint? #489

raucao opened this issue Apr 18, 2024 · 1 comment

Comments

@raucao
Copy link

raucao commented Apr 18, 2024

For lnurlp and Lightning Address, we currently add a memo containing the optional payer-created "comment", so that the payee can read the comment in their transaction history. However, as per LNURL specs, the description actually has to contain a different string that is already announced before a payer can add their comment.

With the v1 endpoint addinvoice, you can add the memo property, and only a hash of the actual description (which is fine, since the wallet can display the description from the lnurlp discovery endpoint it queried beforehand). However, with the v2 endpoint /invoices, it seems that you can only give it the actual description property, but not a memo.

Basically, the question is if it's possible with the v2 endpoint to store a normal comment as the memo, while also implementing LUD-06 correctly, i.e. the description hash is a hash of a metadata array, not just a comment/text.

Maybe I'm understanding something wrong here, in which case you can just treat this issue as an informational/support/docs one.

@bumi
Copy link
Contributor

bumi commented May 8, 2024

re v2 endpoint. I think it is just a different naming. the description is the memo
there is description/memo and the description_hash and the BOLT11 spec is actually pretty strange about this. and the hash should be used if the description is longer than x chars.

I think LND now allows setting both description and description_hash. but for the spec it's actually more correct to only set the description_hash.

but there is also a push to drop the description_hash in the LNURL spec: lnurl/luds#234

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