You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the value in the "x-preimage" header is required to be Base64, because that's the format that's used in listed invoices when executing lncli listinvoices. Not only for preimages, but also for their hashes.
But on the other hand the LightningClient's method LookupInvoice(...) expects a hex-encoded payment hash.
That's why in our package, when receiving a request with a correct x-preimage header, we need to:
Base64 Decode the preimage
Sha256 the previous value
Hex the previous value
Send it to lnd
So:
Figure out which format is best for using in the header (Plain preimage, Base64 or hex)
Change our implementation in case it's not Base64
Document which format is expected
The text was updated successfully, but these errors were encountered:
Currently the value in the "x-preimage" header is required to be Base64, because that's the format that's used in listed invoices when executing
lncli listinvoices
. Not only for preimages, but also for their hashes.But on the other hand the
LightningClient
's methodLookupInvoice(...)
expects a hex-encoded payment hash.That's why in our package, when receiving a request with a correct x-preimage header, we need to:
So:
The text was updated successfully, but these errors were encountered: