Closed FilipChalupa closed 2 years ago
I think there are security concerns or something, I don't know
I don't doubt that.
I will investigate then. I hope I am on the right track looking into alexbosworth/lightning/lnd_methods/invoices/create_invoice.js.
By diving deep into the lnd I've found out that the answer was right under my nose. The h
tag is sometimes called description_hash
which is supported by ln-service
. 🎉
By diving deep into the lnd I've found out that the answer was right under my nose. The
h
tag is sometimes calleddescription_hash
which is supported byln-service
. 🎉
Can you please share some code that could help us understand how you create a lnurl-pay flow if possible? Thanks!
you could look here https://github.com/alexbosworth/balanceofsatoshis/blob/master/lnurl/pay.js
@alexbosworth My problem is I'm trying to build a flow for lnurl pay but stuck with description_hash
.
Spec says it's sha256 of description or meta, but seems like I'm misunderstanding what value it should have exactly.
I asked on SO https://stackoverflow.com/questions/72366005/how-to-get-a-specific-hash-value-from-a-specific-string, and seemed like I got some clue but still not much luck.
When I try the flow via a mobile wallet like breez or BlueWallet, in most cases it shows "description has not found in invoice"
When I decode the invoice with some online tools, I indeed don't see h
in raw value and no description_hash
in parsed one.
I tried to pass all kinds of data via sha256 utils, bech32 lib, converting from this to that and vice versa.
Can you advise in what direction I should move?
By the way I managed to implement lnurl withdraw flow and it works in the wallets I use.
I'm not sure if I have an example for that other than the linked lnurl methods
I'm implementing LNURL service but can't get over the
h
tag requirement. https://github.com/lightningnetwork/lightning-rfc/blob/master/11-payment-encoding.md#requirements-3 Theh
tag is then required by a wallet. https://github.com/fiatjaf/lnurl-rfc/blob/luds/06.md#notes-on-metadata-for-server-side-lnurl-payPlease is there a way to include metadata hash in an invoice using
ln-service
or am I trying to do something which is not yet possible?