Skip to content

Make sending a bolt12 offer a standardized part of fetchinvoice #1203

@hMsats

Description

@hMsats

Allow any lightning wallet to include an offer in a standardized manner when paying a bolt11 invoice.

Let me give 2 examples where this is (very) useful.

A family goes on vacation to some country and rents an apartment for a week. The rent for that week will be $1000 but there is an obligatory deposit of $300 to cover the risk of damage during their stay. They book the apartment via a website, the website generates the bolt11 qr-code for $1300 and they pay it with their lightning wallet and the payment also includes the/an offer of that wallet. Now if they don't damage anything during their stay, the owner can pay back the $300 or less if there was some minor damage like breaking a cup. Since the wallet automatically included the offer, the family didn't had to insert any extra (complicated) information for the payback.

You play a lightning game where you can win some money, like my own game where you have to guess if the price of bitcoin will be higher of lower after a certain amount of time. Playing the game would go as follows:

  1. The player inserts 50 sats and clicks a button that the bitcoin price will be higher 24 hours from now.
  2. The game generates a qr-code for 52 sats (2 sats gaming fee included)
  3. The player pays the qr-code with his wallet (also sending his offer)
  4. It the bitcoin price is indeed higher after 24 hours, the player gets double the amount paid
  5. The game returns 100 sats to the player

Note that no registration was necessary to play the game, which always makes trying out a (lightning) game a bit annoying.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions