Open trbouma opened 1 year ago
Interesting requirement. Definitely fits the Minibits direction I have in my mind. Even more if it is underlined by real use case. I will use upcoming holiday to think of it broader - it will require to extend the state model of proofs and transactions so that it's not just thrown in but properly integrated and think over corner cases.
At first glance the double spend problem seems like quite UX challenge - the situation as such is not different as if you would have your not yet redeemed coins received in Signal before pasting them into the wallet. Just in our case, wallet is already involved and the user expectation is that the coins were received. I will not be surprised if most effort would have been spent on this.
All in all 'Offline' could become e-cash distinctive feature let's say compared to lightning. Like it.
This is the use case: poor connectivity areas where there is a need to transact (markets). Everybody has phones that connect to wifi at the end of the day.
I am testing your app with a wifi-only phone
I see. I have already started working on that. With some luck, I should have an MVP implementation tonight (w/o automated redeem and a bit hacky but fair enough for alpha test). Will add a comment if I would be able to get it work before vacation, leaving tommorow mornig. Video very telling.
Later we should aim for offline SEND as well - should be logically doable if sender wallet has exact denomination but might require change to cashu-ts - I have not checked yet, one step at a time.
Nice! The offline (deferred redemption) use case is a BIG deal. Looking forward to what you put together. I will keep testing.
Did it. For quick test there is v0.0.5-alpha.9 ready for you. Please take it as an MVP:
I will make v0.0.6 native release out of this codebase. Many people just don't upgrade through OTA and test outright dangerous versions. After that I beleive I can go on vacation. Hope for no critical regression out of our OFFLINE project ;) Happy testing!
I tried it in airplane mode. Received a token offline and redeemed online. AWESOME!!! Have a great vacation!
New offline ability to SEND now available in v0.0.7-alpha
Very cool! Just tried it out. It works!
The wallet is working great so far. Scanning tokens is working perfectly. I tried with the phone not connected to the internet - it scanned the token but failed on the redemption (obviously)
What I require is the ability to accept tokens into the wallet when there is no internet connect. That means the token can be scanned in, stored locally, and when the phone re-connects to the internet the 'accepted' coins can be redeemed. I realize there is a double-spend risk to be mitigated, but that is better than not being able to accept the token at the time of transaction.
I don't think it would be a big deal to implement. My goal is to demonstrate this for a migrant worker use case. I was planning to build something myself, but this wallet is so close to what I am looking for, is that this is what I plan to propose instead.
Keep up the good work!!!
Cheers,
@trbouma