SwiftLightning icon indicating copy to clipboard operation
SwiftLightning copied to clipboard

Support BOLT#11 fallback

Open joshmh opened this issue 7 years ago • 0 comments

It would be really useful for all the lightning mobile wallets to support the fallback mode described in BOLT#11. This means that if the wallet comes across an old BIP21 URI, it will parse it as it does now, then look for a lighting parameter. If it finds it, it just takes that parameter and treats it as a regular lightning invoice. If not, it treats the URI as a regular Bitcoin URI.

This is especially important for Bitcoin ATMs. We can show a single QR code for everyone. If the user has a lightning wallet, they can send the funds instantly (and receive cash on the spot). If the user has an old Bitcoin-only wallet (currently the majority), they can just send Bitcoin. Eventually, lightning wallets could use the Bitcoin address to send large payments for which a path can't be found.

https://github.com/biscottigelato/SwiftLightning/blob/81aa62a7ccaf7bf3e80b3fc39dfc8ea18c9a34ea/ios/SwiftLightning/Models/Lightning%20Shim/LNManager.swift#L182

See: https://github.com/ACINQ/eclair-wallet/commit/56dd9c5f81fd70b0fb0cb0f7dea25c523205f2bd

https://twitter.com/meeDamian/status/1019505368760659968

joshmh avatar Jul 19 '18 08:07 joshmh