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

What are the preimages of the payment hashes of the Bolt11 Examples? #683

Sword-Smith opened this issue Oct 10, 2019 · 2 comments


Copy link

@Sword-Smith Sword-Smith commented Oct 10, 2019

The Bolt11 examples use payment hashes such as 000102.... uint256 numbers for which the preimage is unknown. If people are writing software that verifies that the payment_hash is actually the sha256(x), then it would be nice to include x in the breakdown of these invoices.


This comment has been minimized.

Copy link

@t-bast t-bast commented Oct 11, 2019

Why would you care about preimages when testing invoice encoding?

The goal of the Bolts is to try to break the protocol into different components that can be as independent as possible (it's proving to be hard in many places, but at least that's the goal).

Bolt 11 is only about payment encoding. Thus the examples should how you encode and decode some sample invoices. Invoices know nothing about the payment preimage, so there's no reason to test that at this level.


This comment has been minimized.

Copy link

@Roasbeef Roasbeef commented Nov 22, 2019

Yep, I can hand you a payment hash and you can create an invoice for that without you ever learning of the preimage.

@Roasbeef Roasbeef closed this Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
3 participants
You can’t perform that action at this time.