Mutiny Web PPPs: Week 2 🚀
This week we turned Mutiny Web into an on-chain wallet! We can send and receive using BDK and sync with a blockchain source to find out how rich we are (on testnet). We didn't make as much LDK progress as we would've liked, but we've decided to do it "slow and steady" to make sure we truly understand how we're using LDK. There's a ton of potential complexity in an LDK-based node and we don't want to introduce any undue complexity ourselves due to a shortage of understanding. Our plan is to "pair program" the LDK stuff until it really clicks for all three of us.
Progress ✅
-
Implemented localstorage
-
Stored seeds into local browser storage
-
Gave up on Gitea because we couldn't find a good enough CI solution (RIP Gitea, you were great!)
-
Added Github CI/CD
-
Deployed Mutiny as a website: https://bitcoindevshop.github.io/mutiny-web-poc/
-
Added BDK: https://github.com/bitcoindevkit/bdk
-
Save BDK wallet to localstorage
-
Create receive addresses with BDK wallet
-
Sync with Blockstream Esplora: https://github.com/Blockstream/esplora
-
Implemented send with BDK
-
Encrypt seed to localstorage
-
Can create LDK "nodes" (just the pubkey part)
-
Save LDK nodes to disk
-
Created websocket to TCP proxy
Problems ✋
-
Implementing a full "node" based on LDK is a huge undertaking, so we've decided to take it slow and team up on implementing this part to make sure we spread out the understanding. Tony's already implemented two LDK nodes (Hidden Lightning Network and LNsploit) and it's not fair to make him do a third one all by himself.
-
Local storage is probably too slow for how we're using it right now. BDK has plans to change its "Database" strategy that will be very welcome: https://bitcoindevkit.org/blog/bdk-core-pt1/#how-to-store-and-index-transactions
-
We investigated Indexed DB but the async / sync mismatch with some BDK and LDK storage traits makes it too much of a hassle to follow through with right now. We decided to punt on storage performance for now.
Plans 📆
-
Create client-side websocket to TCP proxy (implement LDK traits to use our proxy for node peer connections basically)
-
Implement enough LDK components to create a connection with a peer on the lightning network
-
Start working on the UI a bit (we have a browser on-chain wallet now, why not make nice to use?)