0

To broadcast on-chain Bitcoin transaction offline we need transaction hex which should be sent to a device which is online. Example: Government has shutdown internet in an area, text messaging still works so Alice can create a signed transaction, copy transaction hex and send it via text message to Bob who can broadcast this transaction (sendrawtransaction) because Internet works at his place.

How does this work for LN? I have not experimented enough with LN so not sure about everything involved. Tried doing it in Electrum 4.1.2 (testnet) but couldn't find necessary information and commands.

  1. Bob creates an invoice for 0.001 BTC and sends it to Alice using text message
lntb1m1psdd0c3pp539vpce5yrw2zk0w23h0p4pnst58d9jfuugx2qmmmyw8zgz09q03ssp5a9ahkkj45k3e5a3q3ftnagqy27zrm0m7g9aknlrjpu5fce2k27nsdqqcqzynxqyjw5q9qxpq9qsqrzjqwfn3p9278ttzzpe0e00uhyxhned3j5d9acqak5emwfpflp8z2cng85awqqqq8gqqgqqqqlgqqqqqeqqjqtz9qwfn3p9278ttzzpe0e00uhyxhned3j5d9acqak5emwfpflp8z2cngqqqq05qqqqqvsqfqqxkhjszx8ftlnljk0uk6an5d6ksyhxrfgn4x7sgq7j48agj948n9gr2tn64qrxe84jczxwr56dtr9mw7al52awrl7alxn7pu68ndckgqhd7cz5
  1. Alice pastes it in Electrum and click on "save"

ln-invoice-pay

Invoice details:

ln-invoice-details

How do I use any of this information from the invoice which can be sent to Bob so that LN 0.001 BTC invoice is paid?

LN commands in Electrum: https://github.com/spesmilo/electrum/blob/3bc8ef6651ed9d9aff0531b3597f80eca4886301/electrum/commands.py#L1001

2

Lightning has an inherent liveliness requirement too it. To receive payments, Bob needs to be online to setup HTLCs on his commitment transaction and and then reveal the corresponding preimages to claim payments to atomically transfer the funds across the Lightning Network.

If Bob were to go offline due to a region wide shutdown of the internet, he would no longer be able to receive payments on the LN. Alice wouldn't be able to find a route to Bob, since he isn't online!

This is much different then sending bitcoin transactions onchain. Bob does NOT need to be online to receive bitcoin onchain. He can simply text the address to Alice, and then sign on 1 year later and verify Alice made the payment.

Of course, if Bob is a merchant sending goods/services to Alice, he should not send the goods and services until he can verify Alice sent the payment onchain.

0

Workaround:

  1. Run LN node and wallet on a VPS with some funds
  2. Use text messaging API provided by some third party
  3. Listen for incoming messages
  4. Send text mesaage with LN invoice which will be used to pay automatically
  5. Send sucesss or error message as text message to number which sent the initial message

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.