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
  1. Alice pastes it in Electrum and click on "save"


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 Answers 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.



  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 and acknowledge you have read our privacy policy.