<div>Good morning Igor,<br></div><div><br></div><div>This is quite an interesting use-case for Lightning.<br></div><div><br></div><div>However it seems to me that the payer will need a direct channel to the payee, or at least the payment terminal (of the payee...?).<br></div><div><br></div><div>In addition the payer will need to somehow get blockchain information from the payee if the payer itself has no Internet.&nbsp; The payee may have an incentive to prevent the payer from knowing that timeouts have been reached, for example, and may withhold new blocks (although all censorship attacks I know of that could be used on LN target the payee and not the payer).<br></div><div><br></div><div>Is my understanding correct?<br></div><div><br></div><div><br></div><div>Regards,<br></div><div>ZmnSCPxj<br></div><div><br></div><div class="protonmail_signature_block"><div class="protonmail_signature_block-user protonmail_signature_block-empty"><br></div><div class="protonmail_signature_block-proton">Sent with <a href="https://protonmail.com" target="_blank">ProtonMail</a> Secure Email.<br></div></div><div><br></div><div>‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐<br></div><div> On April 5, 2018 5:46 PM, Igor Cota &lt;igor@codexapertus.com&gt; wrote:<br></div><div> <br></div><blockquote class="protonmail_quote" type="cite"><div dir="ltr"><div>Hello all,<br></div><div><br></div><div>I feel that one of the biggest promises of lightning lies in it being used for everyday retail payments.<br></div><div><br></div><div>I'd like to see a system that's:<br></div><div>1) instantaneous like the contactless bank cards of today<br></div><div>2) encodes a fancy HTML receipt in bolt11 for the payers future reference<br></div><div><br></div><div>QR codes are a bit unwieldy and even more so if you want a nice HTML table description of your grocery shopping with hundreds of items - this relatively large amount of data makes them impractical to scan.<br></div><div><br></div><div>To this end I've been running an instance of c-lightning on Android [1][2][3] and experimenting with payments via NFC. I set up a machine with an NFC USB dongle that acts as an point-of-sale terminal [4]. So far so good!<br></div><div><br></div><div>There are two basic ways you can use NFC enabled phones today - as passive tag readers or in card emulation mode (not sure if the latter is available on iOS).<br></div><div><br></div><div>Passive tags are really simple and encoding bolt11 to them works as expected. If you set the right MIME type Android will open whatever app is registered to handle lightning and you can either pay instantaneously or after user confirmation. Works great provided both the phone and terminal are connected to the network and have a route to each other.<br></div><div><br></div><div>Card emulation mode is more interesting because it enables us to have two way communication and therefore an ad hoc connection to the lightning network. After some handshaking, phone can tell the terminal that it wants to connect to lightning via NFC. All communication between these two lightning nodes can be done over NFC or even bluetooth [5]. This might be useful as fallback in situations where mobile data is not available.<br></div><div><br></div><div>I settled on a MIME type (application/lightning) and an NFC application id (LIGHTNING). There is also a very simple protocol to forward socket data. For the sake of interoperability it would be great if we agreed on some standards but I'm not sure how to proceed with this. Should these be part of a future BOLT or is mailing list banter enough?<br></div><div><br></div><div>I look forward to your views!<br></div><div><br></div><div>Cheers,<br></div><div>Igor<br></div><div><br></div><div><br></div><div>[1] <a href="https://github.com/ElementsProject/lightning/commit/bd95aba7a5f9bad8f447bf3de8f7e8cfe83751af">https://github.com/ElementsProject/lightning/commit/bd95aba7a5f9bad8f447bf3de8f7e8cfe83751af</a><br></div><div>[2] <a href="https://github.com/ElementsProject/lightning/commit/d4d1c4acb08efb6be4f491cdee5cb6dd4b84ddf7">https://github.com/ElementsProject/lightning/commit/d4d1c4acb08efb6be4f491cdee5cb6dd4b84ddf7</a><br></div><div>[3] <a href="https://github.com/ElementsProject/lightning/commit/bd95aba7a5f9bad8f447bf3de8f7e8cfe83751af">https://github.com/ElementsProject/lightning/commit/bd95aba7a5f9bad8f447bf3de8f7e8cfe83751af</a><br></div><div>[4] <a href="https://github.com/icota/presto">https://github.com/icota/presto</a><br></div><div>[5] <a href="https://github.com/ElementsProject/lightning/pull/1323">https://github.com/ElementsProject/lightning/pull/1323</a><br></div></div></blockquote><div><br></div>