This was inspired by my shadows c-lightning plugin.

It's a way for people on noncustodial mobile wallets to receive payments asynchronously and trustlessly.

Imagine there's an user Bob who uses a Lightning mobile wallet such as BLW. Bob wants to receive a payment from Alice, so he's going to send her an invoice. But he doesn't know when will Alice see his message or if she's going to pay immediately. If he doesn't keep his mobile wallet open her payment will fail.

On my c-lightning node I have a plugin that controls a Telegram bot.

Bob can then generate an invoice on this wallet, open a chat with that bot and send the invoice.

The bot will generate a new invoice passing through it using the same hash (this is important because this means the bot can't steal the payment from Bob). Let's call that an awaitable invoice. Bob sends the awaitable invoice to Alice and can close his wallet.

5 hours later Alice decides to pay Bob. She sends a payment from her wallet. The c-lightning plugin will intercept that payment and send a message to Bob through the bot. Bob will get a notification on his Telegram.

The bot will wait up to 30 minutes for Bob to see the notification, open his wallet and press "ok" at the bot. Then the bot will pay Bob's original invoice, get the preimage for the hash and release it to Alice.

Built With

  • c-lightning
  • go
Share this project:

Updates