Pizza for (lightning) bitcoins?



Summary:

Laszlo Hanyecz, a Bitcoin enthusiast, recently tried out a real trade using the Lightning Network. He paid bitcoin using the lightning network and his friend arranged for pizza to be delivered to him. They improvised and decided that Laszlo would need to provide the payment hash preimage to the delivery driver in order to claim his pizza. When the pizza delivery arrived, Laszlo was asked "What is the preimage?" by the driver. At this point he paid the invoice and instantly received the preimage in return. The preimage was just the first and last 4 characters of the hex string. In c-lightning, one can get the preimage for the invoice by using the command 'sqlite3 ~/.lightning/lightningd.sqlite3 "SELECT quote(payment_key) FROM invoices ORDER BY id DESC LIMIT 1"'. Laszlo funded a channel on the blockchain and was given a bolt11 invoice which he decoded with the c-lightning cli to verify everything was as agreed. In conclusion, the goal was just to play around with c-lightning and do something more than shuffling a few satoshi back and forth. Maybe eventually pizza shops will have their own lightning nodes and customers can open channels to them directly.


Updated on: 2023-05-24T21:13:02.033255+00:00