Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
The Bolt11 examples use payment hashes such as
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.