Happy to present Cashu - a Chaumian Ecash wallet and mint with early #Bitcoin Lightning support.
Disclaimer: I'm not a cryptographer. There are likely serious bugs in Cashu. I've built this over the weekend, so it's very unfinished and probably broken.
Here is a quick video demonstration of what it looks like. The flow has changed a little bit so if you wanna try yourself, make sure to read the readme in the git repo.
Think of it this way: it's a custodial Bitcoin wallet in which the server does not know who owns what and who transacts with whom. It's a major privacy improvement over classical custodianship. Downside: lose your tokens (or your keys) and they are gone.
How does it work?
Simply put, the user generates a "token" with a specific value (let's say 100 sats), encrypts the token ("blinding") and sends it to the server. ...
Server signs the encrypted token ("blinded signature") and sends them back. User decrypts token and store it in their database. The server doesn't know what the decrypted token was.
How do you send tokens to someone else?
You can send tokens to another user via any means. The receiver then sends them to the server and requests new ones with the same value. The old ones get "burned" so they can't be double spent.
That's the basic mechanics summarized.
Is this like Fedimint?
Yes and no. This is not a federated mint (meaning multiple parties control it) though it could potentially be in the future. I'm no expert but I think the basic principles of handling the tokens should be similar (like with any Chaumian Ecash).
Fedimint is obviously a lot more advanced than Cashu and I'm a big fan of it. Fedimint rocks. This is not supposed to be any competition, I'm just learning and coding. But life is too short to wait for Fedimint to drop.
Does Cashu have Lightning support?
A little bit. From the Readme: Currently, only Lightning deposits work but not withdrawals. The server could vanish at any moment so *consider any Satoshis you deposit a donation*. ....
I will add Lightning withdrawals soon so unless someone comes up with a huge inflation bug, you might be able to claim them back at a later point in time.
Only mint small amounts that you want to play with and are ok to risk losing.
Why publish it at this early stage?
Because I don't mind. And because it's an open source project and I'm hoping that people will help me with it and especially with finding bugs. Again, I'm not a cryptographer so I expect bugs to be found in the crypto as well.
What are the next steps?
Obviously it needs quite some work. Immediate improvements would be improving the overall UX (it's terrible right now), adding full Lightning support, ...
building a P2P protocol for client-to-client token exchanges (@brian_trollz is helping with the design), integrating it into @LNbits, and so much more. It's open source, it needs your help.
What, you did all of this by yourself?!
Of course not. Much of the crypto mechanics is from @phyrooo's minicash which is an implementation of an old scheme from the cypherpunk list that @SomsenRuben has written down. A bunch of code is from @lnbits. Open source is beautiful.
Wait so can I try this now?
Yes, but only with a command line, don't expect fancy things. Install Cashu and use the test instance.
Here is a list of resources that I found helpful when setting up and managing my Lightning Network⚡️ node.
🧵👇
Finding good nodes to connect to can be hard. Lightning Node Match uses some basic network analysis to tell you which other nodes will improve the connectivity of yours when connected to. moneni.com/nodematch
LN Nodes Insight is similar in that it can simulate how your for example your network centrality changes when you connect to a specific node. Nice to have! lnnodeinsight.com