(ios) Playground: Bolt Card + Phoenix Wallet #665
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The Bolt Card allows for bitcoin payments over the lightning network using a contactless payment card.
This PR:
This is a playground / draft PR, with the goal of developing and testing Bolt Card version 2 - a new version that replaces LNURL with modern lightning network communication.
There's a LOT to explain here, so I've broken it down into sections.
User Experience
It's super easy to link a card to your wallet. Just tap the "create new debit card" button, and then tap the card to the upper-half of the iPhone.
nfc_write_720p.mov
After that the user is free to manage their card however they want:
When they make a payment with the card, they will see a notification on their phone:
NTAG 424 DNA
The NFC card that's used is called NTAG 424 DNA
This type of card can be used for many different things. But it also has the attributes needed to perform card payments. In particular, it has AES encryption plus a built-in counter that gets incremented everytime the card is read.
Here's the cliff notes version of how it works:
When you program the card, you write:
Then when the card is read, it will:
counter
variablepicc
data:cmac
(message authentication code):Then general idea is:
Lnurl-Withdraw
The Bolt Card was initially released several years ago. Long before Bolt 12 was standardized and widely deployed. Thus it's completely understandable that they opted to use lnurl-withdraw.
However, the use of lnurl-withdraw means:
There's not many problems with this design if you're operating a custodial wallet service. But if you're designing a non-custodial wallet, then there are lots of problems. Thus the desire for an updated version that takes advantage of modern lightning technologies.
(Similar to how BIP-353 is replacing lnurl-pay for lightning addresses.)
Host Card Emulation (like Apple Pay)
It is my understanding that we do NOT need any special permission from Apple to allow either reading NFC cards, or writing to them within our app.
This is in stark contrast to doing Host Card Emulation, where the phone itself acts as an NFC card, and sends data to a reader (i.e. like when using Apple Pay)
However, you must obtain special permission from Apple to use this technology. Here's the details for obtaining permission in the European Economic Area. And here's the details for obtaining permission in the USA.
However, note that even if Apple decides to give you permission to use the technology, it can only be used in an "eligible territory", which Apple decides. And there are more people in the world living outside these "eligible territories" than inside.
Task List: